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
39,100
nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int)
ng-log[P]ng-log/src/signalhandler.cc
void AppendUint64(uint64 number, unsigned radix) { unsigned i = 0; while (cursor_ + i < end_) { const uint64 tmp = number % radix; number /= radix; cursor_[i] = static_cast<char>(tmp < 10 ? '0' + tmp : 'a' + tmp - 10); ++i; if (number == 0) { break; } } // Reverse the bytes written. std::reverse(cursor_, cursor_ + i); cursor_ += i; }
O0
cpp
nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movl $0x0, -0x18(%rbp) movq -0x28(%rbp), %rcx movq 0x8(%rcx), %rax movl -0x18(%rbp), %edx addq %rdx, %rax cmpq 0x10(%rcx), %rax jae 0x68978 movq -0x10(%rbp), %rax movl -0x14(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rdx, -0x20(%rbp) movl -0x14(%rbp), %eax movl %eax, %ecx movq -0x10(%rbp), %rax xorl %edx, %edx divq %rcx movq %rax, -0x10(%rbp) cmpq $0xa, -0x20(%rbp) jae 0x6893d movq -0x20(%rbp), %rax addq $0x30, %rax movq %rax, -0x30(%rbp) jmp 0x6894d movq -0x20(%rbp), %rax addq $0x61, %rax subq $0xa, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movb %cl, %dl movq 0x8(%rax), %rax movl -0x18(%rbp), %ecx movb %dl, (%rax,%rcx) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x68973 jmp 0x68978 jmp 0x688f2 movq -0x28(%rbp), %rax movq 0x8(%rax), %rdi movq 0x8(%rax), %rsi movl -0x18(%rbp), %eax addq %rax, %rsi callq 0x68d00 movq -0x28(%rbp), %rax movl -0x18(%rbp), %edx movq 0x8(%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, 0x8(%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov [rbp+var_28], rax mov [rbp+var_18], 0 loc_688F2: mov rcx, [rbp+var_28] mov rax, [rcx+8] mov edx, [rbp+var_18] add rax, rdx cmp rax, [rcx+10h] jnb short loc_68978 mov rax, [rbp+var_10] mov ecx, [rbp+var_14] xor edx, edx div rcx mov [rbp+var_20], rdx mov eax, [rbp+var_14] mov ecx, eax mov rax, [rbp+var_10] xor edx, edx div rcx mov [rbp+var_10], rax cmp [rbp+var_20], 0Ah jnb short loc_6893D mov rax, [rbp+var_20] add rax, 30h ; '0' mov [rbp+var_30], rax jmp short loc_6894D loc_6893D: mov rax, [rbp+var_20] add rax, 61h ; 'a' sub rax, 0Ah mov [rbp+var_30], rax loc_6894D: mov rax, [rbp+var_28] mov rcx, [rbp+var_30] mov dl, cl mov rax, [rax+8] mov ecx, [rbp+var_18] mov [rax+rcx], dl mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax cmp [rbp+var_10], 0 jnz short loc_68973 jmp short loc_68978 loc_68973: jmp loc_688F2 loc_68978: mov rax, [rbp+var_28] mov rdi, [rax+8] mov rsi, [rax+8] mov eax, [rbp+var_18] add rsi, rax call _ZSt7reverseIPcEvT_S1_; std::reverse<char *>(char *,char *) mov rax, [rbp+var_28] mov edx, [rbp+var_18] mov rcx, [rax+8] mov edx, edx add rcx, rdx mov [rax+8], rcx add rsp, 30h pop rbp retn
nglog::_anonymous_namespace_::MinimalFormatter * nglog::`anonymous namespace'::MinimalFormatter::AppendUint64( nglog::_anonymous_namespace_::MinimalFormatter *this, unsigned long long a2, unsigned int a3) { nglog::_anonymous_namespace_::MinimalFormatter *result; // rax char v4; // [rsp+0h] [rbp-30h] unsigned long long v5; // [rsp+10h] [rbp-20h] unsigned int v6; // [rsp+18h] [rbp-18h] v6 = 0; do { if ( (unsigned long long)v6 + *((_QWORD *)this + 1) >= *((_QWORD *)this + 2) ) break; v5 = a2 % a3; a2 /= a3; v4 = v5 >= 0xA ? v5 + 87 : (unsigned __int8)v5 + 48; *(_BYTE *)(*((_QWORD *)this + 1) + v6++) = v4; } while ( a2 ); std::reverse<char *>(*((_QWORD *)this + 1), v6 + *((_QWORD *)this + 1)); result = this; *((_QWORD *)this + 1) += v6; return result; }
AppendUint64: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x18],0x0 LAB_001688f2: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RCX + 0x8] MOV EDX,dword ptr [RBP + -0x18] ADD RAX,RDX CMP RAX,qword ptr [RCX + 0x10] JNC 0x00168978 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x20],RDX MOV EAX,dword ptr [RBP + -0x14] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x20],0xa JNC 0x0016893d MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x30 MOV qword ptr [RBP + -0x30],RAX JMP 0x0016894d LAB_0016893d: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x61 SUB RAX,0xa MOV qword ptr [RBP + -0x30],RAX LAB_0016894d: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV DL,CL MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x18] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00168973 JMP 0x00168978 LAB_00168973: JMP 0x001688f2 LAB_00168978: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RBP + -0x18] ADD RSI,RAX CALL 0x00168d00 MOV RAX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x8] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX ADD RSP,0x30 POP RBP RET
/* nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) */ void __thiscall nglog::(anonymous_namespace)::MinimalFormatter::AppendUint64 (MinimalFormatter *this,ulong param_1,uint param_2) { ulong uVar1; char local_38; uint local_20; ulong local_18; local_20 = 0; local_18 = param_1; do { if (*(ulong *)(this + 0x10) <= *(long *)(this + 8) + (ulong)local_20) break; uVar1 = local_18 % (ulong)param_2; local_18 = local_18 / param_2; local_38 = (char)uVar1; if (uVar1 < 10) { local_38 = local_38 + '0'; } else { local_38 = local_38 + 'W'; } *(char *)(*(long *)(this + 8) + (ulong)local_20) = local_38; local_20 = local_20 + 1; } while (local_18 != 0); std::reverse<char*>(*(char **)(this + 8),(char *)(*(long *)(this + 8) + (ulong)local_20)); *(ulong *)(this + 8) = *(long *)(this + 8) + (ulong)local_20; return; }
39,101
nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int)
ng-log[P]ng-log/src/signalhandler.cc
void AppendUint64(uint64 number, unsigned radix) { unsigned i = 0; while (cursor_ + i < end_) { const uint64 tmp = number % radix; number /= radix; cursor_[i] = static_cast<char>(tmp < 10 ? '0' + tmp : 'a' + tmp - 10); ++i; if (number == 0) { break; } } // Reverse the bytes written. std::reverse(cursor_, cursor_ + i); cursor_ += i; }
O1
cpp
nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int): movl %edx, %r8d xorl %ecx, %ecx movl %ecx, %r9d addq 0x8(%rdi), %r9 cmpq 0x10(%rdi), %r9 jae 0x303be movq %rsi, %rax xorl %edx, %edx divq %r8 leal 0x57(%rdx), %r10d movl %edx, %r11d orb $0x30, %r11b cmpq $0xa, %rdx movzbl %r11b, %edx movzbl %r10b, %r10d cmovbl %edx, %r10d movb %r10b, (%r9) incl %ecx cmpq %r8, %rsi movq %rax, %rsi jae 0x30381 movq 0x8(%rdi), %rdx movl %ecx, %eax testl %ecx, %ecx setne %sil leaq (%rdx,%rax), %rcx decq %rcx cmpq %rdx, %rcx seta %r8b andb %sil, %r8b cmpb $0x1, %r8b jne 0x30401 incq %rdx movb -0x1(%rdx), %sil movb (%rcx), %r8b movb %r8b, -0x1(%rdx) movb %sil, (%rcx) decq %rcx leaq 0x1(%rdx), %rsi cmpq %rcx, %rdx movq %rsi, %rdx jb 0x303e4 addq %rax, 0x8(%rdi) retq
_ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj: mov r8d, edx xor ecx, ecx loc_30381: mov r9d, ecx add r9, [rdi+8] cmp r9, [rdi+10h] jnb short loc_303BE mov rax, rsi xor edx, edx div r8 lea r10d, [rdx+57h] mov r11d, edx or r11b, 30h cmp rdx, 0Ah movzx edx, r11b movzx r10d, r10b cmovb r10d, edx mov [r9], r10b inc ecx cmp rsi, r8 mov rsi, rax jnb short loc_30381 loc_303BE: mov rdx, [rdi+8] mov eax, ecx test ecx, ecx setnz sil lea rcx, [rdx+rax] dec rcx cmp rcx, rdx setnbe r8b and r8b, sil cmp r8b, 1 jnz short loc_30401 inc rdx loc_303E4: mov sil, [rdx-1] mov r8b, [rcx] mov [rdx-1], r8b mov [rcx], sil dec rcx lea rsi, [rdx+1] cmp rdx, rcx mov rdx, rsi jb short loc_303E4 loc_30401: add [rdi+8], rax retn
long long nglog::`anonymous namespace'::MinimalFormatter::AppendUint64( nglog::_anonymous_namespace_::MinimalFormatter *this, unsigned long long a2, unsigned int a3) { unsigned int v3; // ecx _BYTE *v4; // r9 char v5; // r10 bool v6; // cf unsigned long long v7; // rdx long long result; // rax bool v9; // si _BYTE *v10; // rcx unsigned long long v11; // rdx char v12; // si v3 = 0; do { v4 = (_BYTE *)(*((_QWORD *)this + 1) + v3); if ( (unsigned long long)v4 >= *((_QWORD *)this + 2) ) break; v5 = a2 % a3 + 87; if ( a2 % a3 < 0xA ) v5 = (a2 % a3) | 0x30; *v4 = v5; ++v3; v6 = a2 < a3; a2 /= a3; } while ( !v6 ); v7 = *((_QWORD *)this + 1); result = v3; v9 = v3 != 0; v10 = (_BYTE *)(v7 + v3 - 1); if ( v9 && (unsigned long long)v10 > v7 ) { v11 = v7 + 1; do { v12 = *(_BYTE *)(v11 - 1); *(_BYTE *)(v11 - 1) = *v10; *v10-- = v12; v6 = v11++ < (unsigned long long)v10; } while ( v6 ); } *((_QWORD *)this + 1) += result; return result; }
AppendUint64: MOV R8D,EDX XOR ECX,ECX LAB_00130381: MOV R9D,ECX ADD R9,qword ptr [RDI + 0x8] CMP R9,qword ptr [RDI + 0x10] JNC 0x001303be MOV RAX,RSI XOR EDX,EDX DIV R8 LEA R10D,[RDX + 0x57] MOV R11D,EDX OR R11B,0x30 CMP RDX,0xa MOVZX EDX,R11B MOVZX R10D,R10B CMOVC R10D,EDX MOV byte ptr [R9],R10B INC ECX CMP RSI,R8 MOV RSI,RAX JNC 0x00130381 LAB_001303be: MOV RDX,qword ptr [RDI + 0x8] MOV EAX,ECX TEST ECX,ECX SETNZ SIL LEA RCX,[RDX + RAX*0x1] DEC RCX CMP RCX,RDX SETA R8B AND R8B,SIL CMP R8B,0x1 JNZ 0x00130401 INC RDX LAB_001303e4: MOV SIL,byte ptr [RDX + -0x1] MOV R8B,byte ptr [RCX] MOV byte ptr [RDX + -0x1],R8B MOV byte ptr [RCX],SIL DEC RCX LEA RSI,[RDX + 0x1] CMP RDX,RCX MOV RDX,RSI JC 0x001303e4 LAB_00130401: ADD qword ptr [RDI + 0x8],RAX RET
/* nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) */ void __thiscall nglog::(anonymous_namespace)::MinimalFormatter::AppendUint64 (MinimalFormatter *this,ulong param_1,uint param_2) { int1 uVar1; int1 *puVar2; int1 auVar3 [16]; int1 auVar4 [16]; byte bVar5; uint uVar6; int1 *puVar7; int1 *puVar8; ulong uVar9; byte bVar10; bool bVar11; uVar9 = CONCAT44(0,param_2); uVar6 = 0; do { if (*(byte **)(this + 0x10) <= (byte *)((ulong)uVar6 + *(long *)(this + 8))) break; auVar3._8_8_ = 0; auVar3._0_8_ = uVar9; auVar4._8_8_ = 0; auVar4._0_8_ = param_1; bVar5 = SUB161(auVar4 % auVar3,0); bVar10 = bVar5 + 0x57; if (SUB168(auVar4 % auVar3,0) < 10) { bVar10 = bVar5 | 0x30; } *(byte *)((ulong)uVar6 + *(long *)(this + 8)) = bVar10; uVar6 = uVar6 + 1; bVar11 = uVar9 <= param_1; param_1 = param_1 / uVar9; } while (bVar11); puVar2 = *(int1 **)(this + 8); puVar7 = puVar2 + ((ulong)uVar6 - 1); if (puVar2 < puVar7 && uVar6 != 0) { do { puVar8 = puVar2 + 1; uVar1 = *puVar2; *puVar2 = *puVar7; *puVar7 = uVar1; puVar7 = puVar7 + -1; puVar2 = puVar8; } while (puVar8 < puVar7); } *(ulong *)(this + 8) = *(long *)(this + 8) + (ulong)uVar6; return; }
39,102
init_functions
eloqsql/mysys/mf_iocache.c
static void init_functions(IO_CACHE* info) { enum cache_type type= info->type; info->read_function = 0; /* Force a core if used */ info->write_function = 0; /* Force a core if used */ switch (type) { case READ_NET: /* Must be initialized by the caller. The problem is that _my_b_net_read has to be defined in sql directory because of the dependency on THD, and therefore cannot be visible to programs that link against mysys but know nothing about THD, such as myisamchk */ DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); break; case SEQ_READ_APPEND: info->read_function = _my_b_seq_read; DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); break; case READ_CACHE: if (info->myflags & MY_ENCRYPT) { DBUG_ASSERT(info->share == 0); info->read_function = _my_b_encr_read; break; } /* fall through */ case WRITE_CACHE: if (info->myflags & MY_ENCRYPT) { info->write_function = _my_b_encr_write; break; } /* fall through */ case READ_FIFO: DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); info->read_function = info->share ? _my_b_cache_read_r : _my_b_cache_read; info->write_function = info->share ? _my_b_cache_write_r : _my_b_cache_write; break; case TYPE_NOT_SET: DBUG_ASSERT(0); break; } if (type == READ_CACHE || type == WRITE_CACHE || type == SEQ_READ_APPEND) info->myflags|= MY_FULL_IO; else info->myflags&= ~MY_FULL_IO; }
O3
c
init_functions: pushq %rbp movq %rsp, %rbp movl 0xb0(%rdi), %eax xorps %xmm0, %xmm0 movups %xmm0, 0xa0(%rdi) decl %eax cmpl $0x3, %eax ja 0x530c9 leaq 0xa0(%rdi), %rcx leaq 0x48610(%rip), %rdx # 0x9b678 movslq (%rdx,%rax,4), %rsi addq %rdx, %rsi jmpq *%rsi testb $0x40, 0xf8(%rdi) je 0x5308f leaq 0x362bb7(%rip), %rax # 0x3b5c38 movq (%rax), %rax jmp 0x530e3 testb $0x40, 0xf8(%rdi) jne 0x530e8 cmpq $0x0, 0x98(%rdi) leaq 0x18ea(%rip), %rcx # 0x54988 leaq 0x8b1(%rip), %rdx # 0x53956 cmoveq %rcx, %rdx movq %rdx, 0xa0(%rdi) leaq 0x1cea(%rip), %rcx # 0x54da1 leaq 0xbde(%rip), %rdx # 0x53c9c cmoveq %rcx, %rdx movq %rdx, 0xa8(%rdi) cmpl $0x2, %eax jbe 0x530f9 movl $0xfffffdff, %eax # imm = 0xFFFFFDFF andq %rax, 0xf8(%rdi) jmp 0x53100 leaq 0x1409(%rip), %rax # 0x544ec movq %rax, (%rcx) jmp 0x530f9 leaq 0x362b51(%rip), %rax # 0x3b5c40 movq (%rax), %rax movq %rax, 0xa8(%rdi) orb $0x2, 0xf9(%rdi) popq %rbp retq
init_functions: push rbp mov rbp, rsp mov eax, [rdi+0B0h] xorps xmm0, xmm0 movups xmmword ptr [rdi+0A0h], xmm0 dec eax; switch 4 cases cmp eax, 3 ja short def_5306F; jumptable 000000000005306F default case lea rcx, [rdi+0A0h] lea rdx, jpt_5306F movsxd rsi, ds:(jpt_5306F - 9B678h)[rdx+rax*4] add rsi, rdx jmp rsi; switch jump loc_53071: test byte ptr [rdi+0F8h], 40h; jumptable 000000000005306F case 1 jz short loc_5308F; jumptable 000000000005306F case 4 lea rax, _my_b_encr_read mov rax, [rax] jmp short loc_530E3 loc_53086: test byte ptr [rdi+0F8h], 40h; jumptable 000000000005306F case 2 jnz short loc_530E8 loc_5308F: cmp qword ptr [rdi+98h], 0; jumptable 000000000005306F case 4 lea rcx, _my_b_cache_read lea rdx, _my_b_cache_read_r cmovz rdx, rcx mov [rdi+0A0h], rdx lea rcx, _my_b_cache_write lea rdx, _my_b_cache_write_r cmovz rdx, rcx mov [rdi+0A8h], rdx def_5306F: cmp eax, 2; jumptable 000000000005306F default case jbe short loc_530F9 mov eax, 0FFFFFDFFh and [rdi+0F8h], rax jmp short loc_53100 loc_530DC: lea rax, _my_b_seq_read; jumptable 000000000005306F case 3 loc_530E3: mov [rcx], rax jmp short loc_530F9 loc_530E8: lea rax, _my_b_encr_write mov rax, [rax] mov [rdi+0A8h], rax loc_530F9: or byte ptr [rdi+0F9h], 2 loc_53100: pop rbp retn
long long init_functions(long long a1) { int v1; // eax long long result; // rax bool v3; // zf long long ( *v4)(); // rdx long long ( *v5)(); // rdx v1 = *(_DWORD *)(a1 + 176); *(_OWORD *)(a1 + 160) = 0LL; result = (unsigned int)(v1 - 1); switch ( (int)result ) { case 0: if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 ) goto LABEL_5; result = my_b_encr_read; goto LABEL_13; case 1: if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 ) goto LABEL_5; result = my_b_encr_write; *(_QWORD *)(a1 + 168) = my_b_encr_write; goto LABEL_15; case 2: result = (long long)my_b_seq_read; LABEL_13: *(_QWORD *)(a1 + 160) = result; goto LABEL_15; case 3: LABEL_5: v3 = *(_QWORD *)(a1 + 152) == 0LL; v4 = my_b_cache_read_r; if ( !*(_QWORD *)(a1 + 152) ) v4 = my_b_cache_read; *(_QWORD *)(a1 + 160) = v4; v5 = my_b_cache_write_r; if ( v3 ) v5 = my_b_cache_write; *(_QWORD *)(a1 + 168) = v5; goto LABEL_10; default: LABEL_10: if ( (unsigned int)result <= 2 ) { LABEL_15: *(_BYTE *)(a1 + 249) |= 2u; } else { result = 4294966783LL; *(_QWORD *)(a1 + 248) &= 0xFFFFFDFFuLL; } return result; } }
init_functions: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI + 0xb0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0xa0],XMM0 DEC EAX CMP EAX,0x3 JA 0x001530c9 LEA RCX,[RDI + 0xa0] LEA RDX,[0x19b678] MOVSXD RSI,dword ptr [RDX + RAX*0x4] ADD RSI,RDX switchD: JMP RSI caseD_0: TEST byte ptr [RDI + 0xf8],0x40 JZ 0x0015308f LEA RAX,[0x4b5c38] MOV RAX,qword ptr [RAX] JMP 0x001530e3 caseD_1: TEST byte ptr [RDI + 0xf8],0x40 JNZ 0x001530e8 caseD_3: CMP qword ptr [RDI + 0x98],0x0 LEA RCX,[0x154988] LEA RDX,[0x153956] CMOVZ RDX,RCX MOV qword ptr [RDI + 0xa0],RDX LEA RCX,[0x154da1] LEA RDX,[0x153c9c] CMOVZ RDX,RCX MOV qword ptr [RDI + 0xa8],RDX LAB_001530c9: CMP EAX,0x2 JBE 0x001530f9 MOV EAX,0xfffffdff AND qword ptr [RDI + 0xf8],RAX JMP 0x00153100 caseD_2: LEA RAX,[0x1544ec] LAB_001530e3: MOV qword ptr [RCX],RAX JMP 0x001530f9 LAB_001530e8: LEA RAX,[0x4b5c40] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa8],RAX LAB_001530f9: OR byte ptr [RDI + 0xf9],0x2 LAB_00153100: POP RBP RET
void init_functions(long param_1) { uint uVar1; code *pcVar2; bool bVar3; *(int8 *)(param_1 + 0xa0) = 0; *(int8 *)(param_1 + 0xa8) = 0; uVar1 = *(int *)(param_1 + 0xb0) - 1; if (3 < uVar1) goto LAB_001530c9; switch(uVar1) { case 0: pcVar2 = _my_b_encr_read; if ((*(byte *)(param_1 + 0xf8) & 0x40) == 0) goto switchD_0015306f_caseD_3; break; case 1: if ((*(byte *)(param_1 + 0xf8) & 0x40) != 0) { *(int8 *)(param_1 + 0xa8) = _my_b_encr_write; goto LAB_001530f9; } case 3: switchD_0015306f_caseD_3: bVar3 = *(long *)(param_1 + 0x98) == 0; pcVar2 = _my_b_cache_read_r; if (bVar3) { pcVar2 = _my_b_cache_read; } *(code **)(param_1 + 0xa0) = pcVar2; pcVar2 = _my_b_cache_write_r; if (bVar3) { pcVar2 = _my_b_cache_write; } *(code **)(param_1 + 0xa8) = pcVar2; LAB_001530c9: if (2 < uVar1) { *(ulong *)(param_1 + 0xf8) = *(ulong *)(param_1 + 0xf8) & 0xfffffdff; return; } goto LAB_001530f9; case 2: pcVar2 = _my_b_seq_read; } *(code **)(param_1 + 0xa0) = pcVar2; LAB_001530f9: *(byte *)(param_1 + 0xf9) = *(byte *)(param_1 + 0xf9) | 2; return; }
39,103
die
eloqsql/client/mysqldump.c
static void die(int error_num, const char* fmt_reason, ...) { char buffer[1000]; va_list args; va_start(args,fmt_reason); my_vsnprintf(buffer, sizeof(buffer), fmt_reason, args); va_end(args); fprintf(stderr, "%s: %s\n", my_progname_short, buffer); fflush(stderr); ignore_errors= 0; /* force the exit */ maybe_exit(error_num); }
O0
c
die: pushq %rbp movq %rsp, %rbp subq $0x4e0, %rsp # imm = 0x4E0 testb %al, %al je 0x38de7 movaps %xmm0, -0x4a0(%rbp) movaps %xmm1, -0x490(%rbp) movaps %xmm2, -0x480(%rbp) movaps %xmm3, -0x470(%rbp) movaps %xmm4, -0x460(%rbp) movaps %xmm5, -0x450(%rbp) movaps %xmm6, -0x440(%rbp) movaps %xmm7, -0x430(%rbp) movq %r9, -0x4a8(%rbp) movq %r8, -0x4b0(%rbp) movq %rcx, -0x4b8(%rbp) movq %rdx, -0x4c0(%rbp) movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x3f4(%rbp) movq %rsi, -0x400(%rbp) leaq -0x4d0(%rbp), %rax movq %rax, -0x410(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x418(%rbp) movl $0x30, -0x41c(%rbp) movl $0x10, -0x420(%rbp) movq -0x400(%rbp), %rdx leaq -0x3f0(%rbp), %rdi movq %rdi, -0x4e0(%rbp) movl $0x3e8, %esi # imm = 0x3E8 leaq -0x420(%rbp), %rcx callq 0xd4c90 movq -0x4e0(%rbp), %rcx movq 0x20c162(%rip), %rax # 0x244fe0 movq %rax, -0x4d8(%rbp) movq (%rax), %rdi leaq 0x3d3d49(%rip), %rax # 0x40cbd8 movq (%rax), %rdx leaq 0xaabbd(%rip), %rsi # 0xe3a56 xorl %eax, %eax callq 0x381d0 movq -0x4d8(%rbp), %rax movq (%rax), %rdi callq 0x384c0 movb $0x0, 0x3c87be(%rip) # 0x401674 movl -0x3f4(%rbp), %edi callq 0x3cb90 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x38edc addq $0x4e0, %rsp # imm = 0x4E0 popq %rbp retq callq 0x382c0 nopw %cs:(%rax,%rax)
die: push rbp mov rbp, rsp sub rsp, 4E0h test al, al jz short loc_38DE7 movaps [rbp+var_4A0], xmm0 movaps [rbp+var_490], xmm1 movaps [rbp+var_480], xmm2 movaps [rbp+var_470], xmm3 movaps [rbp+var_460], xmm4 movaps [rbp+var_450], xmm5 movaps [rbp+var_440], xmm6 movaps [rbp+var_430], xmm7 loc_38DE7: mov [rbp+var_4A8], r9 mov [rbp+var_4B0], r8 mov [rbp+var_4B8], rcx mov [rbp+var_4C0], rdx mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_3F4], edi mov [rbp+var_400], rsi lea rax, [rbp+var_4D0] mov [rbp+var_410], rax lea rax, [rbp+arg_0] mov [rbp+var_418], rax mov [rbp+var_41C], 30h ; '0' mov [rbp+var_420], 10h mov rdx, [rbp+var_400] lea rdi, [rbp+var_3F0] mov [rbp+var_4E0], rdi mov esi, 3E8h lea rcx, [rbp+var_420] call my_vsnprintf mov rcx, [rbp+var_4E0] mov rax, cs:stderr_ptr mov [rbp+var_4D8], rax mov rdi, [rax] lea rax, my_progname_short mov rdx, [rax] lea rsi, aUnknownOptionT+12h; "%s: %s\n" xor eax, eax call _fprintf mov rax, [rbp+var_4D8] mov rdi, [rax] call _fflush mov cs:ignore_errors, 0 mov edi, [rbp+var_3F4] call maybe_exit mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_38EDC add rsp, 4E0h pop rbp retn loc_38EDC: call ___stack_chk_fail
unsigned long long die(unsigned int a1, long long a2, ...) { va_list va; // [rsp+C0h] [rbp-420h] BYREF long long v4; // [rsp+E0h] [rbp-400h] unsigned int v5; // [rsp+ECh] [rbp-3F4h] char v6[1000]; // [rsp+F0h] [rbp-3F0h] BYREF unsigned long long v7; // [rsp+4D8h] [rbp-8h] va_start(va, a2); v7 = __readfsqword(0x28u); v5 = a1; v4 = a2; my_vsnprintf(v6, 1000LL, a2, va); fprintf(stderr, "%s: %s\n", my_progname_short, v6); fflush(stderr); ignore_errors = 0; maybe_exit(v5); return __readfsqword(0x28u); }
die: PUSH RBP MOV RBP,RSP SUB RSP,0x4e0 TEST AL,AL JZ 0x00138de7 MOVAPS xmmword ptr [RBP + -0x4a0],XMM0 MOVAPS xmmword ptr [RBP + -0x490],XMM1 MOVAPS xmmword ptr [RBP + -0x480],XMM2 MOVAPS xmmword ptr [RBP + -0x470],XMM3 MOVAPS xmmword ptr [RBP + -0x460],XMM4 MOVAPS xmmword ptr [RBP + -0x450],XMM5 MOVAPS xmmword ptr [RBP + -0x440],XMM6 MOVAPS xmmword ptr [RBP + -0x430],XMM7 LAB_00138de7: MOV qword ptr [RBP + -0x4a8],R9 MOV qword ptr [RBP + -0x4b0],R8 MOV qword ptr [RBP + -0x4b8],RCX MOV qword ptr [RBP + -0x4c0],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x3f4],EDI MOV qword ptr [RBP + -0x400],RSI LEA RAX,[RBP + -0x4d0] MOV qword ptr [RBP + -0x410],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x418],RAX MOV dword ptr [RBP + -0x41c],0x30 MOV dword ptr [RBP + -0x420],0x10 MOV RDX,qword ptr [RBP + -0x400] LEA RDI,[RBP + -0x3f0] MOV qword ptr [RBP + -0x4e0],RDI MOV ESI,0x3e8 LEA RCX,[RBP + -0x420] CALL 0x001d4c90 MOV RCX,qword ptr [RBP + -0x4e0] MOV RAX,qword ptr [0x00344fe0] MOV qword ptr [RBP + -0x4d8],RAX MOV RDI,qword ptr [RAX] LEA RAX,[0x50cbd8] MOV RDX,qword ptr [RAX] LEA RSI,[0x1e3a56] XOR EAX,EAX CALL 0x001381d0 MOV RAX,qword ptr [RBP + -0x4d8] MOV RDI,qword ptr [RAX] CALL 0x001384c0 MOV byte ptr [0x00501674],0x0 MOV EDI,dword ptr [RBP + -0x3f4] CALL 0x0013cb90 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00138edc ADD RSP,0x4e0 POP RBP RET LAB_00138edc: CALL 0x001382c0
void die(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int *puVar1; char in_AL; long in_FS_OFFSET; int1 local_4d8 [16]; int8 local_4c8; int8 local_4c0; int8 local_4b8; int8 local_4b0; int8 local_4a8; int8 local_498; int8 local_488; int8 local_478; int8 local_468; int8 local_458; int8 local_448; int8 local_438; int4 local_428; int4 local_424; int1 *local_420; int1 *local_418; int8 local_408; int4 local_3fc; int1 local_3f8 [1000]; long local_10; if (in_AL != '\0') { local_4a8 = param_1; local_498 = param_2; local_488 = param_3; local_478 = param_4; local_468 = param_5; local_458 = param_6; local_448 = param_7; local_438 = param_8; } local_10 = *(long *)(in_FS_OFFSET + 0x28); local_418 = local_4d8; local_420 = &stack0x00000008; local_424 = 0x30; local_428 = 0x10; local_4c8 = param_11; local_4c0 = param_12; local_4b8 = param_13; local_4b0 = param_14; local_408 = param_10; local_3fc = param_9; my_vsnprintf(local_3f8,1000,param_10,&local_428); puVar1 = PTR_stderr_00344fe0; fprintf(*(FILE **)PTR_stderr_00344fe0,"%s: %s\n",my_progname_short,local_3f8); fflush(*(FILE **)puVar1); ignore_errors = 0; maybe_exit(local_3fc); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,104
psi_cond_timedwait
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex, const struct timespec *abstime, const char *file, uint line) { PSI_cond_locker_state state; PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait) (&state, that->m_psi, mutex->m_psi, PSI_COND_TIMEDWAIT, file, line); int result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime); if (psi_likely(locker)) PSI_COND_CALL(end_cond_wait)(locker, result); return result; }
O3
c
psi_cond_timedwait: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r8d, %r9d movq %rcx, %r8 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 leaq 0x2d5355(%rip), %r13 # 0x2f9e58 movq (%r13), %rax movq 0x30(%rdi), %rsi movq 0x40(%r15), %rdx leaq -0x60(%rbp), %rdi pushq $0x1 popq %rcx callq *0x1c0(%rax) movq %rax, %rbx movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x24530 movl %eax, %r14d testq %rbx, %rbx jne 0x24b47 movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r13), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1c8(%rax) jmp 0x24b35
psi_cond_timedwait: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r9d, r8d mov r8, rcx mov r14, rdx mov r15, rsi mov r12, rdi lea r13, PSI_server mov rax, [r13+0] mov rsi, [rdi+30h] mov rdx, [r15+40h] lea rdi, [rbp+var_60] push 1 pop rcx call qword ptr [rax+1C0h] mov rbx, rax mov rdi, r12 mov rsi, r15 mov rdx, r14 call _pthread_cond_timedwait mov r14d, eax test rbx, rbx jnz short loc_24B47 loc_24B35: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_24B47: mov rax, [r13+0] mov rdi, rbx mov esi, r14d call qword ptr [rax+1C8h] jmp short loc_24B35
long long psi_cond_timedwait(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v6; // rbx unsigned int v7; // r14d _BYTE v9[96]; // [rsp+0h] [rbp-60h] BYREF v6 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, long long, _QWORD))PSI_server + 56))( v9, *(_QWORD *)(a1 + 48), *(_QWORD *)(a2 + 64), 1LL, a4, a5); v7 = pthread_cond_timedwait(a1, a2, a3); if ( v6 ) (*((void ( **)(long long, _QWORD))PSI_server + 57))(v6, v7); return v7; }
psi_cond_timedwait: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R9D,R8D MOV R8,RCX MOV R14,RDX MOV R15,RSI MOV R12,RDI LEA R13,[0x3f9e58] MOV RAX,qword ptr [R13] MOV RSI,qword ptr [RDI + 0x30] MOV RDX,qword ptr [R15 + 0x40] LEA RDI,[RBP + -0x60] PUSH 0x1 POP RCX CALL qword ptr [RAX + 0x1c0] MOV RBX,RAX MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x00124530 MOV R14D,EAX TEST RBX,RBX JNZ 0x00124b47 LAB_00124b35: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00124b47: MOV RAX,qword ptr [R13] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1c8] JMP 0x00124b35
int psi_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,timespec *param_3, int8 param_4,int4 param_5) { int iVar1; long lVar2; int1 local_68 [56]; lVar2 = (**(code **)(PSI_server + 0x1c0)) (local_68,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),1,param_4, param_5); iVar1 = pthread_cond_timedwait(param_1,param_2,param_3); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1c8))(lVar2,iVar1); } return iVar1; }
39,105
main
monkey531[P]llama/examples/gen-docs/gen-docs.cpp
int main(int, char **) { export_md("autogen-main.md", LLAMA_EXAMPLE_MAIN); export_md("autogen-server.md", LLAMA_EXAMPLE_SERVER); return 0; }
O1
cpp
main: pushq %r14 pushq %rbx subq $0x48, %rsp leaq 0x38(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xc8681(%rip), %rsi # 0xe70e4 leaq 0xc8689(%rip), %rdx # 0xe70f3 leaq 0x28(%rsp), %rbx movq %rbx, %rdi callq 0x21530 movq %rbx, %rdi movl $0x2, %esi callq 0x1eb17 movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x1ea9b movq 0x38(%rsp), %rsi incq %rsi callq 0x1a890 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xc8649(%rip), %rsi # 0xe70f4 leaq 0xc8653(%rip), %rdx # 0xe7105 leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x21530 movq %rbx, %rdi movl $0xa, %esi callq 0x1eb17 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x1eae3 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x8(%rsp), %rdi jmp 0x1eaff movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x1eb0f movq (%r14), %rsi incq %rsi callq 0x1a890 movq %rbx, %rdi callq 0x1af20
main: push r14; int push rbx; void * sub rsp, 48h lea r14, [rsp+58h+var_20] mov [r14-10h], r14 lea rsi, aAutogenMainMd; "autogen-main.md" lea rdx, aAutogenMainMd+0Fh; "" lea rbx, [rsp+58h+var_30] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rbx; int mov esi, 2; int call _ZL9export_mdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE13llama_example; export_md(std::string,llama_example) mov rdi, [rsp+58h+var_30]; void * cmp rdi, r14 jz short loc_1EA9B mov rsi, [rsp+58h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1EA9B: lea r14, [rsp+58h+var_40] mov [r14-10h], r14 lea rsi, aAutogenServerM; "autogen-server.md" lea rdx, aAutogenServerM+11h; "" lea rbx, [rsp+58h+var_50] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rbx; int mov esi, 0Ah; int call _ZL9export_mdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE13llama_example; export_md(std::string,llama_example) mov rdi, [rsp+58h+var_50]; void * cmp rdi, r14 jz short loc_1EAE3 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1EAE3: xor eax, eax add rsp, 48h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+arg_0] jmp short loc_1EAFF mov rbx, rax mov rdi, [rsp+arg_20]; void * loc_1EAFF: cmp rdi, r14 jz short loc_1EB0F mov rsi, [r14] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1EB0F: mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { void *v4[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v5[2]; // [rsp+18h] [rbp-40h] BYREF void *v6[2]; // [rsp+28h] [rbp-30h] BYREF _QWORD v7[4]; // [rsp+38h] [rbp-20h] BYREF v6[0] = v7; std::string::_M_construct<char const*>(v6, "autogen-main.md", ""); export_md(v6, 2LL); if ( v6[0] != v7 ) operator delete(v6[0], v7[0] + 1LL); v4[0] = v5; std::string::_M_construct<char const*>(v4, "autogen-server.md", ""); export_md(v4, 10LL); if ( v4[0] != v5 ) operator delete(v4[0], v5[0] + 1LL); return 0; }
main: PUSH R14 PUSH RBX SUB RSP,0x48 LEA R14,[RSP + 0x38] MOV qword ptr [R14 + -0x10],R14 LEA RSI,[0x1e70e4] LEA RDX,[0x1e70f3] LEA RBX,[RSP + 0x28] MOV RDI,RBX CALL 0x00121530 LAB_0011ea77: MOV RDI,RBX MOV ESI,0x2 CALL 0x0011eb17 LAB_0011ea84: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R14 JZ 0x0011ea9b MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a890 LAB_0011ea9b: LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 LEA RSI,[0x1e70f4] LEA RDX,[0x1e7105] LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x00121530 LAB_0011eabf: MOV RDI,RBX MOV ESI,0xa CALL 0x0011eb17 LAB_0011eacc: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x0011eae3 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a890 LAB_0011eae3: XOR EAX,EAX ADD RSP,0x48 POP RBX POP R14 RET
int8 main(void) { long *local_50 [2]; long local_40 [2]; long *local_30 [2]; long local_20 [2]; local_30[0] = local_20; std::__cxx11::string::_M_construct<char_const*>(local_30,"autogen-main.md",""); /* try { // try from 0011ea77 to 0011ea83 has its CatchHandler @ 0011eaf7 */ export_md(local_30,2); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,"autogen-server.md",""); /* try { // try from 0011eabf to 0011eacb has its CatchHandler @ 0011eaed */ export_md(local_50,10); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return 0; }
39,106
my_rmtree
eloqsql/mysys/my_delete.c
int my_rmtree(const char *dir, myf MyFlags) { char path[FN_REFLEN]; char sep[] = { FN_LIBCHAR, 0 }; int err = 0; uint i; MY_DIR *dir_info = my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT)); if (!dir_info) return 1; for (i = 0; i < dir_info->number_of_files; i++) { FILEINFO *file = dir_info->dir_entry + i; /* Skip "." and ".." */ if (!strcmp(file->name, ".") || !strcmp(file->name, "..")) continue; strxnmov(path, sizeof(path), dir, sep, file->name, NULL); if (!MY_S_ISDIR(file->mystat->st_mode)) { err = my_delete(path, MyFlags); #ifdef _WIN32 /* On Windows, check and possible reset readonly attribute. my_delete(), or DeleteFile does not remove theses files. */ if (err) { DWORD attr = GetFileAttributes(path); if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_READONLY)) { SetFileAttributes(path, attr &~FILE_ATTRIBUTE_READONLY); err = my_delete(path, MyFlags); } } #endif } else err = my_rmtree(path, MyFlags); if (err) break; } my_dirend(dir_info); if (!err) err = rmdir(dir); return err; }
O3
c
my_rmtree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, -0x240(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movw $0x2f, -0x232(%rbp) movl $0x4000, %esi # imm = 0x4000 movq %rdi, -0x248(%rbp) callq 0xa2685 testq %rax, %rax je 0xa1011 movq %rax, %r15 movl 0x8(%rax), %eax testl %eax, %eax je 0xa0ff8 movl $0x8, %r14d leaq -0x230(%rbp), %rbx xorl %r12d, %r12d movq (%r15), %r13 movq -0x8(%r13,%r14), %r8 cmpb $0x2e, (%r8) jne 0xa0f81 cmpb $0x0, 0x1(%r8) je 0xa0fe6 cmpb $0x2e, 0x1(%r8) jne 0xa0f81 cmpb $0x0, 0x2(%r8) je 0xa0fe6 movl $0x200, %esi # imm = 0x200 movq %rbx, %rdi movq -0x248(%rbp), %rdx leaq -0x232(%rbp), %rcx xorl %r9d, %r9d xorl %eax, %eax callq 0xda0e0 movq (%r13,%r14), %rax movl 0x18(%rax), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax movq %rbx, %rdi cmpl $0x4000, %eax # imm = 0x4000 jne 0xa0fc8 movq -0x240(%rbp), %rsi callq 0xa0ef5 jmp 0xa0fd4 movq -0x240(%rbp), %rsi callq 0xa0e20 movl %eax, %r13d testl %eax, %eax jne 0xa1019 movl 0x8(%r15), %eax leaq -0x230(%rbp), %rbx incq %r12 movl %eax, %ecx addq $0x10, %r14 cmpq %rcx, %r12 jb 0xa0f5e movq %r15, %rdi callq 0xa2654 movq -0x248(%rbp), %rdi callq 0x29320 movl %eax, %r13d jmp 0xa1021 movl $0x1, %r13d jmp 0xa1021 movq %r15, %rdi callq 0xa2654 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xa1045 movl %r13d, %eax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29220 nop
my_rmtree: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov [rbp+var_240], rsi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_232], 2Fh ; '/' mov esi, 4000h mov [rbp+var_248], rdi call my_dir test rax, rax jz loc_A1011 mov r15, rax mov eax, [rax+8] test eax, eax jz loc_A0FF8 mov r14d, 8 lea rbx, [rbp+var_230] xor r12d, r12d loc_A0F5E: mov r13, [r15] mov r8, [r13+r14-8] cmp byte ptr [r8], 2Eh ; '.' jnz short loc_A0F81 cmp byte ptr [r8+1], 0 jz short loc_A0FE6 cmp byte ptr [r8+1], 2Eh ; '.' jnz short loc_A0F81 cmp byte ptr [r8+2], 0 jz short loc_A0FE6 loc_A0F81: mov esi, 200h mov rdi, rbx mov rdx, [rbp+var_248] lea rcx, [rbp+var_232] xor r9d, r9d xor eax, eax call strxnmov mov rax, [r13+r14+0] mov eax, [rax+18h] mov ecx, 0F000h and eax, ecx mov rdi, rbx cmp eax, 4000h jnz short loc_A0FC8 mov rsi, [rbp+var_240] call my_rmtree jmp short loc_A0FD4 loc_A0FC8: mov rsi, [rbp+var_240] call my_delete loc_A0FD4: mov r13d, eax test eax, eax jnz short loc_A1019 mov eax, [r15+8] lea rbx, [rbp+var_230] loc_A0FE6: inc r12 mov ecx, eax add r14, 10h cmp r12, rcx jb loc_A0F5E loc_A0FF8: mov rdi, r15 call my_dirend mov rdi, [rbp+var_248] call _rmdir mov r13d, eax jmp short loc_A1021 loc_A1011: mov r13d, 1 jmp short loc_A1021 loc_A1019: mov rdi, r15 call my_dirend loc_A1021: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_A1045 mov eax, r13d add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A1045: call ___stack_chk_fail
long long my_rmtree(long long a1, long long a2) { long long v2; // rax long long v3; // r15 unsigned int v4; // eax long long v5; // r14 unsigned long long i; // r12 long long v7; // r13 _BYTE *v8; // r8 unsigned int v9; // eax unsigned int v10; // r13d char v12; // [rsp+0h] [rbp-250h] __int16 v13; // [rsp+1Eh] [rbp-232h] BYREF _BYTE v14[512]; // [rsp+20h] [rbp-230h] BYREF unsigned long long v15; // [rsp+220h] [rbp-30h] v15 = __readfsqword(0x28u); v13 = 47; v2 = my_dir(a1, 0x4000LL); if ( v2 ) { v3 = v2; v4 = *(_DWORD *)(v2 + 8); if ( v4 ) { v5 = 8LL; for ( i = 0LL; i < v4; ++i ) { v7 = *(_QWORD *)v3; v8 = *(_BYTE **)(*(_QWORD *)v3 + v5 - 8); if ( *v8 != 46 || v8[1] && (v8[1] != 46 || v8[2]) ) { strxnmov((unsigned int)v14, 512, a1, (unsigned int)&v13, (_DWORD)v8, 0, v12); if ( (*(_DWORD *)(*(_QWORD *)(v7 + v5) + 24LL) & 0xF000) == 0x4000 ) v9 = my_rmtree(v14, a2); else v9 = my_delete((long long)v14, a2); v10 = v9; if ( v9 ) { my_dirend(v3); return v10; } v4 = *(_DWORD *)(v3 + 8); } v5 += 16LL; } } my_dirend(v3); return (unsigned int)rmdir(a1); } else { return 1; } }
my_rmtree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV qword ptr [RBP + -0x240],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV word ptr [RBP + -0x232],0x2f MOV ESI,0x4000 MOV qword ptr [RBP + -0x248],RDI CALL 0x001a2685 TEST RAX,RAX JZ 0x001a1011 MOV R15,RAX MOV EAX,dword ptr [RAX + 0x8] TEST EAX,EAX JZ 0x001a0ff8 MOV R14D,0x8 LEA RBX,[RBP + -0x230] XOR R12D,R12D LAB_001a0f5e: MOV R13,qword ptr [R15] MOV R8,qword ptr [R13 + R14*0x1 + -0x8] CMP byte ptr [R8],0x2e JNZ 0x001a0f81 CMP byte ptr [R8 + 0x1],0x0 JZ 0x001a0fe6 CMP byte ptr [R8 + 0x1],0x2e JNZ 0x001a0f81 CMP byte ptr [R8 + 0x2],0x0 JZ 0x001a0fe6 LAB_001a0f81: MOV ESI,0x200 MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x248] LEA RCX,[RBP + -0x232] XOR R9D,R9D XOR EAX,EAX CALL 0x001da0e0 MOV RAX,qword ptr [R13 + R14*0x1] MOV EAX,dword ptr [RAX + 0x18] MOV ECX,0xf000 AND EAX,ECX MOV RDI,RBX CMP EAX,0x4000 JNZ 0x001a0fc8 MOV RSI,qword ptr [RBP + -0x240] CALL 0x001a0ef5 JMP 0x001a0fd4 LAB_001a0fc8: MOV RSI,qword ptr [RBP + -0x240] CALL 0x001a0e20 LAB_001a0fd4: MOV R13D,EAX TEST EAX,EAX JNZ 0x001a1019 MOV EAX,dword ptr [R15 + 0x8] LEA RBX,[RBP + -0x230] LAB_001a0fe6: INC R12 MOV ECX,EAX ADD R14,0x10 CMP R12,RCX JC 0x001a0f5e LAB_001a0ff8: MOV RDI,R15 CALL 0x001a2654 MOV RDI,qword ptr [RBP + -0x248] CALL 0x00129320 MOV R13D,EAX JMP 0x001a1021 LAB_001a1011: MOV R13D,0x1 JMP 0x001a1021 LAB_001a1019: MOV RDI,R15 CALL 0x001a2654 LAB_001a1021: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001a1045 MOV EAX,R13D ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a1045: CALL 0x00129220
int my_rmtree(char *param_1,int8 param_2) { long lVar1; char *pcVar2; uint uVar3; int iVar4; long *plVar5; ulong uVar6; long lVar7; long in_FS_OFFSET; int2 local_23a; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_23a = 0x2f; plVar5 = (long *)my_dir(param_1,0x4000); if (plVar5 == (long *)0x0) { iVar4 = 1; } else { uVar3 = *(uint *)(plVar5 + 1); if (uVar3 != 0) { lVar7 = 8; uVar6 = 0; do { lVar1 = *plVar5; pcVar2 = *(char **)(lVar1 + -8 + lVar7); if ((*pcVar2 != '.') || ((pcVar2[1] != '\0' && ((pcVar2[1] != '.' || (pcVar2[2] != '\0'))))) ) { strxnmov(local_238,0x200,param_1,&local_23a,pcVar2,0); if ((*(uint *)(*(long *)(lVar1 + lVar7) + 0x18) & 0xf000) == 0x4000) { iVar4 = my_rmtree(local_238,param_2); } else { iVar4 = my_delete(local_238,param_2); } if (iVar4 != 0) { my_dirend(plVar5); goto LAB_001a1021; } uVar3 = *(uint *)(plVar5 + 1); } uVar6 = uVar6 + 1; lVar7 = lVar7 + 0x10; } while (uVar6 < uVar3); } my_dirend(plVar5); iVar4 = rmdir(param_1); } LAB_001a1021: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,107
escape_quotes_for_mysql
eloqsql/mysys/charset.c
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); #ifdef USE_MB my_bool use_mb_flag= my_ci_use_mb(charset_info); #endif *overflow= FALSE; for (end= from + length; from < end; from++) { #ifdef USE_MB int tmp_length; if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end))) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* We don't have the same issue here with a non-multi-byte character being turned into a multi-byte character by the addition of an escaping character, because we are only escaping the ' character with itself. */ #endif if (*from == '\'') { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\''; *to++= '\''; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O0
c
escape_quotes_for_mysql: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x18(%rbp) je 0xdc995 movq -0x18(%rbp), %rax subq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0xdc9a0 movq -0x28(%rbp), %rax shlq %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movq -0x60(%rbp), %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi callq 0xdcb10 movb %al, -0x49(%rbp) movq -0x30(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0xdcae9 movsbl -0x49(%rbp), %eax cmpl $0x0, %eax je 0xdca5f movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0xdcb40 movl %eax, -0x50(%rbp) cmpl $0x0, %eax je 0xdca5f movq -0x10(%rbp), %rax movslq -0x50(%rbp), %rcx addq %rcx, %rax cmpq -0x48(%rbp), %rax jbe 0xdca1b movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0xdcae9 jmp 0xdca1d movl -0x50(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x50(%rbp) cmpl $0x0, %eax je 0xdca51 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xdca1d movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0xdcad8 movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x27, %eax jne 0xdcaa8 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x48(%rbp), %rax jbe 0xdca82 movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0xdcae9 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x27, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x27, (%rax) jmp 0xdcad6 movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x48(%rbp), %rax jbe 0xdcabf movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0xdcae9 movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xdcad8 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0xdc9ce movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
escape_quotes_for_mysql: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_58], rax cmp [rbp+var_18], 0 jz short loc_DC995 mov rax, [rbp+var_18] sub rax, 1 mov [rbp+var_60], rax jmp short loc_DC9A0 loc_DC995: mov rax, [rbp+var_28] shl rax, 1 mov [rbp+var_60], rax loc_DC9A0: mov rax, [rbp+var_58] mov rcx, [rbp+var_60] add rax, rcx mov [rbp+var_48], rax mov rdi, [rbp+var_8] call my_ci_use_mb mov [rbp+var_49], al mov rax, [rbp+var_30] mov byte ptr [rax], 0 mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_40], rax loc_DC9CE: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] jnb loc_DCAE9 movsx eax, [rbp+var_49] cmp eax, 0 jz short loc_DCA5F mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] call my_ismbchar mov [rbp+var_50], eax cmp eax, 0 jz short loc_DCA5F mov rax, [rbp+var_10] movsxd rcx, [rbp+var_50] add rax, rcx cmp rax, [rbp+var_48] jbe short loc_DCA1B mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp loc_DCAE9 loc_DCA1B: jmp short $+2 loc_DCA1D: mov eax, [rbp+var_50] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_50], ecx cmp eax, 0 jz short loc_DCA51 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_DCA1D loc_DCA51: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short loc_DCAD8 loc_DCA5F: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 27h ; ''' jnz short loc_DCAA8 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_48] jbe short loc_DCA82 mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_DCAE9 loc_DCA82: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 27h ; ''' mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 27h ; ''' jmp short loc_DCAD6 loc_DCAA8: mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_48] jbe short loc_DCABF mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_DCAE9 loc_DCABF: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl loc_DCAD6: jmp short $+2 loc_DCAD8: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp loc_DC9CE loc_DCAE9: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6) { char *v7; // rax char v8; // cl char *v9; // rax _BYTE *v10; // rax char *v11; // rax long long v13; // [rsp+0h] [rbp-60h] int v14; // [rsp+10h] [rbp-50h] char v15; // [rsp+17h] [rbp-49h] unsigned long long v16; // [rsp+18h] [rbp-48h] char *v17; // [rsp+20h] [rbp-40h] char *v21; // [rsp+50h] [rbp-10h] v21 = a2; if ( a3 ) v13 = a3 - 1; else v13 = 2 * a5; v16 = (unsigned long long)&a2[v13]; v15 = my_ci_use_mb(a1); *a6 = 0; v17 = &a4[a5]; while ( a4 < v17 ) { if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 ) { if ( (unsigned long long)&v21[v14] > v16 ) { *a6 = 1; break; } while ( v14-- ) { v7 = a4++; v8 = *v7; v9 = v21++; *v9 = v8; } --a4; } else if ( *a4 == 39 ) { if ( (unsigned long long)(v21 + 2) > v16 ) { *a6 = 1; break; } *v21 = 39; v10 = v21 + 1; v21 += 2; *v10 = 39; } else { if ( (unsigned long long)(v21 + 1) > v16 ) { *a6 = 1; break; } v11 = v21++; *v11 = *a4; } ++a4; } *v21 = 0; return (_BYTE *)(v21 - a2); }
escape_quotes_for_mysql: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001dc995 MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x001dc9a0 LAB_001dc995: MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x1 MOV qword ptr [RBP + -0x60],RAX LAB_001dc9a0: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001dcb10 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_001dc9ce: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001dcae9 MOVSX EAX,byte ptr [RBP + -0x49] CMP EAX,0x0 JZ 0x001dca5f MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CALL 0x001dcb40 MOV dword ptr [RBP + -0x50],EAX CMP EAX,0x0 JZ 0x001dca5f MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x50] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x48] JBE 0x001dca1b MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x001dcae9 LAB_001dca1b: JMP 0x001dca1d LAB_001dca1d: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x50],ECX CMP EAX,0x0 JZ 0x001dca51 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x001dca1d LAB_001dca51: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001dcad8 LAB_001dca5f: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x27 JNZ 0x001dcaa8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x48] JBE 0x001dca82 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x001dcae9 LAB_001dca82: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x27 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x27 JMP 0x001dcad6 LAB_001dcaa8: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x48] JBE 0x001dcabf MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x001dcae9 LAB_001dcabf: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL LAB_001dcad6: JMP 0x001dcad8 LAB_001dcad8: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001dc9ce LAB_001dcae9: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long escape_quotes_for_mysql (int8 param_1,char *param_2,long param_3,char *param_4,long param_5, int1 *param_6) { char cVar1; char *pcVar2; long local_68; int local_58; char *local_28; char *local_18; if (param_3 == 0) { local_68 = param_5 << 1; } else { local_68 = param_3 + -1; } pcVar2 = param_2 + local_68; cVar1 = my_ci_use_mb(param_1); *param_6 = 0; local_28 = param_4; local_18 = param_2; do { if (param_4 + param_5 <= local_28) { LAB_001dcae9: *local_18 = '\0'; return (long)local_18 - (long)param_2; } if ((cVar1 == '\0') || (local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) { if (*local_28 == '\'') { if (pcVar2 < local_18 + 2) { *param_6 = 1; goto LAB_001dcae9; } *local_18 = '\''; local_18[1] = '\''; local_18 = local_18 + 2; } else { if (pcVar2 < local_18 + 1) { *param_6 = 1; goto LAB_001dcae9; } *local_18 = *local_28; local_18 = local_18 + 1; } } else { if (pcVar2 < local_18 + local_58) { *param_6 = 1; goto LAB_001dcae9; } while (local_58 != 0) { *local_18 = *local_28; local_58 = local_58 + -1; local_28 = local_28 + 1; local_18 = local_18 + 1; } local_28 = local_28 + -1; } local_28 = local_28 + 1; } while( true ); }
39,108
my_rw_trywrlock
eloqsql/mysys/thr_rwlock.c
int my_rw_trywrlock(my_rw_lock_t *rwp) { int res; pthread_mutex_lock(&rwp->lock); if (rwp->state) res= EBUSY; /* Can't get lock */ else { res=0; rwp->state = -1; #ifdef SAFE_MUTEX rwp->write_thread= pthread_self(); #endif } pthread_mutex_unlock(&rwp->lock); return(res); }
O3
c
my_rw_trywrlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x264d0 movl $0x10, %r14d cmpl $0x0, 0x88(%rbx) jne 0x469d6 movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF xorl %r14d, %r14d movq %rbx, %rdi callq 0x26250 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
my_rw_trywrlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock mov r14d, 10h cmp dword ptr [rbx+88h], 0 jnz short loc_469D6 mov dword ptr [rbx+88h], 0FFFFFFFFh xor r14d, r14d loc_469D6: mov rdi, rbx call _pthread_mutex_unlock mov eax, r14d pop rbx pop r14 pop rbp retn
long long my_rw_trywrlock(long long a1) { unsigned int v1; // r14d pthread_mutex_lock(a1); v1 = 16; if ( !*(_DWORD *)(a1 + 136) ) { *(_DWORD *)(a1 + 136) = -1; v1 = 0; } pthread_mutex_unlock(a1); return v1; }
my_rw_trywrlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x001264d0 MOV R14D,0x10 CMP dword ptr [RBX + 0x88],0x0 JNZ 0x001469d6 MOV dword ptr [RBX + 0x88],0xffffffff XOR R14D,R14D LAB_001469d6: MOV RDI,RBX CALL 0x00126250 MOV EAX,R14D POP RBX POP R14 POP RBP RET
int8 my_rw_trywrlock(pthread_mutex_t *param_1) { int8 uVar1; pthread_mutex_lock(param_1); uVar1 = 0x10; if (*(int *)((long)param_1 + 0x88) == 0) { *(int4 *)((long)param_1 + 0x88) = 0xffffffff; uVar1 = 0; } pthread_mutex_unlock(param_1); return uVar1; }
39,109
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::end_array()
monkey531[P]llama/common/json.hpp
bool end_array() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_array()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::end_array(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x5fbdc movq -0x8(%rax), %rcx cmpb $0x2, (%rcx) jne 0x5fbf8 addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x8cff6(%rip), %rdi # 0xecbd9 leaq 0x8d039(%rip), %rdx # 0xecc23 leaq 0x8dfea(%rip), %rcx # 0xedbdb movl $0x1b01, %esi # imm = 0x1B01 jmp 0x5fc12 leaq 0x8cfda(%rip), %rdi # 0xecbd9 leaq 0x8d01d(%rip), %rdx # 0xecc23 leaq 0x8e299(%rip), %rcx # 0xedea6 movl $0x1b02, %esi # imm = 0x1B02 xorl %eax, %eax callq 0x1ae30 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_5FBDC mov rcx, [rax-8] cmp byte ptr [rcx], 2 jnz short loc_5FBF8 add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_5FBDC: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1B01h jmp short loc_5FC12 loc_5FBF8: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()" mov esi, 1B02h loc_5FC12: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array( long long a1) { long long v1; // rax long long v3; // rsi long long v4; // rdx long long v5; // rcx v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6913LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6913LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 2 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6914LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6914LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_array()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v3, v4, v5); }
end_array: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x0015fbdc MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x2 JNZ 0x0015fbf8 ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_0015fbdc: LEA RDI,[0x1ecbd9] LEA RDX,[0x1ecc23] LEA RCX,[0x1edbdb] MOV ESI,0x1b01 JMP 0x0015fc12 LAB_0015fbf8: LEA RDI,[0x1ecbd9] LEA RDX,[0x1ecc23] LEA RCX,[0x1edea6] MOV ESI,0x1b02 LAB_0015fc12: XOR EAX,EAX CALL 0x0011ae30
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1b01; } else { if (**(char **)(lVar1 + -8) == '\x02') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_array()"; uVar3 = 0x1b02; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
39,110
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::end_array()
monkey531[P]llama/common/json.hpp
bool end_array() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_array()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::end_array(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x4454a movq -0x8(%rax), %rcx cmpb $0x2, (%rcx) jne 0x44566 addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x6a68b(%rip), %rdi # 0xaebdc leaq 0x6a6ce(%rip), %rdx # 0xaec26 leaq 0x6b68e(%rip), %rcx # 0xafbed movl $0x1b01, %esi # imm = 0x1B01 jmp 0x44580 leaq 0x6a66f(%rip), %rdi # 0xaebdc leaq 0x6a6b2(%rip), %rdx # 0xaec26 leaq 0x6b93d(%rip), %rcx # 0xafeb8 movl $0x1b02, %esi # imm = 0x1B02 xorl %eax, %eax callq 0x23e40 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_4454A mov rcx, [rax-8] cmp byte ptr [rcx], 2 jnz short loc_44566 add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_4454A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1B01h jmp short loc_44580 loc_44566: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()" mov esi, 1B02h loc_44580: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array( long long a1) { long long v1; // rax long long v3; // rsi long long v4; // rdx long long v5; // rcx v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6913LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6913LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 2 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6914LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6914LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_array()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v3, v4, v5); }
end_array: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x0014454a MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x2 JNZ 0x00144566 ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_0014454a: LEA RDI,[0x1aebdc] LEA RDX,[0x1aec26] LEA RCX,[0x1afbed] MOV ESI,0x1b01 JMP 0x00144580 LAB_00144566: LEA RDI,[0x1aebdc] LEA RDX,[0x1aec26] LEA RCX,[0x1afeb8] MOV ESI,0x1b02 LAB_00144580: XOR EAX,EAX CALL 0x00123e40
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1b01; } else { if (**(char **)(lVar1 + -8) == '\x02') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_array()"; uVar3 = 0x1b02; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
39,111
Vers_parse_info::fix_create_like(Alter_info&, HA_CREATE_INFO&, TABLE_LIST&, TABLE_LIST&)
eloqsql/sql/handler.cc
bool Vers_parse_info::fix_create_like(Alter_info &alter_info, HA_CREATE_INFO &create_info, TABLE_LIST &src_table, TABLE_LIST &table) { List_iterator<Create_field> it(alter_info.create_list); List_iterator<Key> key_it(alter_info.key_list); List_iterator<Key_part_spec> kp_it; Create_field *f, *f_start=NULL, *f_end= NULL; DBUG_ASSERT(alter_info.create_list.elements > 2); if (create_info.tmp_table()) { int remove= 2; while (remove && (f= it++)) { if (f->flags & VERS_SYSTEM_FIELD) { it.remove(); remove--; } key_it.rewind(); while (Key *key= key_it++) { kp_it.init(key->columns); while (Key_part_spec *kp= kp_it++) { if (0 == lex_string_cmp(system_charset_info, &kp->field_name, &f->field_name)) { kp_it.remove(); } } if (0 == key->columns.elements) { key_it.remove(); } } } DBUG_ASSERT(remove == 0); push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR, "System versioning is stripped from temporary `%s.%s`", table.db.str, table.table_name.str); return false; } while ((f= it++)) { if (f->flags & VERS_ROW_START) { f_start= f; if (f_end) break; } else if (f->flags & VERS_ROW_END) { f_end= f; if (f_start) break; } } if (!f_start || !f_end) { my_error(ER_MISSING, MYF(0), src_table.table_name.str, f_start ? "AS ROW END" : "AS ROW START"); return true; } as_row= start_end_t(f_start->field_name, f_end->field_name); period= as_row; create_info.options|= HA_VERSIONED_TABLE; return false; }
O0
cpp
Vers_parse_info::fix_create_like(Alter_info&, HA_CREATE_INFO&, TABLE_LIST&, TABLE_LIST&): pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xe8(%rbp) movq -0x18(%rbp), %rsi addq $0x60, %rsi leaq -0x50(%rbp), %rdi callq 0x9796b0 movq -0x18(%rbp), %rsi addq $0x30, %rsi leaq -0x70(%rbp), %rdi callq 0x9f9350 leaq -0x90(%rbp), %rdi callq 0xd1cdc0 movq $0x0, -0xa0(%rbp) movq $0x0, -0xa8(%rbp) jmp 0xd1a470 movq -0x20(%rbp), %rdi callq 0x8847e0 testb $0x1, %al jne 0xd1a482 jmp 0xd1a5ee movl $0x2, -0xac(%rbp) xorl %eax, %eax cmpl $0x0, -0xac(%rbp) movb %al, -0xe9(%rbp) je 0xd1a4bc leaq -0x50(%rbp), %rdi xorl %esi, %esi callq 0x979700 movq %rax, -0x98(%rbp) cmpq $0x0, %rax setne %al movb %al, -0xe9(%rbp) movb -0xe9(%rbp), %al testb $0x1, %al jne 0xd1a4cb jmp 0xd1a5b1 movq -0x98(%rbp), %rax movl 0x68(%rax), %eax andl $0x18000000, %eax # imm = 0x18000000 cmpl $0x0, %eax je 0xd1a4f7 leaq -0x50(%rbp), %rdi callq 0xacfbe0 movl -0xac(%rbp), %eax addl $-0x1, %eax movl %eax, -0xac(%rbp) leaq -0x70(%rbp), %rdi callq 0xad0710 leaq -0x70(%rbp), %rdi xorl %esi, %esi callq 0x9f9380 movq %rax, -0xb8(%rbp) cmpq $0x0, -0xb8(%rbp) je 0xd1a5ac movq -0xb8(%rbp), %rsi addq $0x50, %rsi leaq -0x90(%rbp), %rdi callq 0xd1cde0 leaq -0x90(%rbp), %rdi xorl %esi, %esi callq 0x979690 movq %rax, -0xc0(%rbp) cmpq $0x0, -0xc0(%rbp) je 0xd1a590 leaq 0x102fdeb(%rip), %rax # 0x1d4a348 movq (%rax), %rdi movq -0xc0(%rbp), %rsi movq -0x98(%rbp), %rdx addq $0x38, %rdx callq 0xd1a760 andb $0x1, %al movzbl %al, %ecx xorl %eax, %eax cmpl %ecx, %eax jne 0xd1a58e leaq -0x90(%rbp), %rdi callq 0xd1ce10 jmp 0xd1a537 movq -0xb8(%rbp), %rcx xorl %eax, %eax cmpl 0x60(%rcx), %eax jne 0xd1a5a7 leaq -0x70(%rbp), %rdi callq 0xad0d80 jmp 0xd1a500 jmp 0xd1a48c jmp 0xd1a5b3 jmp 0xd1a5b5 callq 0x88f160 movq %rax, %rdi movq -0x30(%rbp), %rax movq 0x18(%rax), %r8 movq -0x30(%rbp), %rax movq 0x28(%rax), %r9 movl $0x1, %esi movl $0x451, %edx # imm = 0x451 leaq 0x727d54(%rip), %rcx # 0x1442332 movb $0x0, %al callq 0x999510 movb $0x0, -0x1(%rbp) jmp 0xd1a74a jmp 0xd1a5f0 leaq -0x50(%rbp), %rdi xorl %esi, %esi callq 0x979700 movq %rax, -0x98(%rbp) cmpq $0x0, %rax je 0xd1a66c movq -0x98(%rbp), %rax movl 0x68(%rax), %eax andl $0x8000000, %eax # imm = 0x8000000 cmpl $0x0, %eax je 0xd1a638 movq -0x98(%rbp), %rax movq %rax, -0xa0(%rbp) cmpq $0x0, -0xa8(%rbp) je 0xd1a636 jmp 0xd1a66c jmp 0xd1a66a movq -0x98(%rbp), %rax movl 0x68(%rax), %eax andl $0x10000000, %eax # imm = 0x10000000 cmpl $0x0, %eax je 0xd1a668 movq -0x98(%rbp), %rax movq %rax, -0xa8(%rbp) cmpq $0x0, -0xa0(%rbp) je 0xd1a666 jmp 0xd1a66c jmp 0xd1a668 jmp 0xd1a66a jmp 0xd1a5f0 cmpq $0x0, -0xa0(%rbp) je 0xd1a680 cmpq $0x0, -0xa8(%rbp) jne 0xd1a6be movq -0x28(%rbp), %rax movq 0x28(%rax), %rdx movq -0xa0(%rbp), %rsi leaq 0x708663(%rip), %rcx # 0x1422cf9 leaq 0x70867b(%rip), %rax # 0x1422d18 cmpq $0x0, %rsi cmovneq %rax, %rcx movl $0x101d, %edi # imm = 0x101D xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x131c1e0 movb $0x1, -0x1(%rbp) jmp 0xd1a74a movq -0xa0(%rbp), %rsi addq $0x38, %rsi movq -0xa8(%rbp), %rdx addq $0x38, %rdx leaq -0xe0(%rbp), %rdi callq 0xd1ccf0 movq -0xe8(%rbp), %rax movq -0xe0(%rbp), %rcx movq %rcx, 0x48(%rax) movq -0xd8(%rbp), %rcx movq %rcx, 0x50(%rax) movq -0xd0(%rbp), %rcx movq %rcx, 0x58(%rax) movq -0xc8(%rbp), %rcx movq %rcx, 0x60(%rax) movq 0x48(%rax), %rcx movq %rcx, 0x10(%rax) movq 0x50(%rax), %rcx movq %rcx, 0x18(%rax) movq 0x58(%rax), %rcx movq %rcx, 0x20(%rax) movq 0x60(%rax), %rcx movq %rcx, 0x28(%rax) movq -0x20(%rbp), %rax movl 0xe8(%rax), %ecx orl $0x20, %ecx movl %ecx, 0xe8(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0xf0, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN15Vers_parse_info15fix_create_likeER10Alter_infoR14HA_CREATE_INFOR10TABLE_LISTS5_: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_10] mov [rbp+var_E8], rax mov rsi, [rbp+var_18] add rsi, 60h ; '`' lea rdi, [rbp+var_50] call _ZN13List_iteratorI12Create_fieldEC2ER4ListIS0_E; List_iterator<Create_field>::List_iterator(List<Create_field> &) mov rsi, [rbp+var_18] add rsi, 30h ; '0' lea rdi, [rbp+var_70] call _ZN13List_iteratorI3KeyEC2ER4ListIS0_E; List_iterator<Key>::List_iterator(List<Key> &) lea rdi, [rbp+var_90] call _ZN13List_iteratorI13Key_part_specEC2Ev; List_iterator<Key_part_spec>::List_iterator(void) mov [rbp+var_A0], 0 mov [rbp+var_A8], 0 jmp short $+2 loc_D1A470: mov rdi, [rbp+var_20]; this call _ZNK38Table_scope_and_contents_source_pod_st9tmp_tableEv; Table_scope_and_contents_source_pod_st::tmp_table(void) test al, 1 jnz short loc_D1A482 jmp loc_D1A5EE loc_D1A482: mov [rbp+var_AC], 2 loc_D1A48C: xor eax, eax cmp [rbp+var_AC], 0 mov [rbp+var_E9], al jz short loc_D1A4BC lea rdi, [rbp+var_50] xor esi, esi call _ZN13List_iteratorI12Create_fieldEppEi; List_iterator<Create_field>::operator++(int) mov [rbp+var_98], rax cmp rax, 0 setnz al mov [rbp+var_E9], al loc_D1A4BC: mov al, [rbp+var_E9] test al, 1 jnz short loc_D1A4CB jmp loc_D1A5B1 loc_D1A4CB: mov rax, [rbp+var_98] mov eax, [rax+68h] and eax, 18000000h cmp eax, 0 jz short loc_D1A4F7 lea rdi, [rbp+var_50] call _ZN13List_iteratorI12Create_fieldE6removeEv; List_iterator<Create_field>::remove(void) mov eax, [rbp+var_AC] add eax, 0FFFFFFFFh mov [rbp+var_AC], eax loc_D1A4F7: lea rdi, [rbp+var_70] call _ZN13List_iteratorI3KeyE6rewindEv; List_iterator<Key>::rewind(void) loc_D1A500: lea rdi, [rbp+var_70] xor esi, esi call _ZN13List_iteratorI3KeyEppEi; List_iterator<Key>::operator++(int) mov [rbp+var_B8], rax cmp [rbp+var_B8], 0 jz loc_D1A5AC mov rsi, [rbp+var_B8] add rsi, 50h ; 'P' lea rdi, [rbp+var_90] call _ZN13List_iteratorI13Key_part_specE4initER4ListIS0_E; List_iterator<Key_part_spec>::init(List<Key_part_spec> &) loc_D1A537: lea rdi, [rbp+var_90] xor esi, esi call _ZN13List_iteratorI13Key_part_specEppEi; List_iterator<Key_part_spec>::operator++(int) mov [rbp+var_C0], rax cmp [rbp+var_C0], 0 jz short loc_D1A590 lea rax, system_charset_info mov rdi, [rax] mov rsi, [rbp+var_C0] mov rdx, [rbp+var_98] add rdx, 38h ; '8' call _ZL14lex_string_cmpPK15charset_info_stPK25st_mysql_const_lex_stringS4__13; lex_string_cmp(charset_info_st const*,st_mysql_const_lex_string const*,st_mysql_const_lex_string const*) and al, 1 movzx ecx, al xor eax, eax cmp eax, ecx jnz short loc_D1A58E lea rdi, [rbp+var_90] call _ZN13List_iteratorI13Key_part_specE6removeEv; List_iterator<Key_part_spec>::remove(void) loc_D1A58E: jmp short loc_D1A537 loc_D1A590: mov rcx, [rbp+var_B8] xor eax, eax cmp eax, [rcx+60h] jnz short loc_D1A5A7 lea rdi, [rbp+var_70] call _ZN13List_iteratorI3KeyE6removeEv; List_iterator<Key>::remove(void) loc_D1A5A7: jmp loc_D1A500 loc_D1A5AC: jmp loc_D1A48C loc_D1A5B1: jmp short $+2 loc_D1A5B3: jmp short $+2 loc_D1A5B5: call _current_thd mov rdi, rax mov rax, [rbp+var_30] mov r8, [rax+18h] mov rax, [rbp+var_30] mov r9, [rax+28h] mov esi, 1 mov edx, 451h lea rcx, aSystemVersioni_1; "System versioning is stripped from temp"... mov al, 0 call _Z19push_warning_printfP3THDN21Sql_state_errno_level18enum_warning_levelEjPKcz; push_warning_printf(THD *,Sql_state_errno_level::enum_warning_level,uint,char const*,...) mov [rbp+var_1], 0 jmp loc_D1A74A loc_D1A5EE: jmp short $+2 loc_D1A5F0: lea rdi, [rbp+var_50] xor esi, esi call _ZN13List_iteratorI12Create_fieldEppEi; List_iterator<Create_field>::operator++(int) mov [rbp+var_98], rax cmp rax, 0 jz short loc_D1A66C mov rax, [rbp+var_98] mov eax, [rax+68h] and eax, 8000000h cmp eax, 0 jz short loc_D1A638 mov rax, [rbp+var_98] mov [rbp+var_A0], rax cmp [rbp+var_A8], 0 jz short loc_D1A636 jmp short loc_D1A66C loc_D1A636: jmp short loc_D1A66A loc_D1A638: mov rax, [rbp+var_98] mov eax, [rax+68h] and eax, 10000000h cmp eax, 0 jz short loc_D1A668 mov rax, [rbp+var_98] mov [rbp+var_A8], rax cmp [rbp+var_A0], 0 jz short loc_D1A666 jmp short loc_D1A66C loc_D1A666: jmp short $+2 loc_D1A668: jmp short $+2 loc_D1A66A: jmp short loc_D1A5F0 loc_D1A66C: cmp [rbp+var_A0], 0 jz short loc_D1A680 cmp [rbp+var_A8], 0 jnz short loc_D1A6BE loc_D1A680: mov rax, [rbp+var_28] mov rdx, [rax+28h] mov rsi, [rbp+var_A0] lea rcx, aGeneratedAlway_0+12h; "AS ROW START" lea rax, aGeneratedAlway_1+12h; "AS ROW END" cmp rsi, 0 cmovnz rcx, rax mov edi, 101Dh xor eax, eax mov esi, eax mov al, 0 call my_error mov [rbp+var_1], 1 jmp loc_D1A74A loc_D1A6BE: mov rsi, [rbp+var_A0] add rsi, 38h ; '8' mov rdx, [rbp+var_A8] add rdx, 38h ; '8' lea rdi, [rbp+var_E0] call _ZN17Table_period_info11start_end_tC2ERK25st_mysql_const_lex_stringS3_; Table_period_info::start_end_t::start_end_t(st_mysql_const_lex_string const&,st_mysql_const_lex_string const&) mov rax, [rbp+var_E8] mov rcx, [rbp+var_E0] mov [rax+48h], rcx mov rcx, [rbp+var_D8] mov [rax+50h], rcx mov rcx, [rbp+var_D0] mov [rax+58h], rcx mov rcx, [rbp+var_C8] mov [rax+60h], rcx mov rcx, [rax+48h] mov [rax+10h], rcx mov rcx, [rax+50h] mov [rax+18h], rcx mov rcx, [rax+58h] mov [rax+20h], rcx mov rcx, [rax+60h] mov [rax+28h], rcx mov rax, [rbp+var_20] mov ecx, [rax+0E8h] or ecx, 20h mov [rax+0E8h], ecx mov [rbp+var_1], 0 loc_D1A74A: mov al, [rbp+var_1] and al, 1 add rsp, 0F0h pop rbp retn
char Vers_parse_info::fix_create_like( Vers_parse_info *this, Alter_info *a2, HA_CREATE_INFO *a3, TABLE_LIST *a4, TABLE_LIST *a5) { THD *v5; // rax int v6; // r8d int v7; // r9d const char *v8; // rcx bool v10; // [rsp+7h] [rbp-E9h] _QWORD v11[4]; // [rsp+10h] [rbp-E0h] BYREF long long v12; // [rsp+30h] [rbp-C0h] long long v13; // [rsp+38h] [rbp-B8h] int v14; // [rsp+44h] [rbp-ACh] long long v15; // [rsp+48h] [rbp-A8h] long long v16; // [rsp+50h] [rbp-A0h] long long v17; // [rsp+58h] [rbp-98h] _BYTE v18[32]; // [rsp+60h] [rbp-90h] BYREF _BYTE v19[32]; // [rsp+80h] [rbp-70h] BYREF _BYTE v20[32]; // [rsp+A0h] [rbp-50h] BYREF TABLE_LIST *v21; // [rsp+C0h] [rbp-30h] TABLE_LIST *v22; // [rsp+C8h] [rbp-28h] Table_scope_and_contents_source_pod_st *v23; // [rsp+D0h] [rbp-20h] Alter_info *v24; // [rsp+D8h] [rbp-18h] Vers_parse_info *v25; // [rsp+E0h] [rbp-10h] v25 = this; v24 = a2; v23 = a3; v22 = a4; v21 = a5; List_iterator<Create_field>::List_iterator((base_list_iterator *)v20, (Alter_info *)((char *)a2 + 96)); List_iterator<Key>::List_iterator((base_list_iterator *)v19, (Alter_info *)((char *)v24 + 48)); List_iterator<Key_part_spec>::List_iterator(v18); v16 = 0LL; v15 = 0LL; if ( Table_scope_and_contents_source_pod_st::tmp_table(v23) ) { v14 = 2; while ( 1 ) { v10 = 0; if ( v14 ) { v17 = List_iterator<Create_field>::operator++((base_list_iterator *)v20); v10 = v17 != 0; } if ( !v10 ) break; if ( (*(_DWORD *)(v17 + 104) & 0x18000000) != 0 ) { List_iterator<Create_field>::remove((base_list_iterator *)v20); --v14; } List_iterator<Key>::rewind((base_list_iterator *)v19); while ( 1 ) { v13 = List_iterator<Key>::operator++((base_list_iterator *)v19); if ( !v13 ) break; List_iterator<Key_part_spec>::init(v18, v13 + 80); while ( 1 ) { v12 = List_iterator<Key_part_spec>::operator++((base_list_iterator *)v18); if ( !v12 ) break; if ( (lex_string_cmp(system_charset_info, v12, v17 + 56) & 1) == 0 ) List_iterator<Key_part_spec>::remove(v18); } if ( !*(_DWORD *)(v13 + 96) ) List_iterator<Key>::remove((base_list_iterator *)v19); } } v5 = (THD *)current_thd(); push_warning_printf( v5, 1u, 0x451u, (long long)"System versioning is stripped from temporary `%s.%s`", *((const char **)v21 + 3), *((const char **)v21 + 5)); return 0; } else { while ( 1 ) { v17 = List_iterator<Create_field>::operator++((base_list_iterator *)v20); if ( !v17 ) break; if ( (*(_DWORD *)(v17 + 104) & 0x8000000) != 0 ) { v16 = v17; if ( v15 ) break; } else if ( (*(_DWORD *)(v17 + 104) & 0x10000000) != 0 ) { v15 = v17; if ( v16 ) break; } } if ( v16 && v15 ) { Table_period_info::start_end_t::start_end_t(v11, v16 + 56, v15 + 56); *((_QWORD *)this + 9) = v11[0]; *((_QWORD *)this + 10) = v11[1]; *((_QWORD *)this + 11) = v11[2]; *((_QWORD *)this + 12) = v11[3]; *((_QWORD *)this + 2) = *((_QWORD *)this + 9); *((_QWORD *)this + 3) = *((_QWORD *)this + 10); *((_QWORD *)this + 4) = *((_QWORD *)this + 11); *((_QWORD *)this + 5) = *((_QWORD *)this + 12); *((_DWORD *)v23 + 58) |= 0x20u; return 0; } else { v8 = "AS ROW START"; if ( v16 ) v8 = "AS ROW END"; my_error(4125, 0, *((_QWORD *)v22 + 5), (_DWORD)v8, v6, v7); return 1; } } }
next_partition: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x18],0x0 ADD RDI,0x28 CALL 0x00d18a20 CMP EAX,0x0 JZ 0x00d1a430 JMP 0x00d1a472 LAB_00d1a430: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX LAB_00d1a43c: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x28 CALL 0x00d188e0 CMP EAX,0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x00d1a457 JMP 0x00d1a465 LAB_00d1a457: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00d1a43c LAB_00d1a465: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00d1a4f0 LAB_00d1a472: ADD RSP,0x20 POP RBP RET
/* Frame_unbounded_following_set_count::next_partition(unsigned long long) */ void Frame_unbounded_following_set_count::next_partition(ulonglong param_1) { int iVar1; ulonglong local_20; iVar1 = Table_read_cursor::fetch((Table_read_cursor *)(param_1 + 0x28)); if (iVar1 == 0) { local_20 = 1; while (iVar1 = Partition_read_cursor::next((Partition_read_cursor *)(param_1 + 0x28)), iVar1 == 0) { local_20 = local_20 + 1; } set_win_funcs_row_count((Frame_unbounded_following_set_count *)param_1,local_20); } return; }
39,112
OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp
int quad::getSingleStripFacets(int uRes, int vRes, int coord0, bool triangulate, FacetArray facets) { assert((uRes == 1) || (vRes == 1)); FacetStrip qStrip; qStrip.quadTopology = true; qStrip.quadTriangulate = triangulate; qStrip.splitFirstFace = false; qStrip.splitLastFace = false; qStrip.innerReversed = true; qStrip.includeLastFace = true; if (uRes > 1) { qStrip.outerEdges = uRes; qStrip.innerEdges = uRes - 2; // Assign these successively around the strip: qStrip.outerFirst = coord0; qStrip.outerLast = qStrip.outerFirst + uRes; qStrip.innerLast = qStrip.outerLast + 2; qStrip.innerFirst = qStrip.outerLast + uRes; qStrip.outerPrev = qStrip.innerFirst + 1; return qStrip.connectUniformQuads(facets); } else { qStrip.outerEdges = vRes; qStrip.innerEdges = vRes - 2; qStrip.outerPrev = coord0; qStrip.outerFirst = coord0 + 1; qStrip.outerLast = qStrip.outerFirst + vRes; qStrip.innerLast = qStrip.outerLast + 2; qStrip.innerFirst = qStrip.outerLast + vRes; return qStrip.connectUniformQuads(facets); } }
O0
cpp
OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray): pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %r8, -0x80(%rbp) movb %cl, %al movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) andb $0x1, %al movb %al, -0x11(%rbp) movq %r8, -0x20(%rbp) movb $0x1, %al cmpl $0x1, -0x8(%rbp) movb %al, -0x71(%rbp) je 0x1c0888 cmpl $0x1, -0xc(%rbp) sete %al movb %al, -0x71(%rbp) movb -0x71(%rbp), %al testb $0x1, %al jne 0x1c0891 jmp 0x1c0893 jmp 0x1c08b2 leaq 0x3ad4a(%rip), %rdi # 0x1fb5e4 leaq 0x3a6af(%rip), %rsi # 0x1faf50 movl $0x3e9, %edx # imm = 0x3E9 leaq 0x3ad52(%rip), %rcx # 0x1fb5ff callq 0xc9440 leaq -0x40(%rbp), %rdi callq 0x1c0a40 movb -0x40(%rbp), %al andb $-0x2, %al orb $0x1, %al movb %al, -0x40(%rbp) movb -0x11(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movb -0x40(%rbp), %al andb $0x1, %cl shlb %cl andb $-0x3, %al orb %cl, %al movb %al, -0x40(%rbp) movb -0x40(%rbp), %al andb $-0x11, %al orb $0x0, %al movb %al, -0x40(%rbp) movb -0x40(%rbp), %al andb $-0x21, %al orb $0x0, %al movb %al, -0x40(%rbp) movb -0x40(%rbp), %al andb $-0x5, %al orb $0x4, %al movb %al, -0x40(%rbp) movb -0x40(%rbp), %al andb $-0x41, %al orb $0x40, %al movb %al, -0x40(%rbp) cmpl $0x1, -0x8(%rbp) jle 0x1c099d movq -0x80(%rbp), %rax movl -0x8(%rbp), %ecx movl %ecx, -0x3c(%rbp) movl -0x8(%rbp), %ecx addl $-0x2, %ecx movl %ecx, -0x38(%rbp) movl -0x10(%rbp), %ecx movl %ecx, -0x34(%rbp) movl -0x34(%rbp), %ecx movl -0x8(%rbp), %edx addl %edx, %ecx movl %ecx, -0x30(%rbp) movl -0x30(%rbp), %ecx addl $0x2, %ecx movl %ecx, -0x24(%rbp) movl -0x30(%rbp), %ecx movl -0x8(%rbp), %edx addl %edx, %ecx movl %ecx, -0x28(%rbp) movl -0x28(%rbp), %ecx incl %ecx movl %ecx, -0x2c(%rbp) movups (%rax), %xmm0 movaps %xmm0, -0x50(%rbp) leaq -0x40(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x1c0a70 movl %eax, -0x84(%rbp) jmp 0x1c096c movl -0x84(%rbp), %eax movl %eax, -0x4(%rbp) leaq -0x50(%rbp), %rdi callq 0x1bf330 jmp 0x1c0a24 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x50(%rbp), %rdi callq 0x1bf330 jmp 0x1c0a30 movq -0x80(%rbp), %rax movl -0xc(%rbp), %ecx movl %ecx, -0x3c(%rbp) movl -0xc(%rbp), %ecx addl $-0x2, %ecx movl %ecx, -0x38(%rbp) movl -0x10(%rbp), %ecx movl %ecx, -0x2c(%rbp) movl -0x10(%rbp), %ecx incl %ecx movl %ecx, -0x34(%rbp) movl -0x34(%rbp), %ecx movl -0xc(%rbp), %edx addl %edx, %ecx movl %ecx, -0x30(%rbp) movl -0x30(%rbp), %ecx addl $0x2, %ecx movl %ecx, -0x24(%rbp) movl -0x30(%rbp), %ecx movl -0xc(%rbp), %edx addl %edx, %ecx movl %ecx, -0x28(%rbp) movups (%rax), %xmm0 movaps %xmm0, -0x70(%rbp) leaq -0x40(%rbp), %rdi leaq -0x70(%rbp), %rsi callq 0x1c0a70 movl %eax, -0x88(%rbp) jmp 0x1c09f9 movl -0x88(%rbp), %eax movl %eax, -0x4(%rbp) leaq -0x70(%rbp), %rdi callq 0x1bf330 jmp 0x1c0a24 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x70(%rbp), %rdi callq 0x1bf330 jmp 0x1c0a30 movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq movq -0x58(%rbp), %rdi callq 0xd58b0 nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Bfr4quad20getSingleStripFacetsEiiibNS1_12_GLOBAL__N_110FacetArrayE: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_80], r8 mov al, cl mov [rbp+var_8], edi mov [rbp+var_C], esi mov [rbp+var_10], edx and al, 1 mov [rbp+var_11], al mov [rbp+var_20], r8 mov al, 1 cmp [rbp+var_8], 1 mov [rbp+var_71], al jz short loc_1C0888 cmp [rbp+var_C], 1 setz al mov [rbp+var_71], al loc_1C0888: mov al, [rbp+var_71] test al, 1 jnz short loc_1C0891 jmp short loc_1C0893 loc_1C0891: jmp short loc_1C08B2 loc_1C0893: lea rdi, aUres1Vres1_0; "(uRes == 1) || (vRes == 1)" lea rsi, aWorkspaceLlm4b_42; "/workspace/llm4binary/github/2025_star3"... mov edx, 3E9h lea rcx, aStaticIntOpens_8; "static int OpenSubdiv::v3_6_0::Bfr::qua"... call ___assert_fail loc_1C08B2: lea rdi, [rbp+var_40]; this call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetStripC2Ev; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::FacetStrip(void) mov al, [rbp+var_40] and al, 0FEh or al, 1 mov [rbp+var_40], al mov al, [rbp+var_11] and al, 1 movzx eax, al mov cl, al mov al, [rbp+var_40] and cl, 1 shl cl, 1 and al, 0FDh or al, cl mov [rbp+var_40], al mov al, [rbp+var_40] and al, 0EFh or al, 0 mov [rbp+var_40], al mov al, [rbp+var_40] and al, 0DFh or al, 0 mov [rbp+var_40], al mov al, [rbp+var_40] and al, 0FBh or al, 4 mov [rbp+var_40], al mov al, [rbp+var_40] and al, 0BFh or al, 40h mov [rbp+var_40], al cmp [rbp+var_8], 1 jle loc_1C099D mov rax, [rbp+var_80] mov ecx, [rbp+var_8] mov [rbp+var_3C], ecx mov ecx, [rbp+var_8] add ecx, 0FFFFFFFEh mov [rbp+var_38], ecx mov ecx, [rbp+var_10] mov [rbp+var_34], ecx mov ecx, [rbp+var_34] mov edx, [rbp+var_8] add ecx, edx mov [rbp+var_30], ecx mov ecx, [rbp+var_30] add ecx, 2 mov [rbp+var_24], ecx mov ecx, [rbp+var_30] mov edx, [rbp+var_8] add ecx, edx mov [rbp+var_28], ecx mov ecx, [rbp+var_28] inc ecx mov [rbp+var_2C], ecx movups xmm0, xmmword ptr [rax] movaps [rbp+var_50], xmm0 lea rdi, [rbp+var_40] lea rsi, [rbp+var_50] call _ZNK10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetStrip19connectUniformQuadsENS2_10FacetArrayE; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformQuads(OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray) mov [rbp+var_84], eax jmp short $+2 loc_1C096C: mov eax, [rbp+var_84] mov [rbp+var_4], eax lea rdi, [rbp+var_50]; this call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetArrayD2Ev; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray::~FacetArray() jmp loc_1C0A24 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_50]; this call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetArrayD2Ev; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray::~FacetArray() jmp loc_1C0A30 loc_1C099D: mov rax, [rbp+var_80] mov ecx, [rbp+var_C] mov [rbp+var_3C], ecx mov ecx, [rbp+var_C] add ecx, 0FFFFFFFEh mov [rbp+var_38], ecx mov ecx, [rbp+var_10] mov [rbp+var_2C], ecx mov ecx, [rbp+var_10] inc ecx mov [rbp+var_34], ecx mov ecx, [rbp+var_34] mov edx, [rbp+var_C] add ecx, edx mov [rbp+var_30], ecx mov ecx, [rbp+var_30] add ecx, 2 mov [rbp+var_24], ecx mov ecx, [rbp+var_30] mov edx, [rbp+var_C] add ecx, edx mov [rbp+var_28], ecx movups xmm0, xmmword ptr [rax] movaps [rbp+var_70], xmm0 lea rdi, [rbp+var_40] lea rsi, [rbp+var_70] call _ZNK10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetStrip19connectUniformQuadsENS2_10FacetArrayE; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformQuads(OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray) mov [rbp+var_88], eax jmp short $+2 loc_1C09F9: mov eax, [rbp+var_88] mov [rbp+var_4], eax lea rdi, [rbp+var_70]; this call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetArrayD2Ev; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray::~FacetArray() jmp short loc_1C0A24 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_70]; this call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetArrayD2Ev; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray::~FacetArray() jmp short loc_1C0A30 loc_1C0A24: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn loc_1C0A30: mov rdi, [rbp+var_58] call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int a1, int a2, int a3, char a4, _OWORD *a5) { bool v7; // [rsp+1Fh] [rbp-71h] __int128 v8; // [rsp+20h] [rbp-70h] BYREF __int128 v9; // [rsp+40h] [rbp-50h] BYREF _BYTE v10[4]; // [rsp+50h] [rbp-40h] BYREF int v11; // [rsp+54h] [rbp-3Ch] int v12; // [rsp+58h] [rbp-38h] int v13; // [rsp+5Ch] [rbp-34h] int v14; // [rsp+60h] [rbp-30h] int v15; // [rsp+64h] [rbp-2Ch] int v16; // [rsp+68h] [rbp-28h] int v17; // [rsp+6Ch] [rbp-24h] _OWORD *v18; // [rsp+70h] [rbp-20h] char v19; // [rsp+7Fh] [rbp-11h] int v20; // [rsp+80h] [rbp-10h] int v21; // [rsp+84h] [rbp-Ch] int v22; // [rsp+88h] [rbp-8h] unsigned int v23; // [rsp+8Ch] [rbp-4h] v22 = a1; v21 = a2; v20 = a3; v19 = a4 & 1; v18 = a5; v7 = 1; if ( a1 != 1 ) v7 = v21 == 1; if ( !v7 ) __assert_fail( "(uRes == 1) || (vRes == 1)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp", 1001LL, "static int OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, FacetArray)"); OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::FacetStrip((OpenSubdiv::v3_6_0::Bfr::_anonymous_namespace_::FacetStrip *)v10); v10[0] = v10[0] & 0xFE | 1; v10[0] = (2 * (v19 & 1)) | v10[0] & 0xFD; v10[0] &= ~0x10u; v10[0] &= ~0x20u; v10[0] = v10[0] & 0xFB | 4; v10[0] = v10[0] & 0xBF | 0x40; if ( v22 <= 1 ) { v11 = v21; v12 = v21 - 2; v15 = v20; v13 = v20 + 1; v14 = v21 + v20 + 1; v17 = v14 + 2; v16 = v21 + v14; v8 = *a5; v23 = OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformQuads(v10, &v8); OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray::~FacetArray((OpenSubdiv::v3_6_0::Bfr::_anonymous_namespace_::FacetArray *)&v8); } else { v11 = v22; v12 = v22 - 2; v13 = v20; v14 = v22 + v20; v17 = v22 + v20 + 2; v16 = v22 + v22 + v20; v15 = v16 + 1; v9 = *a5; v23 = OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformQuads(v10, &v9); OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray::~FacetArray((OpenSubdiv::v3_6_0::Bfr::_anonymous_namespace_::FacetArray *)&v9); } return v23; }
39,113
OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp
int quad::getSingleStripFacets(int uRes, int vRes, int coord0, bool triangulate, FacetArray facets) { assert((uRes == 1) || (vRes == 1)); FacetStrip qStrip; qStrip.quadTopology = true; qStrip.quadTriangulate = triangulate; qStrip.splitFirstFace = false; qStrip.splitLastFace = false; qStrip.innerReversed = true; qStrip.includeLastFace = true; if (uRes > 1) { qStrip.outerEdges = uRes; qStrip.innerEdges = uRes - 2; // Assign these successively around the strip: qStrip.outerFirst = coord0; qStrip.outerLast = qStrip.outerFirst + uRes; qStrip.innerLast = qStrip.outerLast + 2; qStrip.innerFirst = qStrip.outerLast + uRes; qStrip.outerPrev = qStrip.innerFirst + 1; return qStrip.connectUniformQuads(facets); } else { qStrip.outerEdges = vRes; qStrip.innerEdges = vRes - 2; qStrip.outerPrev = coord0; qStrip.outerFirst = coord0 + 1; qStrip.outerLast = qStrip.outerFirst + vRes; qStrip.innerLast = qStrip.outerLast + 2; qStrip.innerFirst = qStrip.outerLast + vRes; return qStrip.connectUniformQuads(facets); } }
O2
cpp
OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray): subq $0x48, %rsp cmpl $0x1, %edi sete %al cmpl $0x1, %esi sete %r9b orb %al, %r9b je 0xac3cb xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movaps %xmm0, 0x10(%rsp) addb %cl, %cl orb $0x45, %cl movb %cl, (%rsp) cmpl $0x2, %edi jl 0xac388 leaq 0x14(%rsp), %rax movl %edi, -0x10(%rax) leal -0x2(%rdi), %ecx movl %ecx, -0xc(%rax) movl %edx, -0x8(%rax) leal (%rdx,%rdi), %ecx movl %ecx, -0x4(%rax) addl %edi, %edx addl $0x2, %edx movl %edx, 0x8(%rax) movl %edi, %edx addl %ecx, %edx movl %edx, 0x4(%rax) addl %edi, %ecx incl %ecx leaq 0x38(%rsp), %rsi jmp 0xac3b5 leaq 0x18(%rsp), %rax movl %esi, -0x14(%rax) leal -0x2(%rsi), %ecx movl %ecx, -0x10(%rax) movl %edx, -0x4(%rax) leal 0x1(%rdx), %ecx movl %ecx, -0xc(%rax) leal 0x1(%rdx,%rsi), %ecx movl %ecx, -0x8(%rax) addl %esi, %edx addl $0x3, %edx movl %edx, 0x4(%rax) addl %esi, %ecx leaq 0x28(%rsp), %rsi movl %ecx, (%rax) movups (%r8), %xmm0 movups %xmm0, (%rsi) movq %rsp, %rdi callq 0xac3ea addq $0x48, %rsp retq leaq 0x20a15(%rip), %rdi # 0xccde7 leaq 0x20457(%rip), %rsi # 0xcc830 leaq 0x20a22(%rip), %rcx # 0xcce02 movl $0x3e9, %edx # imm = 0x3E9 callq 0x512a0
_ZN10OpenSubdiv6v3_6_03Bfr4quad20getSingleStripFacetsEiiibNS1_12_GLOBAL__N_110FacetArrayE: sub rsp, 48h cmp edi, 1 setz al cmp esi, 1 setz r9b or r9b, al jz loc_AC3CB xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 movaps [rsp+48h+var_38], xmm0 add cl, cl or cl, 45h mov byte ptr [rsp+48h+var_48], cl cmp edi, 2 jl short loc_AC388 lea rax, [rsp+48h+var_38+4] mov [rax-10h], edi lea ecx, [rdi-2] mov [rax-0Ch], ecx mov [rax-8], edx lea ecx, [rdx+rdi] mov [rax-4], ecx add edx, edi add edx, 2 mov [rax+8], edx mov edx, edi add edx, ecx mov [rax+4], edx add ecx, edi inc ecx lea rsi, [rsp+48h+var_10] jmp short loc_AC3B5 loc_AC388: lea rax, [rsp+48h+var_38+8] mov [rax-14h], esi lea ecx, [rsi-2] mov [rax-10h], ecx mov [rax-4], edx lea ecx, [rdx+1] mov [rax-0Ch], ecx lea ecx, [rdx+rsi+1] mov [rax-8], ecx add edx, esi add edx, 3 mov [rax+4], edx add ecx, esi lea rsi, [rsp+48h+var_20] loc_AC3B5: mov [rax], ecx movups xmm0, xmmword ptr [r8] movups xmmword ptr [rsi], xmm0 mov rdi, rsp call _ZNK10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetStrip19connectUniformQuadsENS2_10FacetArrayE; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformQuads(OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray) add rsp, 48h retn loc_AC3CB: lea rdi, aUres1Vres1_0; "(uRes == 1) || (vRes == 1)" lea rsi, aWorkspaceLlm4b_43; "/workspace/llm4binary/github/2025_star3"... lea rcx, aStaticIntOpens_8; "static int OpenSubdiv::v3_6_0::Bfr::qua"... mov edx, 3E9h call ___assert_fail
long long OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int a1, int a2, int a3, char a4, _OWORD *a5) { char *v5; // rax int v6; // ecx char *v7; // rsi __int128 v9; // [rsp+0h] [rbp-48h] BYREF __int128 v10; // [rsp+10h] [rbp-38h] BYREF char v11; // [rsp+28h] [rbp-20h] BYREF char v12; // [rsp+38h] [rbp-10h] BYREF if ( a1 != 1 && a2 != 1 ) __assert_fail( "(uRes == 1) || (vRes == 1)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp", 1001LL, "static int OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, FacetArray)"); v9 = 0LL; v10 = 0LL; LOBYTE(v9) = (2 * a4) | 0x45; if ( a1 < 2 ) { v5 = (char *)&v10 + 8; DWORD1(v9) = a2; DWORD2(v9) = a2 - 2; DWORD1(v10) = a3; HIDWORD(v9) = a3 + 1; LODWORD(v10) = a3 + a2 + 1; HIDWORD(v10) = a2 + a3 + 3; v6 = a2 + v10; v7 = &v11; } else { v5 = (char *)&v10 + 4; DWORD1(v9) = a1; DWORD2(v9) = a1 - 2; HIDWORD(v9) = a3; LODWORD(v10) = a3 + a1; HIDWORD(v10) = a1 + a3 + 2; DWORD2(v10) = a3 + a1 + a1; v6 = DWORD2(v10) + 1; v7 = &v12; } *(_DWORD *)v5 = v6; *(_OWORD *)v7 = *a5; return OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformQuads(&v9, v7); }
getSingleStripFacets: SUB RSP,0x48 CMP EDI,0x1 SETZ AL CMP ESI,0x1 SETZ R9B OR R9B,AL JZ 0x001ac3cb XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 ADD CL,CL OR CL,0x45 MOV byte ptr [RSP],CL CMP EDI,0x2 JL 0x001ac388 LEA RAX,[RSP + 0x14] MOV dword ptr [RAX + -0x10],EDI LEA ECX,[RDI + -0x2] MOV dword ptr [RAX + -0xc],ECX MOV dword ptr [RAX + -0x8],EDX LEA ECX,[RDX + RDI*0x1] MOV dword ptr [RAX + -0x4],ECX ADD EDX,EDI ADD EDX,0x2 MOV dword ptr [RAX + 0x8],EDX MOV EDX,EDI ADD EDX,ECX MOV dword ptr [RAX + 0x4],EDX ADD ECX,EDI INC ECX LEA RSI,[RSP + 0x38] JMP 0x001ac3b5 LAB_001ac388: LEA RAX,[RSP + 0x18] MOV dword ptr [RAX + -0x14],ESI LEA ECX,[RSI + -0x2] MOV dword ptr [RAX + -0x10],ECX MOV dword ptr [RAX + -0x4],EDX LEA ECX,[RDX + 0x1] MOV dword ptr [RAX + -0xc],ECX LEA ECX,[RDX + RSI*0x1 + 0x1] MOV dword ptr [RAX + -0x8],ECX ADD EDX,ESI ADD EDX,0x3 MOV dword ptr [RAX + 0x4],EDX ADD ECX,ESI LEA RSI,[RSP + 0x28] LAB_001ac3b5: MOV dword ptr [RAX],ECX MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSI],XMM0 MOV RDI,RSP CALL 0x001ac3ea ADD RSP,0x48 RET LAB_001ac3cb: LEA RDI,[0x1ccde7] LEA RSI,[0x1cc830] LEA RCX,[0x1cce02] MOV EDX,0x3e9 CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray) */ void OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets (int param_1,int param_2,int param_3,char param_4,int4 *param_5) { uint uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int *piVar5; int iVar6; int4 *puVar7; ulong local_48; int iStack_40; int iStack_3c; int8 local_38; int8 uStack_30; int4 local_20 [4]; int4 local_10 [4]; if (param_2 == 1 || param_1 == 1) { if (param_1 < 2) { piVar5 = (int *)&uStack_30; local_48 = CONCAT44(param_2,(uint)(byte)(param_4 * '\x02')); _iStack_40 = CONCAT44(param_3 + 1,param_2 + -2); iVar6 = param_3 + 1 + param_2; local_38 = CONCAT44(param_3,iVar6); uStack_30 = (ulong)(param_3 + param_2 + 3) << 0x20; iVar6 = iVar6 + param_2; puVar7 = local_20; } else { piVar5 = (int *)((long)&local_38 + 4); local_48 = CONCAT44(param_1,(uint)(byte)(param_4 * '\x02')); _iStack_40 = CONCAT44(param_3,param_1 + -2); uVar1 = param_3 + param_1; local_38 = (ulong)uVar1; uStack_30 = CONCAT44(param_3 + param_1 + 2,param_1 + uVar1); iVar6 = uVar1 + param_1 + 1; puVar7 = local_10; } local_48 = local_48 | 0x45; *piVar5 = iVar6; uVar2 = param_5[1]; uVar3 = param_5[2]; uVar4 = param_5[3]; *puVar7 = *param_5; puVar7[1] = uVar2; puVar7[2] = uVar3; puVar7[3] = uVar4; (anonymous_namespace)::FacetStrip::connectUniformQuads((FacetStrip *)&local_48); return; } /* WARNING: Subroutine does not return */ __assert_fail("(uRes == 1) || (vRes == 1)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp" ,0x3e9, "static int OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, FacetArray)" ); }
39,114
OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp
int quad::getSingleStripFacets(int uRes, int vRes, int coord0, bool triangulate, FacetArray facets) { assert((uRes == 1) || (vRes == 1)); FacetStrip qStrip; qStrip.quadTopology = true; qStrip.quadTriangulate = triangulate; qStrip.splitFirstFace = false; qStrip.splitLastFace = false; qStrip.innerReversed = true; qStrip.includeLastFace = true; if (uRes > 1) { qStrip.outerEdges = uRes; qStrip.innerEdges = uRes - 2; // Assign these successively around the strip: qStrip.outerFirst = coord0; qStrip.outerLast = qStrip.outerFirst + uRes; qStrip.innerLast = qStrip.outerLast + 2; qStrip.innerFirst = qStrip.outerLast + uRes; qStrip.outerPrev = qStrip.innerFirst + 1; return qStrip.connectUniformQuads(facets); } else { qStrip.outerEdges = vRes; qStrip.innerEdges = vRes - 2; qStrip.outerPrev = coord0; qStrip.outerFirst = coord0 + 1; qStrip.outerLast = qStrip.outerFirst + vRes; qStrip.innerLast = qStrip.outerLast + 2; qStrip.innerFirst = qStrip.outerLast + vRes; return qStrip.connectUniformQuads(facets); } }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray): subq $0x48, %rsp cmpl $0x1, %edi sete %al cmpl $0x1, %esi sete %r9b orb %al, %r9b je 0xa33bf xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movaps %xmm0, 0x10(%rsp) addb %cl, %cl orb $0x45, %cl movb %cl, (%rsp) cmpl $0x2, %edi jl 0xa337c leaq 0x14(%rsp), %rax movl %edi, -0x10(%rax) leal -0x2(%rdi), %ecx movl %ecx, -0xc(%rax) movl %edx, -0x8(%rax) leal (%rdx,%rdi), %ecx movl %ecx, -0x4(%rax) addl %edi, %edx addl $0x2, %edx movl %edx, 0x8(%rax) movl %edi, %edx addl %ecx, %edx movl %edx, 0x4(%rax) addl %edi, %ecx incl %ecx leaq 0x38(%rsp), %rsi jmp 0xa33a9 leaq 0x18(%rsp), %rax movl %esi, -0x14(%rax) leal -0x2(%rsi), %ecx movl %ecx, -0x10(%rax) movl %edx, -0x4(%rax) leal 0x1(%rdx), %ecx movl %ecx, -0xc(%rax) leal 0x1(%rdx,%rsi), %ecx movl %ecx, -0x8(%rax) addl %esi, %edx addl $0x3, %edx movl %edx, 0x4(%rax) addl %esi, %ecx leaq 0x28(%rsp), %rsi movl %ecx, (%rax) movups (%r8), %xmm0 movups %xmm0, (%rsi) movq %rsp, %rdi callq 0xa33de addq $0x48, %rsp retq leaq 0x226a9(%rip), %rdi # 0xc5a6f leaq 0x22133(%rip), %rsi # 0xc5500 leaq 0x226b6(%rip), %rcx # 0xc5a8a movl $0x3e9, %edx # imm = 0x3E9 callq 0x39540
_ZN10OpenSubdiv6v3_6_03Bfr4quad20getSingleStripFacetsEiiibNS1_12_GLOBAL__N_110FacetArrayE: sub rsp, 48h cmp edi, 1 setz al cmp esi, 1 setz r9b or r9b, al jz loc_A33BF xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 movaps [rsp+48h+var_38], xmm0 add cl, cl or cl, 45h mov byte ptr [rsp+48h+var_48], cl cmp edi, 2 jl short loc_A337C lea rax, [rsp+48h+var_38+4] mov [rax-10h], edi lea ecx, [rdi-2] mov [rax-0Ch], ecx mov [rax-8], edx lea ecx, [rdx+rdi] mov [rax-4], ecx add edx, edi add edx, 2 mov [rax+8], edx mov edx, edi add edx, ecx mov [rax+4], edx add ecx, edi inc ecx lea rsi, [rsp+48h+var_10] jmp short loc_A33A9 loc_A337C: lea rax, [rsp+48h+var_38+8] mov [rax-14h], esi lea ecx, [rsi-2] mov [rax-10h], ecx mov [rax-4], edx lea ecx, [rdx+1] mov [rax-0Ch], ecx lea ecx, [rdx+rsi+1] mov [rax-8], ecx add edx, esi add edx, 3 mov [rax+4], edx add ecx, esi lea rsi, [rsp+48h+var_20] loc_A33A9: mov [rax], ecx movups xmm0, xmmword ptr [r8] movups xmmword ptr [rsi], xmm0 mov rdi, rsp call _ZNK10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetStrip19connectUniformQuadsENS2_10FacetArrayE; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformQuads(OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray) add rsp, 48h retn loc_A33BF: lea rdi, aUres1Vres1_0; "(uRes == 1) || (vRes == 1)" lea rsi, aWorkspaceLlm4b_47; "/workspace/llm4binary/github/2025_star3"... lea rcx, aStaticIntOpens_8; "static int OpenSubdiv::v3_6_0::Bfr::qua"... mov edx, 3E9h call ___assert_fail
long long OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int a1, int a2, int a3, char a4, _OWORD *a5) { char *v5; // rax int v6; // ecx char *v7; // rsi __int128 v9; // [rsp+0h] [rbp-48h] BYREF __int128 v10; // [rsp+10h] [rbp-38h] BYREF char v11; // [rsp+28h] [rbp-20h] BYREF char v12; // [rsp+38h] [rbp-10h] BYREF if ( a1 != 1 && a2 != 1 ) __assert_fail( "(uRes == 1) || (vRes == 1)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp", 1001LL, "static int OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, FacetArray)"); v9 = 0LL; v10 = 0LL; LOBYTE(v9) = (2 * a4) | 0x45; if ( a1 < 2 ) { v5 = (char *)&v10 + 8; DWORD1(v9) = a2; DWORD2(v9) = a2 - 2; DWORD1(v10) = a3; HIDWORD(v9) = a3 + 1; LODWORD(v10) = a3 + a2 + 1; HIDWORD(v10) = a2 + a3 + 3; v6 = a2 + v10; v7 = &v11; } else { v5 = (char *)&v10 + 4; DWORD1(v9) = a1; DWORD2(v9) = a1 - 2; HIDWORD(v9) = a3; LODWORD(v10) = a3 + a1; HIDWORD(v10) = a1 + a3 + 2; DWORD2(v10) = a3 + a1 + a1; v6 = DWORD2(v10) + 1; v7 = &v12; } *(_DWORD *)v5 = v6; *(_OWORD *)v7 = *a5; return OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformQuads(&v9, v7); }
getSingleStripFacets: SUB RSP,0x48 CMP EDI,0x1 SETZ AL CMP ESI,0x1 SETZ R9B OR R9B,AL JZ 0x001a33bf XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 ADD CL,CL OR CL,0x45 MOV byte ptr [RSP],CL CMP EDI,0x2 JL 0x001a337c LEA RAX,[RSP + 0x14] MOV dword ptr [RAX + -0x10],EDI LEA ECX,[RDI + -0x2] MOV dword ptr [RAX + -0xc],ECX MOV dword ptr [RAX + -0x8],EDX LEA ECX,[RDX + RDI*0x1] MOV dword ptr [RAX + -0x4],ECX ADD EDX,EDI ADD EDX,0x2 MOV dword ptr [RAX + 0x8],EDX MOV EDX,EDI ADD EDX,ECX MOV dword ptr [RAX + 0x4],EDX ADD ECX,EDI INC ECX LEA RSI,[RSP + 0x38] JMP 0x001a33a9 LAB_001a337c: LEA RAX,[RSP + 0x18] MOV dword ptr [RAX + -0x14],ESI LEA ECX,[RSI + -0x2] MOV dword ptr [RAX + -0x10],ECX MOV dword ptr [RAX + -0x4],EDX LEA ECX,[RDX + 0x1] MOV dword ptr [RAX + -0xc],ECX LEA ECX,[RDX + RSI*0x1 + 0x1] MOV dword ptr [RAX + -0x8],ECX ADD EDX,ESI ADD EDX,0x3 MOV dword ptr [RAX + 0x4],EDX ADD ECX,ESI LEA RSI,[RSP + 0x28] LAB_001a33a9: MOV dword ptr [RAX],ECX MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSI],XMM0 MOV RDI,RSP CALL 0x001a33de ADD RSP,0x48 RET LAB_001a33bf: LEA RDI,[0x1c5a6f] LEA RSI,[0x1c5500] LEA RCX,[0x1c5a8a] MOV EDX,0x3e9 CALL 0x00139540
/* OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray) */ void OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets (int param_1,int param_2,int param_3,char param_4,int4 *param_5) { uint uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int *piVar5; int iVar6; int4 *puVar7; ulong local_48; int iStack_40; int iStack_3c; int8 local_38; int8 uStack_30; int4 local_20 [4]; int4 local_10 [4]; if (param_2 == 1 || param_1 == 1) { if (param_1 < 2) { piVar5 = (int *)&uStack_30; local_48 = CONCAT44(param_2,(uint)(byte)(param_4 * '\x02')); _iStack_40 = CONCAT44(param_3 + 1,param_2 + -2); iVar6 = param_3 + 1 + param_2; local_38 = CONCAT44(param_3,iVar6); uStack_30 = (ulong)(param_3 + param_2 + 3) << 0x20; iVar6 = iVar6 + param_2; puVar7 = local_20; } else { piVar5 = (int *)((long)&local_38 + 4); local_48 = CONCAT44(param_1,(uint)(byte)(param_4 * '\x02')); _iStack_40 = CONCAT44(param_3,param_1 + -2); uVar1 = param_3 + param_1; local_38 = (ulong)uVar1; uStack_30 = CONCAT44(param_3 + param_1 + 2,param_1 + uVar1); iVar6 = uVar1 + param_1 + 1; puVar7 = local_10; } local_48 = local_48 | 0x45; *piVar5 = iVar6; uVar2 = param_5[1]; uVar3 = param_5[2]; uVar4 = param_5[3]; *puVar7 = *param_5; puVar7[1] = uVar2; puVar7[2] = uVar3; puVar7[3] = uVar4; (anonymous_namespace)::FacetStrip::connectUniformQuads((FacetStrip *)&local_48); return; } /* WARNING: Subroutine does not return */ __assert_fail("(uRes == 1) || (vRes == 1)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp" ,0x3e9, "static int OpenSubdiv::v3_6_0::Bfr::quad::getSingleStripFacets(int, int, int, bool, FacetArray)" ); }
39,115
my_charset_is_8bit_pure_ascii
eloqsql/strings/ctype-simple.c
static my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs) { size_t code; if (!cs->tab_to_uni) return 0; for (code= 0; code < 256; code++) { if (cs->tab_to_uni[code] > 0x7F) return 0; } return 1; }
O0
c
my_charset_is_8bit_pure_ascii: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x96829 movb $0x0, -0x1(%rbp) jmp 0x9686a movq $0x0, -0x18(%rbp) cmpq $0x100, -0x18(%rbp) # imm = 0x100 jae 0x96866 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq -0x18(%rbp), %rcx movzwl (%rax,%rcx,2), %eax cmpl $0x7f, %eax jle 0x96856 movb $0x0, -0x1(%rbp) jmp 0x9686a jmp 0x96858 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x96831 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nop
my_charset_is_8bit_pure_ascii: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_96829 mov [rbp+var_1], 0 jmp short loc_9686A loc_96829: mov [rbp+var_18], 0 loc_96831: cmp [rbp+var_18], 100h jnb short loc_96866 mov rax, [rbp+var_10] mov rax, [rax+68h] mov rcx, [rbp+var_18] movzx eax, word ptr [rax+rcx*2] cmp eax, 7Fh jle short loc_96856 mov [rbp+var_1], 0 jmp short loc_9686A loc_96856: jmp short $+2 loc_96858: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_96831 loc_96866: mov [rbp+var_1], 1 loc_9686A: mov al, [rbp+var_1] pop rbp retn
char my_charset_is_8bit_pure_ascii(long long a1) { unsigned long long i; // [rsp+0h] [rbp-18h] if ( !*(_QWORD *)(a1 + 104) ) return 0; for ( i = 0LL; i < 0x100; ++i ) { if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i) > 0x7Fu ) return 0; } return 1; }
my_charset_is_8bit_pure_ascii: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x00196829 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0019686a LAB_00196829: MOV qword ptr [RBP + -0x18],0x0 LAB_00196831: CMP qword ptr [RBP + -0x18],0x100 JNC 0x00196866 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + RCX*0x2] CMP EAX,0x7f JLE 0x00196856 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0019686a LAB_00196856: JMP 0x00196858 LAB_00196858: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00196831 LAB_00196866: MOV byte ptr [RBP + -0x1],0x1 LAB_0019686a: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 my_charset_is_8bit_pure_ascii(long param_1) { ulong local_20; int1 local_9; if (*(long *)(param_1 + 0x68) == 0) { local_9 = 0; } else { for (local_20 = 0; local_20 < 0x100; local_20 = local_20 + 1) { if (0x7f < *(ushort *)(*(long *)(param_1 + 0x68) + local_20 * 2)) { return 0; } } local_9 = 1; } return local_9; }
39,116
my_strtoll10_utf32
eloqsql/strings/ctype-ucs2.c
static longlong my_strtoll10_utf32(CHARSET_INFO *cs __attribute__((unused)), const char *nptr, char **endptr, int *error) { const char *s, *end, *start, *n_end, *true_end; uchar c; unsigned long i, j, k; ulonglong li; int negative; ulong cutoff, cutoff2, cutoff3; s= nptr; /* If fixed length string */ if (endptr) { /* Make sure string length is even */ end= s + ((*endptr - s) / 4) * 4; while (s < end && !s[0] && !s[1] && !s[2] && (s[3] == ' ' || s[3] == '\t')) s+= 4; if (s == end) goto no_conv; } else { /* We don't support null terminated strings in UCS2 */ goto no_conv; } /* Check for a sign. */ negative= 0; if (!s[0] && !s[1] && !s[2] && s[3] == '-') { *error= -1; /* Mark as negative number */ negative= 1; s+= 4; if (s == end) goto no_conv; cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2; cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100; cutoff3= MAX_NEGATIVE_NUMBER % 100; } else { *error= 0; if (!s[0] && !s[1] && !s[2] && s[3] == '+') { s+= 4; if (s == end) goto no_conv; } cutoff= ULONGLONG_MAX / LFACTOR2; cutoff2= ULONGLONG_MAX % LFACTOR2 / 100; cutoff3= ULONGLONG_MAX % 100; } /* Handle case where we have a lot of pre-zero */ if (!s[0] && !s[1] && !s[2] && s[3] == '0') { i= 0; do { s+= 4; if (s == end) goto end_i; /* Return 0 */ } while (!s[0] && !s[1] && !s[2] && s[3] == '0'); n_end= s + 4 * INIT_CNT; } else { /* Read first digit to check that it's a valid number */ if (s[0] || s[1] || s[2] || (c= (s[3]-'0')) > 9) goto no_conv; i= c; s+= 4; n_end= s + 4 * (INIT_CNT-1); } /* Handle first 9 digits and store them in i */ if (n_end > end) n_end= end; for (; s != n_end ; s+= 4) { if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9) goto end_i; i= i * 10 + c; } if (s == end) goto end_i; /* Handle next 9 digits and store them in j */ j= 0; start= s; /* Used to know how much to shift i */ n_end= true_end= s + 4 * INIT_CNT; if (n_end > end) n_end= end; do { if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9) goto end_i_and_j; j= j * 10 + c; s+= 4; } while (s != n_end); if (s == end) { if (s != true_end) goto end_i_and_j; goto end3; } if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9) goto end3; /* Handle the next 1 or 2 digits and store them in k */ k=c; s+= 4; if (s == end || s[0] || s[1] || s[2] || (c= (s[3]-'0')) > 9) goto end4; k= k * 10 + c; s+= 4; *endptr= (char*) s; /* number string should have ended here */ if (s != end && !s[0] && !s[1] && !s[2] && (c= (s[3] - '0')) <= 9) goto overflow; /* Check that we didn't get an overflow with the last digit */ if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) && k > cutoff3))) goto overflow; li= i * LFACTOR2+ (ulonglong) j * 100 + k; return (longlong) li; overflow: /* *endptr is set here */ *error= MY_ERRNO_ERANGE; return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX; end_i: *endptr= (char*) s; return (negative ? ((longlong) -(long) i) : (longlong) i); end_i_and_j: li= (ulonglong) i * lfactor[(size_t) (s-start) / 4] + j; *endptr= (char*) s; return (negative ? -((longlong) li) : (longlong) li); end3: li= (ulonglong) i*LFACTOR+ (ulonglong) j; *endptr= (char*) s; return (negative ? -((longlong) li) : (longlong) li); end4: li= (ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k; *endptr= (char*) s; if (negative) { if (li > MAX_NEGATIVE_NUMBER) goto overflow; return -((longlong) li); } return (longlong) li; no_conv: /* There was no number to convert. */ *error= MY_ERRNO_EDOM; *endptr= (char *) nptr; return 0; }
O3
c
my_strtoll10_utf32: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx testq %rdx, %rdx je 0x69a72 movq (%rdx), %rdi subq %rsi, %rdi leaq 0x3(%rdi), %rax testq %rdi, %rdi cmovnsq %rdi, %rax andq $-0x4, %rax addq %rsi, %rax movq %rsi, %r11 cmpq $0x4, %rdi jl 0x6997c movq %rsi, %r11 cmpb $0x0, (%r11) jne 0x6997c cmpb $0x0, 0x1(%r11) jne 0x6997c cmpb $0x0, 0x2(%r11) jne 0x6997c movzbl 0x3(%r11), %edi cmpl $0x20, %edi je 0x69973 cmpl $0x9, %edi jne 0x6997c addq $0x4, %r11 cmpq %rax, %r11 jb 0x69950 cmpq %rax, %r11 je 0x69a72 cmpb $0x0, (%r11) jne 0x699c9 cmpb $0x0, 0x1(%r11) jne 0x699c9 cmpb $0x0, 0x2(%r11) jne 0x699c9 cmpb $0x2d, 0x3(%r11) jne 0x699c9 movl $0xffffffff, (%rcx) # imm = 0xFFFFFFFF addq $0x4, %r11 cmpq %rax, %r11 je 0x69a72 movl $0x8, %r8d movl $0x15f797ae, %r9d # imm = 0x15F797AE movl $0x57f5ff8, %r10d # imm = 0x57F5FF8 xorl %edi, %edi jmp 0x69a0c movl $0x0, (%rcx) cmpb $0x0, (%r11) jne 0x69a72 movl $0xf, %r8d movl $0x2bef2f5c, %r9d # imm = 0x2BEF2F5C movl $0xafebff0, %r10d # imm = 0xAFEBFF0 movb $0x1, %dil cmpb $0x0, 0x1(%r11) jne 0x69a0c cmpb $0x0, 0x2(%r11) jne 0x69a0c cmpb $0x2b, 0x3(%r11) jne 0x69a0c addq $0x4, %r11 cmpq %rax, %r11 je 0x69a72 cmpb $0x0, (%r11) jne 0x69a72 cmpb $0x0, 0x1(%r11) jne 0x69a72 cmpb $0x0, 0x2(%r11) jne 0x69a5f cmpb $0x30, 0x3(%r11) jne 0x69a5f addq $0x28, %r11 xorl %esi, %esi leaq -0x24(%r11), %rbx cmpq %rax, %rbx je 0x69c15 movq %r11, %r14 cmpb $0x0, (%rbx) jne 0x69a5b cmpb $0x0, -0x23(%r14) jne 0x69a5b cmpb $0x0, -0x22(%r14) jne 0x69a5b leaq 0x4(%r14), %r11 cmpb $0x30, -0x21(%r14) je 0x69a2d xorl %esi, %esi jmp 0x69a96 cmpb $0x0, 0x2(%r11) jne 0x69a72 movb 0x3(%r11), %bl addb $-0x30, %bl cmpb $0x9, %bl jbe 0x69a88 movl $0x21, (%rcx) movq %rsi, (%rdx) xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movzbl %bl, %esi leaq 0x4(%r11), %rbx addq $0x24, %r11 movq %r11, %r14 cmpq %rax, %r14 cmovaq %rax, %r14 cmpq %r14, %rbx je 0x69ae3 cmpb $0x0, (%rbx) jne 0x69c12 cmpb $0x0, 0x1(%rbx) jne 0x69c12 cmpb $0x0, 0x2(%rbx) jne 0x69c12 movb 0x3(%rbx), %r11b addb $-0x30, %r11b cmpb $0x9, %r11b ja 0x69c12 leaq (%rsi,%rsi,4), %rsi movzbl %r11b, %r11d leaq (%r11,%rsi,2), %rsi addq $0x4, %rbx jmp 0x69a9d cmpq %rax, %rbx je 0x69c12 leaq 0x24(%rbx), %r12 cmpq %rax, %r12 cmovaq %rax, %r12 leaq 0x8(%rbx), %r14 movl $0x24, %r13d xorl %r11d, %r11d cmpb $0x0, -0x8(%r14) jne 0x69c1a cmpb $0x0, -0x7(%r14) jne 0x69c1a cmpb $0x0, -0x6(%r14) jne 0x69c1a movb -0x5(%r14), %r15b addb $-0x30, %r15b cmpb $0x9, %r15b ja 0x69c1a leaq (%r11,%r11,4), %r11 movzbl %r15b, %r15d leaq (%r15,%r11,2), %r11 leaq 0x4(%r14), %r15 addq $-0x4, %r14 addq $-0x4, %r13 cmpq %r12, %r14 movq %r15, %r14 jne 0x69b04 leaq -0x8(%r15), %r14 cmpq %rax, %r12 je 0x69c4c cmpb $0x0, (%r14) jne 0x69c51 cmpb $0x0, -0x7(%r15) jne 0x69c51 cmpb $0x0, -0x6(%r15) jne 0x69c51 movb -0x5(%r15), %bl addb $-0x30, %bl cmpb $0x9, %bl ja 0x69c51 movzbl %bl, %ebx leaq -0x4(%r15), %r12 cmpq %rax, %r12 je 0x69bc7 cmpb $0x0, -0x4(%r15) jne 0x69bc7 cmpb $0x0, -0x3(%r15) jne 0x69bc7 cmpb $0x0, -0x2(%r15) jne 0x69bc7 movb -0x1(%r15), %r14b addb $-0x30, %r14b cmpb $0x9, %r14b jbe 0x69c78 movabsq $0x2540be400, %rax # imm = 0x2540BE400 imulq %rax, %rsi leaq (%r11,%r11,4), %rax leaq (%rsi,%rax,2), %rax addq %rbx, %rax movq %r12, (%rdx) testb %dil, %dil jne 0x69a7d movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 cmpq %rdx, %rax jbe 0x69c70 movl $0x22, (%rcx) movzbl %dil, %eax negq %rax btsq $0x3f, %rax jmp 0x69a7d movq %rbx, %rax movq %rax, (%rdx) jmp 0x69c3a addq $-0x8, %r14 movq %r14, %rax subq %rbx, %rax andq $-0x4, %rax leaq 0x20cc21(%rip), %rcx # 0x276850 imulq (%rcx,%rax,2), %rsi addq %r11, %rsi movq %r14, (%rdx) movq %rsi, %rax negq %rax testb %dil, %dil cmovneq %rsi, %rax jmp 0x69a7d testq %r13, %r13 jne 0x69c1e imulq $0x3b9aca00, %rsi, %rax # imm = 0x3B9ACA00 addq %rax, %r11 movq %r14, (%rdx) movq %r11, %rax negq %rax testb %dil, %dil cmovneq %r11, %rax jmp 0x69a7d negq %rax jmp 0x69a7d movq %r15, (%rdx) cmpq %rax, %r15 je 0x69ca2 cmpb $0x0, (%r15) jne 0x69ca2 cmpb $0x0, 0x1(%r15) jne 0x69ca2 cmpb $0x0, 0x2(%r15) jne 0x69ca2 movb 0x3(%r15), %al addb $-0x30, %al cmpb $0xa, %al jb 0x69bfb cmpq %r10, %rsi ja 0x69bfb leaq (%rbx,%rbx,4), %rax movzbl %r14b, %edx leaq (%rdx,%rax,2), %rax cmpq %r10, %rsi jne 0x69cca cmpq %r9, %r11 jb 0x69cca cmpl %r8d, %eax ja 0x69bfb movabsq $0x174876e800, %rcx # imm = 0x174876E800 imulq %rcx, %rsi imulq $0x64, %r11, %rcx addq %rax, %rsi addq %rcx, %rsi movq %rsi, %rax jmp 0x69a7d
my_strtoll10_utf32: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx test rdx, rdx jz loc_69A72 mov rdi, [rdx] sub rdi, rsi lea rax, [rdi+3] test rdi, rdi cmovns rax, rdi and rax, 0FFFFFFFFFFFFFFFCh add rax, rsi mov r11, rsi cmp rdi, 4 jl short loc_6997C mov r11, rsi loc_69950: cmp byte ptr [r11], 0 jnz short loc_6997C cmp byte ptr [r11+1], 0 jnz short loc_6997C cmp byte ptr [r11+2], 0 jnz short loc_6997C movzx edi, byte ptr [r11+3] cmp edi, 20h ; ' ' jz short loc_69973 cmp edi, 9 jnz short loc_6997C loc_69973: add r11, 4 cmp r11, rax jb short loc_69950 loc_6997C: cmp r11, rax jz loc_69A72 cmp byte ptr [r11], 0 jnz short loc_699C9 cmp byte ptr [r11+1], 0 jnz short loc_699C9 cmp byte ptr [r11+2], 0 jnz short loc_699C9 cmp byte ptr [r11+3], 2Dh ; '-' jnz short loc_699C9 mov dword ptr [rcx], 0FFFFFFFFh add r11, 4 cmp r11, rax jz loc_69A72 mov r8d, 8 mov r9d, 15F797AEh mov r10d, 57F5FF8h xor edi, edi jmp short loc_69A0C loc_699C9: mov dword ptr [rcx], 0 cmp byte ptr [r11], 0 jnz loc_69A72 mov r8d, 0Fh mov r9d, 2BEF2F5Ch mov r10d, 0AFEBFF0h mov dil, 1 cmp byte ptr [r11+1], 0 jnz short loc_69A0C cmp byte ptr [r11+2], 0 jnz short loc_69A0C cmp byte ptr [r11+3], 2Bh ; '+' jnz short loc_69A0C add r11, 4 cmp r11, rax jz short loc_69A72 loc_69A0C: cmp byte ptr [r11], 0 jnz short loc_69A72 cmp byte ptr [r11+1], 0 jnz short loc_69A72 cmp byte ptr [r11+2], 0 jnz short loc_69A5F cmp byte ptr [r11+3], 30h ; '0' jnz short loc_69A5F add r11, 28h ; '(' xor esi, esi loc_69A2D: lea rbx, [r11-24h] cmp rbx, rax jz loc_69C15 mov r14, r11 cmp byte ptr [rbx], 0 jnz short loc_69A5B cmp byte ptr [r14-23h], 0 jnz short loc_69A5B cmp byte ptr [r14-22h], 0 jnz short loc_69A5B lea r11, [r14+4] cmp byte ptr [r14-21h], 30h ; '0' jz short loc_69A2D loc_69A5B: xor esi, esi jmp short loc_69A96 loc_69A5F: cmp byte ptr [r11+2], 0 jnz short loc_69A72 mov bl, [r11+3] add bl, 0D0h cmp bl, 9 jbe short loc_69A88 loc_69A72: mov dword ptr [rcx], 21h ; '!' mov [rdx], rsi xor eax, eax loc_69A7D: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_69A88: movzx esi, bl lea rbx, [r11+4] add r11, 24h ; '$' mov r14, r11 loc_69A96: cmp r14, rax cmova r14, rax loc_69A9D: cmp rbx, r14 jz short loc_69AE3 cmp byte ptr [rbx], 0 jnz loc_69C12 cmp byte ptr [rbx+1], 0 jnz loc_69C12 cmp byte ptr [rbx+2], 0 jnz loc_69C12 mov r11b, [rbx+3] add r11b, 0D0h cmp r11b, 9 ja loc_69C12 lea rsi, [rsi+rsi*4] movzx r11d, r11b lea rsi, [r11+rsi*2] add rbx, 4 jmp short loc_69A9D loc_69AE3: cmp rbx, rax jz loc_69C12 lea r12, [rbx+24h] cmp r12, rax cmova r12, rax lea r14, [rbx+8] mov r13d, 24h ; '$' xor r11d, r11d loc_69B04: cmp byte ptr [r14-8], 0 jnz loc_69C1A cmp byte ptr [r14-7], 0 jnz loc_69C1A cmp byte ptr [r14-6], 0 jnz loc_69C1A mov r15b, [r14-5] add r15b, 0D0h cmp r15b, 9 ja loc_69C1A lea r11, [r11+r11*4] movzx r15d, r15b lea r11, [r15+r11*2] lea r15, [r14+4] add r14, 0FFFFFFFFFFFFFFFCh add r13, 0FFFFFFFFFFFFFFFCh cmp r14, r12 mov r14, r15 jnz short loc_69B04 lea r14, [r15-8] cmp r12, rax jz loc_69C4C cmp byte ptr [r14], 0 jnz loc_69C51 cmp byte ptr [r15-7], 0 jnz loc_69C51 cmp byte ptr [r15-6], 0 jnz loc_69C51 mov bl, [r15-5] add bl, 0D0h cmp bl, 9 ja loc_69C51 movzx ebx, bl lea r12, [r15-4] cmp r12, rax jz short loc_69BC7 cmp byte ptr [r15-4], 0 jnz short loc_69BC7 cmp byte ptr [r15-3], 0 jnz short loc_69BC7 cmp byte ptr [r15-2], 0 jnz short loc_69BC7 mov r14b, [r15-1] add r14b, 0D0h cmp r14b, 9 jbe loc_69C78 loc_69BC7: mov rax, 2540BE400h imul rsi, rax lea rax, [r11+r11*4] lea rax, [rsi+rax*2] add rax, rbx mov [rdx], r12 test dil, dil jnz loc_69A7D mov rdx, 8000000000000000h cmp rax, rdx jbe short loc_69C70 loc_69BFB: mov dword ptr [rcx], 22h ; '"' movzx eax, dil neg rax bts rax, 3Fh ; '?' jmp loc_69A7D loc_69C12: mov rax, rbx loc_69C15: mov [rdx], rax jmp short loc_69C3A loc_69C1A: add r14, 0FFFFFFFFFFFFFFF8h loc_69C1E: mov rax, r14 sub rax, rbx and rax, 0FFFFFFFFFFFFFFFCh lea rcx, lfactor imul rsi, [rcx+rax*2] add rsi, r11 mov [rdx], r14 loc_69C3A: mov rax, rsi neg rax test dil, dil cmovnz rax, rsi jmp loc_69A7D loc_69C4C: test r13, r13 jnz short loc_69C1E loc_69C51: imul rax, rsi, 3B9ACA00h add r11, rax mov [rdx], r14 mov rax, r11 neg rax test dil, dil cmovnz rax, r11 jmp loc_69A7D loc_69C70: neg rax jmp loc_69A7D loc_69C78: mov [rdx], r15 cmp r15, rax jz short loc_69CA2 cmp byte ptr [r15], 0 jnz short loc_69CA2 cmp byte ptr [r15+1], 0 jnz short loc_69CA2 cmp byte ptr [r15+2], 0 jnz short loc_69CA2 mov al, [r15+3] add al, 0D0h cmp al, 0Ah jb loc_69BFB loc_69CA2: cmp rsi, r10 ja loc_69BFB lea rax, [rbx+rbx*4] movzx edx, r14b lea rax, [rdx+rax*2] cmp rsi, r10 jnz short loc_69CCA cmp r11, r9 jb short loc_69CCA cmp eax, r8d ja loc_69BFB loc_69CCA: mov rcx, 174876E800h imul rsi, rcx imul rcx, r11, 64h ; 'd' add rsi, rax add rsi, rcx mov rax, rsi jmp loc_69A7D
unsigned long long my_strtoll10_utf32(long long a1, _BYTE *a2, unsigned long long *a3, _DWORD *a4) { long long v4; // rdi long long v5; // rax unsigned long long v6; // rax _BYTE *v7; // r11 int v8; // edi unsigned int v9; // r8d unsigned long long v10; // r9 unsigned long long v11; // r10 unsigned __int8 v12; // di _BYTE *v13; // r11 unsigned long long v14; // rsi _BYTE *v15; // rbx _BYTE *v16; // r14 unsigned __int8 v17; // bl unsigned long long result; // rax unsigned __int8 v19; // r11 _BYTE *v20; // r12 _BYTE *v21; // r14 long long v22; // r13 unsigned long long v23; // r11 unsigned __int8 v24; // r15 _BYTE *v25; // r15 bool v26; // zf _BYTE *v27; // r14 unsigned __int8 v28; // bl unsigned __int8 v29; // r14 unsigned long long v30; // r11 long long v31; // rax if ( !a3 ) goto LABEL_37; v4 = *a3 - (_QWORD)a2; v5 = v4 + 3; if ( v4 >= 0 ) v5 = *a3 - (_QWORD)a2; v6 = (unsigned long long)&a2[v5 & 0xFFFFFFFFFFFFFFFCLL]; v7 = a2; if ( v4 >= 4 ) { v7 = a2; do { if ( *v7 ) break; if ( v7[1] ) break; if ( v7[2] ) break; v8 = (unsigned __int8)v7[3]; if ( v8 != 32 && v8 != 9 ) break; v7 += 4; } while ( (unsigned long long)v7 < v6 ); } if ( v7 == (_BYTE *)v6 ) goto LABEL_37; if ( *v7 || v7[1] || v7[2] || v7[3] != 45 ) { *a4 = 0; if ( *v7 ) goto LABEL_37; v9 = 15; v10 = 737095516LL; v11 = 184467440LL; v12 = 1; if ( !v7[1] && !v7[2] && v7[3] == 43 ) { v7 += 4; if ( v7 == (_BYTE *)v6 ) goto LABEL_37; } } else { *a4 = -1; v7 += 4; if ( v7 == (_BYTE *)v6 ) goto LABEL_37; v9 = 8; v10 = 368547758LL; v11 = 92233720LL; v12 = 0; } if ( *v7 || v7[1] ) goto LABEL_37; if ( !v7[2] && v7[3] == 48 ) { v13 = v7 + 40; v14 = 0LL; while ( 1 ) { v15 = v13 - 36; if ( v13 - 36 == (_BYTE *)v6 ) goto LABEL_71; v16 = v13; if ( !*v15 && !*(v13 - 35) && !*(v13 - 34) ) { v13 += 4; if ( *(v16 - 33) == 48 ) continue; } v14 = 0LL; goto LABEL_40; } } if ( v7[2] || (v17 = v7[3] - 48, v17 > 9u) ) { LABEL_37: *a4 = 33; *a3 = (unsigned long long)a2; return 0LL; } v14 = v17; v15 = v7 + 4; v16 = v7 + 36; LABEL_40: if ( (unsigned long long)v16 > v6 ) v16 = (_BYTE *)v6; while ( v15 != v16 ) { if ( *v15 ) goto LABEL_70; if ( v15[1] ) goto LABEL_70; if ( v15[2] ) goto LABEL_70; v19 = v15[3] - 48; if ( v19 > 9u ) goto LABEL_70; v14 = v19 + 10 * v14; v15 += 4; } if ( v15 != (_BYTE *)v6 ) { v20 = v15 + 36; if ( (unsigned long long)(v15 + 36) > v6 ) v20 = (_BYTE *)v6; v21 = v15 + 8; v22 = 36LL; v23 = 0LL; while ( !*(v21 - 8) ) { if ( *(v21 - 7) ) break; if ( *(v21 - 6) ) break; v24 = *(v21 - 5) - 48; if ( v24 > 9u ) break; v23 = v24 + 10 * v23; v25 = v21 + 4; v22 -= 4LL; v26 = v21 - 4 == v20; v21 += 4; if ( v26 ) { v27 = v25 - 8; if ( v20 != (_BYTE *)v6 ) { if ( !*v27 && !*(v25 - 7) && !*(v25 - 6) ) { v28 = *(v25 - 5) - 48; if ( v28 <= 9u ) { if ( v25 - 4 == (_BYTE *)v6 || *(v25 - 4) || *(v25 - 3) || *(v25 - 2) || (v29 = *(v25 - 1) - 48, v29 > 9u) ) { result = v28 + 10000000000LL * v14 + 10 * v23; *a3 = (unsigned long long)(v25 - 4); if ( v12 ) return result; if ( result > 0x8000000000000000LL ) goto LABEL_69; return -(long long)result; } else { *a3 = (unsigned long long)v25; if ( v25 != (_BYTE *)v6 && !*v25 && !v25[1] && !v25[2] && (unsigned __int8)(v25[3] - 48) < 0xAu || v14 > v11 || (v31 = v29 + 10LL * v28, v14 == v11) && v23 >= v10 && (unsigned int)v31 > v9 ) { LABEL_69: *a4 = 34; return -(long long)v12 | 0x8000000000000000LL; } return 100 * v23 + v31 + 100000000000LL * v14; } } } LABEL_78: v30 = 1000000000 * v14 + v23; *a3 = (unsigned long long)v27; result = -(long long)v30; if ( v12 ) return v30; return result; } if ( !v22 ) goto LABEL_78; LABEL_73: v14 = v23 + *(_QWORD *)((char *)&lfactor + 2 * ((v27 - v15) & 0xFFFFFFFFFFFFFFFCLL)) * v14; *a3 = (unsigned long long)v27; goto LABEL_74; } } v27 = v21 - 8; goto LABEL_73; } LABEL_70: v6 = (unsigned long long)v15; LABEL_71: *a3 = v6; LABEL_74: result = -(long long)v14; if ( v12 ) return v14; return result; }
my_strtoll10_utf32: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX TEST RDX,RDX JZ 0x00169a72 MOV RDI,qword ptr [RDX] SUB RDI,RSI LEA RAX,[RDI + 0x3] TEST RDI,RDI CMOVNS RAX,RDI AND RAX,-0x4 ADD RAX,RSI MOV R11,RSI CMP RDI,0x4 JL 0x0016997c MOV R11,RSI LAB_00169950: CMP byte ptr [R11],0x0 JNZ 0x0016997c CMP byte ptr [R11 + 0x1],0x0 JNZ 0x0016997c CMP byte ptr [R11 + 0x2],0x0 JNZ 0x0016997c MOVZX EDI,byte ptr [R11 + 0x3] CMP EDI,0x20 JZ 0x00169973 CMP EDI,0x9 JNZ 0x0016997c LAB_00169973: ADD R11,0x4 CMP R11,RAX JC 0x00169950 LAB_0016997c: CMP R11,RAX JZ 0x00169a72 CMP byte ptr [R11],0x0 JNZ 0x001699c9 CMP byte ptr [R11 + 0x1],0x0 JNZ 0x001699c9 CMP byte ptr [R11 + 0x2],0x0 JNZ 0x001699c9 CMP byte ptr [R11 + 0x3],0x2d JNZ 0x001699c9 MOV dword ptr [RCX],0xffffffff ADD R11,0x4 CMP R11,RAX JZ 0x00169a72 MOV R8D,0x8 MOV R9D,0x15f797ae MOV R10D,0x57f5ff8 XOR EDI,EDI JMP 0x00169a0c LAB_001699c9: MOV dword ptr [RCX],0x0 CMP byte ptr [R11],0x0 JNZ 0x00169a72 MOV R8D,0xf MOV R9D,0x2bef2f5c MOV R10D,0xafebff0 MOV DIL,0x1 CMP byte ptr [R11 + 0x1],0x0 JNZ 0x00169a0c CMP byte ptr [R11 + 0x2],0x0 JNZ 0x00169a0c CMP byte ptr [R11 + 0x3],0x2b JNZ 0x00169a0c ADD R11,0x4 CMP R11,RAX JZ 0x00169a72 LAB_00169a0c: CMP byte ptr [R11],0x0 JNZ 0x00169a72 CMP byte ptr [R11 + 0x1],0x0 JNZ 0x00169a72 CMP byte ptr [R11 + 0x2],0x0 JNZ 0x00169a5f CMP byte ptr [R11 + 0x3],0x30 JNZ 0x00169a5f ADD R11,0x28 XOR ESI,ESI LAB_00169a2d: LEA RBX,[R11 + -0x24] CMP RBX,RAX JZ 0x00169c15 MOV R14,R11 CMP byte ptr [RBX],0x0 JNZ 0x00169a5b CMP byte ptr [R14 + -0x23],0x0 JNZ 0x00169a5b CMP byte ptr [R14 + -0x22],0x0 JNZ 0x00169a5b LEA R11,[R14 + 0x4] CMP byte ptr [R14 + -0x21],0x30 JZ 0x00169a2d LAB_00169a5b: XOR ESI,ESI JMP 0x00169a96 LAB_00169a5f: CMP byte ptr [R11 + 0x2],0x0 JNZ 0x00169a72 MOV BL,byte ptr [R11 + 0x3] ADD BL,0xd0 CMP BL,0x9 JBE 0x00169a88 LAB_00169a72: MOV dword ptr [RCX],0x21 MOV qword ptr [RDX],RSI XOR EAX,EAX LAB_00169a7d: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00169a88: MOVZX ESI,BL LEA RBX,[R11 + 0x4] ADD R11,0x24 MOV R14,R11 LAB_00169a96: CMP R14,RAX CMOVA R14,RAX LAB_00169a9d: CMP RBX,R14 JZ 0x00169ae3 CMP byte ptr [RBX],0x0 JNZ 0x00169c12 CMP byte ptr [RBX + 0x1],0x0 JNZ 0x00169c12 CMP byte ptr [RBX + 0x2],0x0 JNZ 0x00169c12 MOV R11B,byte ptr [RBX + 0x3] ADD R11B,0xd0 CMP R11B,0x9 JA 0x00169c12 LEA RSI,[RSI + RSI*0x4] MOVZX R11D,R11B LEA RSI,[R11 + RSI*0x2] ADD RBX,0x4 JMP 0x00169a9d LAB_00169ae3: CMP RBX,RAX JZ 0x00169c12 LEA R12,[RBX + 0x24] CMP R12,RAX CMOVA R12,RAX LEA R14,[RBX + 0x8] MOV R13D,0x24 XOR R11D,R11D LAB_00169b04: CMP byte ptr [R14 + -0x8],0x0 JNZ 0x00169c1a CMP byte ptr [R14 + -0x7],0x0 JNZ 0x00169c1a CMP byte ptr [R14 + -0x6],0x0 JNZ 0x00169c1a MOV R15B,byte ptr [R14 + -0x5] ADD R15B,0xd0 CMP R15B,0x9 JA 0x00169c1a LEA R11,[R11 + R11*0x4] MOVZX R15D,R15B LEA R11,[R15 + R11*0x2] LEA R15,[R14 + 0x4] ADD R14,-0x4 ADD R13,-0x4 CMP R14,R12 MOV R14,R15 JNZ 0x00169b04 LEA R14,[R15 + -0x8] CMP R12,RAX JZ 0x00169c4c CMP byte ptr [R14],0x0 JNZ 0x00169c51 CMP byte ptr [R15 + -0x7],0x0 JNZ 0x00169c51 CMP byte ptr [R15 + -0x6],0x0 JNZ 0x00169c51 MOV BL,byte ptr [R15 + -0x5] ADD BL,0xd0 CMP BL,0x9 JA 0x00169c51 MOVZX EBX,BL LEA R12,[R15 + -0x4] CMP R12,RAX JZ 0x00169bc7 CMP byte ptr [R15 + -0x4],0x0 JNZ 0x00169bc7 CMP byte ptr [R15 + -0x3],0x0 JNZ 0x00169bc7 CMP byte ptr [R15 + -0x2],0x0 JNZ 0x00169bc7 MOV R14B,byte ptr [R15 + -0x1] ADD R14B,0xd0 CMP R14B,0x9 JBE 0x00169c78 LAB_00169bc7: MOV RAX,0x2540be400 IMUL RSI,RAX LEA RAX,[R11 + R11*0x4] LEA RAX,[RSI + RAX*0x2] ADD RAX,RBX MOV qword ptr [RDX],R12 TEST DIL,DIL JNZ 0x00169a7d MOV RDX,-0x8000000000000000 CMP RAX,RDX JBE 0x00169c70 LAB_00169bfb: MOV dword ptr [RCX],0x22 MOVZX EAX,DIL NEG RAX BTS RAX,0x3f JMP 0x00169a7d LAB_00169c12: MOV RAX,RBX LAB_00169c15: MOV qword ptr [RDX],RAX JMP 0x00169c3a LAB_00169c1a: ADD R14,-0x8 LAB_00169c1e: MOV RAX,R14 SUB RAX,RBX AND RAX,-0x4 LEA RCX,[0x376850] IMUL RSI,qword ptr [RCX + RAX*0x2] ADD RSI,R11 MOV qword ptr [RDX],R14 LAB_00169c3a: MOV RAX,RSI NEG RAX TEST DIL,DIL CMOVNZ RAX,RSI JMP 0x00169a7d LAB_00169c4c: TEST R13,R13 JNZ 0x00169c1e LAB_00169c51: IMUL RAX,RSI,0x3b9aca00 ADD R11,RAX MOV qword ptr [RDX],R14 MOV RAX,R11 NEG RAX TEST DIL,DIL CMOVNZ RAX,R11 JMP 0x00169a7d LAB_00169c70: NEG RAX JMP 0x00169a7d LAB_00169c78: MOV qword ptr [RDX],R15 CMP R15,RAX JZ 0x00169ca2 CMP byte ptr [R15],0x0 JNZ 0x00169ca2 CMP byte ptr [R15 + 0x1],0x0 JNZ 0x00169ca2 CMP byte ptr [R15 + 0x2],0x0 JNZ 0x00169ca2 MOV AL,byte ptr [R15 + 0x3] ADD AL,0xd0 CMP AL,0xa JC 0x00169bfb LAB_00169ca2: CMP RSI,R10 JA 0x00169bfb LEA RAX,[RBX + RBX*0x4] MOVZX EDX,R14B LEA RAX,[RDX + RAX*0x2] CMP RSI,R10 JNZ 0x00169cca CMP R11,R9 JC 0x00169cca CMP EAX,R8D JA 0x00169bfb LAB_00169cca: MOV RCX,0x174876e800 IMUL RSI,RCX IMUL RCX,R11,0x64 ADD RSI,RAX ADD RSI,RCX MOV RAX,RSI JMP 0x00169a7d
ulong my_strtoll10_utf32(int8 param_1,char *param_2,long *param_3,int4 *param_4) { char *pcVar1; char cVar2; char *pcVar3; byte bVar4; char *pcVar5; ulong uVar6; byte bVar7; ulong uVar8; uint uVar9; ulong uVar10; char *pcVar11; ulong uVar12; long lVar13; char *pcVar14; char *pcVar15; if (param_3 != (long *)0x0) { uVar8 = *param_3 - (long)param_2; uVar10 = uVar8 + 3; if (-1 < (long)uVar8) { uVar10 = uVar8; } pcVar3 = param_2 + (uVar10 & 0xfffffffffffffffc); pcVar11 = param_2; if (3 < (long)uVar8) { do { if ((((*pcVar11 != '\0') || (pcVar11[1] != '\0')) || (pcVar11[2] != '\0')) || ((pcVar11[3] != ' ' && (pcVar11[3] != '\t')))) break; pcVar11 = pcVar11 + 4; } while (pcVar11 < pcVar3); } if (pcVar11 != pcVar3) { if (((*pcVar11 == '\0') && (pcVar11[1] == '\0')) && ((pcVar11[2] == '\0' && (pcVar11[3] == '-')))) { *param_4 = 0xffffffff; pcVar11 = pcVar11 + 4; if (pcVar11 == pcVar3) goto LAB_00169a72; uVar9 = 8; uVar10 = 0x15f797ae; uVar8 = 0x57f5ff8; bVar7 = 0; } else { *param_4 = 0; if (*pcVar11 != '\0') goto LAB_00169a72; uVar9 = 0xf; uVar10 = 0x2bef2f5c; uVar8 = 0xafebff0; bVar7 = 1; if ((((pcVar11[1] == '\0') && (pcVar11[2] == '\0')) && (pcVar11[3] == '+')) && (pcVar11 = pcVar11 + 4, pcVar11 == pcVar3)) goto LAB_00169a72; } if ((*pcVar11 == '\0') && (pcVar11[1] == '\0')) { if ((pcVar11[2] == '\0') && (pcVar11[3] == '0')) { uVar6 = 0; pcVar5 = pcVar11 + 0x28; do { pcVar11 = pcVar5; pcVar1 = pcVar11 + -0x24; pcVar5 = pcVar3; if (pcVar1 == pcVar3) goto LAB_00169c15; } while ((((*pcVar1 == '\0') && (pcVar11[-0x23] == '\0')) && (pcVar11[-0x22] == '\0')) && (pcVar5 = pcVar11 + 4, pcVar11[-0x21] == '0')); uVar6 = 0; pcVar5 = pcVar1; } else { if ((pcVar11[2] != '\0') || (9 < (byte)(pcVar11[3] - 0x30U))) goto LAB_00169a72; uVar6 = (ulong)(byte)(pcVar11[3] - 0x30U); pcVar5 = pcVar11 + 4; pcVar11 = pcVar11 + 0x24; } if (pcVar3 < pcVar11) { pcVar11 = pcVar3; } for (; pcVar5 != pcVar11; pcVar5 = pcVar5 + 4) { if (((*pcVar5 != '\0') || (pcVar5[1] != '\0')) || ((pcVar5[2] != '\0' || (9 < (byte)(pcVar5[3] - 0x30U))))) goto LAB_00169c15; uVar6 = (ulong)(byte)(pcVar5[3] - 0x30U) + uVar6 * 10; } if (pcVar5 != pcVar3) { pcVar11 = pcVar5 + 0x24; if (pcVar3 < pcVar5 + 0x24) { pcVar11 = pcVar3; } lVar13 = 0x24; uVar12 = 0; pcVar1 = pcVar5 + 8; do { pcVar14 = pcVar1; if (((pcVar14[-8] != '\0') || (pcVar14[-7] != '\0')) || ((pcVar14[-6] != '\0' || (9 < (byte)(pcVar14[-5] - 0x30U))))) { pcVar15 = pcVar14 + -8; goto LAB_00169c1e; } uVar12 = (ulong)(byte)(pcVar14[-5] - 0x30U) + uVar12 * 10; pcVar1 = pcVar14 + 4; lVar13 = lVar13 + -4; } while (pcVar14 + -4 != pcVar11); pcVar15 = pcVar14 + -4; if (pcVar11 == pcVar3) { if (lVar13 != 0) { LAB_00169c1e: uVar6 = uVar6 * *(long *)((long)&lfactor + ((long)pcVar15 - (long)pcVar5 & 0xfffffffffffffffcU) * 2) + uVar12; *param_3 = (long)pcVar15; goto LAB_00169c3a; } } else if ((((*pcVar15 == '\0') && (pcVar14[-3] == '\0')) && (pcVar14[-2] == '\0')) && (bVar4 = pcVar14[-1] - 0x30, bVar4 < 10)) { if (((pcVar14 == pcVar3) || (*pcVar14 != '\0')) || ((pcVar14[1] != '\0' || ((pcVar14[2] != '\0' || (cVar2 = pcVar14[3], 9 < (byte)(cVar2 - 0x30U))))))) { uVar10 = uVar6 * 10000000000 + uVar12 * 10 + (ulong)bVar4; *param_3 = (long)pcVar14; if (bVar7 != 0) { return uVar10; } if (uVar10 < 0x8000000000000001) { return -uVar10; } } else { *param_3 = (long)pcVar1; if ((((((pcVar1 == pcVar3) || (*pcVar1 != '\0')) || (pcVar14[5] != '\0')) || ((pcVar14[6] != '\0' || (9 < (byte)(pcVar14[7] - 0x30U))))) && (uVar6 <= uVar8)) && (((lVar13 = (ulong)(byte)(cVar2 - 0x30U) + (ulong)bVar4 * 10, uVar6 != uVar8 || (uVar12 < uVar10)) || ((uint)lVar13 <= uVar9)))) { return uVar6 * 100000000000 + lVar13 + uVar12 * 100; } } *param_4 = 0x22; return -(ulong)bVar7 | 0x8000000000000000; } uVar12 = uVar12 + uVar6 * 1000000000; *param_3 = (long)pcVar15; if (bVar7 == 0) { return -uVar12; } return uVar12; } LAB_00169c15: *param_3 = (long)pcVar5; LAB_00169c3a: if (bVar7 == 0) { return -uVar6; } return uVar6; } } } LAB_00169a72: *param_4 = 0x21; *param_3 = (long)param_2; return 0; }
39,117
my_setwd
eloqsql/mysys/my_getwd.c
int my_setwd(const char *dir, myf MyFlags) { int res; size_t length; char *start, *pos; DBUG_ENTER("my_setwd"); DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags)); start=(char *) dir; if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0)) dir=FN_ROOTDIR; if ((res=chdir((char*) dir)) != 0) { my_errno=errno; if (MyFlags & MY_WME) my_error(EE_SETWD,MYF(ME_BELL),start,errno); } else { if (test_if_hard_path(start)) { /* Hard pathname */ pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1); if (pos[-1] != FN_LIBCHAR) { length=(uint) (pos-(char*) curr_dir); curr_dir[length]=FN_LIBCHAR; /* must end with '/' */ curr_dir[length+1]='\0'; } } else curr_dir[0]='\0'; /* Don't save name */ } DBUG_RETURN(res); }
O0
c
my_setwd: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x2d772 movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, (%rax) je 0x2d79c movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x2d7a7 movq -0x8(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x0, %eax jne 0x2d7a7 leaq 0x53a80(%rip), %rax # 0x81223 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x24460 movl %eax, -0x14(%rbp) cmpl $0x0, %eax je 0x2d800 callq 0x24040 movl (%rax), %eax movl %eax, -0x34(%rbp) callq 0x2fcb0 movl -0x34(%rbp), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x2d7fe movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) callq 0x24040 movq -0x40(%rbp), %rdx movl (%rax), %ecx movl $0x11, %edi movl $0x4, %esi movb $0x0, %al callq 0x38de0 jmp 0x2d875 movq -0x28(%rbp), %rdi callq 0x2d890 cmpl $0x0, %eax je 0x2d869 movq -0x28(%rbp), %rsi leaq 0x35f997(%rip), %rdi # 0x38d1b0 movl $0x1ff, %edx # imm = 0x1FF callq 0x7d510 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax je 0x2d867 movq -0x30(%rbp), %rax leaq 0x35f971(%rip), %rcx # 0x38d1b0 subq %rcx, %rax movl %eax, %eax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rcx leaq 0x35f95d(%rip), %rax # 0x38d1b0 movb $0x2f, (%rax,%rcx) movq -0x20(%rbp), %rcx leaq 0x35f94e(%rip), %rax # 0x38d1b0 movb $0x0, 0x1(%rax,%rcx) jmp 0x2d873 leaq 0x35f940(%rip), %rax # 0x38d1b0 movb $0x0, (%rax) jmp 0x2d875 jmp 0x2d877 movl -0x14(%rbp), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_setwd: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_2D772: mov rax, [rbp+var_8] mov [rbp+var_28], rax mov rax, [rbp+var_8] cmp byte ptr [rax], 0 jz short loc_2D79C mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_2D7A7 mov rax, [rbp+var_8] movsx eax, byte ptr [rax+1] cmp eax, 0 jnz short loc_2D7A7 loc_2D79C: lea rax, unk_81223 mov [rbp+var_8], rax loc_2D7A7: mov rdi, [rbp+var_8] call _chdir mov [rbp+var_14], eax cmp eax, 0 jz short loc_2D800 call ___errno_location mov eax, [rax] mov [rbp+var_34], eax call _my_thread_var mov ecx, [rbp+var_34] mov [rax], ecx mov rax, [rbp+var_10] and rax, 10h cmp rax, 0 jz short loc_2D7FE mov rax, [rbp+var_28] mov [rbp+var_40], rax call ___errno_location mov rdx, [rbp+var_40] mov ecx, [rax] mov edi, 11h mov esi, 4 mov al, 0 call my_error loc_2D7FE: jmp short loc_2D875 loc_2D800: mov rdi, [rbp+var_28] call test_if_hard_path cmp eax, 0 jz short loc_2D869 mov rsi, [rbp+var_28] lea rdi, curr_dir mov edx, 1FFh call strmake mov [rbp+var_30], rax mov rax, [rbp+var_30] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jz short loc_2D867 mov rax, [rbp+var_30] lea rcx, curr_dir sub rax, rcx mov eax, eax mov [rbp+var_20], rax mov rcx, [rbp+var_20] lea rax, curr_dir mov byte ptr [rax+rcx], 2Fh ; '/' mov rcx, [rbp+var_20] lea rax, curr_dir mov byte ptr [rax+rcx+1], 0 loc_2D867: jmp short loc_2D873 loc_2D869: lea rax, curr_dir mov byte ptr [rax], 0 loc_2D873: jmp short $+2 loc_2D875: jmp short $+2 loc_2D877: mov eax, [rbp+var_14] mov [rbp+var_44], eax mov eax, [rbp+var_44] add rsp, 50h pop rbp retn
long long my_setwd(_BYTE *a1, char a2) { _DWORD *v2; // rax int v3; // r8d int v4; // r9d int v6; // [rsp+1Ch] [rbp-34h] long long v7; // [rsp+20h] [rbp-30h] unsigned int v8; // [rsp+3Ch] [rbp-14h] void *v9; // [rsp+48h] [rbp-8h] v9 = a1; if ( !*a1 || *a1 == 47 && !a1[1] ) v9 = &unk_81223; v8 = chdir(v9); if ( v8 ) { v6 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v6; if ( (a2 & 0x10) != 0 ) { v2 = (_DWORD *)__errno_location(); my_error(17, 4, (_DWORD)a1, *v2, v3, v4); } } else if ( (unsigned int)test_if_hard_path(a1) ) { v7 = strmake(curr_dir, a1, 511LL); if ( *(_BYTE *)(v7 - 1) != 47 ) { curr_dir[(unsigned int)(v7 - (_QWORD)curr_dir)] = 47; curr_dir[(unsigned int)(v7 - (_QWORD)curr_dir) + 1] = 0; } } else { curr_dir[0] = 0; } return v8; }
my_setwd: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x0012d772 LAB_0012d772: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX],0x0 JZ 0x0012d79c MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0012d7a7 MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x0 JNZ 0x0012d7a7 LAB_0012d79c: LEA RAX,[0x181223] MOV qword ptr [RBP + -0x8],RAX LAB_0012d7a7: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124460 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JZ 0x0012d800 CALL 0x00124040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX CALL 0x0012fcb0 MOV ECX,dword ptr [RBP + -0x34] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x10 CMP RAX,0x0 JZ 0x0012d7fe MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX CALL 0x00124040 MOV RDX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RAX] MOV EDI,0x11 MOV ESI,0x4 MOV AL,0x0 CALL 0x00138de0 LAB_0012d7fe: JMP 0x0012d875 LAB_0012d800: MOV RDI,qword ptr [RBP + -0x28] CALL 0x0012d890 CMP EAX,0x0 JZ 0x0012d869 MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[0x48d1b0] MOV EDX,0x1ff CALL 0x0017d510 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JZ 0x0012d867 MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x48d1b0] SUB RAX,RCX MOV EAX,EAX MOV qword ptr [RBP + -0x20],RAX MOV RCX,qword ptr [RBP + -0x20] LEA RAX,[0x48d1b0] MOV byte ptr [RAX + RCX*0x1],0x2f MOV RCX,qword ptr [RBP + -0x20] LEA RAX,[0x48d1b0] MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0 LAB_0012d867: JMP 0x0012d873 LAB_0012d869: LEA RAX,[0x48d1b0] MOV byte ptr [RAX],0x0 LAB_0012d873: JMP 0x0012d875 LAB_0012d875: JMP 0x0012d877 LAB_0012d877: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] ADD RSP,0x50 POP RBP RET
int my_setwd(char *param_1,ulong param_2) { int iVar1; int iVar2; uint uVar3; int *piVar4; long lVar5; char *local_10; if ((*param_1 == '\0') || ((local_10 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) { local_10 = "/"; } iVar1 = chdir(local_10); if (iVar1 == 0) { iVar2 = test_if_hard_path(param_1); if (iVar2 == 0) { curr_dir = 0; } else { lVar5 = strmake(&curr_dir,param_1,0x1ff); if (*(char *)(lVar5 + -1) != '/') { uVar3 = (int)lVar5 - 0x48d1b0; (&curr_dir)[uVar3] = 0x2f; (&DAT_0048d1b1)[uVar3] = 0; } } } else { piVar4 = __errno_location(); iVar2 = *piVar4; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar2; if ((param_2 & 0x10) != 0) { piVar4 = __errno_location(); my_error(0x11,4,param_1,*piVar4); } } return iVar1; }
39,118
ma_unmap_file
eloqsql/storage/maria/ma_packrec.c
void _ma_unmap_file(MARIA_HA *info) { MARIA_SHARE *share= info->s; my_munmap((char*) share->file_map, (size_t) share->mmaped_length + MEMMAP_EXTRA_MARGIN); share->file_map= 0; share->file_read= _ma_nommap_pread; share->file_write= _ma_nommap_pwrite; info->opt_flag&= ~MEMMAP_USED; }
O3
c
ma_unmap_file: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq (%rdi), %r14 movq 0x5f0(%r14), %rdi movq 0xa00(%r14), %rsi addq $0x7, %rsi callq 0x294e0 movq $0x0, 0x5f0(%r14) leaq 0x1c6b(%rip), %rax # 0x3becb movq %rax, 0x6e0(%r14) leaq 0x1e73(%rip), %rax # 0x3c0e1 movq %rax, 0x6e8(%r14) andb $-0x21, 0x61c(%rbx) popq %rbx popq %r14 popq %rbp retq
_ma_unmap_file: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov r14, [rdi] mov rdi, [r14+5F0h] mov rsi, [r14+0A00h] add rsi, 7 call _munmap mov qword ptr [r14+5F0h], 0 lea rax, _ma_nommap_pread mov [r14+6E0h], rax lea rax, _ma_nommap_pwrite mov [r14+6E8h], rax and byte ptr [rbx+61Ch], 0DFh pop rbx pop r14 pop rbp retn
long long ( * ma_unmap_file(_BYTE *a1))() { _QWORD *v1; // r14 long long ( *result)(); // rax v1 = *(_QWORD **)a1; munmap(*(_QWORD *)(*(_QWORD *)a1 + 1520LL), *(_QWORD *)(*(_QWORD *)a1 + 2560LL) + 7LL); v1[190] = 0LL; v1[220] = ma_nommap_pread; result = ma_nommap_pwrite; v1[221] = ma_nommap_pwrite; a1[1564] &= ~0x20u; return result; }
_ma_unmap_file: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI] MOV RDI,qword ptr [R14 + 0x5f0] MOV RSI,qword ptr [R14 + 0xa00] ADD RSI,0x7 CALL 0x001294e0 MOV qword ptr [R14 + 0x5f0],0x0 LEA RAX,[0x13becb] MOV qword ptr [R14 + 0x6e0],RAX LEA RAX,[0x13c0e1] MOV qword ptr [R14 + 0x6e8],RAX AND byte ptr [RBX + 0x61c],0xdf POP RBX POP R14 POP RBP RET
void _ma_unmap_file(long *param_1) { long lVar1; lVar1 = *param_1; munmap(*(void **)(lVar1 + 0x5f0),*(long *)(lVar1 + 0xa00) + 7); *(int8 *)(lVar1 + 0x5f0) = 0; *(code **)(lVar1 + 0x6e0) = _ma_nommap_pread; *(code **)(lVar1 + 0x6e8) = _ma_nommap_pwrite; *(byte *)((long)param_1 + 0x61c) = *(byte *)((long)param_1 + 0x61c) & 0xdf; return; }
39,119
rw_pr_init
eloqsql/mysys/thr_rwlock.c
int rw_pr_init(rw_pr_lock_t *rwlock) { pthread_mutex_init(&rwlock->lock, NULL); pthread_cond_init(&rwlock->no_active_readers, NULL); rwlock->active_readers= 0; rwlock->writers_waiting_readers= 0; rwlock->active_writer= FALSE; #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif return 0; }
O0
c
rw_pr_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x363d0 movq -0x8(%rbp), %rdi addq $0x28, %rdi xorl %eax, %eax movl %eax, %esi callq 0x36400 movq -0x8(%rbp), %rax movl $0x0, 0x58(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x5c(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x60(%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbp retq
rw_pr_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call _pthread_mutex_init mov rdi, [rbp+var_8] add rdi, 28h ; '(' xor eax, eax mov esi, eax call _pthread_cond_init mov rax, [rbp+var_8] mov dword ptr [rax+58h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+5Ch], 0 mov rax, [rbp+var_8] mov byte ptr [rax+60h], 0 xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_init(long long a1) { pthread_mutex_init(a1, 0LL); pthread_cond_init(a1 + 40, 0LL); *(_DWORD *)(a1 + 88) = 0; *(_DWORD *)(a1 + 92) = 0; *(_BYTE *)(a1 + 96) = 0; return 0LL; }
rw_pr_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x001363d0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 XOR EAX,EAX MOV ESI,EAX CALL 0x00136400 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x5c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_init(pthread_mutex_t *param_1) { pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0); pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0); *(int4 *)((long)param_1 + 0x58) = 0; *(int4 *)((long)param_1 + 0x5c) = 0; *(int1 *)((long)param_1 + 0x60) = 0; return 0; }
39,120
mi_store_bin_pack_key
eloqsql/storage/myisam/mi_search.c
void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)), register uchar *key_pos, register MI_KEY_PARAM *s_temp) { store_key_length_inc(key_pos,s_temp->ref_length); memcpy((char*) key_pos,(char*) s_temp->key+s_temp->ref_length, (size_t) s_temp->totlength-s_temp->ref_length); if (s_temp->next_key_pos) { key_pos+=(uint) (s_temp->totlength-s_temp->ref_length); store_key_length_inc(key_pos,s_temp->n_ref_length); if (s_temp->prev_length) /* If we must extend key */ { memcpy(key_pos,s_temp->prev_key,s_temp->prev_length); } } }
O0
c
mi_store_bin_pack_key: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0xff, (%rax) jae 0xc33fb movq -0x18(%rbp), %rax movl (%rax), %eax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xc3432 movq -0x10(%rbp), %rax movb $-0x1, (%rax) movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movl -0x1c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x20(%rax), %rsi movq -0x18(%rbp), %rax movl (%rax), %eax addq %rax, %rsi movq -0x18(%rbp), %rax movl 0x10(%rax), %eax movl %eax, %edx movq -0x18(%rbp), %rax movl (%rax), %eax subq %rax, %rdx callq 0x2a0b0 movq -0x18(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0xc350e movq -0x18(%rbp), %rax movl 0x10(%rax), %ecx movq -0x18(%rbp), %rax subl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax cmpl $0xff, 0x8(%rax) jae 0xc34b0 movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xc34e8 movq -0x10(%rbp), %rax movb $-0x1, (%rax) movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movl -0x20(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x18(%rax) je 0xc350c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x28(%rax), %rsi movq -0x18(%rbp), %rax movl 0x18(%rax), %eax movl %eax, %edx callq 0x2a0b0 jmp 0xc350e addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_mi_store_bin_pack_key: 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_18] cmp dword ptr [rax], 0FFh jnb short loc_C33FB mov rax, [rbp+var_18] mov eax, [rax] mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_C3432 loc_C33FB: mov rax, [rbp+var_10] mov byte ptr [rax], 0FFh mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov eax, [rbp+var_1C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_C3432: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+20h] mov rax, [rbp+var_18] mov eax, [rax] add rsi, rax mov rax, [rbp+var_18] mov eax, [rax+10h] mov edx, eax mov rax, [rbp+var_18] mov eax, [rax] sub rdx, rax call _memcpy mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 0 jz loc_C350E mov rax, [rbp+var_18] mov ecx, [rax+10h] mov rax, [rbp+var_18] sub ecx, [rax] mov rax, [rbp+var_10] mov ecx, ecx add rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_18] cmp dword ptr [rax+8], 0FFh jnb short loc_C34B0 mov rax, [rbp+var_18] mov eax, [rax+8] mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_C34E8 loc_C34B0: mov rax, [rbp+var_10] mov byte ptr [rax], 0FFh mov rax, [rbp+var_18] mov eax, [rax+8] mov [rbp+var_20], eax mov eax, [rbp+var_20] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov eax, [rbp+var_20] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_C34E8: mov rax, [rbp+var_18] cmp dword ptr [rax+18h], 0 jz short loc_C350C mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+28h] mov rax, [rbp+var_18] mov eax, [rax+18h] mov edx, eax call _memcpy loc_C350C: jmp short $+2 loc_C350E: add rsp, 20h pop rbp retn
long long mi_store_bin_pack_key(long long a1, _BYTE *a2, unsigned int *a3) { long long result; // rax _BYTE *v4; // rax unsigned int v5; // [rsp+0h] [rbp-20h] int v6; // [rsp+4h] [rbp-1Ch] _BYTE *v8; // [rsp+10h] [rbp-10h] _BYTE *v9; // [rsp+10h] [rbp-10h] _BYTE *v10; // [rsp+10h] [rbp-10h] if ( *a3 >= 0xFF ) { *a2 = -1; v6 = *a3; a2[2] = *a3; a2[1] = BYTE1(v6); v8 = a2 + 3; } else { v8 = a2 + 1; *a2 = *a3; } memcpy(v8, *a3 + *((_QWORD *)a3 + 4), a3[4] - (unsigned long long)*a3); result = (long long)a3; if ( *((_QWORD *)a3 + 6) ) { v9 = &v8[a3[4] - *a3]; if ( a3[2] >= 0xFF ) { *v9 = -1; v5 = a3[2]; v9[2] = v5; v9[1] = BYTE1(v5); v10 = v9 + 3; } else { v4 = v9; v10 = v9 + 1; *v4 = a3[2]; } result = (long long)a3; if ( a3[6] ) return memcpy(v10, *((_QWORD *)a3 + 5), a3[6]); } return result; }
_mi_store_bin_pack_key: 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 + -0x18] CMP dword ptr [RAX],0xff JNC 0x001c33fb MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x001c3432 LAB_001c33fb: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV EAX,dword ptr [RBP + -0x1c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_001c3432: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] SUB RDX,RAX CALL 0x0012a0b0 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x0 JZ 0x001c350e MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] SUB ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x8],0xff JNC 0x001c34b0 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x001c34e8 LAB_001c34b0: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV EAX,dword ptr [RBP + -0x20] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_001c34e8: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x18],0x0 JZ 0x001c350c MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x18] MOV EDX,EAX CALL 0x0012a0b0 LAB_001c350c: JMP 0x001c350e LAB_001c350e: ADD RSP,0x20 POP RBP RET
void _mi_store_bin_pack_key(int8 param_1,int1 *param_2,uint *param_3) { uint uVar1; int1 *puVar2; int1 *local_18; if (*param_3 < 0xff) { local_18 = param_2 + 1; *param_2 = (char)*param_3; } else { *param_2 = 0xff; uVar1 = *param_3; param_2[2] = (char)uVar1; param_2[1] = (char)(uVar1 >> 8); local_18 = param_2 + 3; } memcpy(local_18,(void *)(*(long *)(param_3 + 8) + (ulong)*param_3), (ulong)param_3[4] - (ulong)*param_3); if (*(long *)(param_3 + 0xc) != 0) { puVar2 = local_18 + (param_3[4] - *param_3); if (param_3[2] < 0xff) { local_18 = puVar2 + 1; *puVar2 = (char)param_3[2]; } else { *puVar2 = 0xff; uVar1 = param_3[2]; puVar2[2] = (char)uVar1; puVar2[1] = (char)(uVar1 >> 8); local_18 = puVar2 + 3; } if (param_3[6] != 0) { memcpy(local_18,*(void **)(param_3 + 10),(ulong)param_3[6]); } } return; }
39,121
httplib::detail::status_message(int)
nickolajgrishuk[P]metricz-cpp/build_O2/_deps/httplib-src/httplib.h
inline const char *status_message(int status) { switch (status) { case 100: return "Continue"; case 101: return "Switching Protocol"; case 102: return "Processing"; case 103: return "Early Hints"; case 200: return "OK"; case 201: return "Created"; case 202: return "Accepted"; case 203: return "Non-Authoritative Information"; case 204: return "No Content"; case 205: return "Reset Content"; case 206: return "Partial Content"; case 207: return "Multi-Status"; case 208: return "Already Reported"; case 226: return "IM Used"; case 300: return "Multiple Choice"; case 301: return "Moved Permanently"; case 302: return "Found"; case 303: return "See Other"; case 304: return "Not Modified"; case 305: return "Use Proxy"; case 306: return "unused"; case 307: return "Temporary Redirect"; case 308: return "Permanent Redirect"; case 400: return "Bad Request"; case 401: return "Unauthorized"; case 402: return "Payment Required"; case 403: return "Forbidden"; case 404: return "Not Found"; case 405: return "Method Not Allowed"; case 406: return "Not Acceptable"; case 407: return "Proxy Authentication Required"; case 408: return "Request Timeout"; case 409: return "Conflict"; case 410: return "Gone"; case 411: return "Length Required"; case 412: return "Precondition Failed"; case 413: return "Payload Too Large"; case 414: return "URI Too Long"; case 415: return "Unsupported Media Type"; case 416: return "Range Not Satisfiable"; case 417: return "Expectation Failed"; case 418: return "I'm a teapot"; case 421: return "Misdirected Request"; case 422: return "Unprocessable Entity"; case 423: return "Locked"; case 424: return "Failed Dependency"; case 425: return "Too Early"; case 426: return "Upgrade Required"; case 428: return "Precondition Required"; case 429: return "Too Many Requests"; case 431: return "Request Header Fields Too Large"; case 451: return "Unavailable For Legal Reasons"; case 501: return "Not Implemented"; case 502: return "Bad Gateway"; case 503: return "Service Unavailable"; case 504: return "Gateway Timeout"; case 505: return "HTTP Version Not Supported"; case 506: return "Variant Also Negotiates"; case 507: return "Insufficient Storage"; case 508: return "Loop Detected"; case 510: return "Not Extended"; case 511: return "Network Authentication Required"; default: case 500: return "Internal Server Error"; } }
O2
c
httplib::detail::status_message(int): leal -0x190(%rdi), %eax cmpl $0x33, %eax jbe 0x170fa leal -0x1f5(%rdi), %eax cmpl $0xa, %eax jbe 0x17112 leal -0xc8(%rdi), %eax cmpl $0x8, %eax jbe 0x1712a leal -0x12c(%rdi), %eax cmpl $0x8, %eax ja 0x17142 leaq 0x10ff3(%rip), %rcx # 0x280dc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x1241b(%rip), %rax # 0x29514 retq leaq 0x10fff(%rip), %rcx # 0x28100 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x12473(%rip), %rax # 0x29584 retq leaq 0x110b7(%rip), %rcx # 0x281d0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x1264a(%rip), %rax # 0x29773 retq leaq 0x10f87(%rip), %rcx # 0x280b8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x12352(%rip), %rax # 0x29493 retq leal -0x64(%rdi), %eax cmpl $0x3, %eax ja 0x17162 leaq 0x10f57(%rip), %rcx # 0x280a8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x122ff(%rip), %rax # 0x29460 retq cmpl $0xe2, %edi jne 0x17172 leaq 0x1239b(%rip), %rax # 0x2950c retq leaq 0x126bd(%rip), %rax # 0x29836 retq leaq 0x12665(%rip), %rax # 0x297e6 retq leaq 0x12680(%rip), %rax # 0x29809 retq leaq 0x1266a(%rip), %rax # 0x297fb retq leaq 0x1261a(%rip), %rax # 0x297b3 retq leaq 0x12675(%rip), %rax # 0x29816 retq leaq 0x125da(%rip), %rax # 0x29783 retq leaq 0x125de(%rip), %rax # 0x2978f retq leaq 0x12615(%rip), %rax # 0x297ce retq leaq 0x125e2(%rip), %rax # 0x297a3 retq leaq 0x12533(%rip), %rax # 0x296fc retq leaq 0x12584(%rip), %rax # 0x29755 retq leaq 0x124a1(%rip), %rax # 0x2967a retq leaq 0x124cf(%rip), %rax # 0x296b0 retq leaq 0x12437(%rip), %rax # 0x29620 retq leaq 0x12453(%rip), %rax # 0x29644 retq leaq 0x124f9(%rip), %rax # 0x296f2 retq leaq 0x1241a(%rip), %rax # 0x2961b retq leaq 0x1251a(%rip), %rax # 0x29723 retq leaq 0x1241f(%rip), %rax # 0x29630 retq leaq 0x124ab(%rip), %rax # 0x296c4 retq leaq 0x123f1(%rip), %rax # 0x29612 retq leaq 0x1250c(%rip), %rax # 0x29735 retq leaq 0x123b3(%rip), %rax # 0x295e4 retq leaq 0x1239c(%rip), %rax # 0x295d5 retq leaq 0x12381(%rip), %rax # 0x295c2 retq leaq 0x12365(%rip), %rax # 0x295ae retq leaq 0x12367(%rip), %rax # 0x295b8 retq leaq 0x12337(%rip), %rax # 0x29590 retq leaq 0x12402(%rip), %rax # 0x29663 retq leaq 0x12399(%rip), %rax # 0x29602 retq leaq 0x1241f(%rip), %rax # 0x29690 retq leaq 0x12324(%rip), %rax # 0x2959d retq leaq 0x12458(%rip), %rax # 0x296d9 retq leaq 0x12457(%rip), %rax # 0x296e0 retq leaq 0x12412(%rip), %rax # 0x296a3 retq leaq 0x123bd(%rip), %rax # 0x29656 retq leaq 0x1246c(%rip), %rax # 0x2970d retq leaq 0x12297(%rip), %rax # 0x29540 retq leaq 0x12214(%rip), %rax # 0x294c5 retq leaq 0x12303(%rip), %rax # 0x295bc retq leaq 0x121dd(%rip), %rax # 0x2949e retq leaq 0x1226d(%rip), %rax # 0x29536 retq leaq 0x1228d(%rip), %rax # 0x2955e retq leaq 0x121ce(%rip), %rax # 0x294a7 retq leaq 0x12243(%rip), %rax # 0x29524 retq leaq 0x12205(%rip), %rax # 0x294ee retq leaq 0x1218b(%rip), %rax # 0x2947c retq leaq 0x1219d(%rip), %rax # 0x29496 retq leaq 0x12186(%rip), %rax # 0x29487 retq leaq 0x12244(%rip), %rax # 0x2954d retq leaq 0x12246(%rip), %rax # 0x29557 retq leaq 0x121b7(%rip), %rax # 0x294d0 retq leaq 0x12148(%rip), %rax # 0x29469 retq leaq 0x12248(%rip), %rax # 0x29571 retq leaq 0x121ad(%rip), %rax # 0x294de retq leaq 0x121c2(%rip), %rax # 0x294fb retq
_ZN7httplib6detail14status_messageEi: lea eax, [rdi-190h]; switch 52 cases cmp eax, 33h jbe short loc_170FA def_17108: lea eax, [rdi-1F5h]; jumptable 0000000000017108 default case cmp eax, 0Ah jbe short loc_17112 def_17120: lea eax, [rdi-0C8h]; jumptable 0000000000017120 default case cmp eax, 8 jbe short loc_1712A def_17138: lea eax, [rdi-12Ch]; jumptable 0000000000017138 default case cmp eax, 8 ja short def_170F0; jumptable 00000000000170F0 default case lea rcx, jpt_170F0 movsxd rax, ds:(jpt_170F0 - 280DCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_170F2: lea rax, aMultipleChoice; jumptable 00000000000170F0 case 300 retn loc_170FA: lea rcx, jpt_17108 movsxd rax, ds:(jpt_17108 - 28100h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1710A: lea rax, aBadRequest; jumptable 0000000000017108 case 400 retn loc_17112: lea rcx, jpt_17120 movsxd rax, ds:(jpt_17120 - 281D0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_17122: lea rax, aNotImplemented; jumptable 0000000000017120 case 501 retn loc_1712A: lea rcx, jpt_17138 movsxd rax, ds:(jpt_17138 - 280B8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1713A: lea rax, aOk; jumptable 0000000000017138 case 200 retn def_170F0: lea eax, [rdi-64h]; jumptable 00000000000170F0 default case cmp eax, 3 ja short def_17158; jumptable 0000000000017158 default case lea rcx, jpt_17158 movsxd rax, ds:(jpt_17158 - 280A8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1715A: lea rax, aContinue; jumptable 0000000000017158 case 100 retn def_17158: cmp edi, 0E2h; jumptable 0000000000017158 default case jnz short loc_17172; jumptable 0000000000017108 cases 419,420,427,430,432-450 lea rax, aImUsed; "IM Used" retn loc_17172: lea rax, aInternalServer; jumptable 0000000000017108 cases 419,420,427,430,432-450 retn loc_1717A: lea rax, aInsufficientSt; jumptable 0000000000017120 case 507 retn loc_17182: lea rax, aNotExtended; jumptable 0000000000017120 case 510 retn loc_1718A: lea rax, aLoopDetected; jumptable 0000000000017120 case 508 retn loc_17192: lea rax, aHttpVersionNot; jumptable 0000000000017120 case 505 retn loc_1719A: lea rax, aNetworkAuthent; jumptable 0000000000017120 case 511 retn loc_171A2: lea rax, aBadGateway; jumptable 0000000000017120 case 502 retn loc_171AA: lea rax, aServiceUnavail; jumptable 0000000000017120 case 503 retn loc_171B2: lea rax, aVariantAlsoNeg; jumptable 0000000000017120 case 506 retn loc_171BA: lea rax, aGatewayTimeout; jumptable 0000000000017120 case 504 retn loc_171C2: lea rax, aUpgradeRequire; jumptable 0000000000017108 case 426 retn loc_171CA: lea rax, aUnavailableFor; jumptable 0000000000017108 case 451 retn loc_171D2: lea rax, aRangeNotSatisf; jumptable 0000000000017108 case 416 retn loc_171DA: lea rax, aMisdirectedReq; jumptable 0000000000017108 case 421 retn loc_171E2: lea rax, aLengthRequired; jumptable 0000000000017108 case 411 retn loc_171EA: lea rax, aPayloadTooLarg; jumptable 0000000000017108 case 413 retn loc_171F2: lea rax, aTooEarly; jumptable 0000000000017108 case 425 retn loc_171FA: lea rax, aGone; jumptable 0000000000017108 case 410 retn loc_17202: lea rax, aTooManyRequest; jumptable 0000000000017108 case 429 retn loc_1720A: lea rax, aPreconditionFa; jumptable 0000000000017108 case 412 retn loc_17212: lea rax, aUnprocessableE; jumptable 0000000000017108 case 422 retn loc_1721A: lea rax, aConflict; jumptable 0000000000017108 case 409 retn loc_17222: lea rax, aRequestHeaderF; jumptable 0000000000017108 case 431 retn loc_1722A: lea rax, aProxyAuthentic; jumptable 0000000000017108 case 407 retn loc_17232: lea rax, aNotAcceptable; jumptable 0000000000017108 case 406 retn loc_1723A: lea rax, aMethodNotAllow; jumptable 0000000000017108 case 405 retn loc_17242: lea rax, aForbidden; jumptable 0000000000017108 case 403 retn loc_1724A: lea rax, aNotFound; jumptable 0000000000017108 case 404 retn loc_17252: lea rax, aUnauthorized; jumptable 0000000000017108 case 401 retn loc_1725A: lea rax, aUnsupportedMed; jumptable 0000000000017108 case 415 retn loc_17262: lea rax, aRequestTimeout; jumptable 0000000000017108 case 408 retn loc_1726A: lea rax, aExpectationFai; jumptable 0000000000017108 case 417 retn loc_17272: lea rax, aPaymentRequire; jumptable 0000000000017108 case 402 retn loc_1727A: lea rax, aLocked; jumptable 0000000000017108 case 423 retn loc_17282: lea rax, aFailedDependen; jumptable 0000000000017108 case 424 retn loc_1728A: lea rax, aIMATeapot; jumptable 0000000000017108 case 418 retn loc_17292: lea rax, aUriTooLong; jumptable 0000000000017108 case 414 retn loc_1729A: lea rax, aPreconditionRe; jumptable 0000000000017108 case 428 retn loc_172A2: lea rax, aNotModified; jumptable 00000000000170F0 case 304 retn loc_172AA: lea rax, aNoContent; jumptable 0000000000017138 case 204 retn loc_172B2: lea rax, aNotFound+4; jumptable 00000000000170F0 case 302 retn loc_172BA: lea rax, aAccepted; jumptable 0000000000017138 case 202 retn loc_172C2: lea rax, aSeeOther; jumptable 00000000000170F0 case 303 retn loc_172CA: lea rax, aTemporaryRedir; jumptable 00000000000170F0 case 307 retn loc_172D2: lea rax, aNonAuthoritati; jumptable 0000000000017138 case 203 retn loc_172DA: lea rax, aMovedPermanent; jumptable 00000000000170F0 case 301 retn loc_172E2: lea rax, aMultiStatus; jumptable 0000000000017138 case 207 retn loc_172EA: lea rax, aProcessing; jumptable 0000000000017158 case 102 retn loc_172F2: lea rax, aCreated; jumptable 0000000000017138 case 201 retn loc_172FA: lea rax, aEarlyHints; jumptable 0000000000017158 case 103 retn loc_17302: lea rax, aUseProxy; jumptable 00000000000170F0 case 305 retn loc_1730A: lea rax, aUnused; jumptable 00000000000170F0 case 306 retn loc_17312: lea rax, aResetContent; jumptable 0000000000017138 case 205 retn loc_1731A: lea rax, aSwitchingProto; jumptable 0000000000017158 case 101 retn loc_17322: lea rax, aPermanentRedir; jumptable 00000000000170F0 case 308 retn loc_1732A: lea rax, aPartialContent; jumptable 0000000000017138 case 206 retn loc_17332: lea rax, aAlreadyReporte; jumptable 0000000000017138 case 208 retn
char * httplib::detail::status_message(httplib::detail *this) { char *result; // rax switch ( (int)this ) { case 400: result = "Bad Request"; break; case 401: result = "Unauthorized"; break; case 402: result = "Payment Required"; break; case 403: result = "Forbidden"; break; case 404: result = "Not Found"; break; case 405: result = "Method Not Allowed"; break; case 406: result = "Not Acceptable"; break; case 407: result = "Proxy Authentication Required"; break; case 408: result = "Request Timeout"; break; case 409: result = "Conflict"; break; case 410: result = "Gone"; break; case 411: result = "Length Required"; break; case 412: result = "Precondition Failed"; break; case 413: result = "Payload Too Large"; break; case 414: result = "URI Too Long"; break; case 415: result = "Unsupported Media Type"; break; case 416: result = "Range Not Satisfiable"; break; case 417: result = "Expectation Failed"; break; case 418: result = "I'm a teapot"; break; case 419: case 420: case 427: case 430: case 432: case 433: case 434: case 435: case 436: case 437: case 438: case 439: case 440: case 441: case 442: case 443: case 444: case 445: case 446: case 447: case 448: case 449: case 450: LABEL_14: result = "Internal Server Error"; break; case 421: result = "Misdirected Request"; break; case 422: result = "Unprocessable Entity"; break; case 423: result = "Locked"; break; case 424: result = "Failed Dependency"; break; case 425: result = "Too Early"; break; case 426: result = "Upgrade Required"; break; case 428: result = "Precondition Required"; break; case 429: result = "Too Many Requests"; break; case 431: result = "Request Header Fields Too Large"; break; case 451: result = "Unavailable For Legal Reasons"; break; default: switch ( (int)this ) { case 501: result = "Not Implemented"; break; case 502: result = "Bad Gateway"; break; case 503: result = "Service Unavailable"; break; case 504: result = "Gateway Timeout"; break; case 505: result = "HTTP Version Not Supported"; break; case 506: result = "Variant Also Negotiates"; break; case 507: result = "Insufficient Storage"; break; case 508: result = "Loop Detected"; break; case 509: goto LABEL_14; case 510: result = "Not Extended"; break; case 511: result = "Network Authentication Required"; break; default: switch ( (int)this ) { case 200: result = "OK"; break; case 201: result = "Created"; break; case 202: result = "Accepted"; break; case 203: result = "Non-Authoritative Information"; break; case 204: result = "No Content"; break; case 205: result = "Reset Content"; break; case 206: result = "Partial Content"; break; case 207: result = "Multi-Status"; break; case 208: result = "Already Reported"; break; default: switch ( (int)this ) { case 300: result = "Multiple Choice"; break; case 301: result = "Moved Permanently"; break; case 302: result = "Found"; break; case 303: result = "See Other"; break; case 304: result = "Not Modified"; break; case 305: result = "Use Proxy"; break; case 306: result = "unused"; break; case 307: result = "Temporary Redirect"; break; case 308: result = "Permanent Redirect"; break; default: switch ( (int)this ) { case 'd': result = "Continue"; break; case 'e': result = "Switching Protocol"; break; case 'f': result = "Processing"; break; case 'g': result = "Early Hints"; break; default: if ( (_DWORD)this != 226 ) goto LABEL_14; result = "IM Used"; break; } break; } break; } break; } break; } return result; }
status_message: LEA EAX,[RDI + -0x190] CMP EAX,0x33 JBE 0x001170fa default: LEA EAX,[RDI + -0x1f5] CMP EAX,0xa JBE 0x00117112 default: LEA EAX,[RDI + -0xc8] CMP EAX,0x8 JBE 0x0011712a default: LEA EAX,[RDI + -0x12c] CMP EAX,0x8 JA 0x00117142 LEA RCX,[0x1280dc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_12c: LEA RAX,[0x129514] RET LAB_001170fa: LEA RCX,[0x128100] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_190: LEA RAX,[0x129584] RET LAB_00117112: LEA RCX,[0x1281d0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1f5: LEA RAX,[0x129773] RET LAB_0011712a: LEA RCX,[0x1280b8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_c8: LEA RAX,[0x129493] RET default: LEA EAX,[RDI + -0x64] CMP EAX,0x3 JA 0x00117162 LEA RCX,[0x1280a8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_64: LEA RAX,[0x129460] RET default: CMP EDI,0xe2 JNZ 0x00117172 LEA RAX,[0x12950c] RET caseD_1fd: LEA RAX,[0x129836] RET caseD_1fb: LEA RAX,[0x1297e6] RET caseD_1fe: LEA RAX,[0x129809] RET caseD_1fc: LEA RAX,[0x1297fb] RET caseD_1f9: LEA RAX,[0x1297b3] RET caseD_1ff: LEA RAX,[0x129816] RET caseD_1f6: LEA RAX,[0x129783] RET caseD_1f7: LEA RAX,[0x12978f] RET caseD_1fa: LEA RAX,[0x1297ce] RET caseD_1f8: LEA RAX,[0x1297a3] RET caseD_1aa: LEA RAX,[0x1296fc] RET caseD_1c3: LEA RAX,[0x129755] RET caseD_1a0: LEA RAX,[0x12967a] RET caseD_1a5: LEA RAX,[0x1296b0] RET caseD_19b: LEA RAX,[0x129620] RET caseD_19d: LEA RAX,[0x129644] RET caseD_1a9: LEA RAX,[0x1296f2] RET caseD_19a: LEA RAX,[0x12961b] RET caseD_1ad: LEA RAX,[0x129723] RET caseD_19c: LEA RAX,[0x129630] RET caseD_1a6: LEA RAX,[0x1296c4] RET caseD_199: LEA RAX,[0x129612] RET caseD_1af: LEA RAX,[0x129735] RET caseD_197: LEA RAX,[0x1295e4] RET caseD_196: LEA RAX,[0x1295d5] RET caseD_195: LEA RAX,[0x1295c2] RET caseD_193: LEA RAX,[0x1295ae] RET caseD_194: LEA RAX,[0x1295b8] RET caseD_191: LEA RAX,[0x129590] RET caseD_19f: LEA RAX,[0x129663] RET caseD_198: LEA RAX,[0x129602] RET caseD_1a1: LEA RAX,[0x129690] RET caseD_192: LEA RAX,[0x12959d] RET caseD_1a7: LEA RAX,[0x1296d9] RET caseD_1a8: LEA RAX,[0x1296e0] RET caseD_1a2: LEA RAX,[0x1296a3] RET caseD_19e: LEA RAX,[0x129656] RET caseD_1ac: LEA RAX,[0x12970d] RET caseD_130: LEA RAX,[0x129540] RET caseD_cc: LEA RAX,[0x1294c5] RET caseD_12e: LEA RAX,[0x1295bc] RET caseD_ca: LEA RAX,[0x12949e] RET caseD_12f: LEA RAX,[0x129536] RET caseD_133: LEA RAX,[0x12955e] RET caseD_cb: LEA RAX,[0x1294a7] RET caseD_12d: LEA RAX,[0x129524] RET caseD_cf: LEA RAX,[0x1294ee] RET caseD_66: LEA RAX,[0x12947c] RET caseD_c9: LEA RAX,[0x129496] RET caseD_67: LEA RAX,[0x129487] RET caseD_131: LEA RAX,[0x12954d] RET caseD_132: LEA RAX,[0x129557] RET caseD_cd: LEA RAX,[0x1294d0] RET caseD_65: LEA RAX,[0x129469] RET caseD_134: LEA RAX,[0x129571] RET caseD_ce: LEA RAX,[0x1294de] RET caseD_d0: LEA RAX,[0x1294fb] RET
/* httplib::detail::status_message(int) */ char * httplib::detail::status_message(int param_1) { switch(param_1) { case 400: return "Bad Request"; case 0x191: return "Unauthorized"; case 0x192: return "Payment Required"; case 0x193: return "Forbidden"; case 0x194: return "Not Found"; case 0x195: return "Method Not Allowed"; case 0x196: return "Not Acceptable"; case 0x197: return "Proxy Authentication Required"; case 0x198: return "Request Timeout"; case 0x199: return "Conflict"; case 0x19a: return "Gone"; case 0x19b: return "Length Required"; case 0x19c: return "Precondition Failed"; case 0x19d: return "Payload Too Large"; case 0x19e: return "URI Too Long"; case 0x19f: return "Unsupported Media Type"; case 0x1a0: return "Range Not Satisfiable"; case 0x1a1: return "Expectation Failed"; case 0x1a2: return "I\'m a teapot"; case 0x1a3: case 0x1a4: case 0x1ab: case 0x1ae: case 0x1b0: case 0x1b1: case 0x1b2: case 0x1b3: case 0x1b4: case 0x1b5: case 0x1b6: case 0x1b7: case 0x1b8: case 0x1b9: case 0x1ba: case 0x1bb: case 0x1bc: case 0x1bd: case 0x1be: case 0x1bf: case 0x1c0: case 0x1c1: case 0x1c2: goto switchD_00117120_caseD_1fd; case 0x1a5: return "Misdirected Request"; case 0x1a6: return "Unprocessable Entity"; case 0x1a7: return "Locked"; case 0x1a8: return "Failed Dependency"; case 0x1a9: return "Too Early"; case 0x1aa: return "Upgrade Required"; case 0x1ac: return "Precondition Required"; case 0x1ad: return "Too Many Requests"; case 0x1af: return "Request Header Fields Too Large"; case 0x1c3: return "Unavailable For Legal Reasons"; default: switch(param_1) { case 0x1f5: return "Not Implemented"; case 0x1f6: return "Bad Gateway"; case 0x1f7: return "Service Unavailable"; case 0x1f8: return "Gateway Timeout"; case 0x1f9: return "HTTP Version Not Supported"; case 0x1fa: return "Variant Also Negotiates"; case 0x1fb: return "Insufficient Storage"; case 0x1fc: return "Loop Detected"; case 0x1fd: break; case 0x1fe: return "Not Extended"; case 0x1ff: return "Network Authentication Required"; default: switch(param_1) { case 200: return "OK"; case 0xc9: return "Created"; case 0xca: return "Accepted"; case 0xcb: return "Non-Authoritative Information"; case 0xcc: return "No Content"; case 0xcd: return "Reset Content"; case 0xce: return "Partial Content"; case 0xcf: return "Multi-Status"; case 0xd0: return "Already Reported"; } switch(param_1) { case 300: return "Multiple Choice"; case 0x12d: return "Moved Permanently"; case 0x12e: return "Found"; case 0x12f: return "See Other"; case 0x130: return "Not Modified"; case 0x131: return "Use Proxy"; case 0x132: return "unused"; case 0x133: return "Temporary Redirect"; case 0x134: return "Permanent Redirect"; } switch(param_1) { case 100: return "Continue"; case 0x65: return "Switching Protocol"; case 0x66: return "Processing"; case 0x67: return "Early Hints"; } if (param_1 == 0xe2) { return "IM Used"; } } switchD_00117120_caseD_1fd: return "Internal Server Error"; } }
39,122
rw_pr_rdlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_rdlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); /* The fact that we were able to acquire 'lock' mutex means that there are no active writers and we can acquire rd-lock. Increment active readers counter to prevent requests for wr-lock from succeeding and unlock mutex. */ rwlock->active_readers++; pthread_mutex_unlock(&rwlock->lock); return 0; }
O0
c
rw_pr_rdlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x244a0 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rdi callq 0x24200 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rw_pr_rdlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 1 mov [rax+58h], ecx mov rdi, [rbp+var_8] call _pthread_mutex_unlock xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_rdlock(long long a1) { pthread_mutex_lock(a1); ++*(_DWORD *)(a1 + 88); pthread_mutex_unlock(a1); return 0LL; }
rw_pr_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x001244a0 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,0x1 MOV dword ptr [RAX + 0x58],ECX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124200 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_rdlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1; pthread_mutex_unlock(param_1); return 0; }
39,123
rw_pr_rdlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_rdlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); /* The fact that we were able to acquire 'lock' mutex means that there are no active writers and we can acquire rd-lock. Increment active readers counter to prevent requests for wr-lock from succeeding and unlock mutex. */ rwlock->active_readers++; pthread_mutex_unlock(&rwlock->lock); return 0; }
O3
c
rw_pr_rdlock: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x244c0 incl 0x58(%rbx) movq %rbx, %rdi callq 0x24210 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
rw_pr_rdlock: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call _pthread_mutex_lock inc dword ptr [rbx+58h] mov rdi, rbx call _pthread_mutex_unlock xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long rw_pr_rdlock(long long a1) { pthread_mutex_lock(a1); ++*(_DWORD *)(a1 + 88); pthread_mutex_unlock(a1); return 0LL; }
rw_pr_rdlock: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x001244c0 INC dword ptr [RBX + 0x58] MOV RDI,RBX CALL 0x00124210 XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 rw_pr_rdlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1; pthread_mutex_unlock(param_1); return 0; }
39,124
get_sysfs_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ami-iit[P]serial_cpp/src/impl/list_ports/list_ports_linux.cc
vector<string> get_sysfs_info(const string& device_path) { string device_name = basename( device_path ); string friendly_name; string hardware_id; string sys_device_path = format( "/sys/class/tty/%s/device", device_name.c_str() ); if( device_name.compare(0,6,"ttyUSB") == 0 ) { sys_device_path = dirname( dirname( realpath( sys_device_path ) ) ); if( path_exists( sys_device_path ) ) { friendly_name = usb_sysfs_friendly_name( sys_device_path ); hardware_id = usb_sysfs_hw_string( sys_device_path ); } } else if( device_name.compare(0,6,"ttyACM") == 0 ) { sys_device_path = dirname( realpath( sys_device_path ) ); if( path_exists( sys_device_path ) ) { friendly_name = usb_sysfs_friendly_name( sys_device_path ); hardware_id = usb_sysfs_hw_string( sys_device_path ); } } else { // Try to read ID string of PCI device string sys_id_path = sys_device_path + "/id"; if( path_exists( sys_id_path ) ) hardware_id = read_line( sys_id_path ); } if( friendly_name.empty() ) friendly_name = device_name; if( hardware_id.empty() ) hardware_id = "n/a"; vector<string> result; result.push_back(friendly_name); result.push_back(hardware_id); return result; }
O0
cpp
get_sysfs_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x270, %rsp # imm = 0x270 movq %rdi, -0x220(%rbp) movq %rdi, %rax movq %rax, -0x218(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdi movq %rdi, -0x210(%rbp) callq 0xdcc0 leaq -0x50(%rbp), %rdi callq 0x34b0 leaq -0x70(%rbp), %rdi callq 0x34b0 movq -0x210(%rbp), %rdi callq 0x3150 movq %rax, %rdx leaq 0x31bd(%rip), %rsi # 0x1099d xorl %eax, %eax leaq -0x90(%rbp), %rdi callq 0xdd40 jmp 0xd7f0 leaq 0x31bf(%rip), %rcx # 0x109b6 xorl %eax, %eax movl %eax, %esi leaq -0x30(%rbp), %rdi movl $0x6, %edx callq 0x3480 movl %eax, -0x224(%rbp) jmp 0xd811 movl -0x224(%rbp), %eax cmpl $0x0, %eax jne 0xd9a8 leaq -0x100(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0xdff0 jmp 0xd835 leaq -0xe0(%rbp), %rdi leaq -0x100(%rbp), %rsi callq 0xdf20 jmp 0xd84a leaq -0xc0(%rbp), %rdi leaq -0xe0(%rbp), %rsi callq 0xdf20 jmp 0xd85f leaq -0x90(%rbp), %rdi movq %rdi, -0x230(%rbp) leaq -0xc0(%rbp), %rsi movq %rsi, -0x238(%rbp) callq 0x3410 movq -0x238(%rbp), %rdi callq 0x31e0 leaq -0xe0(%rbp), %rdi callq 0x31e0 leaq -0x100(%rbp), %rdi callq 0x31e0 movq -0x230(%rbp), %rdi callq 0xe090 movb %al, -0x225(%rbp) jmp 0xd8b8 movb -0x225(%rbp), %al testb $0x1, %al jne 0xd8c7 jmp 0xd9a3 leaq -0x120(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0xe0e0 jmp 0xd8dc leaq -0x50(%rbp), %rdi leaq -0x120(%rbp), %rsi movq %rsi, -0x240(%rbp) callq 0x3410 movq -0x240(%rbp), %rdi callq 0x31e0 leaq -0x140(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0xe4d0 jmp 0xd914 leaq -0x70(%rbp), %rdi leaq -0x140(%rbp), %rsi callq 0x3410 leaq -0x140(%rbp), %rdi callq 0x31e0 jmp 0xd9a3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) jmp 0xdc8c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) jmp 0xdc80 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) jmp 0xd992 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) leaq -0xe0(%rbp), %rdi callq 0x31e0 leaq -0x100(%rbp), %rdi callq 0x31e0 jmp 0xdc80 jmp 0xdb91 leaq 0x300e(%rip), %rcx # 0x109bd xorl %eax, %eax movl %eax, %esi leaq -0x30(%rbp), %rdi movl $0x6, %edx callq 0x3480 movl %eax, -0x244(%rbp) jmp 0xd9c9 movl -0x244(%rbp), %eax cmpl $0x0, %eax jne 0xdaf1 leaq -0x180(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0xdff0 jmp 0xd9ed leaq -0x160(%rbp), %rdi leaq -0x180(%rbp), %rsi callq 0xdf20 jmp 0xda02 leaq -0x90(%rbp), %rdi movq %rdi, -0x250(%rbp) leaq -0x160(%rbp), %rsi movq %rsi, -0x258(%rbp) callq 0x3410 movq -0x258(%rbp), %rdi callq 0x31e0 leaq -0x180(%rbp), %rdi callq 0x31e0 movq -0x250(%rbp), %rdi callq 0xe090 movb %al, -0x245(%rbp) jmp 0xda4f movb -0x245(%rbp), %al testb $0x1, %al jne 0xda5e jmp 0xdaec leaq -0x1a0(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0xe0e0 jmp 0xda73 leaq -0x50(%rbp), %rdi leaq -0x1a0(%rbp), %rsi movq %rsi, -0x260(%rbp) callq 0x3410 movq -0x260(%rbp), %rdi callq 0x31e0 leaq -0x1c0(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0xe4d0 jmp 0xdaab leaq -0x70(%rbp), %rdi leaq -0x1c0(%rbp), %rsi callq 0x3410 leaq -0x1c0(%rbp), %rdi callq 0x31e0 jmp 0xdaec movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) leaq -0x180(%rbp), %rdi callq 0x31e0 jmp 0xdc80 jmp 0xdb8f leaq 0x2ecc(%rip), %rdx # 0x109c4 leaq -0x1e0(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0xeb70 jmp 0xdb0d leaq -0x1e0(%rbp), %rdi callq 0xe090 movb %al, -0x261(%rbp) jmp 0xdb21 movb -0x261(%rbp), %al testb $0x1, %al jne 0xdb2d jmp 0xdb83 leaq -0x200(%rbp), %rdi leaq -0x1e0(%rbp), %rsi callq 0xe710 jmp 0xdb42 leaq -0x70(%rbp), %rdi leaq -0x200(%rbp), %rsi callq 0x3410 leaq -0x200(%rbp), %rdi callq 0x31e0 jmp 0xdb83 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) leaq -0x1e0(%rbp), %rdi callq 0x31e0 jmp 0xdc80 leaq -0x1e0(%rbp), %rdi callq 0x31e0 jmp 0xdb91 leaq -0x50(%rbp), %rdi callq 0x3580 testb $0x1, %al jne 0xdba0 jmp 0xdbb1 leaq -0x50(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x3040 jmp 0xdbaf jmp 0xdbb1 leaq -0x70(%rbp), %rdi callq 0x3580 testb $0x1, %al jne 0xdbc0 jmp 0xdbd4 leaq 0x2e01(%rip), %rsi # 0x109c8 leaq -0x70(%rbp), %rdi callq 0x3490 jmp 0xdbd2 jmp 0xdbd4 movq -0x220(%rbp), %rdi movb $0x0, -0x201(%rbp) callq 0x6490 movq -0x220(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0xebf0 jmp 0xdbf9 movq -0x220(%rbp), %rdi leaq -0x70(%rbp), %rsi callq 0xebf0 jmp 0xdc0b movb $0x1, -0x201(%rbp) testb $0x1, -0x201(%rbp) jne 0xdc49 jmp 0xdc3d movq -0x220(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) callq 0x64e0 jmp 0xdc80 movq -0x220(%rbp), %rdi callq 0x64e0 leaq -0x90(%rbp), %rdi callq 0x31e0 leaq -0x70(%rbp), %rdi callq 0x31e0 leaq -0x50(%rbp), %rdi callq 0x31e0 leaq -0x30(%rbp), %rdi callq 0x31e0 movq -0x218(%rbp), %rax addq $0x270, %rsp # imm = 0x270 popq %rbp retq leaq -0x90(%rbp), %rdi callq 0x31e0 leaq -0x70(%rbp), %rdi callq 0x31e0 leaq -0x50(%rbp), %rdi callq 0x31e0 leaq -0x30(%rbp), %rdi callq 0x31e0 movq -0x98(%rbp), %rdi callq 0x35d0 nopw %cs:(%rax,%rax)
_ZL14get_sysfs_infoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 270h mov [rbp+var_220], rdi mov rax, rdi mov [rbp+var_218], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rsi, [rbp+var_10] lea rdi, [rbp+var_30] mov [rbp+var_210], rdi call _ZL8basenameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; basename(std::string const&) lea rdi, [rbp+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) lea rdi, [rbp+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rbp+var_210] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdx, rax lea rsi, aSysClassTtySDe; "/sys/class/tty/%s/device" xor eax, eax lea rdi, [rbp+var_90] call _ZL6formatB5cxx11PKcz; format(char const*,...) jmp short $+2 loc_D7F0: lea rcx, aTtyusb; "ttyUSB" xor eax, eax mov esi, eax lea rdi, [rbp+var_30] mov edx, 6 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc; std::string::compare(ulong,ulong,char const*) mov [rbp+var_224], eax jmp short $+2 loc_D811: mov eax, [rbp+var_224] cmp eax, 0 jnz loc_D9A8 lea rdi, [rbp+var_100] lea rsi, [rbp+var_90] call _ZL8realpathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; realpath(std::string const&) jmp short $+2 loc_D835: lea rdi, [rbp+var_E0] lea rsi, [rbp+var_100] call _ZL7dirnameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; dirname(std::string const&) jmp short $+2 loc_D84A: lea rdi, [rbp+var_C0] lea rsi, [rbp+var_E0] call _ZL7dirnameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; dirname(std::string const&) jmp short $+2 loc_D85F: lea rdi, [rbp+var_90] mov [rbp+var_230], rdi lea rsi, [rbp+var_C0] mov [rbp+var_238], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbp+var_238] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_230] call _ZL11path_existsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; path_exists(std::string const&) mov [rbp+var_225], al jmp short $+2 loc_D8B8: mov al, [rbp+var_225] test al, 1 jnz short loc_D8C7 jmp loc_D9A3 loc_D8C7: lea rdi, [rbp+var_120] lea rsi, [rbp+var_90] call _ZL23usb_sysfs_friendly_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; usb_sysfs_friendly_name(std::string const&) jmp short $+2 loc_D8DC: lea rdi, [rbp+var_50] lea rsi, [rbp+var_120] mov [rbp+var_240], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbp+var_240] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_140] lea rsi, [rbp+var_90] call _ZL19usb_sysfs_hw_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; usb_sysfs_hw_string(std::string const&) jmp short $+2 loc_D914: lea rdi, [rbp+var_70] lea rsi, [rbp+var_140] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_140] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_D9A3 mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax jmp loc_DC8C mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax jmp loc_DC80 mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax jmp short loc_D992 mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax lea rdi, [rbp+var_E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D992: lea rdi, [rbp+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_DC80 loc_D9A3: jmp loc_DB91 loc_D9A8: lea rcx, aTtyacm; "ttyACM" xor eax, eax mov esi, eax lea rdi, [rbp+var_30] mov edx, 6 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc; std::string::compare(ulong,ulong,char const*) mov [rbp+var_244], eax jmp short $+2 loc_D9C9: mov eax, [rbp+var_244] cmp eax, 0 jnz loc_DAF1 lea rdi, [rbp+var_180] lea rsi, [rbp+var_90] call _ZL8realpathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; realpath(std::string const&) jmp short $+2 loc_D9ED: lea rdi, [rbp+var_160] lea rsi, [rbp+var_180] call _ZL7dirnameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; dirname(std::string const&) jmp short $+2 loc_DA02: lea rdi, [rbp+var_90] mov [rbp+var_250], rdi lea rsi, [rbp+var_160] mov [rbp+var_258], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbp+var_258] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_180] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_250] call _ZL11path_existsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; path_exists(std::string const&) mov [rbp+var_245], al jmp short $+2 loc_DA4F: mov al, [rbp+var_245] test al, 1 jnz short loc_DA5E jmp loc_DAEC loc_DA5E: lea rdi, [rbp+var_1A0] lea rsi, [rbp+var_90] call _ZL23usb_sysfs_friendly_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; usb_sysfs_friendly_name(std::string const&) jmp short $+2 loc_DA73: lea rdi, [rbp+var_50] lea rsi, [rbp+var_1A0] mov [rbp+var_260], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbp+var_260] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_1C0] lea rsi, [rbp+var_90] call _ZL19usb_sysfs_hw_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; usb_sysfs_hw_string(std::string const&) jmp short $+2 loc_DAAB: lea rdi, [rbp+var_70] lea rsi, [rbp+var_1C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_1C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_DAEC mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax lea rdi, [rbp+var_180] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_DC80 loc_DAEC: jmp loc_DB8F loc_DAF1: lea rdx, aId; "/id" lea rdi, [rbp+var_1E0] lea rsi, [rbp+var_90] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_DB0D: lea rdi, [rbp+var_1E0] call _ZL11path_existsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; path_exists(std::string const&) mov [rbp+var_261], al jmp short $+2 loc_DB21: mov al, [rbp+var_261] test al, 1 jnz short loc_DB2D jmp short loc_DB83 loc_DB2D: lea rdi, [rbp+var_200] lea rsi, [rbp+var_1E0] call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&) jmp short $+2 loc_DB42: lea rdi, [rbp+var_70] lea rsi, [rbp+var_200] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_200] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_DB83 mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax lea rdi, [rbp+var_1E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_DC80 loc_DB83: lea rdi, [rbp+var_1E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_DB8F: jmp short $+2 loc_DB91: lea rdi, [rbp+var_50] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_DBA0 jmp short loc_DBB1 loc_DBA0: lea rdi, [rbp+var_50] lea rsi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) jmp short $+2 loc_DBAF: jmp short $+2 loc_DBB1: lea rdi, [rbp+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_DBC0 jmp short loc_DBD4 loc_DBC0: lea rsi, aNA; "n/a" lea rdi, [rbp+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_DBD2: jmp short $+2 loc_DBD4: mov rdi, [rbp+var_220] mov [rbp+var_201], 0 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov rdi, [rbp+var_220] lea rsi, [rbp+var_50] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp short $+2 loc_DBF9: mov rdi, [rbp+var_220] lea rsi, [rbp+var_70] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp short $+2 loc_DC0B: mov [rbp+var_201], 1 test [rbp+var_201], 1 jnz short loc_DC49 jmp short loc_DC3D mov rdi, [rbp+var_220] mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_DC80 loc_DC3D: mov rdi, [rbp+var_220] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_DC49: lea rdi, [rbp+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rbp+var_218] add rsp, 270h pop rbp retn loc_DC80: lea rdi, [rbp+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_DC8C: lea rdi, [rbp+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_98] call __Unwind_Resume
long long get_sysfs_info(long long a1, long long a2) { int v2; // eax int v3; // ecx int v4; // r8d int v5; // r9d _BYTE v7[32]; // [rsp+70h] [rbp-200h] BYREF _BYTE v8[32]; // [rsp+90h] [rbp-1E0h] BYREF _BYTE v9[32]; // [rsp+B0h] [rbp-1C0h] BYREF _BYTE v10[32]; // [rsp+D0h] [rbp-1A0h] BYREF _BYTE v11[32]; // [rsp+F0h] [rbp-180h] BYREF _BYTE v12[32]; // [rsp+110h] [rbp-160h] BYREF _BYTE v13[32]; // [rsp+130h] [rbp-140h] BYREF _BYTE v14[32]; // [rsp+150h] [rbp-120h] BYREF _BYTE v15[32]; // [rsp+170h] [rbp-100h] BYREF _BYTE v16[32]; // [rsp+190h] [rbp-E0h] BYREF _BYTE v17[36]; // [rsp+1B0h] [rbp-C0h] BYREF _BYTE v18[32]; // [rsp+1E0h] [rbp-90h] BYREF _BYTE v19[32]; // [rsp+200h] [rbp-70h] BYREF _BYTE v20[32]; // [rsp+220h] [rbp-50h] BYREF _BYTE v21[32]; // [rsp+240h] [rbp-30h] BYREF long long v22; // [rsp+260h] [rbp-10h] long long v23; // [rsp+268h] [rbp-8h] v23 = a1; v22 = a2; basename(v21, a2); std::string::basic_string(v20); std::string::basic_string(v19); v2 = std::string::c_str(v21); format[abi:cxx11]((unsigned int)v18, (unsigned int)"/sys/class/tty/%s/device", v2, v3, v4, v5); if ( !(unsigned int)std::string::compare(v21, 0LL, 6LL, "ttyUSB") ) { realpath(v15, v18); dirname(v16, v15); dirname(v17, v16); std::string::operator=(v18, v17); std::string::~string(v17); std::string::~string(v16); std::string::~string(v15); if ( (path_exists(v18) & 1) != 0 ) { usb_sysfs_friendly_name(v14, v18); std::string::operator=(v20, v14); std::string::~string(v14); usb_sysfs_hw_string(v13, v18); std::string::operator=(v19, v13); std::string::~string(v13); } } else if ( !(unsigned int)std::string::compare(v21, 0LL, 6LL, "ttyACM") ) { realpath(v11, v18); dirname(v12, v11); std::string::operator=(v18, v12); std::string::~string(v12); std::string::~string(v11); if ( (path_exists(v18) & 1) != 0 ) { usb_sysfs_friendly_name(v10, v18); std::string::operator=(v20, v10); std::string::~string(v10); usb_sysfs_hw_string(v9, v18); std::string::operator=(v19, v9); std::string::~string(v9); } } else { std::operator+<char>(v8, v18, "/id"); if ( (path_exists(v8) & 1) != 0 ) { read_line(v7, v8); std::string::operator=(v19, v7); std::string::~string(v7); } std::string::~string(v8); } if ( (std::string::empty(v20) & 1) != 0 ) std::string::operator=(v20, v21); if ( (std::string::empty(v19) & 1) != 0 ) std::string::operator=(v19, "n/a"); std::vector<std::string>::vector(a1); std::vector<std::string>::push_back(a1, v20); std::vector<std::string>::push_back(a1, v19); std::string::~string(v18); std::string::~string(v19); std::string::~string(v20); std::string::~string(v21); return a1; }
get_sysfs_info: PUSH RBP MOV RBP,RSP SUB RSP,0x270 MOV qword ptr [RBP + -0x220],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x218],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x30] MOV qword ptr [RBP + -0x210],RDI CALL 0x0010dcc0 LEA RDI,[RBP + -0x50] CALL 0x001034b0 LEA RDI,[RBP + -0x70] CALL 0x001034b0 MOV RDI,qword ptr [RBP + -0x210] CALL 0x00103150 MOV RDX,RAX LAB_0010d7d9: LEA RSI,[0x11099d] XOR EAX,EAX LEA RDI,[RBP + -0x90] CALL 0x0010dd40 JMP 0x0010d7f0 LAB_0010d7f0: LEA RCX,[0x1109b6] XOR EAX,EAX MOV ESI,EAX LEA RDI,[RBP + -0x30] MOV EDX,0x6 CALL 0x00103480 MOV dword ptr [RBP + -0x224],EAX JMP 0x0010d811 LAB_0010d811: MOV EAX,dword ptr [RBP + -0x224] CMP EAX,0x0 JNZ 0x0010d9a8 LEA RDI,[RBP + -0x100] LEA RSI,[RBP + -0x90] CALL 0x0010dff0 JMP 0x0010d835 LAB_0010d835: LEA RDI,[RBP + -0xe0] LEA RSI,[RBP + -0x100] CALL 0x0010df20 JMP 0x0010d84a LAB_0010d84a: LEA RDI,[RBP + -0xc0] LEA RSI,[RBP + -0xe0] CALL 0x0010df20 JMP 0x0010d85f LAB_0010d85f: LEA RDI,[RBP + -0x90] MOV qword ptr [RBP + -0x230],RDI LEA RSI,[RBP + -0xc0] MOV qword ptr [RBP + -0x238],RSI CALL 0x00103410 MOV RDI,qword ptr [RBP + -0x238] CALL 0x001031e0 LEA RDI,[RBP + -0xe0] CALL 0x001031e0 LEA RDI,[RBP + -0x100] CALL 0x001031e0 MOV RDI,qword ptr [RBP + -0x230] LAB_0010d8ab: CALL 0x0010e090 MOV byte ptr [RBP + -0x225],AL JMP 0x0010d8b8 LAB_0010d8b8: MOV AL,byte ptr [RBP + -0x225] TEST AL,0x1 JNZ 0x0010d8c7 JMP 0x0010d9a3 LAB_0010d8c7: LEA RDI,[RBP + -0x120] LEA RSI,[RBP + -0x90] CALL 0x0010e0e0 JMP 0x0010d8dc LAB_0010d8dc: LEA RDI,[RBP + -0x50] LEA RSI,[RBP + -0x120] MOV qword ptr [RBP + -0x240],RSI CALL 0x00103410 MOV RDI,qword ptr [RBP + -0x240] CALL 0x001031e0 LEA RDI,[RBP + -0x140] LEA RSI,[RBP + -0x90] CALL 0x0010e4d0 JMP 0x0010d914 LAB_0010d914: LEA RDI,[RBP + -0x70] LEA RSI,[RBP + -0x140] CALL 0x00103410 LEA RDI,[RBP + -0x140] CALL 0x001031e0 JMP 0x0010d9a3 LAB_0010d9a3: JMP 0x0010db91 LAB_0010d9a8: LEA RCX,[0x1109bd] XOR EAX,EAX MOV ESI,EAX LEA RDI,[RBP + -0x30] MOV EDX,0x6 CALL 0x00103480 MOV dword ptr [RBP + -0x244],EAX JMP 0x0010d9c9 LAB_0010d9c9: MOV EAX,dword ptr [RBP + -0x244] CMP EAX,0x0 JNZ 0x0010daf1 LEA RDI,[RBP + -0x180] LEA RSI,[RBP + -0x90] CALL 0x0010dff0 JMP 0x0010d9ed LAB_0010d9ed: LEA RDI,[RBP + -0x160] LEA RSI,[RBP + -0x180] CALL 0x0010df20 JMP 0x0010da02 LAB_0010da02: LEA RDI,[RBP + -0x90] MOV qword ptr [RBP + -0x250],RDI LEA RSI,[RBP + -0x160] MOV qword ptr [RBP + -0x258],RSI CALL 0x00103410 MOV RDI,qword ptr [RBP + -0x258] CALL 0x001031e0 LEA RDI,[RBP + -0x180] CALL 0x001031e0 MOV RDI,qword ptr [RBP + -0x250] LAB_0010da42: CALL 0x0010e090 MOV byte ptr [RBP + -0x245],AL JMP 0x0010da4f LAB_0010da4f: MOV AL,byte ptr [RBP + -0x245] TEST AL,0x1 JNZ 0x0010da5e JMP 0x0010daec LAB_0010da5e: LEA RDI,[RBP + -0x1a0] LEA RSI,[RBP + -0x90] CALL 0x0010e0e0 JMP 0x0010da73 LAB_0010da73: LEA RDI,[RBP + -0x50] LEA RSI,[RBP + -0x1a0] MOV qword ptr [RBP + -0x260],RSI CALL 0x00103410 MOV RDI,qword ptr [RBP + -0x260] CALL 0x001031e0 LEA RDI,[RBP + -0x1c0] LEA RSI,[RBP + -0x90] CALL 0x0010e4d0 JMP 0x0010daab LAB_0010daab: LEA RDI,[RBP + -0x70] LEA RSI,[RBP + -0x1c0] CALL 0x00103410 LEA RDI,[RBP + -0x1c0] CALL 0x001031e0 JMP 0x0010daec LAB_0010daec: JMP 0x0010db8f LAB_0010daf1: LEA RDX,[0x1109c4] LEA RDI,[RBP + -0x1e0] LEA RSI,[RBP + -0x90] CALL 0x0010eb70 JMP 0x0010db0d LAB_0010db0d: LEA RDI,[RBP + -0x1e0] CALL 0x0010e090 MOV byte ptr [RBP + -0x261],AL JMP 0x0010db21 LAB_0010db21: MOV AL,byte ptr [RBP + -0x261] TEST AL,0x1 JNZ 0x0010db2d JMP 0x0010db83 LAB_0010db2d: LEA RDI,[RBP + -0x200] LEA RSI,[RBP + -0x1e0] CALL 0x0010e710 JMP 0x0010db42 LAB_0010db42: LEA RDI,[RBP + -0x70] LEA RSI,[RBP + -0x200] CALL 0x00103410 LEA RDI,[RBP + -0x200] CALL 0x001031e0 JMP 0x0010db83 LAB_0010db83: LEA RDI,[RBP + -0x1e0] CALL 0x001031e0 LAB_0010db8f: JMP 0x0010db91 LAB_0010db91: LEA RDI,[RBP + -0x50] CALL 0x00103580 TEST AL,0x1 JNZ 0x0010dba0 JMP 0x0010dbb1 LAB_0010dba0: LEA RDI,[RBP + -0x50] LEA RSI,[RBP + -0x30] CALL 0x00103040 JMP 0x0010dbaf LAB_0010dbaf: JMP 0x0010dbb1 LAB_0010dbb1: LEA RDI,[RBP + -0x70] CALL 0x00103580 TEST AL,0x1 JNZ 0x0010dbc0 JMP 0x0010dbd4 LAB_0010dbc0: LEA RSI,[0x1109c8] LEA RDI,[RBP + -0x70] CALL 0x00103490 JMP 0x0010dbd2 LAB_0010dbd2: JMP 0x0010dbd4 LAB_0010dbd4: MOV RDI,qword ptr [RBP + -0x220] MOV byte ptr [RBP + -0x201],0x0 CALL 0x00106490 MOV RDI,qword ptr [RBP + -0x220] LAB_0010dbee: LEA RSI,[RBP + -0x50] CALL 0x0010ebf0 JMP 0x0010dbf9 LAB_0010dbf9: MOV RDI,qword ptr [RBP + -0x220] LEA RSI,[RBP + -0x70] CALL 0x0010ebf0 LAB_0010dc09: JMP 0x0010dc0b LAB_0010dc0b: MOV byte ptr [RBP + -0x201],0x1 TEST byte ptr [RBP + -0x201],0x1 JNZ 0x0010dc49 JMP 0x0010dc3d LAB_0010dc3d: MOV RDI,qword ptr [RBP + -0x220] CALL 0x001064e0 LAB_0010dc49: LEA RDI,[RBP + -0x90] CALL 0x001031e0 LEA RDI,[RBP + -0x70] CALL 0x001031e0 LEA RDI,[RBP + -0x50] CALL 0x001031e0 LEA RDI,[RBP + -0x30] CALL 0x001031e0 MOV RAX,qword ptr [RBP + -0x218] ADD RSP,0x270 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0010dc1b) */ /* get_sysfs_info(std::__cxx11::string const&) */ string * get_sysfs_info(string *param_1) { byte bVar1; int iVar2; int8 uVar3; ulong uVar4; string local_208 [32]; string local_1e8 [32]; string local_1c8 [32]; string local_1a8 [32]; string local_188 [32]; string local_168 [32]; string local_148 [32]; string local_128 [32]; string local_108 [32]; string local_e8 [32]; string local_c8 [48]; string local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [40]; string *local_10; local_10 = param_1; basename(local_38); std::__cxx11::string::string(local_58); std::__cxx11::string::string(local_78); uVar3 = std::__cxx11::string::c_str(); /* try { // try from 0010d7d9 to 0010d7ed has its CatchHandler @ 0010d932 */ format_abi_cxx11_((char *)local_98,"/sys/class/tty/%s/device",uVar3); /* try { // try from 0010d7f0 to 0010d832 has its CatchHandler @ 0010d949 */ iVar2 = std::__cxx11::string::compare((ulong)local_38,0,(char *)0x6); if (iVar2 == 0) { realpath(local_108); /* try { // try from 0010d835 to 0010d847 has its CatchHandler @ 0010d960 */ dirname(local_e8); /* try { // try from 0010d84a to 0010d85c has its CatchHandler @ 0010d974 */ dirname(local_c8); std::__cxx11::string::operator=(local_98,local_c8); std::__cxx11::string::~string(local_c8); std::__cxx11::string::~string(local_e8); std::__cxx11::string::~string(local_108); /* try { // try from 0010d8ab to 0010d9ea has its CatchHandler @ 0010d949 */ bVar1 = path_exists(local_98); if ((bVar1 & 1) != 0) { usb_sysfs_friendly_name(local_128); std::__cxx11::string::operator=(local_58,local_128); std::__cxx11::string::~string(local_128); usb_sysfs_hw_string(local_148); std::__cxx11::string::operator=(local_78,local_148); std::__cxx11::string::~string(local_148); } } else { iVar2 = std::__cxx11::string::compare((ulong)local_38,0,(char *)0x6); if (iVar2 == 0) { realpath(local_188); /* try { // try from 0010d9ed to 0010d9ff has its CatchHandler @ 0010dac9 */ dirname(local_168); std::__cxx11::string::operator=(local_98,local_168); std::__cxx11::string::~string(local_168); std::__cxx11::string::~string(local_188); /* try { // try from 0010da42 to 0010db0a has its CatchHandler @ 0010d949 */ bVar1 = path_exists(local_98); if ((bVar1 & 1) != 0) { usb_sysfs_friendly_name(local_1a8); std::__cxx11::string::operator=(local_58,local_1a8); std::__cxx11::string::~string(local_1a8); usb_sysfs_hw_string(local_1c8); std::__cxx11::string::operator=(local_78,local_1c8); std::__cxx11::string::~string(local_1c8); } } else { std::operator+(local_1e8,(char *)local_98); /* try { // try from 0010db0d to 0010db3f has its CatchHandler @ 0010db60 */ bVar1 = path_exists(local_1e8); if ((bVar1 & 1) != 0) { read_line(local_208); std::__cxx11::string::operator=(local_78,local_208); std::__cxx11::string::~string(local_208); } std::__cxx11::string::~string(local_1e8); } } uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) != 0) { /* try { // try from 0010dba0 to 0010dbcf has its CatchHandler @ 0010d949 */ std::__cxx11::string::operator=(local_58,local_38); } uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) != 0) { std::__cxx11::string::operator=(local_78,"n/a"); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1); /* try { // try from 0010dbee to 0010dc08 has its CatchHandler @ 0010dc1d */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_58); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_78); std::__cxx11::string::~string(local_98); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string(local_38); return param_1; }
39,125
wt_resource_create
eloqsql/mysys/waiting_threads.c
static void wt_resource_create(uchar *arg) { WT_RESOURCE *rc= (WT_RESOURCE*)(arg+LF_HASH_OVERHEAD); DBUG_ENTER("wt_resource_create"); bzero(rc, sizeof(*rc)); rc_rwlock_init(rc); mysql_cond_init(key_WT_RESOURCE_cond, &rc->cond, 0); my_init_dynamic_array(PSI_INSTRUMENT_ME, &rc->owners, sizeof(WT_THD *), 0, 5, MYF(0)); DBUG_VOID_RETURN; }
O0
c
wt_resource_create: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax leaq 0x5be59(%rip), %rcx # 0x1267a0 movslq (%rcx), %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi xorl %esi, %esi movl $0x108, %edx # imm = 0x108 callq 0x27310 movq -0x10(%rbp), %rdi callq 0xcb6b0 leaq 0xb80d23(%rip), %rax # 0xc4b694 movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0xa8, %rsi xorl %eax, %eax movl %eax, %edx callq 0xcb6d0 movq -0x10(%rbp), %rsi addq $0xe0, %rsi xorl %r8d, %r8d movl $0x8, %edx xorl %eax, %eax movl %eax, %ecx movl $0x5, %r9d movl %r8d, %edi movq $0x0, (%rsp) callq 0xa7420 jmp 0xca9b6 addq $0x20, %rsp popq %rbp retq nopl (%rax)
wt_resource_create: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] lea rcx, LF_HASH_OVERHEAD movsxd rcx, dword ptr [rcx] add rax, rcx mov [rbp+var_10], rax mov rdi, [rbp+var_10] xor esi, esi mov edx, 108h call _memset mov rdi, [rbp+var_10] call rc_rwlock_init lea rax, key_WT_RESOURCE_cond mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 0A8h xor eax, eax mov edx, eax call inline_mysql_cond_init_5 mov rsi, [rbp+var_10] add rsi, 0E0h xor r8d, r8d mov edx, 8 xor eax, eax mov ecx, eax mov r9d, 5 mov edi, r8d mov [rsp+20h+var_20], 0 call init_dynamic_array2 jmp short $+2 loc_CA9B6: add rsp, 20h pop rbp retn
char wt_resource_create(long long a1) { long long v2; // [rsp+10h] [rbp-10h] v2 = LF_HASH_OVERHEAD + a1; memset(v2, 0LL, 264LL); rc_rwlock_init(v2); inline_mysql_cond_init_5(key_WT_RESOURCE_cond, v2 + 168, 0LL); return init_dynamic_array2(0, v2 + 224, 8u, 0LL, 0, 5, 0LL); }
wt_resource_create: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x2267a0] MOVSXD RCX,dword ptr [RCX] ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI MOV EDX,0x108 CALL 0x00127310 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001cb6b0 LEA RAX,[0xd4b694] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0xa8 XOR EAX,EAX MOV EDX,EAX CALL 0x001cb6d0 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0xe0 XOR R8D,R8D MOV EDX,0x8 XOR EAX,EAX MOV ECX,EAX MOV R9D,0x5 MOV EDI,R8D MOV qword ptr [RSP],0x0 CALL 0x001a7420 JMP 0x001ca9b6 LAB_001ca9b6: ADD RSP,0x20 POP RBP RET
void wt_resource_create(long param_1) { void *__s; __s = (void *)(param_1 + LF_HASH_OVERHEAD); memset(__s,0,0x108); rc_rwlock_init(__s); inline_mysql_cond_init(key_WT_RESOURCE_cond,(long)__s + 0xa8,0); init_dynamic_array2(0,(long)__s + 0xe0,8,0,0,5,0); return; }
39,126
my_casedn_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0) { my_tolower_utf16(uni_plane, &wc); if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_casedn_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, -0x38(%rbp) movq %rdx, -0x30(%rbp) testq %rdx, %rdx jle 0x7cd8b movq %rcx, %r15 movq %rsi, %r12 movq %rdi, %r13 movq 0x78(%rdi), %rax movq %rax, -0x50(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rcx movq %rcx, -0x58(%rbp) movq 0x30(%rax), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax leaq (%rsi,%rax), %r14 addq %r15, -0x38(%rbp) movq %r13, %rdi leaq -0x40(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *-0x58(%rbp) testl %eax, %eax jle 0x7cd8b movl %eax, %ebx movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rax cmpq (%rax), %rsi ja 0x7cd6d movq 0x8(%rax), %rax movq %rsi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x7cd6d movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx movl 0x4(%rax,%rcx,4), %esi movq %rsi, -0x40(%rbp) movq %r13, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq *-0x48(%rbp) cmpl %eax, %ebx jne 0x7cd8b movl %ebx, %eax addq %rax, %r12 addq %rax, %r15 cmpq %r14, %r12 jb 0x7cd26 movq -0x30(%rbp), %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casedn_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_38], r8 mov [rbp+var_30], rdx test rdx, rdx jle loc_7CD8B mov r15, rcx mov r12, rsi mov r13, rdi mov rax, [rdi+78h] mov [rbp+var_50], rax mov rax, [rdi+0B8h] mov rcx, [rax+28h] mov [rbp+var_58], rcx mov rax, [rax+30h] mov [rbp+var_48], rax mov rax, [rbp+var_30] lea r14, [rsi+rax] add [rbp+var_38], r15 loc_7CD26: mov rdi, r13 lea rsi, [rbp+var_40] mov rdx, r12 mov rcx, r14 call [rbp+var_58] test eax, eax jle short loc_7CD8B mov ebx, eax mov rsi, [rbp+var_40] mov rax, [rbp+var_50] cmp rsi, [rax] ja short loc_7CD6D mov rax, [rax+8] mov rcx, rsi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_7CD6D movzx ecx, sil lea rcx, [rcx+rcx*2] mov esi, [rax+rcx*4+4] mov [rbp+var_40], rsi loc_7CD6D: mov rdi, r13 mov rdx, r15 mov rcx, [rbp+var_38] call [rbp+var_48] cmp ebx, eax jnz short loc_7CD8B mov eax, ebx add r12, rax add r15, rax cmp r12, r14 jb short loc_7CD26 loc_7CD8B: mov rax, [rbp+var_30] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5) { long long v5; // r15 unsigned long long v6; // r12 long long v7; // rax unsigned long long v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rsi long long v12; // rax long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] unsigned long long *v15; // [rsp+10h] [rbp-50h] unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h] unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF long long v18; // [rsp+28h] [rbp-38h] long long v19; // [rsp+30h] [rbp-30h] v18 = a5; v19 = a3; if ( a3 > 0 ) { v5 = a4; v6 = a2; v15 = *(unsigned long long **)(a1 + 120); v7 = *(_QWORD *)(a1 + 184); v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40); v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48); v8 = a2 + v19; v18 += a4; do { v9 = v14(a1, &v17, v6, v8); if ( v9 <= 0 ) break; v10 = v9; v11 = v17; if ( v17 <= *v15 ) { v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17 + 4); v17 = v11; } } if ( v10 != v16(a1, v11, v5, v18) ) break; v6 += v10; v5 += v10; } while ( v6 < v8 ); } return v19; }
my_casedn_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],R8 MOV qword ptr [RBP + -0x30],RDX TEST RDX,RDX JLE 0x0017cd8b MOV R15,RCX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RCX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RCX MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] LEA R14,[RSI + RAX*0x1] ADD qword ptr [RBP + -0x38],R15 LAB_0017cd26: MOV RDI,R13 LEA RSI,[RBP + -0x40] MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RBP + -0x58] TEST EAX,EAX JLE 0x0017cd8b MOV EBX,EAX MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x50] CMP RSI,qword ptr [RAX] JA 0x0017cd6d MOV RAX,qword ptr [RAX + 0x8] MOV RCX,RSI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x0017cd6d MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4] MOV qword ptr [RBP + -0x40],RSI LAB_0017cd6d: MOV RDI,R13 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x48] CMP EBX,EAX JNZ 0x0017cd8b MOV EAX,EBX ADD R12,RAX ADD R15,RAX CMP R12,R14 JC 0x0017cd26 LAB_0017cd8b: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5) { ulong uVar1; ulong *puVar2; code *pcVar3; code *pcVar4; long lVar5; uint uVar6; uint uVar7; ulong local_48; long local_40; long local_38; local_38 = param_3; if (0 < param_3) { puVar2 = *(ulong **)(param_1 + 0x78); pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); uVar1 = param_2 + param_3; local_40 = param_5 + param_4; do { uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1); if ((int)uVar6 < 1) { return local_38; } if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0)) { local_48 = (ulong)*(uint *)(lVar5 + 4 + (local_48 & 0xff) * 0xc); } uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40); if (uVar6 != uVar7) { return local_38; } param_2 = param_2 + uVar6; param_4 = param_4 + (ulong)uVar6; } while (param_2 < uVar1); } return local_38; }
39,127
my_copy_fix_mb
eloqsql/strings/ctype-mb.c
size_t my_copy_fix_mb(CHARSET_INFO *cs, char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { size_t well_formed_nchars; size_t well_formed_length; size_t fixed_length; size_t min_length= MY_MIN(src_length, dst_length); well_formed_nchars= my_ci_well_formed_char_length(cs, src, src + min_length, nchars, status); DBUG_ASSERT(well_formed_nchars <= nchars); well_formed_length= status->m_source_end_pos - src; if (well_formed_length) memmove(dst, src, well_formed_length); if (!status->m_well_formed_error_pos) return well_formed_length; fixed_length= my_append_fix_badly_formed_tail(cs, dst + well_formed_length, dst + dst_length, src + well_formed_length, src + src_length, nchars - well_formed_nchars, status); return well_formed_length + fixed_length; }
O3
c
my_copy_fix_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq 0x10(%rbp), %rbx cmpq %rdx, %r8 movq %r8, -0x58(%rbp) cmovbq %r8, %rdx addq %rcx, %rdx movq 0xb8(%rdi), %rax movq %rdi, -0x40(%rbp) movq %rcx, %rsi movq %r9, -0x30(%rbp) movq %r9, %rcx movq %rbx, %r8 callq *0xc8(%rax) movq %rax, %r14 movq (%rbx), %rbx subq %r15, %rbx je 0xb4051 movq %r13, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x29110 movq 0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0xb4140 leaq (%rbx,%r13), %rax movq %rbx, -0x50(%rbp) addq %r15, %rbx movq -0x30(%rbp), %rcx cmpq %r14, %rcx movq %rax, -0x48(%rbp) je 0xb4126 addq %r12, %r13 movq %r13, -0x38(%rbp) addq -0x58(%rbp), %r15 subq %rcx, %r14 movq %rax, %r13 movq %r15, -0x30(%rbp) movq -0x40(%rbp), %rdi movq 0xb8(%rdi), %rax movq %rbx, %rsi movq %r15, %rdx callq *0xc0(%rax) testl %eax, %eax jle 0xb40cc movl %eax, %r15d leaq (%r15,%r13), %r12 cmpq -0x38(%rbp), %r12 ja 0xb412b movq %r13, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x29080 movq %r12, %r13 jmp 0xb4114 setne %al cmpq %r15, %rbx setae %cl testb %al, %cl jne 0xb412b movq 0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0xb40e8 movq %rbx, 0x8(%rax) movq -0x40(%rbp), %rdi movq 0xb8(%rdi), %rax movl $0x3f, %esi movq %r13, %rdx movq -0x38(%rbp), %rcx callq *0x30(%rax) testl %eax, %eax jle 0xb412b movl %eax, %eax addq %rax, %r13 movl $0x1, %r15d movq %r13, %r12 addq %r15, %rbx incq %r14 movq -0x30(%rbp), %r15 jne 0xb4091 jmp 0xb412e movq %rax, %r12 jmp 0xb412e movq %r13, %r12 movq 0x10(%rbp), %rax movq %rbx, (%rax) movq -0x50(%rbp), %rbx subq -0x48(%rbp), %rbx addq %r12, %rbx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_copy_fix_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, [rbp+arg_0] cmp r8, rdx mov [rbp+var_58], r8 cmovb rdx, r8 add rdx, rcx mov rax, [rdi+0B8h] mov [rbp+var_40], rdi mov rsi, rcx mov [rbp+var_30], r9 mov rcx, r9 mov r8, rbx call qword ptr [rax+0C8h] mov r14, rax mov rbx, [rbx] sub rbx, r15 jz short loc_B4051 mov rdi, r13 mov rsi, r15 mov rdx, rbx call _memmove loc_B4051: mov rax, [rbp+arg_0] cmp qword ptr [rax+8], 0 jz loc_B4140 lea rax, [rbx+r13] mov [rbp+var_50], rbx add rbx, r15 mov rcx, [rbp+var_30] cmp rcx, r14 mov [rbp+var_48], rax jz loc_B4126 add r13, r12 mov [rbp+var_38], r13 add r15, [rbp+var_58] sub r14, rcx mov r13, rax mov [rbp+var_30], r15 loc_B4091: mov rdi, [rbp+var_40] mov rax, [rdi+0B8h] mov rsi, rbx mov rdx, r15 call qword ptr [rax+0C0h] test eax, eax jle short loc_B40CC mov r15d, eax lea r12, [r15+r13] cmp r12, [rbp+var_38] ja short loc_B412B mov rdi, r13 mov rsi, rbx mov rdx, r15 call _memcpy mov r13, r12 jmp short loc_B4114 loc_B40CC: setnz al cmp rbx, r15 setnb cl test cl, al jnz short loc_B412B mov rax, [rbp+arg_0] cmp qword ptr [rax+8], 0 jnz short loc_B40E8 mov [rax+8], rbx loc_B40E8: mov rdi, [rbp+var_40] mov rax, [rdi+0B8h] mov esi, 3Fh ; '?' mov rdx, r13 mov rcx, [rbp+var_38] call qword ptr [rax+30h] test eax, eax jle short loc_B412B mov eax, eax add r13, rax mov r15d, 1 mov r12, r13 loc_B4114: add rbx, r15 inc r14 mov r15, [rbp+var_30] jnz loc_B4091 jmp short loc_B412E loc_B4126: mov r12, rax jmp short loc_B412E loc_B412B: mov r12, r13 loc_B412E: mov rax, [rbp+arg_0] mov [rax], rbx mov rbx, [rbp+var_50] sub rbx, [rbp+var_48] add rbx, r12 loc_B4140: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_copy_fix_mb( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, long long a6, unsigned long long *a7) { unsigned long long v8; // r12 long long v9; // r14 long long v10; // rbx unsigned long long v11; // rax unsigned long long v12; // rbx unsigned long long v13; // r15 long long v14; // r14 long long v15; // r13 unsigned int v16; // eax long long v17; // r15 unsigned long long v18; // r12 int v19; // eax long long v22; // [rsp+10h] [rbp-50h] unsigned long long v23; // [rsp+18h] [rbp-48h] unsigned long long v24; // [rsp+28h] [rbp-38h] unsigned long long v26; // [rsp+30h] [rbp-30h] v8 = a3; if ( a5 < a3 ) a3 = a5; v9 = (*(long long ( **)(long long, long long, unsigned long long, long long, unsigned long long *))(*(_QWORD *)(a1 + 184) + 200LL))( a1, a4, a4 + a3, a6, a7); v10 = *a7 - a4; if ( v10 ) memmove(a2, a4, v10); if ( !a7[1] ) return v10; v11 = v10 + a2; v22 = v10; v12 = a4 + v10; v23 = v11; if ( a6 == v9 ) { v18 = v11; goto LABEL_20; } v24 = v8 + a2; v13 = a5 + a4; v14 = v9 - a6; v15 = v11; v26 = v13; while ( 1 ) { v16 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v12, v13); if ( (int)v16 <= 0 ) break; v17 = v16; v18 = v16 + v15; if ( v18 > v24 ) goto LABEL_19; memcpy(v15, v12, v16); v15 = v18; LABEL_16: v12 += v17; ++v14; v13 = v26; if ( !v14 ) goto LABEL_20; } if ( v16 == 0 || v12 < v13 ) { if ( !a7[1] ) a7[1] = v12; v19 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, 63LL, v15, v24); if ( v19 > 0 ) { v15 += (unsigned int)v19; v17 = 1LL; v18 = v15; goto LABEL_16; } } LABEL_19: v18 = v15; LABEL_20: *a7 = v12; return v18 + v22 - v23; }
my_copy_fix_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBX,qword ptr [RBP + 0x10] CMP R8,RDX MOV qword ptr [RBP + -0x58],R8 CMOVC RDX,R8 ADD RDX,RCX MOV RAX,qword ptr [RDI + 0xb8] MOV qword ptr [RBP + -0x40],RDI MOV RSI,RCX MOV qword ptr [RBP + -0x30],R9 MOV RCX,R9 MOV R8,RBX CALL qword ptr [RAX + 0xc8] MOV R14,RAX MOV RBX,qword ptr [RBX] SUB RBX,R15 JZ 0x001b4051 MOV RDI,R13 MOV RSI,R15 MOV RDX,RBX CALL 0x00129110 LAB_001b4051: MOV RAX,qword ptr [RBP + 0x10] CMP qword ptr [RAX + 0x8],0x0 JZ 0x001b4140 LEA RAX,[RBX + R13*0x1] MOV qword ptr [RBP + -0x50],RBX ADD RBX,R15 MOV RCX,qword ptr [RBP + -0x30] CMP RCX,R14 MOV qword ptr [RBP + -0x48],RAX JZ 0x001b4126 ADD R13,R12 MOV qword ptr [RBP + -0x38],R13 ADD R15,qword ptr [RBP + -0x58] SUB R14,RCX MOV R13,RAX MOV qword ptr [RBP + -0x30],R15 LAB_001b4091: MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,RBX MOV RDX,R15 CALL qword ptr [RAX + 0xc0] TEST EAX,EAX JLE 0x001b40cc MOV R15D,EAX LEA R12,[R15 + R13*0x1] CMP R12,qword ptr [RBP + -0x38] JA 0x001b412b MOV RDI,R13 MOV RSI,RBX MOV RDX,R15 CALL 0x00129080 MOV R13,R12 JMP 0x001b4114 LAB_001b40cc: SETNZ AL CMP RBX,R15 SETNC CL TEST CL,AL JNZ 0x001b412b MOV RAX,qword ptr [RBP + 0x10] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x001b40e8 MOV qword ptr [RAX + 0x8],RBX LAB_001b40e8: MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RDI + 0xb8] MOV ESI,0x3f MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RAX + 0x30] TEST EAX,EAX JLE 0x001b412b MOV EAX,EAX ADD R13,RAX MOV R15D,0x1 MOV R12,R13 LAB_001b4114: ADD RBX,R15 INC R14 MOV R15,qword ptr [RBP + -0x30] JNZ 0x001b4091 JMP 0x001b412e LAB_001b4126: MOV R12,RAX JMP 0x001b412e LAB_001b412b: MOV R12,R13 LAB_001b412e: MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RBX MOV RBX,qword ptr [RBP + -0x50] SUB RBX,qword ptr [RBP + -0x48] ADD RBX,R12 LAB_001b4140: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
size_t my_copy_fix_mb(long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, long param_6,long *param_7) { void *pvVar1; uint uVar2; long lVar3; size_t __n; void *__src; void *__dest; ulong uVar4; uVar4 = param_3; if (param_5 < param_3) { uVar4 = param_5; } lVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 200)) (param_1,param_4,uVar4 + (long)param_4,param_6,param_7); __n = *param_7 - (long)param_4; if (__n != 0) { memmove(param_2,param_4,__n); } if (param_7[1] != 0) { pvVar1 = (void *)(__n + (long)param_2); __src = (void *)(__n + (long)param_4); __dest = pvVar1; if (param_6 != lVar3) { lVar3 = lVar3 - param_6; do { uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,__src,(void *)((long)param_4 + param_5)); if ((int)uVar2 < 1) { if ((void *)((long)param_4 + param_5) <= __src && uVar2 != 0) break; if (param_7[1] == 0) { param_7[1] = (long)__src; } uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,0x3f,__dest,(void *)((long)param_2 + param_3)); if ((int)uVar2 < 1) break; __dest = (void *)((long)__dest + (ulong)uVar2); uVar4 = 1; } else { uVar4 = (ulong)uVar2; if ((void *)((long)param_2 + param_3) < (void *)(uVar4 + (long)__dest)) break; memcpy(__dest,__src,uVar4); __dest = (void *)(uVar4 + (long)__dest); } __src = (void *)((long)__src + uVar4); lVar3 = lVar3 + 1; } while (lVar3 != 0); } *param_7 = (long)__src; __n = (__n - (long)pvVar1) + (long)__dest; } return __n; }
39,128
httplib::detail::make_multipart_ranges_data(httplib::Request const&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
hkr04[P]cpp-mcp/common/httplib.h
inline void make_multipart_ranges_data(const Request &req, Response &res, const std::string &boundary, const std::string &content_type, size_t content_length, std::string &data) { process_multipart_ranges_data( req, boundary, content_type, content_length, [&](const std::string &token) { data += token; }, [&](const std::string &token) { data += token; }, [&](size_t offset, size_t length) { assert(offset + length <= content_length); data += res.body.substr(offset, length); return true; }); }
O0
c
httplib::detail::make_multipart_ranges_data(httplib::Request const&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x48(%rsp) movq %r8, 0x40(%rsp) movq %r9, 0x38(%rsp) movq 0x60(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x40(%rsp), %rcx movq 0x38(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x30(%rsp), %r8 movq 0x28(%rsp), %r9 leaq 0x18(%rsp), %rax movq (%rax), %r10 movq %r10, (%rsp) movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) callq 0x25540 addq $0x68, %rsp retq nopw (%rax,%rax)
_ZN7httplib6detail26make_multipart_ranges_dataERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_mRSB_: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_20], rcx mov [rsp+68h+var_28], r8 mov [rsp+68h+var_30], r9 mov rdi, [rsp+68h+var_8] mov rsi, [rsp+68h+var_18] mov rdx, [rsp+68h+var_20] mov rcx, [rsp+68h+var_28] mov rax, [rsp+68h+var_30] mov [rsp+68h+var_38], rax mov rax, [rsp+68h+var_30] mov [rsp+68h+var_40], rax mov rax, [rsp+68h+var_30] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_10] mov [rsp+68h+var_48], rax mov r8, [rsp+68h+var_38] mov r9, [rsp+68h+var_40] lea rax, [rsp+68h+var_50] mov r10, [rax] mov [rsp+68h+var_68], r10 mov rax, [rax+8] mov [rsp+68h+var_60], rax call _ZN7httplib6detail29process_multipart_ranges_dataIZNS0_26make_multipart_ranges_dataERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESE_mRSC_EUlSE_E_ZNS0_26make_multipart_ranges_dataES4_S6_SE_SE_mSF_EUlSE_E0_ZNS0_26make_multipart_ranges_dataES4_S6_SE_SE_mSF_EUlmmE_EEbS4_SE_SE_mT_T0_T1_; httplib::detail::process_multipart_ranges_data<httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(std::string const&)#1},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(std::string const&)#2},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(ulong,ulong)#1}>(httplib::Request const&,std::string const&,std::string const&,ulong,httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(std::string const&)#1},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(std::string const&)#2},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(ulong,ulong)#1}) add rsp, 68h retn
long long httplib::detail::make_multipart_ranges_data( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { return httplib::detail::process_multipart_ranges_data<httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,unsigned long,std::string&)::{lambda(std::string const&)#1},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,unsigned long,std::string&)::{lambda(std::string const&)#2},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,unsigned long,std::string&)::{lambda(unsigned long,unsigned long)#1}>( a1, a3, a4, a5, a6, a6, a6, a2); }
make_multipart_ranges_data: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x40],R8 MOV qword ptr [RSP + 0x38],R9 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x20],RAX MOV R8,qword ptr [RSP + 0x30] MOV R9,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x18] MOV R10,qword ptr [RAX] MOV qword ptr [RSP],R10 MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX CALL 0x00125540 ADD RSP,0x68 RET
/* httplib::detail::make_multipart_ranges_data(httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, unsigned long, std::__cxx11::string&) */ void httplib::detail::make_multipart_ranges_data (Request *param_1,Response *param_2,string *param_3,string *param_4,ulong param_5, string *param_6) { process_multipart_ranges_data<httplib::detail::make_multipart_ranges_data(httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long,std::__cxx11::string&)::_lambda(std::__cxx11::string_const&)_1_,httplib::detail::make_multipart_ranges_data(httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long,std::__cxx11::string&)::_lambda(std::__cxx11::string_const&)_2_,httplib::detail::make_multipart_ranges_data(httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long,std::__cxx11::string&)::_lambda(unsigned_long,unsigned_long)_1_> (param_1,param_3,param_4,param_5,param_6,param_6,param_6,param_2); return; }
39,129
mysql_audit_general_log(THD*, long, char const*, unsigned int, char const*, unsigned int, char const*, unsigned int)
eloqsql/sql/sql_audit.h
static inline void mysql_audit_general_log(THD *thd, time_t time, const char *user, uint userlen, const char *cmd, uint cmdlen, const char *query, uint querylen) { if (mysql_audit_general_enabled()) { mysql_event_general event; event.event_subclass= MYSQL_AUDIT_GENERAL_LOG; event.general_error_code= 0; event.general_time= time; event.general_user= user; event.general_user_length= userlen; event.general_command= cmd; event.general_command_length= cmdlen; event.general_query= query; event.general_query_length= querylen; event.general_rows= 0; if (thd) { event.general_thread_id= (unsigned long)thd->thread_id; event.general_charset= thd->variables.character_set_client; event.database= thd->db; event.query_id= thd->query_id; } else { event.general_thread_id= 0; event.general_charset= global_system_variables.character_set_client; event.database= null_clex_str; event.query_id= 0; } mysql_audit_notify(thd, MYSQL_AUDIT_GENERAL_CLASS, &event); } }
O0
c
mysql_audit_general_log(THD*, long, char const*, unsigned int, char const*, unsigned int, char const*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movl 0x18(%rbp), %eax movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) callq 0xd381d0 testb $0x1, %al jne 0xd2c947 jmp 0xd2ca3b movl $0x0, -0xa0(%rbp) movl $0x0, -0x9c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x90(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x88(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x78(%rbp) movq 0x10(%rbp), %rax movq %rax, -0x70(%rbp) movl 0x18(%rbp), %eax movl %eax, -0x68(%rbp) movq $0x0, -0x50(%rbp) cmpq $0x0, -0x8(%rbp) je 0xd2c9ee movq -0x8(%rbp), %rax movq 0x3e48(%rax), %rax movq %rax, -0x98(%rbp) movq -0x8(%rbp), %rax movq 0xb50(%rax), %rax movq %rax, -0x60(%rbp) movq -0x8(%rbp), %rax movq 0x98(%rax), %rcx movq %rcx, -0x40(%rbp) movq 0xa0(%rax), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movq 0x3da8(%rax), %rax movq %rax, -0x48(%rbp) jmp 0xd2ca29 movq $0x0, -0x98(%rbp) leaq 0xf9cb80(%rip), %rax # 0x1cc9580 movq 0x310(%rax), %rax movq %rax, -0x60(%rbp) leaq 0x71a316(%rip), %rax # 0x1446d28 movq (%rax), %rcx movq %rcx, -0x40(%rbp) movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) movq $0x0, -0x48(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi leaq -0xa0(%rbp), %rdx callq 0xa556f0 addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL23mysql_audit_general_logP3THDlPKcjS2_jS2_j: push rbp mov rbp, rsp sub rsp, 0A0h mov eax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d call _ZL27mysql_audit_general_enabledv_4; mysql_audit_general_enabled(void) test al, 1 jnz short loc_D2C947 jmp loc_D2CA3B loc_D2C947: mov [rbp+var_A0], 0 mov [rbp+var_9C], 0 mov rax, [rbp+var_10] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_90], rax mov eax, [rbp+var_1C] mov [rbp+var_88], eax mov rax, [rbp+var_28] mov [rbp+var_80], rax mov eax, [rbp+var_2C] mov [rbp+var_78], eax mov rax, [rbp+arg_0] mov [rbp+var_70], rax mov eax, [rbp+arg_8] mov [rbp+var_68], eax mov [rbp+var_50], 0 cmp [rbp+var_8], 0 jz short loc_D2C9EE mov rax, [rbp+var_8] mov rax, [rax+3E48h] mov [rbp+var_98], rax mov rax, [rbp+var_8] mov rax, [rax+0B50h] mov [rbp+var_60], rax mov rax, [rbp+var_8] mov rcx, [rax+98h] mov [rbp+var_40], rcx mov rax, [rax+0A0h] mov [rbp+var_38], rax mov rax, [rbp+var_8] mov rax, [rax+3DA8h] mov [rbp+var_48], rax jmp short loc_D2CA29 loc_D2C9EE: mov [rbp+var_98], 0 lea rax, global_system_variables mov rax, [rax+310h] mov [rbp+var_60], rax lea rax, null_clex_str mov rcx, [rax] mov [rbp+var_40], rcx mov rax, [rax+8] mov [rbp+var_38], rax mov [rbp+var_48], 0 loc_D2CA29: mov rdi, [rbp+var_8]; THD * xor esi, esi; unsigned int lea rdx, [rbp+var_A0]; void * call _Z18mysql_audit_notifyP3THDjPKv; mysql_audit_notify(THD *,uint,void const*) loc_D2CA3B: add rsp, 0A0h pop rbp retn
char mysql_audit_general_log( THD *a1, long long a2, const char *a3, int a4, const char *a5, int a6, const char *a7, unsigned int a8) { char result; // al _DWORD v9[2]; // [rsp+0h] [rbp-A0h] BYREF long long v10; // [rsp+8h] [rbp-98h] const char *v11; // [rsp+10h] [rbp-90h] int v12; // [rsp+18h] [rbp-88h] const char *v13; // [rsp+20h] [rbp-80h] int v14; // [rsp+28h] [rbp-78h] const char *v15; // [rsp+30h] [rbp-70h] unsigned int v16; // [rsp+38h] [rbp-68h] long long v17; // [rsp+40h] [rbp-60h] long long v18; // [rsp+48h] [rbp-58h] long long v19; // [rsp+50h] [rbp-50h] long long v20; // [rsp+58h] [rbp-48h] long long v21; // [rsp+60h] [rbp-40h] long long v22; // [rsp+68h] [rbp-38h] int v23; // [rsp+74h] [rbp-2Ch] const char *v24; // [rsp+78h] [rbp-28h] int v25; // [rsp+84h] [rbp-1Ch] const char *v26; // [rsp+88h] [rbp-18h] long long v27; // [rsp+90h] [rbp-10h] THD *v28; // [rsp+98h] [rbp-8h] v28 = a1; v27 = a2; v26 = a3; v25 = a4; v24 = a5; v23 = a6; result = mysql_audit_general_enabled(); if ( (result & 1) != 0 ) { v9[0] = 0; v9[1] = 0; v18 = v27; v11 = v26; v12 = v25; v13 = v24; v14 = v23; v15 = a7; v16 = a8; v19 = 0LL; if ( v28 ) { v10 = *((_QWORD *)v28 + 1993); v17 = *((_QWORD *)v28 + 362); v21 = *((_QWORD *)v28 + 19); v22 = *((_QWORD *)v28 + 20); v20 = *((_QWORD *)v28 + 1973); } else { v10 = 0LL; v17 = global_system_variables[98]; v21 = null_clex_str; v22 = *(&null_clex_str + 1); v20 = 0LL; } return mysql_audit_notify(v28, 0, v9); } return result; }
values: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] POP RBP RET
/* Discrete_interval::values() const */ int8 __thiscall Discrete_interval::values(Discrete_interval *this) { return *(int8 *)(this + 8); }
39,130
mi_rec_check
eloqsql/storage/myisam/mi_dynrec.c
my_bool _mi_rec_check(MI_INFO *info,const uchar *record, uchar *rec_buff, ulong packed_length, my_bool with_checksum) { uint length,new_length,flag,bit,i; uchar *pos,*end,*packpos,*to; enum en_fieldtype type; reg3 MI_COLUMNDEF *rec; DBUG_ENTER("_mi_rec_check"); packpos=rec_buff; to= rec_buff+info->s->base.pack_bits; rec=info->s->rec; flag= *packpos; bit=1; for (i=info->s->base.fields ; i-- > 0; record+= length, rec++) { length=(uint) rec->length; if ((type = (enum en_fieldtype) rec->type) != FIELD_NORMAL) { if (type == FIELD_BLOB) { uint blob_length= _mi_calc_blob_length(length-portable_sizeof_char_ptr,record); if (!blob_length && !(flag & bit)) goto err; if (blob_length) to+=length - portable_sizeof_char_ptr+ blob_length; } else if (type == FIELD_SKIP_ZERO) { if (memcmp((uchar*) record,zero_string,length) == 0) { if (!(flag & bit)) goto err; } else to+=length; } else if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE) { pos= (uchar*) record; end= (uchar*) record + length; if (type == FIELD_SKIP_ENDSPACE) { /* Pack trailing spaces */ while (end > record && *(end-1) == ' ') end--; } else { /* Pack pre-spaces */ while (pos < end && *pos == ' ') pos++; } new_length=(uint) (end-pos); if (new_length + 1 + MY_TEST(rec->length > 255 && new_length > 127) < length) { if (!(flag & bit)) goto err; if (rec->length > 255 && new_length > 127) { /* purecov: begin inspected */ if (to[0] != (uchar) ((new_length & 127) + 128) || to[1] != (uchar) (new_length >> 7)) goto err; to+=2; /* purecov: end */ } else if (*to++ != (uchar) new_length) goto err; to+=new_length; } else to+=length; } else if (type == FIELD_VARCHAR) { uint pack_length= HA_VARCHAR_PACKLENGTH(rec->length -1); uint tmp_length; if (pack_length == 1) { tmp_length= (uint) *(uchar*) record; to+= 1+ tmp_length; continue; } else { tmp_length= uint2korr(record); to+= get_pack_length(tmp_length)+tmp_length; } continue; } else { to+=length; continue; /* Normal field */ } if ((bit= bit << 1) >= 256) { flag= *++packpos; bit=1; } } else to+= length; } if (packed_length != (uint) (to - rec_buff) + MY_TEST(info->s->calc_checksum) || (bit != 1 && (flag & ~(bit - 1)))) goto err; if (with_checksum && ((uchar) info->checksum != (uchar) *to)) { DBUG_PRINT("error",("wrong checksum for row")); goto err; } DBUG_RETURN(0); err: DBUG_RETURN(1); }
O3
c
mi_rec_check: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r8d, -0x34(%rbp) movq %rcx, -0x60(%rbp) movq %rdi, -0x50(%rbp) movq (%rdi), %rax movl 0x168(%rax), %r14d movl 0x18c(%rax), %r12d addq %rdx, %r12 movzbl (%rdx), %edi testl %r14d, %r14d movq %rax, -0x58(%rbp) je 0x78c10 movq %rsi, %r13 movq 0x230(%rax), %rbx movl $0x1, %r9d movq %rdx, -0x48(%rbp) movq %rdx, -0x40(%rbp) movzwl 0x4(%rbx), %r15d movl (%rbx), %ecx testl %ecx, %ecx je 0x78ab5 cmpl $0x3, %ecx je 0x78a3a cmpl $0x4, %ecx jne 0x78a6a leal -0x9(%r15), %eax cmpl $0x3, %eax ja 0x78b0c leaq 0x68e49(%rip), %rcx # 0xe1870 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movzbl (%r13), %eax jmp 0x78b0e movl %r9d, -0x30(%rbp) movl %edi, -0x2c(%rbp) movq %r13, %rdi leaq 0xb86fa5(%rip), %rsi # 0xbff9f0 movq %r15, %rdx callq 0x29560 testl %eax, %eax je 0x78abd addq %r15, %r12 movl -0x2c(%rbp), %edi movq -0x40(%rbp), %rdx movl -0x30(%rbp), %r9d jmp 0x78bda cmpl $0x2, %ecx ja 0x78a96 leaq (%r15,%r13), %rax cmpl $0x1, %ecx jne 0x78ad6 movq %rax, %r8 cmpq %r13, %rax jbe 0x78a8b leaq -0x1(%r8), %rax cmpb $0x20, -0x1(%r8) je 0x78a78 movq %r13, %rcx movq %r8, %rax jmp 0x78b5b cmpl $0x8, %ecx jne 0x78ab5 cmpl $0x100, %r15d # imm = 0x100 ja 0x78b39 movzbl (%r13), %eax incq %rax jmp 0x78b50 addq %r15, %r12 jmp 0x78bfb movl -0x2c(%rbp), %edi movl -0x30(%rbp), %r9d testl %r9d, %edi movq -0x40(%rbp), %rdx jne 0x78bda jmp 0x78c58 movq %r13, %rcx testl %r15d, %r15d je 0x78b58 cmpb $0x20, (%rcx) jne 0x78b5b incq %rcx cmpq %rax, %rcx jb 0x78ade jmp 0x78b5b movzwl (%r13), %ecx movzbl 0x2(%r13), %eax shll $0x10, %eax orq %rcx, %rax jmp 0x78b0e movl (%r13), %eax jmp 0x78b0e movzwl (%r13), %eax jmp 0x78b0e xorl %eax, %eax movl %r15d, %ecx addl $-0x8, %ecx addl %eax, %ecx testq %rax, %rax cmoveq %rax, %rcx addq %rcx, %r12 testq %rax, %rax jne 0x78bda movl %edi, %eax andl %r9d, %eax jne 0x78bda jmp 0x78c58 movzwl (%r13), %eax xorl %ecx, %ecx cmpq $0xff, %rax setae %cl leaq (%rax,%rcx,2), %rax incq %rax addq %rax, %r12 jmp 0x78bfb movq %r13, %rcx subq %rcx, %rax cmpl $0x100, %r15d # imm = 0x100 setae %r8b cmpl $0x7f, %eax seta %cl andb %r8b, %cl movzbl %cl, %r8d addl %eax, %r8d incl %r8d cmpl %r15d, %r8d jae 0x78bbf testl %r9d, %edi je 0x78c58 movzbl (%r12), %r8d testb %cl, %cl je 0x78bc4 movl %eax, %ecx orl $0x80, %ecx movzbl %cl, %ecx cmpl %r8d, %ecx jne 0x78c58 movl %eax, %r8d shrl $0x7, %r8d movl $0x2, %ecx cmpb %r8b, 0x1(%r12) je 0x78bd2 jmp 0x78c58 addq %r15, %r12 jmp 0x78bda movl $0x1, %ecx cmpb %al, %r8b jne 0x78c58 addq %rcx, %r12 movl %eax, %eax addq %rax, %r12 addl %r9d, %r9d cmpl $0x100, %r9d # imm = 0x100 jb 0x78bfb movq -0x48(%rbp), %rax movzbl 0x1(%rax), %edi incq %rax movq %rax, -0x48(%rbp) movl $0x1, %r9d decl %r14d addq %r15, %r13 addq $0x30, %rbx testl %r14d, %r14d jne 0x789fa jmp 0x78c16 movl $0x1, %r9d movl %r12d, %eax subl %edx, %eax movq -0x58(%rbp), %rcx cmpq $0x1, 0x2c8(%rcx) sbbl $-0x1, %eax cmpq -0x60(%rbp), %rax jne 0x78c58 cmpl $0x1, %r9d je 0x78c3e negl %r9d testl %r9d, %edi jne 0x78c58 cmpb $0x0, -0x34(%rbp) je 0x78c54 movb (%r12), %al movq -0x50(%rbp), %rcx cmpb 0x1a8(%rcx), %al jne 0x78c58 xorl %eax, %eax jmp 0x78c5a movb $0x1, %al addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_rec_check: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_34], r8d mov [rbp+var_60], rcx mov [rbp+var_50], rdi mov rax, [rdi] mov r14d, [rax+168h] mov r12d, [rax+18Ch] add r12, rdx movzx edi, byte ptr [rdx] test r14d, r14d mov [rbp+var_58], rax jz loc_78C10 mov r13, rsi mov rbx, [rax+230h] mov r9d, 1 mov [rbp+var_48], rdx mov [rbp+var_40], rdx loc_789FA: movzx r15d, word ptr [rbx+4] mov ecx, [rbx] test ecx, ecx jz loc_78AB5 cmp ecx, 3 jz short loc_78A3A cmp ecx, 4 jnz short loc_78A6A lea eax, [r15-9]; switch 4 cases cmp eax, 3 ja def_78A2E; jumptable 0000000000078A2E default case lea rcx, jpt_78A2E movsxd rax, ds:(jpt_78A2E - 0E1870h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_78A30: movzx eax, byte ptr [r13+0]; jumptable 0000000000078A2E case 9 jmp loc_78B0E loc_78A3A: mov [rbp+var_30], r9d mov [rbp+var_2C], edi mov rdi, r13 lea rsi, zero_string mov rdx, r15 call _bcmp test eax, eax jz short loc_78ABD add r12, r15 mov edi, [rbp+var_2C] mov rdx, [rbp+var_40] mov r9d, [rbp+var_30] jmp loc_78BDA loc_78A6A: cmp ecx, 2 ja short loc_78A96 lea rax, [r15+r13] cmp ecx, 1 jnz short loc_78AD6 loc_78A78: mov r8, rax cmp rax, r13 jbe short loc_78A8B lea rax, [r8-1] cmp byte ptr [r8-1], 20h ; ' ' jz short loc_78A78 loc_78A8B: mov rcx, r13 mov rax, r8 jmp loc_78B5B loc_78A96: cmp ecx, 8 jnz short loc_78AB5 cmp r15d, 100h ja loc_78B39 movzx eax, byte ptr [r13+0] inc rax jmp loc_78B50 loc_78AB5: add r12, r15 jmp loc_78BFB loc_78ABD: mov edi, [rbp+var_2C] mov r9d, [rbp+var_30] test edi, r9d mov rdx, [rbp+var_40] jnz loc_78BDA jmp loc_78C58 loc_78AD6: mov rcx, r13 test r15d, r15d jz short loc_78B58 loc_78ADE: cmp byte ptr [rcx], 20h ; ' ' jnz short loc_78B5B inc rcx cmp rcx, rax jb short loc_78ADE jmp short loc_78B5B loc_78AED: movzx ecx, word ptr [r13+0]; jumptable 0000000000078A2E case 11 movzx eax, byte ptr [r13+2] shl eax, 10h or rax, rcx jmp short loc_78B0E loc_78AFF: mov eax, [r13+0]; jumptable 0000000000078A2E case 12 jmp short loc_78B0E loc_78B05: movzx eax, word ptr [r13+0]; jumptable 0000000000078A2E case 10 jmp short loc_78B0E def_78A2E: xor eax, eax; jumptable 0000000000078A2E default case loc_78B0E: mov ecx, r15d add ecx, 0FFFFFFF8h add ecx, eax test rax, rax cmovz rcx, rax add r12, rcx test rax, rax jnz loc_78BDA mov eax, edi and eax, r9d jnz loc_78BDA jmp loc_78C58 loc_78B39: movzx eax, word ptr [r13+0] xor ecx, ecx cmp rax, 0FFh setnb cl lea rax, [rax+rcx*2] inc rax loc_78B50: add r12, rax jmp loc_78BFB loc_78B58: mov rcx, r13 loc_78B5B: sub rax, rcx cmp r15d, 100h setnb r8b cmp eax, 7Fh setnbe cl and cl, r8b movzx r8d, cl add r8d, eax inc r8d cmp r8d, r15d jnb short loc_78BBF test edi, r9d jz loc_78C58 movzx r8d, byte ptr [r12] test cl, cl jz short loc_78BC4 mov ecx, eax or ecx, 80h movzx ecx, cl cmp ecx, r8d jnz loc_78C58 mov r8d, eax shr r8d, 7 mov ecx, 2 cmp [r12+1], r8b jz short loc_78BD2 jmp loc_78C58 loc_78BBF: add r12, r15 jmp short loc_78BDA loc_78BC4: mov ecx, 1 cmp r8b, al jnz loc_78C58 loc_78BD2: add r12, rcx mov eax, eax add r12, rax loc_78BDA: add r9d, r9d cmp r9d, 100h jb short loc_78BFB mov rax, [rbp+var_48] movzx edi, byte ptr [rax+1] inc rax mov [rbp+var_48], rax mov r9d, 1 loc_78BFB: dec r14d add r13, r15 add rbx, 30h ; '0' test r14d, r14d jnz loc_789FA jmp short loc_78C16 loc_78C10: mov r9d, 1 loc_78C16: mov eax, r12d sub eax, edx mov rcx, [rbp+var_58] cmp qword ptr [rcx+2C8h], 1 sbb eax, 0FFFFFFFFh cmp rax, [rbp+var_60] jnz short loc_78C58 cmp r9d, 1 jz short loc_78C3E neg r9d test edi, r9d jnz short loc_78C58 loc_78C3E: cmp byte ptr [rbp+var_34], 0 jz short loc_78C54 mov al, [r12] mov rcx, [rbp+var_50] cmp al, [rcx+1A8h] jnz short loc_78C58 loc_78C54: xor eax, eax jmp short loc_78C5A loc_78C58: mov al, 1 loc_78C5A: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool mi_rec_check(_BYTE *a1, unsigned __int8 *a2, unsigned __int8 *a3, long long a4, char a5) { long long v5; // rax int v6; // r14d unsigned __int8 *v7; // r12 int v8; // edi long long v10; // rbx unsigned int v11; // r9d long long v12; // r15 unsigned int v13; // ecx unsigned long long v14; // rax unsigned __int8 *v15; // rax unsigned __int8 *v16; // r8 unsigned __int8 *v17; // rcx long long v18; // rax long long v19; // rcx unsigned int v20; // eax bool v21; // cl int v22; // r8d long long v23; // rcx long long v26; // [rsp+8h] [rbp-58h] unsigned __int8 *v28; // [rsp+18h] [rbp-48h] int v29; // [rsp+20h] [rbp-40h] unsigned int v31; // [rsp+30h] [rbp-30h] v5 = *(_QWORD *)a1; v6 = *(_DWORD *)(*(_QWORD *)a1 + 360LL); v7 = &a3[*(unsigned int *)(*(_QWORD *)a1 + 396LL)]; v8 = *a3; v26 = v5; if ( v6 ) { v10 = *(_QWORD *)(v5 + 560); v11 = 1; v28 = a3; v29 = (int)a3; while ( 1 ) { v12 = *(unsigned __int16 *)(v10 + 4); v13 = *(_DWORD *)v10; if ( !*(_DWORD *)v10 ) goto LABEL_18; if ( v13 == 3 ) { v31 = v11; if ( (unsigned int)bcmp(a2, &zero_string, v12) ) { v7 += v12; LODWORD(a3) = v29; v11 = v31; } else { v11 = v31; LODWORD(a3) = v29; if ( (v31 & v8) == 0 ) return 1; } LABEL_46: v11 *= 2; if ( v11 >= 0x100 ) { v8 = *++v28; v11 = 1; } goto LABEL_48; } if ( v13 == 4 ) { switch ( *(_WORD *)(v10 + 4) ) { case 9: v14 = *a2; break; case 0xA: v14 = *(unsigned __int16 *)a2; break; case 0xB: v14 = *(unsigned __int16 *)a2 | (unsigned long long)(a2[2] << 16); break; case 0xC: v14 = *(unsigned int *)a2; break; default: v14 = 0LL; break; } v19 = (unsigned int)(v14 + v12 - 8); if ( !v14 ) v19 = 0LL; v7 += v19; if ( !v14 && (v11 & v8) == 0 ) return 1; goto LABEL_46; } if ( v13 <= 2 ) { v15 = &a2[v12]; if ( v13 == 1 ) { do { v16 = v15; if ( v15 <= a2 ) break; --v15; } while ( *(v16 - 1) == 32 ); LODWORD(v17) = (_DWORD)a2; LODWORD(v15) = (_DWORD)v16; } else { v17 = a2; if ( *(_WORD *)(v10 + 4) ) { do { if ( *v17 != 32 ) break; ++v17; } while ( v17 < v15 ); } else { LODWORD(v17) = (_DWORD)a2; } } v20 = (_DWORD)v15 - (_DWORD)v17; v21 = (unsigned int)v12 >= 0x100 && v20 > 0x7F; if ( v20 + v21 + 1 >= (unsigned int)v12 ) { v7 += v12; } else { if ( (v11 & v8) == 0 ) return 1; v22 = *v7; if ( v21 ) { if ( ((unsigned __int8)v20 | 0x80) != v22 ) return 1; v23 = 2LL; if ( v7[1] != (unsigned __int8)(v20 >> 7) ) return 1; } else { v23 = 1LL; if ( (_BYTE)v22 != (_BYTE)v20 ) return 1; } v7 += v20 + v23; } goto LABEL_46; } if ( v13 == 8 ) { if ( (unsigned int)v12 > 0x100 ) v18 = *(unsigned __int16 *)a2 + 2LL * (*(unsigned __int16 *)a2 >= 0xFFuLL); else v18 = *a2; v7 += v18 + 1; } else { LABEL_18: v7 += v12; } LABEL_48: --v6; a2 += v12; v10 += 48LL; if ( !v6 ) return (_DWORD)v7 - (_DWORD)a3 - ((*(_QWORD *)(v26 + 712) == 0LL) - 1) != a4 || v11 != 1 && (-v11 & v8) != 0 || a5 && *v7 != a1[424]; } } v11 = 1; return (_DWORD)v7 - (_DWORD)a3 - ((*(_QWORD *)(v26 + 712) == 0LL) - 1) != a4 || v11 != 1 && (-v11 & v8) != 0 || a5 && *v7 != a1[424]; }
_mi_rec_check: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV dword ptr [RBP + -0x34],R8D MOV qword ptr [RBP + -0x60],RCX MOV qword ptr [RBP + -0x50],RDI MOV RAX,qword ptr [RDI] MOV R14D,dword ptr [RAX + 0x168] MOV R12D,dword ptr [RAX + 0x18c] ADD R12,RDX MOVZX EDI,byte ptr [RDX] TEST R14D,R14D MOV qword ptr [RBP + -0x58],RAX JZ 0x00178c10 MOV R13,RSI MOV RBX,qword ptr [RAX + 0x230] MOV R9D,0x1 MOV qword ptr [RBP + -0x48],RDX MOV qword ptr [RBP + -0x40],RDX LAB_001789fa: MOVZX R15D,word ptr [RBX + 0x4] MOV ECX,dword ptr [RBX] TEST ECX,ECX JZ 0x00178ab5 CMP ECX,0x3 JZ 0x00178a3a CMP ECX,0x4 JNZ 0x00178a6a LEA EAX,[R15 + -0x9] CMP EAX,0x3 JA 0x00178b0c LEA RCX,[0x1e1870] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_9: MOVZX EAX,byte ptr [R13] JMP 0x00178b0e LAB_00178a3a: MOV dword ptr [RBP + -0x30],R9D MOV dword ptr [RBP + -0x2c],EDI MOV RDI,R13 LEA RSI,[0xcff9f0] MOV RDX,R15 CALL 0x00129560 TEST EAX,EAX JZ 0x00178abd ADD R12,R15 MOV EDI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x40] MOV R9D,dword ptr [RBP + -0x30] JMP 0x00178bda LAB_00178a6a: CMP ECX,0x2 JA 0x00178a96 LEA RAX,[R15 + R13*0x1] CMP ECX,0x1 JNZ 0x00178ad6 LAB_00178a78: MOV R8,RAX CMP RAX,R13 JBE 0x00178a8b LEA RAX,[R8 + -0x1] CMP byte ptr [R8 + -0x1],0x20 JZ 0x00178a78 LAB_00178a8b: MOV RCX,R13 MOV RAX,R8 JMP 0x00178b5b LAB_00178a96: CMP ECX,0x8 JNZ 0x00178ab5 CMP R15D,0x100 JA 0x00178b39 MOVZX EAX,byte ptr [R13] INC RAX JMP 0x00178b50 LAB_00178ab5: ADD R12,R15 JMP 0x00178bfb LAB_00178abd: MOV EDI,dword ptr [RBP + -0x2c] MOV R9D,dword ptr [RBP + -0x30] TEST EDI,R9D MOV RDX,qword ptr [RBP + -0x40] JNZ 0x00178bda JMP 0x00178c58 LAB_00178ad6: MOV RCX,R13 TEST R15D,R15D JZ 0x00178b58 LAB_00178ade: CMP byte ptr [RCX],0x20 JNZ 0x00178b5b INC RCX CMP RCX,RAX JC 0x00178ade JMP 0x00178b5b caseD_b: MOVZX ECX,word ptr [R13] MOVZX EAX,byte ptr [R13 + 0x2] SHL EAX,0x10 OR RAX,RCX JMP 0x00178b0e caseD_c: MOV EAX,dword ptr [R13] JMP 0x00178b0e caseD_a: MOVZX EAX,word ptr [R13] JMP 0x00178b0e default: XOR EAX,EAX LAB_00178b0e: MOV ECX,R15D ADD ECX,-0x8 ADD ECX,EAX TEST RAX,RAX CMOVZ RCX,RAX ADD R12,RCX TEST RAX,RAX JNZ 0x00178bda MOV EAX,EDI AND EAX,R9D JNZ 0x00178bda JMP 0x00178c58 LAB_00178b39: MOVZX EAX,word ptr [R13] XOR ECX,ECX CMP RAX,0xff SETNC CL LEA RAX,[RAX + RCX*0x2] INC RAX LAB_00178b50: ADD R12,RAX JMP 0x00178bfb LAB_00178b58: MOV RCX,R13 LAB_00178b5b: SUB RAX,RCX CMP R15D,0x100 SETNC R8B CMP EAX,0x7f SETA CL AND CL,R8B MOVZX R8D,CL ADD R8D,EAX INC R8D CMP R8D,R15D JNC 0x00178bbf TEST EDI,R9D JZ 0x00178c58 MOVZX R8D,byte ptr [R12] TEST CL,CL JZ 0x00178bc4 MOV ECX,EAX OR ECX,0x80 MOVZX ECX,CL CMP ECX,R8D JNZ 0x00178c58 MOV R8D,EAX SHR R8D,0x7 MOV ECX,0x2 CMP byte ptr [R12 + 0x1],R8B JZ 0x00178bd2 JMP 0x00178c58 LAB_00178bbf: ADD R12,R15 JMP 0x00178bda LAB_00178bc4: MOV ECX,0x1 CMP R8B,AL JNZ 0x00178c58 LAB_00178bd2: ADD R12,RCX MOV EAX,EAX ADD R12,RAX LAB_00178bda: ADD R9D,R9D CMP R9D,0x100 JC 0x00178bfb MOV RAX,qword ptr [RBP + -0x48] MOVZX EDI,byte ptr [RAX + 0x1] INC RAX MOV qword ptr [RBP + -0x48],RAX MOV R9D,0x1 LAB_00178bfb: DEC R14D ADD R13,R15 ADD RBX,0x30 TEST R14D,R14D JNZ 0x001789fa JMP 0x00178c16 LAB_00178c10: MOV R9D,0x1 LAB_00178c16: MOV EAX,R12D SUB EAX,EDX MOV RCX,qword ptr [RBP + -0x58] CMP qword ptr [RCX + 0x2c8],0x1 SBB EAX,-0x1 CMP RAX,qword ptr [RBP + -0x60] JNZ 0x00178c58 CMP R9D,0x1 JZ 0x00178c3e NEG R9D TEST EDI,R9D JNZ 0x00178c58 LAB_00178c3e: CMP byte ptr [RBP + -0x34],0x0 JZ 0x00178c54 MOV AL,byte ptr [R12] MOV RCX,qword ptr [RBP + -0x50] CMP AL,byte ptr [RCX + 0x1a8] JNZ 0x00178c58 LAB_00178c54: XOR EAX,EAX JMP 0x00178c5a LAB_00178c58: MOV AL,0x1 LAB_00178c5a: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _mi_rec_check(long *param_1,uint *param_2,byte *param_3,ulong param_4,char param_5) { ushort uVar1; long lVar2; uint *puVar3; int iVar4; uint uVar5; int4 extraout_var; ulong uVar6; int8 uVar8; uint *puVar9; long lVar10; uint *puVar11; uint uVar12; uint uVar13; byte *pbVar14; int iVar15; ulong __n; byte *local_50; uint *puVar7; lVar2 = *param_1; iVar15 = *(int *)(lVar2 + 0x168); pbVar14 = param_3 + *(uint *)(lVar2 + 0x18c); uVar12 = (uint)*param_3; if (iVar15 == 0) { uVar13 = 1; } else { puVar11 = *(uint **)(lVar2 + 0x230); uVar13 = 1; local_50 = param_3; do { uVar1 = (ushort)puVar11[1]; __n = (ulong)uVar1; uVar5 = *puVar11; if (uVar5 == 0) { LAB_00178ab5: pbVar14 = pbVar14 + __n; } else { if (uVar5 == 3) { iVar4 = bcmp(param_2,zero_string,__n); uVar6 = CONCAT44(extraout_var,iVar4); if (iVar4 == 0) { joined_r0x00178acb: if ((uVar12 & uVar13) == 0) goto LAB_00178c58; } else { pbVar14 = pbVar14 + __n; } } else if (uVar5 == 4) { switch(uVar1) { case 9: uVar5 = (uint)(byte)*param_2; break; case 10: uVar5 = (uint)(ushort)*param_2; break; case 0xb: uVar5 = (uint)(uint3)*param_2; break; case 0xc: uVar5 = *param_2; break; default: uVar5 = 0; } uVar6 = (ulong)((uVar1 - 8) + uVar5); if (uVar5 == 0) { uVar6 = 0; } pbVar14 = pbVar14 + uVar6; if (uVar5 == 0) { uVar6 = 0; goto joined_r0x00178acb; } } else { if (2 < uVar5) { if (uVar5 != 8) goto LAB_00178ab5; if (uVar1 < 0x101) { uVar6 = (ulong)(byte)*param_2; } else { uVar6 = (ulong)(ushort)*param_2 + (ulong)(0xfe < (ulong)(ushort)*param_2) * 2; } pbVar14 = pbVar14 + uVar6 + 1; goto LAB_00178bfb; } puVar7 = (uint *)(__n + (long)param_2); puVar3 = puVar7; puVar9 = param_2; if (uVar5 == 1) { do { puVar7 = puVar3; if (puVar7 <= param_2) break; puVar3 = (uint *)((long)puVar7 + -1); } while (*(byte *)((long)puVar7 + -1) == 0x20); } else if (uVar1 != 0) { do { if ((byte)*puVar9 != 0x20) break; puVar9 = (uint *)((long)puVar9 + 1); } while (puVar9 < puVar7); } uVar6 = (long)puVar7 - (long)puVar9; uVar5 = (uint)uVar6; if ((0x7f < uVar5 && 0xff < uVar1) + uVar5 + 1 < (uint)uVar1) { if ((uVar12 & uVar13) == 0) goto LAB_00178c58; if (0x7f < uVar5 && 0xff < uVar1) { if (((uVar5 & 0xff | 0x80) != (uint)*pbVar14) || (lVar10 = 2, pbVar14[1] != (byte)(uVar6 >> 7))) goto LAB_00178c58; } else { lVar10 = 1; if (*pbVar14 != (byte)uVar6) goto LAB_00178c58; } pbVar14 = pbVar14 + (uVar6 & 0xffffffff) + lVar10; } else { pbVar14 = pbVar14 + __n; } } uVar13 = uVar13 * 2; if (0xff < uVar13) { uVar12 = (uint)local_50[1]; local_50 = local_50 + 1; uVar13 = 1; } } LAB_00178bfb: iVar15 = iVar15 + -1; param_2 = (uint *)((long)param_2 + __n); puVar11 = puVar11 + 0xc; } while (iVar15 != 0); } uVar5 = (((int)pbVar14 - (int)param_3) + 1) - (uint)(*(long *)(lVar2 + 0x2c8) == 0); uVar6 = (ulong)uVar5; if (((uVar6 == param_4) && ((uVar13 == 1 || ((uVar12 & -uVar13) == 0)))) && ((param_5 == '\0' || (uVar6 = (ulong)CONCAT31((int3)(uVar5 >> 8),*pbVar14), *pbVar14 == *(byte *)(param_1 + 0x35))) )) { uVar8 = 0; } else { LAB_00178c58: uVar8 = CONCAT71((int7)(uVar6 >> 8),1); } return uVar8; }
39,131
my_mb_wc_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */ { if (s + 2 > e) return MY_CS_TOOSMALL2; return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 : (s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2; } /* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */ if (hi == 0x8E) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (s[1] < 0xA1 || s[1] > 0xDF) return MY_CS_ILSEQ; *pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */ return 2; } if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */ { if (s + 3 > e) return MY_CS_TOOSMALL3; return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ? 3 : (s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ? MY_CS_ILSEQ : -3; } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_euc_jp: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x4bbaf movzbl (%rdx), %edi testb %dil, %dil js 0x4bbb1 movq %rdi, (%rsi) movl $0x1, %eax popq %rbp retq leal 0x5f(%rdi), %eax cmpb $0x5d, %al ja 0x4bbfd leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x4bbaf movzbl 0x1(%rdx), %eax shll $0x9, %edi leal (%rdi,%rax,2), %eax leaq 0x207009(%rip), %rcx # 0x252be0 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0x4bbaf movb 0x1(%rdx), %al incb %al xorl %ecx, %ecx cmpb $-0x5e, %al setb %cl leal -0x2(,%rcx,2), %eax jmp 0x4bbaf cmpq $0x8f, %rdi je 0x4bc41 cmpl $0x8e, %edi jne 0x4bc83 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x4bbaf movzbl 0x1(%rdx), %ecx leal 0x20(%rcx), %edx movl $0x0, %eax cmpb $-0x3f, %dl jb 0x4bbaf addq $0xfec0, %rcx # imm = 0xFEC0 movq %rcx, (%rsi) movl $0x2, %eax jmp 0x4bbaf leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0x4bbaf movzwl 0x1(%rdx), %eax rolw $0x8, %ax movzwl %ax, %eax leaq 0x226f7b(%rip), %rcx # 0x272be0 movzwl (%rcx,%rax,2), %ecx movq %rcx, (%rsi) movl $0x3, %eax testq %rcx, %rcx jne 0x4bbaf movb 0x1(%rdx), %al incb %al cmpb $-0x5e, %al jae 0x4bc8a xorl %eax, %eax jmp 0x4bbaf movb 0x2(%rdx), %cl movl $0x0, %eax cmpb $-0x5f, %cl jb 0x4bbaf xorl %eax, %eax cmpb $-0x1, %cl sete %al leal (%rax,%rax,2), %eax addl $-0x3, %eax jmp 0x4bbaf
my_mb_wc_euc_jp: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_4BBAF movzx edi, byte ptr [rdx] test dil, dil js short loc_4BBB1 mov [rsi], rdi mov eax, 1 loc_4BBAF: pop rbp retn loc_4BBB1: lea eax, [rdi+5Fh] cmp al, 5Dh ; ']' ja short loc_4BBFD lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_4BBAF movzx eax, byte ptr [rdx+1] shl edi, 9 lea eax, [rdi+rax*2] lea rcx, jisx0208_eucjp_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_4BBAF mov al, [rdx+1] inc al xor ecx, ecx cmp al, 0A2h setb cl lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2] jmp short loc_4BBAF loc_4BBFD: cmp rdi, 8Fh jz short loc_4BC41 cmp edi, 8Eh jnz short loc_4BC83 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_4BBAF movzx ecx, byte ptr [rdx+1] lea edx, [rcx+20h] mov eax, 0 cmp dl, 0C1h jb short loc_4BBAF add rcx, 0FEC0h mov [rsi], rcx mov eax, 2 jmp loc_4BBAF loc_4BC41: lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja loc_4BBAF movzx eax, word ptr [rdx+1] rol ax, 8 movzx eax, ax lea rcx, jisx0212_eucjp_to_unicode movzx ecx, word ptr [rcx+rax*2] mov [rsi], rcx mov eax, 3 test rcx, rcx jnz loc_4BBAF mov al, [rdx+1] inc al cmp al, 0A2h jnb short loc_4BC8A loc_4BC83: xor eax, eax jmp loc_4BBAF loc_4BC8A: mov cl, [rdx+2] mov eax, 0 cmp cl, 0A1h jb loc_4BBAF xor eax, eax cmp cl, 0FFh setz al lea eax, [rax+rax*2] add eax, 0FFFFFFFDh jmp loc_4BBAF
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx long long v7; // rcx long long v8; // rcx unsigned __int8 v9; // cl result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x5Du ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = jisx0208_eucjp_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2; } return result; } if ( v5 != 143 ) { if ( (_DWORD)v5 == 142 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v7 = a3[1]; result = 0LL; if ( (unsigned __int8)(v7 + 32) >= 0xC1u ) { *a2 = v7 + 65216; return 2LL; } } return result; } return 0LL; } result = 4294967193LL; if ( (unsigned long long)(a3 + 3) > a4 ) return result; v8 = jisx0212_eucjp_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)]; *a2 = v8; result = 3LL; if ( v8 ) return result; if ( (unsigned __int8)(a3[1] + 1) < 0xA2u ) return 0LL; v9 = a3[2]; result = 0LL; if ( v9 >= 0xA1u ) return 3 * (unsigned int)(v9 == 0xFF) - 3; return result; }
my_mb_wc_euc_jp: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0014bbaf MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x0014bbb1 MOV qword ptr [RSI],RDI MOV EAX,0x1 LAB_0014bbaf: POP RBP RET LAB_0014bbb1: LEA EAX,[RDI + 0x5f] CMP AL,0x5d JA 0x0014bbfd LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x0014bbaf MOVZX EAX,byte ptr [RDX + 0x1] SHL EDI,0x9 LEA EAX,[RDI + RAX*0x2] LEA RCX,[0x352be0] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x0014bbaf MOV AL,byte ptr [RDX + 0x1] INC AL XOR ECX,ECX CMP AL,0xa2 SETC CL LEA EAX,[-0x2 + RCX*0x2] JMP 0x0014bbaf LAB_0014bbfd: CMP RDI,0x8f JZ 0x0014bc41 CMP EDI,0x8e JNZ 0x0014bc83 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0014bbaf MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + 0x20] MOV EAX,0x0 CMP DL,0xc1 JC 0x0014bbaf ADD RCX,0xfec0 MOV qword ptr [RSI],RCX MOV EAX,0x2 JMP 0x0014bbaf LAB_0014bc41: LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x0014bbaf MOVZX EAX,word ptr [RDX + 0x1] ROL AX,0x8 MOVZX EAX,AX LEA RCX,[0x372be0] MOVZX ECX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RCX MOV EAX,0x3 TEST RCX,RCX JNZ 0x0014bbaf MOV AL,byte ptr [RDX + 0x1] INC AL CMP AL,0xa2 JNC 0x0014bc8a LAB_0014bc83: XOR EAX,EAX JMP 0x0014bbaf LAB_0014bc8a: MOV CL,byte ptr [RDX + 0x2] MOV EAX,0x0 CMP CL,0xa1 JC 0x0014bbaf XOR EAX,EAX CMP CL,0xff SETZ AL LEA EAX,[RAX + RAX*0x2] ADD EAX,-0x3 JMP 0x0014bbaf
int my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if ((byte)(bVar1 + 0x5f) < 0x5e) { iVar3 = -0x66; if (param_3 + 2 <= param_4) { uVar2 = *(ushort *) (jisx0208_eucjp_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; iVar3 = 2; if ((ulong)uVar2 == 0) { iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2; } } } else { if ((ulong)bVar1 == 0x8f) { if (param_4 < param_3 + 3) { return -0x67; } uVar2 = *(ushort *) (&jisx0212_eucjp_to_unicode + (ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) * 2); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 3; } if (0xa1 < (byte)(param_3[1] + 1)) { if (param_3[2] < 0xa1) { return 0; } return (uint)(param_3[2] == 0xff) * 3 + -3; } } else if (bVar1 == 0x8e) { if (param_4 < param_3 + 2) { return -0x66; } if ((byte)(param_3[1] + 0x20) < 0xc1) { return 0; } *param_2 = (ulong)param_3[1] + 0xfec0; return 2; } iVar3 = 0; } } else { *param_2 = (ulong)bVar1; iVar3 = 1; } } return iVar3; }
39,132
common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_deepseek_r1(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { std::vector<std::string> tool_rules; foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; std::string name = function["name"]; auto parameters = function["parameters"]; auto args_rule = builder.add_schema(name + "-args", parameters); tool_rules.push_back(builder.add_rule(name + "-call", "\"<|tool▁call▁begin|>function<|tool▁sep|>" + name + "\\n```json\\n\" " + args_rule + " \"```<|tool▁call▁end|>\"")); }); data.grammar_triggers.push_back({"<|tool▁calls▁begin|>", /* .at_start = */ false}); data.preserved_tokens = { "<|tool▁sep|>", "<|tool▁call▁end|>", }; builder.add_rule("root", "\"<|tool▁calls▁begin|>\" (" + string_join(tool_rules, " | ") + ")" + (inputs.parallel_tool_calls ? "*" : "") + " space"); }, grammar_options); data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_DEEPSEEK_R1; return data; }
O3
cpp
common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl $0x0, (%rdi) xorl %eax, %eax movb %al, 0x8(%rdi) movq %rax, 0x10(%rdi) leaq 0x28(%rdi), %rcx movq %rcx, 0x18(%rdi) movq %rax, 0x20(%rdi) movb %al, 0x28(%rdi) movb %al, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %rax, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x273ad(%rip), %rsi # 0xa891c callq 0x68093 movb %al, 0x38(%rbx) leaq 0x8(%rsp), %rsi movq %r14, (%rsi) movq %rbx, 0x8(%rsi) leaq 0xc926(%rip), %rax # 0x8deb0 movq %rax, 0x18(%rsi) leaq 0xcf63(%rip), %rax # 0x8e4f8 movq %rax, 0x10(%rsi) leaq 0x2e25c(%rip), %rdx # 0xaf7fc leaq 0x28(%rsp), %rdi callq 0x95c4c leaq 0x18(%rbx), %rdi leaq 0x28(%rsp), %r12 movq %r12, %rsi callq 0x187f0 movq (%r12), %rdi leaq 0x38(%rsp), %r12 cmpq %r12, %rdi je 0x815d6 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x18(%rsp), %rax testq %rax, %rax je 0x815ef leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movzbl 0x10(%r14), %eax testl %eax, %eax je 0x8161f cmpl $0x2, %eax je 0x81602 cmpl $0x1, %eax jne 0x8160f movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0x8161f leaq 0x10(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x2a110 jmp 0x8162d movb $0x0, 0x8(%rsp) movq $0x0, 0x10(%rsp) movzbl 0x68(%r14), %r8d leaq 0x48(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %r15, %rsi movq %r14, %rdx callq 0x647b2 leaq 0x58(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x2b464 movb 0x8(%rbx), %al leaq 0x58(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x49a2a movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x816a9 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x48(%rsp), %rdi callq 0x49a2a leaq 0x8(%rsp), %rdi callq 0x49a2a movl $0x5, (%rbx) addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 jmp 0x81727 jmp 0x81737 movq %rax, %r14 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x816f5 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x816f5 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x49a2a leaq 0x8(%rsp), %rdi callq 0x49a2a jmp 0x81727 movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0x81727 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x29e76 movq %r14, %rdi callq 0x18ba0 movq %rax, %rdi callq 0x29f9b
_ZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputs: push r15 push r14 push r12 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor eax, eax mov [rdi+8], al mov [rdi+10h], rax lea rcx, [rdi+28h] mov [rdi+18h], rcx mov [rdi+20h], rax mov [rdi+28h], al mov [rdi+38h], al xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], rax lea rdi, [rdx+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al lea rsi, [rsp+88h+var_80] mov [rsi], r14 mov [rsi+8], rbx lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+88h+var_60] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r12, [rsp+88h+var_60] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r12, [rsp+88h+var_50] cmp rdi, r12 jz short loc_815D6 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_815D6: mov rax, [rsp+88h+var_70] test rax, rax jz short loc_815EF lea rdi, [rsp+88h+var_80] mov rsi, rdi mov edx, 3 call rax loc_815EF: movzx eax, byte ptr [r14+10h] test eax, eax jz short loc_8161F cmp eax, 2 jz short loc_81602 cmp eax, 1 jnz short loc_8160F loc_81602: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_8161F loc_8160F: lea rsi, [r14+10h] lea rdi, [rsp+88h+var_80] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_8162D loc_8161F: mov [rsp+88h+var_80], 0 mov [rsp+88h+var_78], 0 loc_8162D: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+88h+var_40] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+88h+var_88], 1 lea rdi, [rsp+88h+var_60] lea rcx, [rsp+88h+var_80] mov rsi, r15 mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool) lea rdi, [rsp+88h+var_30] lea rsi, [rsp+88h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+88h+var_30] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+88h+var_60]; void * cmp rdi, r12 jz short loc_816A9 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_816A9: lea rdi, [rsp+88h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+88h+var_80] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 5 add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn mov r14, rax jmp short loc_81727 jmp short loc_81737 mov r14, rax mov rdi, [rsp+88h+var_60]; void * cmp rdi, r12 jz short loc_816F5 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_816F5 mov r14, rax loc_816F5: lea rdi, [rsp+88h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+88h+var_80] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_81727 mov r14, rax mov rax, [rsp+88h+var_70] test rax, rax jz short loc_81727 lea rdi, [rsp+88h+var_80] mov rsi, rdi mov edx, 3 call rax loc_81727: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume loc_81737: mov rdi, rax call __clang_call_terminate
void common_chat_params_init_deepseek_r1( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { int v4; // eax int v5; // r8d char v6; // al long long v7; // rax void **v8; // [rsp+8h] [rbp-80h] BYREF const minja::chat_template *v9; // [rsp+10h] [rbp-78h] long long ( *v10)(); // [rsp+18h] [rbp-70h] long long ( *v11)(); // [rsp+20h] [rbp-68h] void *v12[2]; // [rsp+28h] [rbp-60h] BYREF _QWORD v13[2]; // [rsp+38h] [rbp-50h] BYREF void **v14[2]; // [rsp+48h] [rbp-40h] BYREF _OWORD v15[3]; // [rsp+58h] [rbp-30h] BYREF *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( a3 + 32, (long long)"required"); v8 = (void **)a3; v9 = a1; v11 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v10 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11](v12, &v8, &grammar_options); std::string::operator=((char *)a1 + 24, v12); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); if ( v10 ) ((void ( *)(void ***, void ***, long long))v10)(&v8, &v8, 3LL); v4 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v4 == 2 || v4 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v8) = 0; v9 = 0LL; } else { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)&v8, a3 + 16); } v5 = *(unsigned __int8 *)(a3 + 104); LOBYTE(v14[0]) = 0; v14[1] = 0LL; minja::chat_template::apply((long long)v12, a2, a3, (unsigned __int8 *)&v8, v5, v14, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v15); v6 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v15[0]; LOBYTE(v15[0]) = v6; v7 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = *((_QWORD *)&v15[0] + 1); *((_QWORD *)&v15[0] + 1) = v7; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)v15); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v14); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v8); *(_DWORD *)a1 = 5; }
common_chat_params_init_deepseek_r1: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR EAX,EAX MOV byte ptr [RDI + 0x8],AL MOV qword ptr [RDI + 0x10],RAX LEA RCX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],RAX MOV byte ptr [RDI + 0x28],AL MOV byte ptr [RDI + 0x38],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],RAX LEA RDI,[RDX + 0x20] LEA RSI,[0x1a891c] CALL 0x00168093 MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],R14 MOV qword ptr [RSI + 0x8],RBX LEA RAX,[0x18deb0] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x18e4f8] MOV qword ptr [RSI + 0x10],RAX LAB_00181599: LEA RDX,[0x1af7fc] LEA RDI,[RSP + 0x28] CALL 0x00195c4c LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x28] MOV RSI,R12 CALL 0x001187f0 MOV RDI,qword ptr [R12] LEA R12,[RSP + 0x38] CMP RDI,R12 JZ 0x001815d6 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_001815d6: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x001815ef LAB_001815e0: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001815ef: MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX JZ 0x0018161f CMP EAX,0x2 JZ 0x00181602 CMP EAX,0x1 JNZ 0x0018160f LAB_00181602: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x0018161f LAB_0018160f: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x8] CALL 0x0012a110 JMP 0x0018162d LAB_0018161f: MOV byte ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 LAB_0018162d: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x48] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_00181643: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x28] LEA RCX,[RSP + 0x8] MOV RSI,R15 MOV RDX,R14 CALL 0x001647b2 LAB_0018165f: LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x28] CALL 0x0012b464 MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0x58] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x00149a2a MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x001816a9 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_001816a9: LEA RDI,[RSP + 0x48] CALL 0x00149a2a LEA RDI,[RSP + 0x8] CALL 0x00149a2a MOV dword ptr [RBX],0x5 ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_deepseek_r1(chat_template *param_1,common_chat_inputs *param_2) { char cVar1; int8 uVar2; chat_template cVar3; ulong in_RDX; ulong local_80; chat_template *local_78; code *local_70; code *local_68; long *local_60 [2]; long local_50 [2]; data local_40 [8]; int8 local_38; chat_template local_30 [8]; int8 local_28; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; cVar3 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar3; local_68 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_deepseek_r1(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_70 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_deepseek_r1(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 00181599 to 001815a9 has its CatchHandler @ 0018170b */ local_80 = in_RDX; local_78 = param_1; build_grammar_abi_cxx11_((function *)local_60,(common_grammar_options *)&local_80); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_60); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (local_70 != (code *)0x0) { /* try { // try from 001815e0 to 001815ee has its CatchHandler @ 001816d4 */ (*local_70)(&local_80,&local_80,3); } cVar1 = *(char *)(in_RDX + 0x10); if ((cVar1 == '\0') || (((cVar1 == '\x02' || (cVar1 == '\x01')) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_80 = local_80 & 0xffffffffffffff00; local_78 = (chat_template *)0x0; } else { /* try { // try from 0018160f to 0018161c has its CatchHandler @ 001816cf */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)&local_80,(basic_json *)(in_RDX + 0x10)); } local_40[0] = (data)0x0; local_38 = 0; /* try { // try from 00181643 to 0018165e has its CatchHandler @ 001816f2 */ minja::chat_template::apply ((basic_json *)local_60,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)&local_80, *(bool *)(in_RDX + 0x68)); /* try { // try from 0018165f to 0018166d has its CatchHandler @ 001816d6 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_30,local_60); cVar3 = param_1[8]; param_1[8] = local_30[0]; uVar2 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_28; local_30[0] = cVar3; local_28 = uVar2; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_30); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_80); *(int4 *)param_1 = 5; return; }
39,133
getopt_ll_limit_value
eloqsql/mysys/my_getopt.c
longlong getopt_ll_limit_value(longlong num, const struct my_option *optp, my_bool *fix) { longlong old= num; my_bool adjusted= FALSE; char buf1[255], buf2[255]; ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L); DBUG_ENTER("getopt_ll_limit_value"); if (num > 0 && ((ulonglong) num > (ulonglong) optp->max_value) && optp->max_value) /* if max value is not set -> no upper limit */ { num= (ulonglong) optp->max_value; adjusted= TRUE; } switch ((optp->var_type & GET_TYPE_MASK)) { case GET_INT: if (num > (longlong) INT_MAX) { num= ((longlong) INT_MAX); adjusted= TRUE; } break; case GET_LONG: #if SIZEOF_LONG < SIZEOF_LONG_LONG if (num > (longlong) LONG_MAX) { num= ((longlong) LONG_MAX); adjusted= TRUE; } #endif break; default: DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_LL); break; } num= (num / block_size); num= (longlong) (num * block_size); if (num < optp->min_value) { num= optp->min_value; if (old < optp->min_value) adjusted= TRUE; } if (fix) *fix= old != num; else if (adjusted) my_getopt_error_reporter(WARNING_LEVEL, "option '%s': signed value %s adjusted to %s", optp->name, llstr(old, buf1), llstr(num, buf2)); DBUG_RETURN(num); }
O0
c
getopt_ll_limit_value: pushq %rbp movq %rsp, %rbp subq $0x270, %rsp # imm = 0x270 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) movq -0x218(%rbp), %rax movq %rax, -0x230(%rbp) movb $0x0, -0x231(%rbp) movq -0x220(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0xf4f94 movq -0x220(%rbp), %rax movq 0x60(%rax), %rax movq %rax, -0x248(%rbp) jmp 0xf4fa2 movl $0x1, %eax movq %rax, -0x248(%rbp) jmp 0xf4fa2 movq -0x248(%rbp), %rax movq %rax, -0x240(%rbp) cmpq $0x0, -0x218(%rbp) jle 0xf4ff5 movq -0x218(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x50(%rcx), %rax jbe 0xf4ff5 movq -0x220(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0xf4ff5 movq -0x220(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x218(%rbp) movb $0x1, -0x231(%rbp) movq -0x220(%rbp), %rax movq 0x30(%rax), %rax andl $0x3f, %eax movq %rax, -0x250(%rbp) subq $0x3, %rax je 0xf5021 jmp 0xf5012 movq -0x250(%rbp), %rax subq $0x5, %rax je 0xf5042 jmp 0xf5044 cmpq $0x7fffffff, -0x218(%rbp) # imm = 0x7FFFFFFF jle 0xf5040 movq $0x7fffffff, -0x218(%rbp) # imm = 0x7FFFFFFF movb $0x1, -0x231(%rbp) jmp 0xf504a jmp 0xf504a jmp 0xf5046 jmp 0xf5048 jmp 0xf504a movq -0x218(%rbp), %rax xorl %ecx, %ecx movl %ecx, %edx divq -0x240(%rbp) movq %rax, -0x218(%rbp) movq -0x218(%rbp), %rax imulq -0x240(%rbp), %rax movq %rax, -0x218(%rbp) movq -0x218(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x48(%rcx), %rax jge 0xf50bc movq -0x220(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x218(%rbp) movq -0x230(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x48(%rcx), %rax jge 0xf50ba movb $0x1, -0x231(%rbp) jmp 0xf50bc cmpq $0x0, -0x228(%rbp) je 0xf50ec movq -0x230(%rbp), %rax cmpq -0x218(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x228(%rbp), %rax movb %cl, (%rax) jmp 0xf516f cmpb $0x0, -0x231(%rbp) je 0xf516d leaq 0x1d5a54(%rip), %rax # 0x2cab50 movq (%rax), %rax movq %rax, -0x258(%rbp) movq -0x220(%rbp), %rax movq (%rax), %rax movq %rax, -0x268(%rbp) movq -0x230(%rbp), %rdi leaq -0x110(%rbp), %rsi callq 0x154690 movq %rax, -0x260(%rbp) movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x154690 movq -0x268(%rbp), %rdx movq -0x260(%rbp), %rcx movq -0x258(%rbp), %r9 movq %rax, %r8 movl $0x1, %edi leaq 0x68594(%rip), %rsi # 0x15d6fc movb $0x0, %al callq *%r9 jmp 0xf516f jmp 0xf5171 movq -0x218(%rbp), %rax movq %rax, -0x270(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xf51a1 movq -0x270(%rbp), %rax addq $0x270, %rsp # imm = 0x270 popq %rbp retq callq 0x2a260 nopw %cs:(%rax,%rax)
getopt_ll_limit_value: push rbp mov rbp, rsp sub rsp, 270h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov [rbp+var_228], rdx mov rax, [rbp+var_218] mov [rbp+var_230], rax mov [rbp+var_231], 0 mov rax, [rbp+var_220] cmp qword ptr [rax+60h], 0 jz short loc_F4F94 mov rax, [rbp+var_220] mov rax, [rax+60h] mov [rbp+var_248], rax jmp short loc_F4FA2 loc_F4F94: mov eax, 1 mov [rbp+var_248], rax jmp short $+2 loc_F4FA2: mov rax, [rbp+var_248] mov [rbp+var_240], rax cmp [rbp+var_218], 0 jle short loc_F4FF5 mov rax, [rbp+var_218] mov rcx, [rbp+var_220] cmp rax, [rcx+50h] jbe short loc_F4FF5 mov rax, [rbp+var_220] cmp qword ptr [rax+50h], 0 jz short loc_F4FF5 mov rax, [rbp+var_220] mov rax, [rax+50h] mov [rbp+var_218], rax mov [rbp+var_231], 1 loc_F4FF5: mov rax, [rbp+var_220] mov rax, [rax+30h] and eax, 3Fh mov [rbp+var_250], rax sub rax, 3 jz short loc_F5021 jmp short $+2 loc_F5012: mov rax, [rbp+var_250] sub rax, 5 jz short loc_F5042 jmp short loc_F5044 loc_F5021: cmp [rbp+var_218], 7FFFFFFFh jle short loc_F5040 mov [rbp+var_218], 7FFFFFFFh mov [rbp+var_231], 1 loc_F5040: jmp short loc_F504A loc_F5042: jmp short loc_F504A loc_F5044: jmp short $+2 loc_F5046: jmp short $+2 loc_F5048: jmp short $+2 loc_F504A: mov rax, [rbp+var_218] xor ecx, ecx mov edx, ecx div [rbp+var_240] mov [rbp+var_218], rax mov rax, [rbp+var_218] imul rax, [rbp+var_240] mov [rbp+var_218], rax mov rax, [rbp+var_218] mov rcx, [rbp+var_220] cmp rax, [rcx+48h] jge short loc_F50BC mov rax, [rbp+var_220] mov rax, [rax+48h] mov [rbp+var_218], rax mov rax, [rbp+var_230] mov rcx, [rbp+var_220] cmp rax, [rcx+48h] jge short loc_F50BA mov [rbp+var_231], 1 loc_F50BA: jmp short $+2 loc_F50BC: cmp [rbp+var_228], 0 jz short loc_F50EC mov rax, [rbp+var_230] cmp rax, [rbp+var_218] setnz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_228] mov [rax], cl jmp loc_F516F loc_F50EC: cmp [rbp+var_231], 0 jz short loc_F516D lea rax, my_getopt_error_reporter mov rax, [rax] mov [rbp+var_258], rax mov rax, [rbp+var_220] mov rax, [rax] mov [rbp+var_268], rax mov rdi, [rbp+var_230] lea rsi, [rbp+var_110] call llstr mov [rbp+var_260], rax mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call llstr mov rdx, [rbp+var_268] mov rcx, [rbp+var_260] mov r9, [rbp+var_258] mov r8, rax mov edi, 1 lea rsi, aOptionSSignedV; "option '%s': signed value %s adjusted t"... mov al, 0 call r9 loc_F516D: jmp short $+2 loc_F516F: jmp short $+2 loc_F5171: mov rax, [rbp+var_218] mov [rbp+var_270], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_F51A1 mov rax, [rbp+var_270] add rsp, 270h pop rbp retn loc_F51A1: call ___stack_chk_fail
long long getopt_ll_limit_value(long long a1, long long a2, bool *a3) { const char *v3; // rax const char *v5; // [rsp+8h] [rbp-268h] const char *v6; // [rsp+10h] [rbp-260h] long long (*v7)(int, long long, ...); // [rsp+18h] [rbp-258h] unsigned long long v8; // [rsp+28h] [rbp-248h] char v9; // [rsp+3Fh] [rbp-231h] long long v10; // [rsp+58h] [rbp-218h] long long v11; // [rsp+58h] [rbp-218h] char v12[256]; // [rsp+60h] [rbp-210h] BYREF char v13[264]; // [rsp+160h] [rbp-110h] BYREF unsigned long long v14; // [rsp+268h] [rbp-8h] v14 = __readfsqword(0x28u); v10 = a1; v9 = 0; if ( *(_QWORD *)(a2 + 96) ) v8 = *(_QWORD *)(a2 + 96); else v8 = 1LL; if ( a1 > 0 && (unsigned long long)a1 > *(_QWORD *)(a2 + 80) && *(_QWORD *)(a2 + 80) ) { v10 = *(_QWORD *)(a2 + 80); v9 = 1; } if ( (*(_QWORD *)(a2 + 48) & 0x3FLL) == 3 && v10 > 0x7FFFFFFF ) { v10 = 0x7FFFFFFFLL; v9 = 1; } v11 = v8 * (v10 / v8); if ( v11 < *(_QWORD *)(a2 + 72) ) { v11 = *(_QWORD *)(a2 + 72); if ( a1 < v11 ) v9 = 1; } if ( a3 ) { *a3 = a1 != v11; } else if ( v9 ) { v7 = my_getopt_error_reporter; v5 = *(const char **)a2; v6 = (const char *)llstr(a1, v13); v3 = (const char *)llstr(v11, v12); v7(1, (long long)"option '%s': signed value %s adjusted to %s", v5, v6, v3); } return v11; }
getopt_ll_limit_value: PUSH RBP MOV RBP,RSP SUB RSP,0x270 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x230],RAX MOV byte ptr [RBP + -0x231],0x0 MOV RAX,qword ptr [RBP + -0x220] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001f4f94 MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x248],RAX JMP 0x001f4fa2 LAB_001f4f94: MOV EAX,0x1 MOV qword ptr [RBP + -0x248],RAX JMP 0x001f4fa2 LAB_001f4fa2: MOV RAX,qword ptr [RBP + -0x248] MOV qword ptr [RBP + -0x240],RAX CMP qword ptr [RBP + -0x218],0x0 JLE 0x001f4ff5 MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x50] JBE 0x001f4ff5 MOV RAX,qword ptr [RBP + -0x220] CMP qword ptr [RAX + 0x50],0x0 JZ 0x001f4ff5 MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x218],RAX MOV byte ptr [RBP + -0x231],0x1 LAB_001f4ff5: MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x30] AND EAX,0x3f MOV qword ptr [RBP + -0x250],RAX SUB RAX,0x3 JZ 0x001f5021 JMP 0x001f5012 LAB_001f5012: MOV RAX,qword ptr [RBP + -0x250] SUB RAX,0x5 JZ 0x001f5042 JMP 0x001f5044 LAB_001f5021: CMP qword ptr [RBP + -0x218],0x7fffffff JLE 0x001f5040 MOV qword ptr [RBP + -0x218],0x7fffffff MOV byte ptr [RBP + -0x231],0x1 LAB_001f5040: JMP 0x001f504a LAB_001f5042: JMP 0x001f504a LAB_001f5044: JMP 0x001f5046 LAB_001f5046: JMP 0x001f5048 LAB_001f5048: JMP 0x001f504a LAB_001f504a: MOV RAX,qword ptr [RBP + -0x218] XOR ECX,ECX MOV EDX,ECX DIV qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x218],RAX MOV RAX,qword ptr [RBP + -0x218] IMUL RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x218],RAX MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x48] JGE 0x001f50bc MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x218],RAX MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x48] JGE 0x001f50ba MOV byte ptr [RBP + -0x231],0x1 LAB_001f50ba: JMP 0x001f50bc LAB_001f50bc: CMP qword ptr [RBP + -0x228],0x0 JZ 0x001f50ec MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x218] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x228] MOV byte ptr [RAX],CL JMP 0x001f516f LAB_001f50ec: CMP byte ptr [RBP + -0x231],0x0 JZ 0x001f516d LEA RAX,[0x3cab50] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x268],RAX MOV RDI,qword ptr [RBP + -0x230] LEA RSI,[RBP + -0x110] CALL 0x00254690 MOV qword ptr [RBP + -0x260],RAX MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x00254690 MOV RDX,qword ptr [RBP + -0x268] MOV RCX,qword ptr [RBP + -0x260] MOV R9,qword ptr [RBP + -0x258] MOV R8,RAX MOV EDI,0x1 LEA RSI,[0x25d6fc] MOV AL,0x0 CALL R9 LAB_001f516d: JMP 0x001f516f LAB_001f516f: JMP 0x001f5171 LAB_001f5171: MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x270],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001f51a1 MOV RAX,qword ptr [RBP + -0x270] ADD RSP,0x270 POP RBP RET LAB_001f51a1: CALL 0x0012a260
ulong getopt_ll_limit_value(ulong param_1,int8 *param_2,long param_3) { int8 uVar1; bool bVar2; int *puVar3; int8 uVar4; int8 uVar5; ulong uVar6; long in_FS_OFFSET; ulong local_250; ulong local_220; int1 local_218 [256]; int1 local_118 [264]; long local_10; puVar3 = my_getopt_error_reporter; local_10 = *(long *)(in_FS_OFFSET + 0x28); bVar2 = false; if (param_2[0xc] == 0) { local_250 = 1; } else { local_250 = param_2[0xc]; } local_220 = param_1; if (((0 < (long)param_1) && ((ulong)param_2[10] < param_1)) && (param_2[10] != 0)) { local_220 = param_2[10]; bVar2 = true; } if ((((uint)param_2[6] & 0x3f) == 3) && (0x7fffffff < (long)local_220)) { local_220 = 0x7fffffff; bVar2 = true; } uVar6 = local_220 % local_250; local_220 = (local_220 / local_250) * local_250; if (((long)local_220 < (long)param_2[9]) && (local_220 = param_2[9], (long)param_1 < (long)param_2[9])) { bVar2 = true; } if (param_3 == 0) { if (bVar2) { uVar1 = *param_2; uVar4 = llstr(param_1,local_118,uVar6); uVar5 = llstr(local_220,local_218); (*(code *)puVar3)(1,"option \'%s\': signed value %s adjusted to %s",uVar1,uVar4,uVar5); } } else { *(bool *)param_3 = param_1 != local_220; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_220; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,134
flush_partitioned_key_cache_blocks
eloqsql/mysys/mf_keycache.c
static int flush_partitioned_key_cache_blocks(PARTITIONED_KEY_CACHE_CB *keycache, File file, void *file_extra, enum flush_type type) { uint i; uint partitions= keycache->partitions; int err= 0; ulonglong *dirty_part_map= (ulonglong *) file_extra; DBUG_ENTER("partitioned_flush_key_blocks"); DBUG_PRINT("enter", ("keycache: %p", keycache)); for (i= 0; i < partitions; i++) { SIMPLE_KEY_CACHE_CB *partition= keycache->partition_array[i]; if ((type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) && !((*dirty_part_map) & ((ulonglong) 1 << i))) continue; err|= MY_TEST(flush_simple_key_cache_blocks(partition, file, 0, type)); } *dirty_part_map= 0; DBUG_RETURN(err); }
O0
c
flush_partitioned_key_cache_blocks: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x24(%rbp) movl $0x0, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xeff71 movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0xefff2 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movl -0x20(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x38(%rbp) cmpl $0x0, -0x1c(%rbp) je 0xeff9f cmpl $0x3, -0x1c(%rbp) jne 0xeffbf movq -0x30(%rbp), %rax movq (%rax), %rax movl -0x20(%rbp), %ecx movl $0x1, %edx shlq %cl, %rdx movq %rdx, %rcx andq %rcx, %rax cmpq $0x0, %rax jne 0xeffbf jmp 0xeffe7 movq -0x38(%rbp), %rdi movl -0xc(%rbp), %esi movl -0x1c(%rbp), %ecx xorl %eax, %eax movl %eax, %edx callq 0xee530 movl %eax, %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax orl -0x28(%rbp), %eax movl %eax, -0x28(%rbp) movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0xeff78 movq -0x30(%rbp), %rax movq $0x0, (%rax) movl -0x28(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
flush_partitioned_key_cache_blocks: 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_1C], ecx mov rax, [rbp+var_8] mov eax, [rax+1Ch] mov [rbp+var_24], eax mov [rbp+var_28], 0 mov rax, [rbp+var_18] mov [rbp+var_30], rax jmp short $+2 loc_EFF71: mov [rbp+var_20], 0 loc_EFF78: mov eax, [rbp+var_20] cmp eax, [rbp+var_24] jnb short loc_EFFF2 mov rax, [rbp+var_8] mov rax, [rax+8] mov ecx, [rbp+var_20] mov rax, [rax+rcx*8] mov [rbp+var_38], rax cmp [rbp+var_1C], 0 jz short loc_EFF9F cmp [rbp+var_1C], 3 jnz short loc_EFFBF loc_EFF9F: mov rax, [rbp+var_30] mov rax, [rax] mov ecx, [rbp+var_20] mov edx, 1 shl rdx, cl mov rcx, rdx and rax, rcx cmp rax, 0 jnz short loc_EFFBF jmp short loc_EFFE7 loc_EFFBF: mov rdi, [rbp+var_38] mov esi, [rbp+var_C] mov ecx, [rbp+var_1C] xor eax, eax mov edx, eax call flush_simple_key_cache_blocks mov edx, eax xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx or eax, [rbp+var_28] mov [rbp+var_28], eax loc_EFFE7: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp short loc_EFF78 loc_EFFF2: mov rax, [rbp+var_30] mov qword ptr [rax], 0 mov eax, [rbp+var_28] mov [rbp+var_3C], eax mov eax, [rbp+var_3C] add rsp, 40h pop rbp retn
long long flush_partitioned_key_cache_blocks(long long a1, unsigned int a2, _QWORD *a3, unsigned int a4) { unsigned int v6; // [rsp+18h] [rbp-28h] unsigned int v7; // [rsp+1Ch] [rbp-24h] unsigned int i; // [rsp+20h] [rbp-20h] v7 = *(_DWORD *)(a1 + 28); v6 = 0; for ( i = 0; i < v7; ++i ) { if ( a4 && a4 != 3 || ((1LL << i) & *a3) != 0 ) v6 |= (unsigned int)flush_simple_key_cache_blocks(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i), a2, 0LL, a4) != 0; } *a3 = 0LL; return v6; }
flush_partitioned_key_cache_blocks: 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 dword ptr [RBP + -0x1c],ECX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x24],EAX MOV dword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX JMP 0x001eff71 LAB_001eff71: MOV dword ptr [RBP + -0x20],0x0 LAB_001eff78: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x24] JNC 0x001efff2 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x38],RAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x001eff9f CMP dword ptr [RBP + -0x1c],0x3 JNZ 0x001effbf LAB_001eff9f: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] MOV EDX,0x1 SHL RDX,CL MOV RCX,RDX AND RAX,RCX CMP RAX,0x0 JNZ 0x001effbf JMP 0x001effe7 LAB_001effbf: MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0xc] MOV ECX,dword ptr [RBP + -0x1c] XOR EAX,EAX MOV EDX,EAX CALL 0x001ee530 MOV EDX,EAX XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX OR EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x28],EAX LAB_001effe7: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x001eff78 LAB_001efff2: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],0x0 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD RSP,0x40 POP RBP RET
byte flush_partitioned_key_cache_blocks(long param_1,int4 param_2,ulong *param_3,int param_4) { uint uVar1; byte bVar2; int iVar3; uint local_28; uVar1 = *(uint *)(param_1 + 0x1c); bVar2 = 0; for (local_28 = 0; local_28 < uVar1; local_28 = local_28 + 1) { if (((param_4 != 0) && (param_4 != 3)) || ((*param_3 & 1L << ((byte)local_28 & 0x3f)) != 0)) { iVar3 = flush_simple_key_cache_blocks (*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_28 * 8),param_2,0, param_4); bVar2 = iVar3 != 0 | bVar2; } } *param_3 = 0; return bVar2; }
39,135
stbi__pnm_load(stbi__context*, int*, int*, int*, int, stbi__result_info*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { stbi_uc *out; STBI_NOTUSED(ri); ri->bits_per_channel = stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n); if (ri->bits_per_channel == 0) return 0; if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); *x = s->img_x; *y = s->img_y; if (comp) *comp = s->img_n; if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0)) return stbi__errpuc("too large", "PNM too large"); out = (stbi_uc *) stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); if (!out) return stbi__errpuc("outofmem", "Out of memory"); if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) { STBI_FREE(out); return stbi__errpuc("bad PNM", "PNM file truncated"); } if (req_comp && req_comp != s->img_n) { if (ri->bits_per_channel == 16) { out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, s->img_n, req_comp, s->img_x, s->img_y); } else { out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); } if (out == NULL) return out; // stbi__convert_format frees input on failure } return out; }
O1
c
stbi__pnm_load(stbi__context*, int*, int*, int*, int, stbi__result_info*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, %r12 movl %r8d, 0x4(%rsp) movq %rcx, %rbx movq %rdx, %r13 movq %rsi, %rbp movq %rdi, %r15 leaq 0x4(%rdi), %r14 leaq 0x8(%rdi), %rcx movq %rdi, %rsi movq %r14, %rdx movq %rcx, 0x8(%rsp) callq 0x43370 movl %eax, (%r12) testl %eax, %eax je 0x3b60e cmpl $0x1000001, (%r14) # imm = 0x1000001 jae 0x3b5f4 movl (%r15), %eax cmpl $0x1000001, %eax # imm = 0x1000001 jae 0x3b5f4 movq %r12, %rcx movl %eax, (%rbp) movl (%r14), %eax movl %eax, (%r13) testq %rbx, %rbx je 0x3b54d movq 0x8(%rsp), %rax movl (%rax), %eax movl %eax, (%rbx) movl 0x8(%r15), %r12d movl (%r15), %ebp movl 0x4(%r15), %r13d movq %rcx, %r14 movl (%rcx), %eax leal 0x7(%rax), %ebx testl %eax, %eax cmovnsl %eax, %ebx sarl $0x3, %ebx movl %r12d, %edi movl %ebp, %esi movl %r13d, %edx movl %ebx, %ecx callq 0x43556 testl %eax, %eax je 0x3b5f4 movq %r14, 0x10(%rsp) movl %r12d, %edi movl %ebp, %esi movl %r13d, %r14d movl %r13d, %edx movl %ebx, %ecx callq 0x435ca testq %rax, %rax je 0x3b623 movq %rax, %r13 imull %r12d, %ebp imull %r14d, %ebp imull %ebx, %ebp movq %r15, %rdi movq %rax, %rsi movl %ebp, %edx callq 0x3e4c9 testl %eax, %eax je 0x3b638 movl 0x4(%rsp), %edx testl %edx, %edx je 0x3b611 movq 0x8(%rsp), %rax movl (%rax), %esi cmpl %edx, %esi je 0x3b611 movq 0x10(%rsp), %rax cmpl $0x10, (%rax) movl (%r15), %ecx movl 0x4(%r15), %r8d movq %r13, %rdi jne 0x3b655 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3df83 movq %fs:0x0, %rax leaq 0xd2edd(%rip), %rcx # 0x10e4e4 movq %rcx, -0x20(%rax) xorl %r13d, %r13d movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %fs:0x0, %rax leaq 0xd2f8d(%rip), %rcx # 0x10e5c3 jmp 0x3b607 movq %r13, %rdi callq 0x1de70 movq %fs:0x0, %rax leaq 0xd3298(%rip), %rcx # 0x10e8eb jmp 0x3b607 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3db48
_ZL14stbi__pnm_loadP13stbi__contextPiS1_S1_iP17stbi__result_info: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, r9 mov [rsp+48h+var_44], r8d mov rbx, rcx mov r13, rdx mov rbp, rsi mov r15, rdi lea r14, [rdi+4] lea rcx, [rdi+8] mov rsi, rdi mov rdx, r14 mov [rsp+48h+var_40], rcx call _ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_; stbi__pnm_info(stbi__context *,int *,int *,int *) mov [r12], eax test eax, eax jz loc_3B60E cmp dword ptr [r14], 1000001h jnb loc_3B5F4 mov eax, [r15] cmp eax, 1000001h jnb loc_3B5F4 mov rcx, r12 mov [rbp+0], eax mov eax, [r14] mov [r13+0], eax test rbx, rbx jz short loc_3B54D mov rax, [rsp+48h+var_40] mov eax, [rax] mov [rbx], eax loc_3B54D: mov r12d, [r15+8] mov ebp, [r15] mov r13d, [r15+4] mov r14, rcx mov eax, [rcx] lea ebx, [rax+7] test eax, eax cmovns ebx, eax sar ebx, 3 mov edi, r12d; int mov esi, ebp; int mov edx, r13d; int mov ecx, ebx; int call _ZL21stbi__mad4sizes_validiiiii; stbi__mad4sizes_valid(int,int,int,int,int) test eax, eax jz short loc_3B5F4 mov [rsp+48h+var_38], r14 mov edi, r12d; int mov esi, ebp; int mov r14d, r13d mov edx, r13d; int mov ecx, ebx; int call _ZL17stbi__malloc_mad4iiiii; stbi__malloc_mad4(int,int,int,int,int) test rax, rax jz loc_3B623 mov r13, rax imul ebp, r12d imul ebp, r14d imul ebp, ebx mov rdi, r15 mov rsi, rax mov edx, ebp call _ZL10stbi__getnP13stbi__contextPhi; stbi__getn(stbi__context *,uchar *,int) test eax, eax jz short loc_3B638 mov edx, [rsp+48h+var_44]; int test edx, edx jz short loc_3B611 mov rax, [rsp+48h+var_40] mov esi, [rax]; int cmp esi, edx jz short loc_3B611 mov rax, [rsp+48h+var_38] cmp dword ptr [rax], 10h mov ecx, [r15]; unsigned int mov r8d, [r15+4]; unsigned int mov rdi, r13; unsigned __int8 * jnz short loc_3B655 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZL22stbi__convert_format16Ptiijj; stbi__convert_format16(ushort *,int,int,uint,uint) loc_3B5F4: mov rax, fs:0 lea rcx, aTooLarge; "too large" loc_3B607: mov [rax-20h], rcx loc_3B60E: xor r13d, r13d loc_3B611: mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3B623: mov rax, fs:0 lea rcx, aOutofmem; "outofmem" jmp short loc_3B607 loc_3B638: mov rdi, r13 call _free mov rax, fs:0 lea rcx, aBadPnm; "bad PNM" jmp short loc_3B607 loc_3B655: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZL20stbi__convert_formatPhiijj; stbi__convert_format(uchar *,int,int,uint,uint)
long long stbi__pnm_load(int *a1, int *a2, _DWORD *a3, int *a4, int a5, int *a6) { _DWORD *v9; // r14 int v10; // eax int v11; // r8d int *v12; // rcx int v13; // r12d int v14; // ebp int v15; // r13d int *v16; // r14 int v17; // ebx int v18; // ebx int v19; // r8d int v20; // r14d long long v21; // rax unsigned __int16 *v22; // r13 int v23; // esi unsigned int v24; // ecx unsigned int v25; // r8d unsigned long long v27; // rax const char *v28; // rcx int *v30; // [rsp+8h] [rbp-40h] int *v31; // [rsp+10h] [rbp-38h] v9 = a1 + 1; v30 = a1 + 2; v10 = stbi__pnm_info(a1, a1, a1 + 1, a1 + 2); *a6 = v10; if ( !v10 ) return 0LL; if ( *v9 >= 0x1000001u || (unsigned int)*a1 >= 0x1000001 ) goto LABEL_15; v12 = a6; *a2 = *a1; *a3 = *v9; if ( a4 ) *a4 = *v30; v13 = a1[2]; v14 = *a1; v15 = a1[1]; v16 = v12; v17 = *v12 + 7; if ( *v12 >= 0 ) v17 = *v12; v18 = v17 >> 3; if ( !(unsigned int)stbi__mad4sizes_valid(v13, v14, v15, v18, v11) ) { LABEL_15: v27 = __readfsqword(0); v28 = "too large"; LABEL_16: *(_QWORD *)(v27 - 32) = v28; return 0LL; } v31 = v16; v20 = v15; v21 = stbi__malloc_mad4(v13, v14, v15, v18, v19); if ( !v21 ) { v27 = __readfsqword(0); v28 = "outofmem"; goto LABEL_16; } v22 = (unsigned __int16 *)v21; if ( !(unsigned int)stbi__getn(a1, v21, (unsigned int)(v18 * v20 * v13 * v14)) ) { free(v22); v27 = __readfsqword(0); v28 = "bad PNM"; goto LABEL_16; } if ( !a5 ) return (long long)v22; v23 = *v30; if ( *v30 == a5 ) return (long long)v22; v24 = *a1; v25 = a1[1]; if ( *v31 == 16 ) return stbi__convert_format16(v22, v23, a5, v24, v25); else return stbi__convert_format((unsigned __int8 *)v22, v23, a5, v24, v25); }
stbi__pnm_load: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,R9 MOV dword ptr [RSP + 0x4],R8D MOV RBX,RCX MOV R13,RDX MOV RBP,RSI MOV R15,RDI LEA R14,[RDI + 0x4] LEA RCX,[RDI + 0x8] MOV RSI,RDI MOV RDX,R14 MOV qword ptr [RSP + 0x8],RCX CALL 0x00143370 MOV dword ptr [R12],EAX TEST EAX,EAX JZ 0x0013b60e CMP dword ptr [R14],0x1000001 JNC 0x0013b5f4 MOV EAX,dword ptr [R15] CMP EAX,0x1000001 JNC 0x0013b5f4 MOV RCX,R12 MOV dword ptr [RBP],EAX MOV EAX,dword ptr [R14] MOV dword ptr [R13],EAX TEST RBX,RBX JZ 0x0013b54d MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBX],EAX LAB_0013b54d: MOV R12D,dword ptr [R15 + 0x8] MOV EBP,dword ptr [R15] MOV R13D,dword ptr [R15 + 0x4] MOV R14,RCX MOV EAX,dword ptr [RCX] LEA EBX,[RAX + 0x7] TEST EAX,EAX CMOVNS EBX,EAX SAR EBX,0x3 MOV EDI,R12D MOV ESI,EBP MOV EDX,R13D MOV ECX,EBX CALL 0x00143556 TEST EAX,EAX JZ 0x0013b5f4 MOV qword ptr [RSP + 0x10],R14 MOV EDI,R12D MOV ESI,EBP MOV R14D,R13D MOV EDX,R13D MOV ECX,EBX CALL 0x001435ca TEST RAX,RAX JZ 0x0013b623 MOV R13,RAX IMUL EBP,R12D IMUL EBP,R14D IMUL EBP,EBX MOV RDI,R15 MOV RSI,RAX MOV EDX,EBP CALL 0x0013e4c9 TEST EAX,EAX JZ 0x0013b638 MOV EDX,dword ptr [RSP + 0x4] TEST EDX,EDX JZ 0x0013b611 MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX] CMP ESI,EDX JZ 0x0013b611 MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX],0x10 MOV ECX,dword ptr [R15] MOV R8D,dword ptr [R15 + 0x4] MOV RDI,R13 JNZ 0x0013b655 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013df83 LAB_0013b5f4: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20e4e4] LAB_0013b607: MOV qword ptr [RAX + -0x20],RCX LAB_0013b60e: XOR R13D,R13D LAB_0013b611: MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013b623: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20e5c3] JMP 0x0013b607 LAB_0013b638: MOV RDI,R13 CALL 0x0011de70 MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20e8eb] JMP 0x0013b607 LAB_0013b655: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013db48
/* stbi__pnm_load(stbi__context*, int*, int*, int*, int, stbi__result_info*) */ ushort * stbi__pnm_load(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5, stbi__result_info *param_6) { stbi__context *psVar1; stbi__context *psVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; ushort *puVar8; long lVar9; char *pcVar10; int iVar11; long *in_FS_OFFSET; psVar1 = param_1 + 4; psVar2 = param_1 + 8; iVar7 = param_5; iVar5 = stbi__pnm_info(param_1,(int *)param_1,(int *)psVar1,(int *)psVar2); *(int *)param_6 = iVar5; if (iVar5 == 0) { return (ushort *)0x0; } if ((*(uint *)psVar1 < 0x1000001) && (*(uint *)param_1 < 0x1000001)) { *param_2 = *(uint *)param_1; *param_3 = *(uint *)psVar1; if (param_4 != (int *)0x0) { *param_4 = *(int *)psVar2; } iVar5 = *(int *)(param_1 + 8); iVar3 = *(int *)param_1; iVar4 = *(int *)(param_1 + 4); iVar6 = *(int *)param_6; iVar11 = iVar6 + 7; if (-1 < iVar6) { iVar11 = iVar6; } iVar11 = iVar11 >> 3; iVar6 = stbi__mad4sizes_valid(iVar5,iVar3,iVar4,iVar11,iVar7); if (iVar6 != 0) { puVar8 = (ushort *)stbi__malloc_mad4(iVar5,iVar3,iVar4,iVar11,iVar7); if (puVar8 == (ushort *)0x0) { lVar9 = *in_FS_OFFSET; pcVar10 = "outofmem"; } else { iVar7 = stbi__getn(param_1,(uchar *)puVar8,iVar3 * iVar5 * iVar4 * iVar11); if (iVar7 != 0) { if (param_5 == 0) { return puVar8; } iVar7 = *(int *)psVar2; if (iVar7 != param_5) { if (*(int *)param_6 == 0x10) { puVar8 = (ushort *) stbi__convert_format16 (puVar8,iVar7,param_5,*(uint *)param_1,*(uint *)(param_1 + 4)); return puVar8; } puVar8 = (ushort *) stbi__convert_format ((uchar *)puVar8,iVar7,param_5,*(uint *)param_1, *(uint *)(param_1 + 4)); return puVar8; } return puVar8; } free(puVar8); lVar9 = *in_FS_OFFSET; pcVar10 = "bad PNM"; } goto LAB_0013b607; } } lVar9 = *in_FS_OFFSET; pcVar10 = "too large"; LAB_0013b607: *(char **)(lVar9 + -0x20) = pcVar10; return (ushort *)0x0; }
39,136
stbi__pnm_load(stbi__context*, int*, int*, int*, int, stbi__result_info*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { stbi_uc *out; STBI_NOTUSED(ri); ri->bits_per_channel = stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n); if (ri->bits_per_channel == 0) return 0; if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); *x = s->img_x; *y = s->img_y; if (comp) *comp = s->img_n; if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0)) return stbi__errpuc("too large", "PNM too large"); out = (stbi_uc *) stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); if (!out) return stbi__errpuc("outofmem", "Out of memory"); if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) { STBI_FREE(out); return stbi__errpuc("bad PNM", "PNM file truncated"); } if (req_comp && req_comp != s->img_n) { if (ri->bits_per_channel == 16) { out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, s->img_n, req_comp, s->img_x, s->img_y); } else { out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); } if (out == NULL) return out; // stbi__convert_format frees input on failure } return out; }
O3
c
stbi__pnm_load(stbi__context*, int*, int*, int*, int, stbi__result_info*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, %r12 movl %r8d, 0xc(%rsp) movq %rcx, (%rsp) movq %rdx, %rbp movq %rsi, %r14 movq %rdi, %r15 leaq 0x4(%rdi), %r13 leaq 0x8(%rdi), %rcx movq %rdi, %rsi movq %r13, %rdx movq %rcx, %rbx callq 0x42976 movl %eax, (%r12) testl %eax, %eax je 0x3b21d cmpl $0x1000001, (%r13) # imm = 0x1000001 jae 0x3b203 movl (%r15), %eax cmpl $0x1000001, %eax # imm = 0x1000001 jae 0x3b203 movq %r12, %rcx movl %eax, (%r14) movl (%r13), %edx movl %edx, (%rbp) movq %rbx, 0x10(%rsp) movl (%rbx), %edi movq (%rsp), %rax testq %rax, %rax je 0x3b169 movl %edi, (%rax) movl (%r13), %edx movl (%r15), %ebx movq %rcx, %r13 movl (%rcx), %eax leal 0x7(%rax), %ebp testl %eax, %eax cmovnsl %eax, %ebp sarl $0x3, %ebp movl %edi, %r14d movl %ebx, %esi movl %edx, %r12d movl %ebp, %ecx callq 0x42b49 testl %eax, %eax je 0x3b203 movq %r13, (%rsp) movl %r14d, %edi movl %ebx, %esi movl %r12d, %edx movl %ebp, %ecx callq 0x42bb9 testq %rax, %rax je 0x3b232 movq %rax, %r13 imull %r14d, %ebx imull %r12d, %ebx imull %ebp, %ebx movq %r15, %rdi movq %rax, %rsi movl %ebx, %edx callq 0x3de87 testl %eax, %eax je 0x3b247 movl 0xc(%rsp), %edx testl %edx, %edx je 0x3b220 movq 0x10(%rsp), %rax movl (%rax), %esi cmpl %edx, %esi je 0x3b220 movq (%rsp), %rax cmpl $0x10, (%rax) movl (%r15), %ecx movl 0x4(%r15), %r8d movq %r13, %rdi jne 0x3b264 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3d954 movq %fs:0x0, %rax leaq 0xd02de(%rip), %rcx # 0x10b4f4 movq %rcx, -0x20(%rax) xorl %r13d, %r13d movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %fs:0x0, %rax leaq 0xd038e(%rip), %rcx # 0x10b5d3 jmp 0x3b216 movq %r13, %rdi callq 0x1de80 movq %fs:0x0, %rax leaq 0xd0699(%rip), %rcx # 0x10b8fb jmp 0x3b216 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3d523
_ZL14stbi__pnm_loadP13stbi__contextPiS1_S1_iP17stbi__result_info: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, r9 mov [rsp+48h+var_3C], r8d mov [rsp+48h+var_48], rcx mov rbp, rdx mov r14, rsi mov r15, rdi lea r13, [rdi+4] lea rcx, [rdi+8] mov rsi, rdi mov rdx, r13 mov rbx, rcx call _ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_; stbi__pnm_info(stbi__context *,int *,int *,int *) mov [r12], eax test eax, eax jz loc_3B21D cmp dword ptr [r13+0], 1000001h jnb loc_3B203 mov eax, [r15] cmp eax, 1000001h jnb loc_3B203 mov rcx, r12 mov [r14], eax mov edx, [r13+0] mov [rbp+0], edx mov [rsp+48h+var_38], rbx mov edi, [rbx]; int mov rax, [rsp+48h+var_48] test rax, rax jz short loc_3B169 mov [rax], edi mov edx, [r13+0]; int loc_3B169: mov ebx, [r15] mov r13, rcx mov eax, [rcx] lea ebp, [rax+7] test eax, eax cmovns ebp, eax sar ebp, 3 mov r14d, edi mov esi, ebx; int mov r12d, edx mov ecx, ebp; int call _ZL21stbi__mad4sizes_validiiiii; stbi__mad4sizes_valid(int,int,int,int,int) test eax, eax jz short loc_3B203 mov [rsp+48h+var_48], r13 mov edi, r14d; int mov esi, ebx; int mov edx, r12d; int mov ecx, ebp; int call _ZL17stbi__malloc_mad4iiiii; stbi__malloc_mad4(int,int,int,int,int) test rax, rax jz loc_3B232 mov r13, rax imul ebx, r14d imul ebx, r12d imul ebx, ebp mov rdi, r15 mov rsi, rax mov edx, ebx call _ZL10stbi__getnP13stbi__contextPhi; stbi__getn(stbi__context *,uchar *,int) test eax, eax jz short loc_3B247 mov edx, [rsp+48h+var_3C]; int test edx, edx jz short loc_3B220 mov rax, [rsp+48h+var_38] mov esi, [rax]; int cmp esi, edx jz short loc_3B220 mov rax, [rsp+48h+var_48] cmp dword ptr [rax], 10h mov ecx, [r15]; unsigned int mov r8d, [r15+4]; unsigned int mov rdi, r13; unsigned __int8 * jnz short loc_3B264 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZL22stbi__convert_format16Ptiijj; stbi__convert_format16(ushort *,int,int,uint,uint) loc_3B203: mov rax, fs:0 lea rcx, aTooLarge; "too large" loc_3B216: mov [rax-20h], rcx loc_3B21D: xor r13d, r13d loc_3B220: mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3B232: mov rax, fs:0 lea rcx, aOutofmem; "outofmem" jmp short loc_3B216 loc_3B247: mov rdi, r13 call _free mov rax, fs:0 lea rcx, aBadPnm; "bad PNM" jmp short loc_3B216 loc_3B264: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZL20stbi__convert_formatPhiijj; stbi__convert_format(uchar *,int,int,uint,uint)
long long stbi__pnm_load(int *a1, int *a2, int *a3, int *a4, int a5, int *a6) { int *v9; // r13 int v10; // eax int v11; // r8d int v12; // edx int v13; // edi int v14; // ebx int *v15; // r13 int v16; // ebp int v17; // ebp int v18; // r12d int v19; // r8d long long v20; // rax unsigned __int16 *v21; // r13 int v22; // esi unsigned int v23; // ecx unsigned int v24; // r8d unsigned long long v26; // rax const char *v27; // rcx int *v29; // [rsp+0h] [rbp-48h] int *v31; // [rsp+10h] [rbp-38h] v9 = a1 + 1; v10 = stbi__pnm_info(a1, a1, a1 + 1, a1 + 2); *a6 = v10; if ( !v10 ) return 0LL; if ( (unsigned int)*v9 >= 0x1000001 || (unsigned int)*a1 >= 0x1000001 ) goto LABEL_15; *a2 = *a1; v12 = *v9; *a3 = *v9; v31 = a1 + 2; v13 = a1[2]; if ( a4 ) { *a4 = v13; v12 = *v9; } v14 = *a1; v15 = a6; v16 = *a6 + 7; if ( *a6 >= 0 ) v16 = *a6; v17 = v16 >> 3; v18 = v12; if ( !(unsigned int)stbi__mad4sizes_valid(v13, v14, v12, v17, v11) ) { LABEL_15: v26 = __readfsqword(0); v27 = "too large"; LABEL_16: *(_QWORD *)(v26 - 32) = v27; return 0LL; } v29 = v15; v20 = stbi__malloc_mad4(v13, v14, v18, v17, v19); if ( !v20 ) { v26 = __readfsqword(0); v27 = "outofmem"; goto LABEL_16; } v21 = (unsigned __int16 *)v20; if ( !(unsigned int)stbi__getn(a1, v20, (unsigned int)(v17 * v18 * v13 * v14)) ) { free(v21); v26 = __readfsqword(0); v27 = "bad PNM"; goto LABEL_16; } if ( !a5 ) return (long long)v21; v22 = *v31; if ( *v31 == a5 ) return (long long)v21; v23 = *a1; v24 = a1[1]; if ( *v29 == 16 ) return stbi__convert_format16(v21, v22, a5, v23, v24); else return stbi__convert_format((unsigned __int8 *)v21, v22, a5, v23, v24); }
stbi__pnm_load: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,R9 MOV dword ptr [RSP + 0xc],R8D MOV qword ptr [RSP],RCX MOV RBP,RDX MOV R14,RSI MOV R15,RDI LEA R13,[RDI + 0x4] LEA RCX,[RDI + 0x8] MOV RSI,RDI MOV RDX,R13 MOV RBX,RCX CALL 0x00142976 MOV dword ptr [R12],EAX TEST EAX,EAX JZ 0x0013b21d CMP dword ptr [R13],0x1000001 JNC 0x0013b203 MOV EAX,dword ptr [R15] CMP EAX,0x1000001 JNC 0x0013b203 MOV RCX,R12 MOV dword ptr [R14],EAX MOV EDX,dword ptr [R13] MOV dword ptr [RBP],EDX MOV qword ptr [RSP + 0x10],RBX MOV EDI,dword ptr [RBX] MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x0013b169 MOV dword ptr [RAX],EDI MOV EDX,dword ptr [R13] LAB_0013b169: MOV EBX,dword ptr [R15] MOV R13,RCX MOV EAX,dword ptr [RCX] LEA EBP,[RAX + 0x7] TEST EAX,EAX CMOVNS EBP,EAX SAR EBP,0x3 MOV R14D,EDI MOV ESI,EBX MOV R12D,EDX MOV ECX,EBP CALL 0x00142b49 TEST EAX,EAX JZ 0x0013b203 MOV qword ptr [RSP],R13 MOV EDI,R14D MOV ESI,EBX MOV EDX,R12D MOV ECX,EBP CALL 0x00142bb9 TEST RAX,RAX JZ 0x0013b232 MOV R13,RAX IMUL EBX,R14D IMUL EBX,R12D IMUL EBX,EBP MOV RDI,R15 MOV RSI,RAX MOV EDX,EBX CALL 0x0013de87 TEST EAX,EAX JZ 0x0013b247 MOV EDX,dword ptr [RSP + 0xc] TEST EDX,EDX JZ 0x0013b220 MOV RAX,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RAX] CMP ESI,EDX JZ 0x0013b220 MOV RAX,qword ptr [RSP] CMP dword ptr [RAX],0x10 MOV ECX,dword ptr [R15] MOV R8D,dword ptr [R15 + 0x4] MOV RDI,R13 JNZ 0x0013b264 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013d954 LAB_0013b203: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20b4f4] LAB_0013b216: MOV qword ptr [RAX + -0x20],RCX LAB_0013b21d: XOR R13D,R13D LAB_0013b220: MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013b232: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20b5d3] JMP 0x0013b216 LAB_0013b247: MOV RDI,R13 CALL 0x0011de80 MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20b8fb] JMP 0x0013b216 LAB_0013b264: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013d523
/* stbi__pnm_load(stbi__context*, int*, int*, int*, int, stbi__result_info*) */ ushort * stbi__pnm_load(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5, stbi__result_info *param_6) { stbi__context *psVar1; stbi__context *psVar2; int iVar3; int iVar4; int iVar5; int iVar6; ushort *puVar7; long lVar8; char *pcVar9; uint uVar10; int iVar11; long *in_FS_OFFSET; psVar1 = param_1 + 4; psVar2 = param_1 + 8; iVar6 = param_5; iVar4 = stbi__pnm_info(param_1,(int *)param_1,(int *)psVar1,(int *)psVar2); *(int *)param_6 = iVar4; if (iVar4 == 0) { return (ushort *)0x0; } if ((*(uint *)psVar1 < 0x1000001) && (*(uint *)param_1 < 0x1000001)) { *param_2 = *(uint *)param_1; uVar10 = *(uint *)psVar1; *param_3 = uVar10; iVar4 = *(int *)psVar2; if (param_4 != (int *)0x0) { *param_4 = iVar4; uVar10 = *(uint *)psVar1; } iVar3 = *(int *)param_1; iVar5 = *(int *)param_6; iVar11 = iVar5 + 7; if (-1 < iVar5) { iVar11 = iVar5; } iVar11 = iVar11 >> 3; iVar5 = stbi__mad4sizes_valid(iVar4,iVar3,uVar10,iVar11,iVar6); if (iVar5 != 0) { puVar7 = (ushort *)stbi__malloc_mad4(iVar4,iVar3,uVar10,iVar11,iVar6); if (puVar7 == (ushort *)0x0) { lVar8 = *in_FS_OFFSET; pcVar9 = "outofmem"; } else { iVar6 = stbi__getn(param_1,(uchar *)puVar7,iVar3 * iVar4 * uVar10 * iVar11); if (iVar6 != 0) { if (param_5 == 0) { return puVar7; } iVar6 = *(int *)psVar2; if (iVar6 != param_5) { if (*(int *)param_6 == 0x10) { puVar7 = (ushort *) stbi__convert_format16 (puVar7,iVar6,param_5,*(uint *)param_1,*(uint *)(param_1 + 4)); return puVar7; } puVar7 = (ushort *) stbi__convert_format ((uchar *)puVar7,iVar6,param_5,*(uint *)param_1, *(uint *)(param_1 + 4)); return puVar7; } return puVar7; } free(puVar7); lVar8 = *in_FS_OFFSET; pcVar9 = "bad PNM"; } goto LAB_0013b216; } } lVar8 = *in_FS_OFFSET; pcVar9 = "too large"; LAB_0013b216: *(char **)(lVar8 + -0x20) = pcVar9; return (ushort *)0x0; }
39,137
fmt::v10::detail::utf8_decode(char const*, unsigned int*, int*)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR inline auto utf8_decode(const char* s, uint32_t* c, int* e) -> const char* { constexpr const int masks[] = {0x00, 0x7f, 0x1f, 0x0f, 0x07}; constexpr const uint32_t mins[] = {4194304, 0, 128, 2048, 65536}; constexpr const int shiftc[] = {0, 18, 12, 6, 0}; constexpr const int shifte[] = {0, 6, 4, 2, 0}; int len = "\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\0\0\0\0\0\0\0\0\2\2\2\2\3\3\4" [static_cast<unsigned char>(*s) >> 3]; // Compute the pointer to the next character early so that the next // iteration can start working on the next character. Neither Clang // nor GCC figure out this reordering on their own. const char* next = s + len + !len; using uchar = unsigned char; // Assume a four-byte character and load four bytes. Unused bits are // shifted out. *c = uint32_t(uchar(s[0]) & masks[len]) << 18; *c |= uint32_t(uchar(s[1]) & 0x3f) << 12; *c |= uint32_t(uchar(s[2]) & 0x3f) << 6; *c |= uint32_t(uchar(s[3]) & 0x3f) << 0; *c >>= shiftc[len]; // Accumulate the various error conditions. *e = (*c < mins[len]) << 6; // non-canonical encoding *e |= ((*c >> 11) == 0x1b) << 7; // surrogate half? *e |= (*c > 0x10FFFF) << 8; // out of range? *e |= (uchar(s[1]) & 0xc0) >> 2; *e |= (uchar(s[2]) & 0xc0) >> 4; *e |= uchar(s[3]) >> 6; *e ^= 0x2a; // top two bits of each tail byte correct? *e >>= shifte[len]; return next; }
O0
c
fmt::v10::detail::utf8_decode(char const*, unsigned int*, int*): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq 0x85786(%rip), %rax # 0x11a680 movq %rax, -0x10(%rsp) movq 0x85782(%rip), %rax # 0x11a688 movq %rax, -0x8(%rsp) movl 0x8577f(%rip), %eax # 0x11a690 movl %eax, (%rsp) movq 0x85785(%rip), %rax # 0x11a6a0 movq %rax, -0x30(%rsp) movq 0x85781(%rip), %rax # 0x11a6a8 movq %rax, -0x28(%rsp) movl 0x8577e(%rip), %eax # 0x11a6b0 movl %eax, -0x20(%rsp) movq 0x85783(%rip), %rax # 0x11a6c0 movq %rax, -0x50(%rsp) movq 0x8577f(%rip), %rax # 0x11a6c8 movq %rax, -0x48(%rsp) movl 0x8577c(%rip), %eax # 0x11a6d0 movl %eax, -0x40(%rsp) movq 0x85781(%rip), %rax # 0x11a6e0 movq %rax, -0x70(%rsp) movq 0x8577d(%rip), %rax # 0x11a6e8 movq %rax, -0x68(%rsp) movl 0x8577a(%rip), %eax # 0x11a6f0 movl %eax, -0x60(%rsp) movq 0x20(%rsp), %rax movzbl (%rax), %eax sarl $0x3, %eax movslq %eax, %rcx leaq 0x85a77(%rip), %rax # 0x11aa06 movsbl (%rax,%rcx), %eax movl %eax, -0x74(%rsp) movq 0x20(%rsp), %rax movslq -0x74(%rsp), %rcx addq %rcx, %rax cmpl $0x0, -0x74(%rsp) setne %cl xorb $-0x1, %cl andb $0x1, %cl movzbl %cl, %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x80(%rsp) movq 0x20(%rsp), %rax movzbl (%rax), %ecx movslq -0x74(%rsp), %rax andl -0x10(%rsp,%rax,4), %ecx shll $0x12, %ecx movq 0x18(%rsp), %rax movl %ecx, (%rax) movq 0x20(%rsp), %rax movzbl 0x1(%rax), %ecx andl $0x3f, %ecx shll $0xc, %ecx movq 0x18(%rsp), %rax orl (%rax), %ecx movl %ecx, (%rax) movq 0x20(%rsp), %rax movzbl 0x2(%rax), %ecx andl $0x3f, %ecx shll $0x6, %ecx movq 0x18(%rsp), %rax orl (%rax), %ecx movl %ecx, (%rax) movq 0x20(%rsp), %rax movzbl 0x3(%rax), %ecx andl $0x3f, %ecx shll $0x0, %ecx movq 0x18(%rsp), %rax orl (%rax), %ecx movl %ecx, (%rax) movslq -0x74(%rsp), %rax movl -0x50(%rsp,%rax,4), %ecx movq 0x18(%rsp), %rax movl (%rax), %edx shrl %cl, %edx movl %edx, %ecx movl %ecx, (%rax) movq 0x18(%rsp), %rax movl (%rax), %eax movslq -0x74(%rsp), %rcx cmpl -0x30(%rsp,%rcx,4), %eax setb %al andb $0x1, %al movzbl %al, %ecx shll $0x6, %ecx movq 0x10(%rsp), %rax movl %ecx, (%rax) movq 0x18(%rsp), %rax movl (%rax), %eax shrl $0xb, %eax cmpl $0x1b, %eax sete %al andb $0x1, %al movzbl %al, %ecx shll $0x7, %ecx movq 0x10(%rsp), %rax orl (%rax), %ecx movl %ecx, (%rax) movq 0x18(%rsp), %rax cmpl $0x10ffff, (%rax) # imm = 0x10FFFF seta %al andb $0x1, %al movzbl %al, %ecx shll $0x8, %ecx movq 0x10(%rsp), %rax orl (%rax), %ecx movl %ecx, (%rax) movq 0x20(%rsp), %rax movzbl 0x1(%rax), %ecx andl $0xc0, %ecx sarl $0x2, %ecx movq 0x10(%rsp), %rax orl (%rax), %ecx movl %ecx, (%rax) movq 0x20(%rsp), %rax movzbl 0x2(%rax), %ecx andl $0xc0, %ecx sarl $0x4, %ecx movq 0x10(%rsp), %rax orl (%rax), %ecx movl %ecx, (%rax) movq 0x20(%rsp), %rax movzbl 0x3(%rax), %ecx sarl $0x6, %ecx movq 0x10(%rsp), %rax orl (%rax), %ecx movl %ecx, (%rax) movq 0x10(%rsp), %rax movl (%rax), %ecx xorl $0x2a, %ecx movl %ecx, (%rax) movslq -0x74(%rsp), %rax movl -0x70(%rsp,%rax,4), %ecx movq 0x10(%rsp), %rax movl (%rax), %edx sarl %cl, %edx movl %edx, %ecx movl %ecx, (%rax) movq -0x80(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3fmt3v106detail11utf8_decodeEPKcPjPi: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov rax, cs:qword_11A680 mov [rsp+28h+var_38], rax mov rax, cs:qword_11A688 mov [rsp+28h+var_30], rax mov eax, cs:dword_11A690 mov [rsp+28h+var_28], eax mov rax, cs:qword_11A6A0 mov [rsp+28h+var_58], rax mov rax, cs:qword_11A6A8 mov [rsp+28h+var_50], rax mov eax, cs:dword_11A6B0 mov [rsp+28h+var_48], eax mov rax, cs:qword_11A6C0 mov [rsp+28h+var_78], rax mov rax, cs:qword_11A6C8 mov [rsp+28h+var_70], rax mov eax, cs:dword_11A6D0 mov [rsp+28h+var_68], eax mov rax, cs:qword_11A6E0 mov [rsp+28h+var_98], rax mov rax, cs:qword_11A6E8 mov [rsp+28h+var_90], rax mov eax, cs:dword_11A6F0 mov [rsp+28h+var_88], eax mov rax, [rsp+28h+var_8] movzx eax, byte ptr [rax] sar eax, 3 movsxd rcx, eax lea rax, unk_11AA06 movsx eax, byte ptr [rax+rcx] mov [rsp+28h+var_9C], eax mov rax, [rsp+28h+var_8] movsxd rcx, [rsp+28h+var_9C] add rax, rcx cmp [rsp+28h+var_9C], 0 setnz cl xor cl, 0FFh and cl, 1 movzx ecx, cl movsxd rcx, ecx add rax, rcx mov [rsp+28h+var_A8], rax mov rax, [rsp+28h+var_8] movzx ecx, byte ptr [rax] movsxd rax, [rsp+28h+var_9C] and ecx, dword ptr [rsp+rax*4+28h+var_38] shl ecx, 12h mov rax, [rsp+28h+var_10] mov [rax], ecx mov rax, [rsp+28h+var_8] movzx ecx, byte ptr [rax+1] and ecx, 3Fh shl ecx, 0Ch mov rax, [rsp+28h+var_10] or ecx, [rax] mov [rax], ecx mov rax, [rsp+28h+var_8] movzx ecx, byte ptr [rax+2] and ecx, 3Fh shl ecx, 6 mov rax, [rsp+28h+var_10] or ecx, [rax] mov [rax], ecx mov rax, [rsp+28h+var_8] movzx ecx, byte ptr [rax+3] and ecx, 3Fh shl ecx, 0 mov rax, [rsp+28h+var_10] or ecx, [rax] mov [rax], ecx movsxd rax, [rsp+28h+var_9C] mov ecx, dword ptr [rsp+rax*4+28h+var_78] mov rax, [rsp+28h+var_10] mov edx, [rax] shr edx, cl mov ecx, edx mov [rax], ecx mov rax, [rsp+28h+var_10] mov eax, [rax] movsxd rcx, [rsp+28h+var_9C] cmp eax, dword ptr [rsp+rcx*4+28h+var_58] setb al and al, 1 movzx ecx, al shl ecx, 6 mov rax, [rsp+28h+var_18] mov [rax], ecx mov rax, [rsp+28h+var_10] mov eax, [rax] shr eax, 0Bh cmp eax, 1Bh setz al and al, 1 movzx ecx, al shl ecx, 7 mov rax, [rsp+28h+var_18] or ecx, [rax] mov [rax], ecx mov rax, [rsp+28h+var_10] cmp dword ptr [rax], 10FFFFh setnbe al and al, 1 movzx ecx, al shl ecx, 8 mov rax, [rsp+28h+var_18] or ecx, [rax] mov [rax], ecx mov rax, [rsp+28h+var_8] movzx ecx, byte ptr [rax+1] and ecx, 0C0h sar ecx, 2 mov rax, [rsp+28h+var_18] or ecx, [rax] mov [rax], ecx mov rax, [rsp+28h+var_8] movzx ecx, byte ptr [rax+2] and ecx, 0C0h sar ecx, 4 mov rax, [rsp+28h+var_18] or ecx, [rax] mov [rax], ecx mov rax, [rsp+28h+var_8] movzx ecx, byte ptr [rax+3] sar ecx, 6 mov rax, [rsp+28h+var_18] or ecx, [rax] mov [rax], ecx mov rax, [rsp+28h+var_18] mov ecx, [rax] xor ecx, 2Ah mov [rax], ecx movsxd rax, [rsp+28h+var_9C] mov ecx, dword ptr [rsp+rax*4+28h+var_98] mov rax, [rsp+28h+var_18] mov edx, [rax] sar edx, cl mov ecx, edx mov [rax], ecx mov rax, [rsp+28h+var_A8] add rsp, 28h retn
long long fmt::v10::detail::utf8_decode(fmt::v10::detail *this, char *a2, unsigned int *a3, int *a4) { int v5; // [rsp+Ch] [rbp-9Ch] _QWORD v6[2]; // [rsp+10h] [rbp-98h] int v7; // [rsp+20h] [rbp-88h] _QWORD v8[2]; // [rsp+30h] [rbp-78h] int v9; // [rsp+40h] [rbp-68h] _QWORD v10[2]; // [rsp+50h] [rbp-58h] int v11; // [rsp+60h] [rbp-48h] _QWORD v12[2]; // [rsp+70h] [rbp-38h] int v13; // [rsp+80h] [rbp-28h] unsigned int *v14; // [rsp+90h] [rbp-18h] const char *v15; // [rsp+98h] [rbp-10h] fmt::v10::detail *v16; // [rsp+A0h] [rbp-8h] v16 = this; v15 = a2; v14 = a3; v12[0] = 0x7F00000000LL; v12[1] = 0xF0000001FLL; v13 = 7; v10[0] = 0x400000LL; v10[1] = 0x80000000080LL; v11 = 0x10000; v8[0] = 0x1200000000LL; v8[1] = 0x60000000CLL; v9 = 0; v6[0] = 0x600000000LL; v6[1] = 0x200000004LL; v7 = 0; v5 = byte_11AA06[(int)*(unsigned __int8 *)this >> 3]; *(_DWORD *)a2 = (*((_DWORD *)v12 + byte_11AA06[(int)*(unsigned __int8 *)this >> 3]) & *(unsigned __int8 *)this) << 18; *(_DWORD *)v15 |= (*((_BYTE *)v16 + 1) & 0x3F) << 12; *(_DWORD *)v15 |= (*((_BYTE *)v16 + 2) & 0x3F) << 6; *(_DWORD *)v15 |= *((_BYTE *)v16 + 3) & 0x3F; *(_DWORD *)v15 >>= *((_DWORD *)v8 + v5); *v14 = (*(_DWORD *)v15 < *((_DWORD *)v10 + v5)) << 6; *v14 |= (*(_DWORD *)v15 >> 11 == 27) << 7; *v14 |= (*(_DWORD *)v15 > 0x10FFFFu) << 8; *v14 |= (*((_BYTE *)v16 + 1) & 0xC0) >> 2; *v14 |= (*((_BYTE *)v16 + 2) & 0xC0) >> 4; *v14 |= (int)*((unsigned __int8 *)v16 + 3) >> 6; *v14 ^= 0x2Au; *v14 = (int)*v14 >> *((_DWORD *)v6 + v5); return (long long)this + v5 + (v5 == 0); }
utf8_decode: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [0x0021a680] MOV qword ptr [RSP + -0x10],RAX MOV RAX,qword ptr [0x0021a688] MOV qword ptr [RSP + -0x8],RAX MOV EAX,dword ptr [0x0021a690] MOV dword ptr [RSP],EAX MOV RAX,qword ptr [0x0021a6a0] MOV qword ptr [RSP + -0x30],RAX MOV RAX,qword ptr [0x0021a6a8] MOV qword ptr [RSP + -0x28],RAX MOV EAX,dword ptr [0x0021a6b0] MOV dword ptr [RSP + -0x20],EAX MOV RAX,qword ptr [0x0021a6c0] MOV qword ptr [RSP + -0x50],RAX MOV RAX,qword ptr [0x0021a6c8] MOV qword ptr [RSP + -0x48],RAX MOV EAX,dword ptr [0x0021a6d0] MOV dword ptr [RSP + -0x40],EAX MOV RAX,qword ptr [0x0021a6e0] MOV qword ptr [RSP + -0x70],RAX MOV RAX,qword ptr [0x0021a6e8] MOV qword ptr [RSP + -0x68],RAX MOV EAX,dword ptr [0x0021a6f0] MOV dword ptr [RSP + -0x60],EAX MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] SAR EAX,0x3 MOVSXD RCX,EAX LEA RAX,[0x21aa06] MOVSX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + -0x74],EAX MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + -0x74] ADD RAX,RCX CMP dword ptr [RSP + -0x74],0x0 SETNZ CL XOR CL,0xff AND CL,0x1 MOVZX ECX,CL MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RSP + -0x80],RAX MOV RAX,qword ptr [RSP + 0x20] MOVZX ECX,byte ptr [RAX] MOVSXD RAX,dword ptr [RSP + -0x74] AND ECX,dword ptr [RSP + RAX*0x4 + -0x10] SHL ECX,0x12 MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x20] MOVZX ECX,byte ptr [RAX + 0x1] AND ECX,0x3f SHL ECX,0xc MOV RAX,qword ptr [RSP + 0x18] OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x20] MOVZX ECX,byte ptr [RAX + 0x2] AND ECX,0x3f SHL ECX,0x6 MOV RAX,qword ptr [RSP + 0x18] OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x20] MOVZX ECX,byte ptr [RAX + 0x3] AND ECX,0x3f SHL ECX,0x0 MOV RAX,qword ptr [RSP + 0x18] OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOVSXD RAX,dword ptr [RSP + -0x74] MOV ECX,dword ptr [RSP + RAX*0x4 + -0x50] MOV RAX,qword ptr [RSP + 0x18] MOV EDX,dword ptr [RAX] SHR EDX,CL MOV ECX,EDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX] MOVSXD RCX,dword ptr [RSP + -0x74] CMP EAX,dword ptr [RSP + RCX*0x4 + -0x30] SETC AL AND AL,0x1 MOVZX ECX,AL SHL ECX,0x6 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX] SHR EAX,0xb CMP EAX,0x1b SETZ AL AND AL,0x1 MOVZX ECX,AL SHL ECX,0x7 MOV RAX,qword ptr [RSP + 0x10] OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX],0x10ffff SETA AL AND AL,0x1 MOVZX ECX,AL SHL ECX,0x8 MOV RAX,qword ptr [RSP + 0x10] OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x20] MOVZX ECX,byte ptr [RAX + 0x1] AND ECX,0xc0 SAR ECX,0x2 MOV RAX,qword ptr [RSP + 0x10] OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x20] MOVZX ECX,byte ptr [RAX + 0x2] AND ECX,0xc0 SAR ECX,0x4 MOV RAX,qword ptr [RSP + 0x10] OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x20] MOVZX ECX,byte ptr [RAX + 0x3] SAR ECX,0x6 MOV RAX,qword ptr [RSP + 0x10] OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RAX] XOR ECX,0x2a MOV dword ptr [RAX],ECX MOVSXD RAX,dword ptr [RSP + -0x74] MOV ECX,dword ptr [RSP + RAX*0x4 + -0x70] MOV RAX,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RAX] SAR EDX,CL MOV ECX,EDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + -0x80] ADD RSP,0x28 RET
/* fmt::v10::detail::utf8_decode(char const*, unsigned int*, int*) */ char * fmt::v10::detail::utf8_decode(char *param_1,uint *param_2,int *param_3) { int iVar1; int8 local_98; int8 local_90; int4 local_88; int8 local_78; int8 local_70; int4 local_68; int8 local_58; int8 local_50; int4 local_48; int8 local_38; int8 local_30; int4 local_28; int *local_18; uint *local_10; char *local_8; local_8 = param_1; local_10 = param_2; local_18 = param_3; local_38 = DAT_0021a680; local_30 = DAT_0021a688; local_28 = DAT_0021a690; local_58 = DAT_0021a6a0; local_50 = DAT_0021a6a8; local_48 = DAT_0021a6b0; local_78 = DAT_0021a6c0; local_70 = DAT_0021a6c8; local_68 = DAT_0021a6d0; local_98 = DAT_0021a6e0; local_90 = DAT_0021a6e8; local_88 = DAT_0021a6f0; iVar1 = (int)(char)(&DAT_0021aa06)[(int)(uint)(byte)*param_1 >> 3]; *param_2 = ((uint)(byte)*param_1 & *(uint *)((long)&local_38 + (long)iVar1 * 4)) << 0x12; *param_2 = ((byte)param_1[1] & 0x3f) << 0xc | *param_2; *param_2 = ((byte)param_1[2] & 0x3f) << 6 | *param_2; *param_2 = (byte)param_1[3] & 0x3f | *param_2; *param_2 = *param_2 >> ((byte)*(int4 *)((long)&local_78 + (long)iVar1 * 4) & 0x1f); *param_3 = (uint)(*param_2 < *(uint *)((long)&local_58 + (long)iVar1 * 4)) << 6; *param_3 = (uint)(*param_2 >> 0xb == 0x1b) << 7 | *param_3; *param_3 = (uint)(0x10ffff < *param_2) << 8 | *param_3; *param_3 = (int)((byte)param_1[1] & 0xc0) >> 2 | *param_3; *param_3 = (int)((byte)param_1[2] & 0xc0) >> 4 | *param_3; *param_3 = (int)(uint)(byte)param_1[3] >> 6 | *param_3; *param_3 = *param_3 ^ 0x2a; *param_3 = *param_3 >> ((byte)*(int4 *)((long)&local_98 + (long)iVar1 * 4) & 0x1f); return param_1 + (long)(int)(uint)((iVar1 != 0 ^ 0xffU) & 1) + (long)iVar1; }
39,138
innochecksum_get_one_option
eloqsql/extra/innochecksum.cc
my_bool innochecksum_get_one_option( const struct my_option *opt, const char *argument MY_ATTRIBUTE((unused)), const char *) { switch (opt->id) { #ifndef DBUG_OFF case '#': dbug_setting = argument ? argument : IF_WIN("d:O,innochecksum.trace", "d:o,/tmp/innochecksum.trace"); DBUG_PUSH(dbug_setting); break; #endif /* !DBUG_OFF */ case 'e': use_end_page = true; break; case 'p': end_page = start_page = do_page; use_end_page = true; do_one_page = true; break; case 'V': print_version(); my_end(0); exit(EXIT_SUCCESS); break; case 'n': no_check = true; break; case 'a': case 'S': break; case 'w': do_write = true; break; case 'D': page_type_dump = true; break; case 'l': is_log_enabled = true; break; case 'I': case '?': usage(); my_end(0); exit(EXIT_SUCCESS); break; } return(false); }
O0
cpp
innochecksum_get_one_option: 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 0x8(%rax), %eax addl $-0x3f, %eax movl %eax, %ecx movq %rcx, -0x20(%rbp) subl $0x38, %eax ja 0x271c8 movq -0x20(%rbp), %rax leaq 0x66f8c(%rip), %rcx # 0x8e0d4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, 0x389f79(%rip) # 0x3b10d1 jmp 0x271c8 movl 0x389f74(%rip), %eax # 0x3b10d4 movl %eax, 0x389f72(%rip) # 0x3b10d8 movl %eax, 0x389f70(%rip) # 0x3b10dc movb $0x1, 0x389f5e(%rip) # 0x3b10d1 movb $0x1, 0x389f66(%rip) # 0x3b10e0 jmp 0x271c8 callq 0x271d0 xorl %edi, %edi callq 0x304e0 xorl %edi, %edi callq 0x254b0 movb $0x1, 0x389f4b(%rip) # 0x3b10e1 jmp 0x271c8 jmp 0x271c8 movb $0x1, 0x389f20(%rip) # 0x3b10c1 jmp 0x271c8 movb $0x1, 0x389f38(%rip) # 0x3b10e2 jmp 0x271c8 movb $0x1, 0x389f30(%rip) # 0x3b10e3 jmp 0x271c8 callq 0x27210 xorl %edi, %edi callq 0x304e0 xorl %edi, %edi callq 0x254b0 xorl %eax, %eax addq $0x20, %rsp popq %rbp retq
innochecksum_get_one_option: 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+8] add eax, 0FFFFFFC1h; switch 57 cases mov ecx, eax mov [rbp+var_20], rcx sub eax, 38h ja def_2714F; jumptable 000000000002714F default case, cases 64-67,69-72,74-82,84,85,87-96,98-100,102-107,109,111,113-118 mov rax, [rbp+var_20] lea rcx, jpt_2714F movsxd rax, ds:(jpt_2714F - 8E0D4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_27151: mov cs:_ZL12use_end_page, 1; jumptable 000000000002714F case 101 jmp short def_2714F; jumptable 000000000002714F default case, cases 64-67,69-72,74-82,84,85,87-96,98-100,102-107,109,111,113-118 loc_2715A: mov eax, cs:_ZL7do_page; jumptable 000000000002714F case 112 mov cs:_ZL10start_page, eax; start_page mov cs:_ZL8end_page, eax; end_page mov cs:_ZL12use_end_page, 1; use_end_page mov cs:_ZL11do_one_page, 1; do_one_page jmp short def_2714F; jumptable 000000000002714F default case, cases 64-67,69-72,74-82,84,85,87-96,98-100,102-107,109,111,113-118 loc_2717C: call _ZL13print_versionv; jumptable 000000000002714F case 86 xor edi, edi call my_end xor edi, edi call _exit loc_2718F: mov cs:_ZL8no_check, 1; jumptable 000000000002714F case 110 jmp short def_2714F; jumptable 000000000002714F default case, cases 64-67,69-72,74-82,84,85,87-96,98-100,102-107,109,111,113-118 loc_27198: jmp short def_2714F; jumptable 000000000002714F cases 83,97 loc_2719A: mov cs:_ZL8do_write, 1; jumptable 000000000002714F case 119 jmp short def_2714F; jumptable 000000000002714F default case, cases 64-67,69-72,74-82,84,85,87-96,98-100,102-107,109,111,113-118 loc_271A3: mov cs:_ZL14page_type_dump, 1; jumptable 000000000002714F case 68 jmp short def_2714F; jumptable 000000000002714F default case, cases 64-67,69-72,74-82,84,85,87-96,98-100,102-107,109,111,113-118 loc_271AC: mov cs:_ZL14is_log_enabled, 1; jumptable 000000000002714F case 108 jmp short def_2714F; jumptable 000000000002714F default case, cases 64-67,69-72,74-82,84,85,87-96,98-100,102-107,109,111,113-118 loc_271B5: call _ZL5usagev; jumptable 000000000002714F cases 63,73 xor edi, edi call my_end xor edi, edi call _exit def_2714F: xor eax, eax; jumptable 000000000002714F default case, cases 64-67,69-72,74-82,84,85,87-96,98-100,102-107,109,111,113-118 add rsp, 20h pop rbp retn
long long innochecksum_get_one_option(long long a1, long long a2, long long a3) { int v3; // eax long long v4; // rdx long long v5; // rcx long long v6; // r8 long long v7; // r9 long long v8; // rdx long long v9; // rcx long long v10; // r8 long long v11; // r9 long long v13; // [rsp+0h] [rbp-20h] v3 = *(_DWORD *)(a1 + 8); v13 = (unsigned int)(v3 - 63); switch ( v3 ) { case '?': case 'I': usage(); my_end(0LL, a2, v8, v9, v10, v11, v13, a3, a2, a1); exit(0LL); case 'D': page_type_dump = 1; break; case 'V': print_version(); my_end(0LL, a2, v4, v5, v6, v7, v13, a3, a2, a1); exit(0LL); case 'e': use_end_page = 1; break; case 'l': is_log_enabled = 1; break; case 'n': no_check = 1; break; case 'p': start_page = do_page; end_page = do_page; use_end_page = 1; do_one_page = 1; break; case 'w': do_write = 1; break; default: return 0LL; } return 0LL; }
innochecksum_get_one_option: 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 + 0x8] ADD EAX,-0x3f MOV ECX,EAX MOV qword ptr [RBP + -0x20],RCX SUB EAX,0x38 JA 0x001271c8 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x18e0d4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_65: MOV byte ptr [0x004b10d1],0x1 JMP 0x001271c8 caseD_70: MOV EAX,dword ptr [0x004b10d4] MOV dword ptr [0x004b10d8],EAX MOV dword ptr [0x004b10dc],EAX MOV byte ptr [0x004b10d1],0x1 MOV byte ptr [0x004b10e0],0x1 JMP 0x001271c8 caseD_56: CALL 0x001271d0 XOR EDI,EDI CALL 0x001304e0 XOR EDI,EDI CALL 0x001254b0 caseD_6e: MOV byte ptr [0x004b10e1],0x1 JMP 0x001271c8 caseD_53: JMP 0x001271c8 caseD_77: MOV byte ptr [0x004b10c1],0x1 JMP 0x001271c8 caseD_44: MOV byte ptr [0x004b10e2],0x1 JMP 0x001271c8 caseD_6c: MOV byte ptr [0x004b10e3],0x1 JMP 0x001271c8 caseD_3f: CALL 0x00127210 XOR EDI,EDI CALL 0x001304e0 XOR EDI,EDI CALL 0x001254b0 caseD_40: XOR EAX,EAX ADD RSP,0x20 POP RBP RET
int8 innochecksum_get_one_option(long param_1) { switch(*(int4 *)(param_1 + 8)) { case 0x3f: case 0x49: usage(); my_end(); /* WARNING: Subroutine does not return */ exit(0); case 0x44: page_type_dump = 1; break; case 0x53: case 0x61: break; case 0x56: print_version(); my_end(); /* WARNING: Subroutine does not return */ exit(0); case 0x65: use_end_page = 1; break; case 0x6c: is_log_enabled = 1; break; case 0x6e: no_check = 1; break; case 0x70: start_page = do_page; end_page = do_page; use_end_page = 1; do_one_page = 1; break; case 0x77: do_write = 1; } return 0; }
39,139
my_lock
eloqsql/mysys/my_lock.c
int my_lock(File fd, int locktype, my_off_t start, my_off_t length, myf MyFlags) { #ifdef HAVE_FCNTL int value; ALARM_VARIABLES; #endif DBUG_ENTER("my_lock"); DBUG_PRINT("my",("fd: %d Op: %d start: %ld Length: %ld MyFlags: %lu", fd,locktype,(long) start,(long) length,MyFlags)); if (my_disable_locking && ! (MyFlags & MY_FORCE_LOCK)) DBUG_RETURN(0); #if defined(_WIN32) { int timeout_sec; if (MyFlags & MY_NO_WAIT) timeout_sec= 0; else timeout_sec= WIN_LOCK_INFINITE; if (win_lock(fd, locktype, start, length, timeout_sec) == 0) DBUG_RETURN(0); } #else #if defined(HAVE_FCNTL) { struct flock lock; lock.l_type= (short) locktype; lock.l_whence= SEEK_SET; lock.l_start= (off_t) start; lock.l_len= (off_t) length; if (MyFlags & (MY_NO_WAIT | MY_SHORT_WAIT)) { if (fcntl(fd,F_SETLK,&lock) != -1) /* Check if we can lock */ DBUG_RETURN(0); /* Ok, file locked */ if (MyFlags & MY_NO_WAIT) { my_errno= (errno == EACCES) ? EAGAIN : errno ? errno : -1; DBUG_RETURN(-1); } DBUG_PRINT("info",("Was locked, trying with alarm")); ALARM_INIT; while ((value=fcntl(fd,F_SETLKW,&lock)) && ! ALARM_TEST && errno == EINTR) { /* Setup again so we don`t miss it */ ALARM_REINIT; } ALARM_END; if (value != -1) DBUG_RETURN(0); if (errno == EINTR) errno=EAGAIN; } else if (fcntl(fd,F_SETLKW,&lock) != -1) /* Wait until a lock */ DBUG_RETURN(0); } #else if (MyFlags & MY_SEEK_NOT_DONE) { if (my_seek(fd,start,MY_SEEK_SET,MYF(MyFlags & ~MY_SEEK_NOT_DONE)) == MY_FILEPOS_ERROR) { /* If an error has occurred in my_seek then we will already have an error code in my_errno; Just return error code. */ DBUG_RETURN(-1); } } if (lockf(fd,locktype,length) != -1) DBUG_RETURN(0); #endif /* HAVE_FCNTL */ #endif /* _WIN32 */ /* We got an error. We don't want EACCES errors */ my_errno=(errno == EACCES) ? EAGAIN : errno ? errno : -1; if (MyFlags & MY_WME) { if (locktype == F_UNLCK) my_error(EE_CANTUNLOCK,MYF(ME_BELL),my_errno); else my_error(EE_CANTLOCK,MYF(ME_BELL),my_errno); } DBUG_PRINT("error",("my_errno: %d (%d)",my_errno,errno)); DBUG_RETURN(-1); }
O3
c
my_lock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movl %esi, %ebx movl %edi, %r15d testb %r14b, %r14b js 0x9fb5d leaq 0xb68b57(%rip), %rax # 0xc086a8 xorl %r12d, %r12d cmpb $0x0, (%rax) jne 0x9fcf5 movw %bx, -0x58(%rbp) movw $0x0, -0x56(%rbp) movq %rdx, -0x50(%rbp) movq %rcx, -0x48(%rbp) xorl %r12d, %r12d leaq -0x58(%rbp), %rdx testl $0x140, %r14d # imm = 0x140 je 0x9fc3f movl %r15d, %edi movl $0x6, %esi xorl %eax, %eax callq 0x29130 cmpl $-0x1, %eax jne 0x9fcf5 btl $0x8, %r14d jb 0x9fc72 leaq 0xb68aeb(%rip), %rax # 0xc08698 movl $0x0, (%rax) leaq 0x2e5f7e(%rip), %rax # 0x385b38 movl (%rax), %edi callq 0x29250 movl %eax, -0x2c(%rbp) leaq 0x8409(%rip), %rsi # 0xa7fd4 movl $0xe, %edi callq 0x29300 movq %rax, -0x38(%rbp) xorl %r12d, %r12d leaq -0x58(%rbp), %rdx movl %r15d, %edi movl $0x7, %esi xorl %eax, %eax callq 0x29130 testl %eax, %eax je 0x9fcbd movl %eax, %r13d leaq 0xb68a97(%rip), %rax # 0xc08698 cmpl $0x0, (%rax) je 0x9fd07 movl $0xe, %edi movq -0x38(%rbp), %rsi callq 0x29300 movl -0x2c(%rbp), %edi callq 0x29250 xorl %r12d, %r12d cmpl $-0x1, %r13d jne 0x9fcf5 callq 0x297b0 cmpl $0x4, (%rax) jne 0x9fc5c movl $0xb, (%rax) jmp 0x9fc5c movl %r15d, %edi movl $0x7, %esi xorl %eax, %eax callq 0x29130 cmpl $-0x1, %eax jne 0x9fcf5 callq 0x297b0 movl (%rax), %eax testl %eax, %eax je 0x9fc8b movl $0xb, %r15d cmpl $0xd, %eax je 0x9fc91 movl %eax, %r15d jmp 0x9fc91 callq 0x297b0 movl (%rax), %eax testl %eax, %eax je 0x9fce3 movl $0xb, %ebx cmpl $0xd, %eax je 0x9fce8 movl %eax, %ebx jmp 0x9fce8 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF callq 0xa1afa movl %r15d, (%rax) movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testb $0x10, %r14b je 0x9fcf5 callq 0xa1afa movl (%rax), %edx movl $0x4, %esi cmpl $0x2, %ebx jne 0x9fcd5 movl $0xb, %edi jmp 0x9fcda movl $0xe, %edi movq -0x38(%rbp), %rsi callq 0x29300 movl -0x2c(%rbp), %edi callq 0x29250 jmp 0x9fcf5 movl $0xa, %edi xorl %eax, %eax callq 0x9e1af jmp 0x9fcf5 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF callq 0xa1afa movl %ebx, (%rax) movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl %r12d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x297b0 movq %rax, %r12 cmpl $0x4, (%r12) jne 0x9fc0a leaq 0x2e5e17(%rip), %rax # 0x385b38 movl (%rax), %edi callq 0x29250 leaq 0xb68969(%rip), %rax # 0xc08698 movl $0x0, (%rax) xorl %r13d, %r13d movl %r15d, %edi movl $0x7, %esi leaq -0x58(%rbp), %rdx xorl %eax, %eax callq 0x29130 testl %eax, %eax je 0x9fc0a leaq 0xb6893e(%rip), %rcx # 0xc08698 cmpl $0x0, (%rcx) movl %eax, %r13d je 0x9fd0f jmp 0x9fc0a nop
my_lock: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov ebx, esi mov r15d, edi test r14b, r14b js short loc_9FB5D lea rax, my_disable_locking xor r12d, r12d cmp byte ptr [rax], 0 jnz loc_9FCF5 loc_9FB5D: mov [rbp+var_58], bx mov [rbp+var_56], 0 mov [rbp+var_50], rdx mov [rbp+var_48], rcx xor r12d, r12d lea rdx, [rbp+var_58] test r14d, 140h jz loc_9FC3F mov edi, r15d mov esi, 6 xor eax, eax call _fcntl64 cmp eax, 0FFFFFFFFh jnz loc_9FCF5 bt r14d, 8 jb loc_9FC72 lea rax, my_have_got_alarm mov dword ptr [rax], 0 lea rax, my_time_to_wait_for_lock mov edi, [rax] call _alarm mov [rbp+var_2C], eax lea rsi, my_set_alarm_variable mov edi, 0Eh call _signal mov [rbp+var_38], rax xor r12d, r12d lea rdx, [rbp+var_58] mov edi, r15d mov esi, 7 xor eax, eax call _fcntl64 test eax, eax jz loc_9FCBD mov r13d, eax lea rax, my_have_got_alarm cmp dword ptr [rax], 0 jz loc_9FD07 loc_9FC0A: mov edi, 0Eh mov rsi, [rbp+var_38] call _signal mov edi, [rbp+var_2C] call _alarm xor r12d, r12d cmp r13d, 0FFFFFFFFh jnz loc_9FCF5 call ___errno_location cmp dword ptr [rax], 4 jnz short loc_9FC5C mov dword ptr [rax], 0Bh jmp short loc_9FC5C loc_9FC3F: mov edi, r15d mov esi, 7 xor eax, eax call _fcntl64 cmp eax, 0FFFFFFFFh jnz loc_9FCF5 call ___errno_location loc_9FC5C: mov eax, [rax] test eax, eax jz short loc_9FC8B mov r15d, 0Bh cmp eax, 0Dh jz short loc_9FC91 mov r15d, eax jmp short loc_9FC91 loc_9FC72: call ___errno_location mov eax, [rax] test eax, eax jz short loc_9FCE3 mov ebx, 0Bh cmp eax, 0Dh jz short loc_9FCE8 mov ebx, eax jmp short loc_9FCE8 loc_9FC8B: mov r15d, 0FFFFFFFFh loc_9FC91: call _my_thread_var mov [rax], r15d mov r12d, 0FFFFFFFFh test r14b, 10h jz short loc_9FCF5 call _my_thread_var mov edx, [rax] mov esi, 4 cmp ebx, 2 jnz short loc_9FCD5 mov edi, 0Bh jmp short loc_9FCDA loc_9FCBD: mov edi, 0Eh mov rsi, [rbp+var_38] call _signal mov edi, [rbp+var_2C] call _alarm jmp short loc_9FCF5 loc_9FCD5: mov edi, 0Ah loc_9FCDA: xor eax, eax call my_error jmp short loc_9FCF5 loc_9FCE3: mov ebx, 0FFFFFFFFh loc_9FCE8: call _my_thread_var mov [rax], ebx mov r12d, 0FFFFFFFFh loc_9FCF5: mov eax, r12d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9FD07: call ___errno_location mov r12, rax loc_9FD0F: cmp dword ptr [r12], 4 jnz loc_9FC0A lea rax, my_time_to_wait_for_lock mov edi, [rax] call _alarm lea rax, my_have_got_alarm mov dword ptr [rax], 0 xor r13d, r13d mov edi, r15d mov esi, 7 lea rdx, [rbp+var_58] xor eax, eax call _fcntl64 test eax, eax jz loc_9FC0A lea rcx, my_have_got_alarm cmp dword ptr [rcx], 0 mov r13d, eax jz short loc_9FD0F jmp loc_9FC0A
long long my_lock(long long a1, int a2, long long a3, long long a4, __int16 a5) { unsigned int v7; // r12d int v8; // eax int v9; // r13d const char *v10; // rsi int *v11; // rax int v12; // eax int v13; // r15d int v14; // eax int v15; // ebx long long v16; // rdx unsigned int v17; // edi _DWORD *v19; // r12 int v20; // eax _WORD v21[4]; // [rsp+8h] [rbp-58h] BYREF long long v22; // [rsp+10h] [rbp-50h] long long v23; // [rsp+18h] [rbp-48h] long long v24; // [rsp+28h] [rbp-38h] unsigned int v25; // [rsp+34h] [rbp-2Ch] if ( (a5 & 0x80u) == 0 ) { v7 = 0; if ( my_disable_locking ) return v7; } v21[0] = a2; v21[1] = 0; v22 = a3; v23 = a4; v7 = 0; if ( (a5 & 0x140) == 0 ) { a1 = (unsigned int)a1; v10 = &byte_7; if ( (unsigned int)fcntl64((unsigned int)a1, 7LL, v21) != -1 ) return v7; v11 = (int *)__errno_location((unsigned int)a1); goto LABEL_13; } if ( (unsigned int)fcntl64((unsigned int)a1, 6LL, v21) != -1 ) return v7; if ( (a5 & 0x100) != 0 ) { v14 = *(_DWORD *)__errno_location((unsigned int)a1); if ( v14 ) { v15 = 11; if ( v14 != 13 ) v15 = v14; } else { v15 = -1; } *(_DWORD *)my_thread_var((unsigned int)a1, &byte_6) = v15; return (unsigned int)-1; } else { my_have_got_alarm = 0; v25 = alarm(my_time_to_wait_for_lock); v24 = signal(14LL, my_set_alarm_variable); v7 = 0; v8 = fcntl64((unsigned int)a1, 7LL, v21); if ( !v8 ) { signal(14LL, v24); alarm(v25); return v7; } v9 = v8; if ( !my_have_got_alarm ) { v19 = (_DWORD *)__errno_location((unsigned int)a1); do { if ( *v19 != 4 ) break; alarm(my_time_to_wait_for_lock); my_have_got_alarm = 0; v9 = 0; v20 = fcntl64((unsigned int)a1, 7LL, v21); if ( !v20 ) break; v9 = v20; } while ( !my_have_got_alarm ); } v10 = (const char *)v24; signal(14LL, v24); a1 = v25; alarm(v25); v7 = 0; if ( v9 == -1 ) { v11 = (int *)__errno_location(a1); if ( *v11 == 4 ) *v11 = 11; LABEL_13: v12 = *v11; if ( v12 ) { v13 = 11; if ( v12 != 13 ) v13 = v12; } else { v13 = -1; } *(_DWORD *)my_thread_var(a1, v10) = v13; v7 = -1; if ( (a5 & 0x10) != 0 ) { v16 = *(unsigned int *)my_thread_var(a1, v10); if ( a2 == 2 ) v17 = 11; else v17 = 10; my_error(v17, 4LL, v16); } } } return v7; }
my_lock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV EBX,ESI MOV R15D,EDI TEST R14B,R14B JS 0x0019fb5d LEA RAX,[0xd086a8] XOR R12D,R12D CMP byte ptr [RAX],0x0 JNZ 0x0019fcf5 LAB_0019fb5d: MOV word ptr [RBP + -0x58],BX MOV word ptr [RBP + -0x56],0x0 MOV qword ptr [RBP + -0x50],RDX MOV qword ptr [RBP + -0x48],RCX XOR R12D,R12D LEA RDX,[RBP + -0x58] TEST R14D,0x140 JZ 0x0019fc3f MOV EDI,R15D MOV ESI,0x6 XOR EAX,EAX CALL 0x00129130 CMP EAX,-0x1 JNZ 0x0019fcf5 BT R14D,0x8 JC 0x0019fc72 LEA RAX,[0xd08698] MOV dword ptr [RAX],0x0 LEA RAX,[0x485b38] MOV EDI,dword ptr [RAX] CALL 0x00129250 MOV dword ptr [RBP + -0x2c],EAX LEA RSI,[0x1a7fd4] MOV EDI,0xe CALL 0x00129300 MOV qword ptr [RBP + -0x38],RAX XOR R12D,R12D LEA RDX,[RBP + -0x58] MOV EDI,R15D MOV ESI,0x7 XOR EAX,EAX CALL 0x00129130 TEST EAX,EAX JZ 0x0019fcbd MOV R13D,EAX LEA RAX,[0xd08698] CMP dword ptr [RAX],0x0 JZ 0x0019fd07 LAB_0019fc0a: MOV EDI,0xe MOV RSI,qword ptr [RBP + -0x38] CALL 0x00129300 MOV EDI,dword ptr [RBP + -0x2c] CALL 0x00129250 XOR R12D,R12D CMP R13D,-0x1 JNZ 0x0019fcf5 CALL 0x001297b0 CMP dword ptr [RAX],0x4 JNZ 0x0019fc5c MOV dword ptr [RAX],0xb JMP 0x0019fc5c LAB_0019fc3f: MOV EDI,R15D MOV ESI,0x7 XOR EAX,EAX CALL 0x00129130 CMP EAX,-0x1 JNZ 0x0019fcf5 CALL 0x001297b0 LAB_0019fc5c: MOV EAX,dword ptr [RAX] TEST EAX,EAX JZ 0x0019fc8b MOV R15D,0xb CMP EAX,0xd JZ 0x0019fc91 MOV R15D,EAX JMP 0x0019fc91 LAB_0019fc72: CALL 0x001297b0 MOV EAX,dword ptr [RAX] TEST EAX,EAX JZ 0x0019fce3 MOV EBX,0xb CMP EAX,0xd JZ 0x0019fce8 MOV EBX,EAX JMP 0x0019fce8 LAB_0019fc8b: MOV R15D,0xffffffff LAB_0019fc91: CALL 0x001a1afa MOV dword ptr [RAX],R15D MOV R12D,0xffffffff TEST R14B,0x10 JZ 0x0019fcf5 CALL 0x001a1afa MOV EDX,dword ptr [RAX] MOV ESI,0x4 CMP EBX,0x2 JNZ 0x0019fcd5 MOV EDI,0xb JMP 0x0019fcda LAB_0019fcbd: MOV EDI,0xe MOV RSI,qword ptr [RBP + -0x38] CALL 0x00129300 MOV EDI,dword ptr [RBP + -0x2c] CALL 0x00129250 JMP 0x0019fcf5 LAB_0019fcd5: MOV EDI,0xa LAB_0019fcda: XOR EAX,EAX CALL 0x0019e1af JMP 0x0019fcf5 LAB_0019fce3: MOV EBX,0xffffffff LAB_0019fce8: CALL 0x001a1afa MOV dword ptr [RAX],EBX MOV R12D,0xffffffff LAB_0019fcf5: MOV EAX,R12D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019fd07: CALL 0x001297b0 MOV R12,RAX LAB_0019fd0f: CMP dword ptr [R12],0x4 JNZ 0x0019fc0a LEA RAX,[0x485b38] MOV EDI,dword ptr [RAX] CALL 0x00129250 LEA RAX,[0xd08698] MOV dword ptr [RAX],0x0 XOR R13D,R13D MOV EDI,R15D MOV ESI,0x7 LEA RDX,[RBP + -0x58] XOR EAX,EAX CALL 0x00129130 TEST EAX,EAX JZ 0x0019fc0a LEA RCX,[0xd08698] CMP dword ptr [RCX],0x0 MOV R13D,EAX JZ 0x0019fd0f JMP 0x0019fc0a
int8 my_lock(int4 param_1,int param_2,int8 param_3,int8 param_4,uint param_5) { int iVar1; int *piVar2; int4 *puVar3; int8 uVar4; int iVar5; int2 local_60; int2 local_5e; int8 local_58; int8 local_50; __sighandler_t local_40; uint local_34; if ((-1 < (char)param_5) && (my_disable_locking != '\0')) { return 0; } local_60 = (int2)param_2; local_5e = 0; local_58 = param_3; local_50 = param_4; if ((param_5 & 0x140) == 0) { iVar1 = fcntl64(param_1,7,&local_60); if (iVar1 != -1) { return 0; } piVar2 = __errno_location(); } else { iVar1 = fcntl64(param_1,6,&local_60); if (iVar1 != -1) { return 0; } if ((param_5 >> 8 & 1) != 0) { piVar2 = __errno_location(); iVar1 = *piVar2; if (iVar1 == 0) { iVar5 = -1; } else { iVar5 = 0xb; if (iVar1 != 0xd) { iVar5 = iVar1; } } piVar2 = (int *)_my_thread_var(); *piVar2 = iVar5; return 0xffffffff; } my_have_got_alarm = 0; local_34 = alarm(my_time_to_wait_for_lock); local_40 = signal(0xe,my_set_alarm_variable); iVar1 = fcntl64(param_1,7,&local_60); if (iVar1 == 0) { signal(0xe,local_40); alarm(local_34); return 0; } iVar5 = iVar1; if (my_have_got_alarm == 0) { piVar2 = __errno_location(); while (iVar5 = iVar1, *piVar2 == 4) { alarm(my_time_to_wait_for_lock); my_have_got_alarm = 0; iVar1 = fcntl64(param_1,7,&local_60); iVar5 = 0; if ((iVar1 == 0) || (iVar5 = iVar1, my_have_got_alarm != 0)) break; } } signal(0xe,local_40); alarm(local_34); if (iVar5 != -1) { return 0; } piVar2 = __errno_location(); if (*piVar2 == 4) { *piVar2 = 0xb; } } iVar1 = *piVar2; if (iVar1 == 0) { iVar5 = -1; } else { iVar5 = 0xb; if (iVar1 != 0xd) { iVar5 = iVar1; } } piVar2 = (int *)_my_thread_var(); *piVar2 = iVar5; if ((param_5 & 0x10) != 0) { puVar3 = (int4 *)_my_thread_var(); if (param_2 == 2) { uVar4 = 0xb; } else { uVar4 = 10; } my_error(uVar4,4,*puVar3); } return 0xffffffff; }
39,140
common_log::set_colors(bool)
monkey531[P]llama/common/log.cpp
void set_colors(bool colors) { pause(); if (colors) { g_col[COMMON_LOG_COL_DEFAULT] = LOG_COL_DEFAULT; g_col[COMMON_LOG_COL_BOLD] = LOG_COL_BOLD; g_col[COMMON_LOG_COL_RED] = LOG_COL_RED; g_col[COMMON_LOG_COL_GREEN] = LOG_COL_GREEN; g_col[COMMON_LOG_COL_YELLOW] = LOG_COL_YELLOW; g_col[COMMON_LOG_COL_BLUE] = LOG_COL_BLUE; g_col[COMMON_LOG_COL_MAGENTA] = LOG_COL_MAGENTA; g_col[COMMON_LOG_COL_CYAN] = LOG_COL_CYAN; g_col[COMMON_LOG_COL_WHITE] = LOG_COL_WHITE; } else { for (size_t i = 0; i < g_col.size(); i++) { g_col[i] = ""; } } resume(); }
O1
cpp
common_log::set_colors(bool): pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx callq 0x9792a testl %ebp, %ebp je 0x97de7 movq 0x57484(%rip), %rax # 0xef200 leaq 0x189b1(%rip), %rcx # 0xb0734 movq %rcx, (%rax) movq 0x57473(%rip), %rax # 0xef200 leaq 0x28bc7(%rip), %rcx # 0xc095b movq %rcx, 0x8(%rax) leaq 0x28bc1(%rip), %rcx # 0xc0960 movq %rcx, 0x10(%rax) leaq 0x28bbc(%rip), %rcx # 0xc0966 movq %rcx, 0x18(%rax) leaq 0x28bb7(%rip), %rcx # 0xc096c movq %rcx, 0x20(%rax) leaq 0x28bb2(%rip), %rcx # 0xc0972 movq %rcx, 0x28(%rax) leaq 0x28bad(%rip), %rcx # 0xc0978 movq %rcx, 0x30(%rax) leaq 0x28ba8(%rip), %rcx # 0xc097e movq %rcx, 0x38(%rax) leaq 0x28ba3(%rip), %rcx # 0xc0984 movq %rcx, 0x40(%rax) jmp 0x97e21 movq 0x57412(%rip), %rax # 0xef200 cmpq %rax, 0x57413(%rip) # 0xef208 je 0x97e21 xorl %ecx, %ecx leaq 0x1fa3d(%rip), %rdx # 0xb783d movq %rdx, (%rax,%rcx,8) incq %rcx movq 0x573fa(%rip), %rsi # 0xef208 movq 0x573eb(%rip), %rax # 0xef200 subq %rax, %rsi sarq $0x3, %rsi cmpq %rsi, %rcx jb 0x97e00 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x979b2 nop
_ZN10common_log10set_colorsEb: push rbp push rbx push rax mov ebp, esi mov rbx, rdi call _ZN10common_log5pauseEv; common_log::pause(void) test ebp, ebp jz short loc_97DE7 mov rax, cs:_ZL5g_col; g_col lea rcx, a33mwarningSkip+2Fh; "\x1B[0m" mov [rax], rcx mov rax, cs:_ZL5g_col; g_col lea rcx, a1m; "\x1B[1m" mov [rax+8], rcx lea rcx, a31m; "\x1B[31m" mov [rax+10h], rcx lea rcx, a32m; "\x1B[32m" mov [rax+18h], rcx lea rcx, a33m; "\x1B[33m" mov [rax+20h], rcx lea rcx, a34m; "\x1B[34m" mov [rax+28h], rcx lea rcx, a35m; "\x1B[35m" mov [rax+30h], rcx lea rcx, a36m; "\x1B[36m" mov [rax+38h], rcx lea rcx, a37m; "\x1B[37m" mov [rax+40h], rcx jmp short loc_97E21 loc_97DE7: mov rax, cs:_ZL5g_col; g_col cmp cs:qword_EF208, rax jz short loc_97E21 xor ecx, ecx lea rdx, asc_B7839+4; "" loc_97E00: mov [rax+rcx*8], rdx inc rcx mov rsi, cs:qword_EF208 mov rax, cs:_ZL5g_col; g_col sub rsi, rax sar rsi, 3 cmp rcx, rsi jb short loc_97E00 loc_97E21: mov rdi, rbx; this add rsp, 8 pop rbx pop rbp jmp _ZN10common_log6resumeEv; common_log::resume(void)
long long common_log::set_colors(common_log *this, int a2) { _QWORD *v2; // rax long long v3; // rax unsigned long long v4; // rcx common_log::pause(this); if ( a2 ) { *(_QWORD *)g_col = "\x1B[0m"; v2 = (_QWORD *)g_col; *(_QWORD *)(g_col + 8) = "\x1B[1m"; v2[2] = "\x1B[31m"; v2[3] = "\x1B[32m"; v2[4] = "\x1B[33m"; v2[5] = "\x1B[34m"; v2[6] = "\x1B[35m"; v2[7] = "\x1B[36m"; v2[8] = "\x1B[37m"; } else { v3 = g_col; if ( qword_EF208 != g_col ) { v4 = 0LL; do { *(_QWORD *)(v3 + 8 * v4++) = ""; v3 = g_col; } while ( v4 < (qword_EF208 - g_col) >> 3 ); } } return common_log::resume(this); }
set_colors: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI CALL 0x0019792a TEST EBP,EBP JZ 0x00197de7 MOV RAX,qword ptr [0x001ef200] LEA RCX,[0x1b0734] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [0x001ef200] LEA RCX,[0x1c095b] MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1c0960] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[0x1c0966] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[0x1c096c] MOV qword ptr [RAX + 0x20],RCX LEA RCX,[0x1c0972] MOV qword ptr [RAX + 0x28],RCX LEA RCX,[0x1c0978] MOV qword ptr [RAX + 0x30],RCX LEA RCX,[0x1c097e] MOV qword ptr [RAX + 0x38],RCX LEA RCX,[0x1c0984] MOV qword ptr [RAX + 0x40],RCX JMP 0x00197e21 LAB_00197de7: MOV RAX,qword ptr [0x001ef200] CMP qword ptr [0x001ef208],RAX JZ 0x00197e21 XOR ECX,ECX LEA RDX,[0x1b783d] LAB_00197e00: MOV qword ptr [RAX + RCX*0x8],RDX INC RCX MOV RSI,qword ptr [0x001ef208] MOV RAX,qword ptr [0x001ef200] SUB RSI,RAX SAR RSI,0x3 CMP RCX,RSI JC 0x00197e00 LAB_00197e21: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001979b2
/* common_log::set_colors(bool) */ void __thiscall common_log::set_colors(common_log *this,bool param_1) { int8 *puVar1; ulong uVar2; int7 in_register_00000031; pause(this); if ((int)CONCAT71(in_register_00000031,param_1) == 0) { if (DAT_001ef208 != g_col) { uVar2 = 0; do { g_col[uVar2] = &DAT_001b783d; uVar2 = uVar2 + 1; } while (uVar2 < (ulong)((long)DAT_001ef208 - (long)g_col >> 3)); } } else { *g_col = &DAT_001b0734; puVar1 = g_col; g_col[1] = &DAT_001c095b; puVar1[2] = &DAT_001c0960; puVar1[3] = &DAT_001c0966; puVar1[4] = &DAT_001c096c; puVar1[5] = &DAT_001c0972; puVar1[6] = &DAT_001c0978; puVar1[7] = &DAT_001c097e; puVar1[8] = &DAT_001c0984; } resume(this); return; }
39,141
mi_get_prev_key
eloqsql/storage/myisam/mi_search.c
static my_bool _mi_get_prev_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length) { uint nod_flag; DBUG_ENTER("_mi_get_prev_key"); nod_flag=mi_test_if_nod(page); if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { *return_key_length=keyinfo->keylength; bmove((uchar*) key,(uchar*) keypos- *return_key_length-nod_flag, *return_key_length); DBUG_RETURN(0); } else { page+=2+nod_flag; key[0]=0; /* safety */ while (page < keypos) { *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key); if (*return_key_length == 0) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(1); } } } DBUG_RETURN(0); }
O0
c
mi_get_prev_key: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x455c3 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x40(%rbp) jmp 0x455ca xorl %eax, %eax movl %eax, -0x40(%rbp) jmp 0x455ca movl -0x40(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0x45629 movq -0x18(%rbp), %rax movzwl 0x12(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rax movl (%rax), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movl -0x3c(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movq -0x38(%rbp), %rax movl (%rax), %eax movl %eax, %edx callq 0x28600 movb $0x0, -0x1(%rbp) jmp 0x456aa movl -0x3c(%rbp), %ecx addl $0x2, %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x456a2 movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0x3c(%rbp), %esi movq -0x28(%rbp), %rcx leaq -0x20(%rbp), %rdx callq *%rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rax cmpl $0x0, (%rax) jne 0x456a0 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x34490 callq 0x82360 movl $0x7e, (%rax) movb $0x1, -0x1(%rbp) jmp 0x456aa jmp 0x45643 jmp 0x456a4 jmp 0x456a6 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_get_prev_key: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_20] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_455C3 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_40], eax jmp short loc_455CA loc_455C3: xor eax, eax mov [rbp+var_40], eax jmp short $+2 loc_455CA: mov eax, [rbp+var_40] mov [rbp+var_3C], eax mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Ah] and eax, 28h cmp eax, 0 jnz short loc_45629 mov rax, [rbp+var_18] movzx ecx, word ptr [rax+12h] mov rax, [rbp+var_38] mov [rax], ecx mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] mov rax, [rbp+var_38] mov eax, [rax] mov ecx, eax xor eax, eax sub rax, rcx add rsi, rax mov eax, [rbp+var_3C] mov ecx, eax xor eax, eax sub rax, rcx add rsi, rax mov rax, [rbp+var_38] mov eax, [rax] mov edx, eax call _memmove mov [rbp+var_1], 0 jmp loc_456AA loc_45629: mov ecx, [rbp+var_3C] add ecx, 2 mov rax, [rbp+var_20] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_28] mov byte ptr [rax], 0 loc_45643: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnb short loc_456A2 mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_3C] mov rcx, [rbp+var_28] lea rdx, [rbp+var_20] call rax mov ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov rax, [rbp+var_38] cmp dword ptr [rax], 0 jnz short loc_456A0 mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_1], 1 jmp short loc_456AA loc_456A0: jmp short loc_45643 loc_456A2: jmp short $+2 loc_456A4: jmp short $+2 loc_456A6: mov [rbp+var_1], 0 loc_456AA: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char mi_get_prev_key(long long a1, long long a2, _BYTE *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6) { const char *v6; // rsi unsigned int v8; // [rsp+0h] [rbp-40h] _BYTE *v12; // [rsp+20h] [rbp-20h] BYREF long long v13; // [rsp+28h] [rbp-18h] long long v14; // [rsp+30h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; if ( (*a3 & 0x80) != 0 ) v8 = *(_DWORD *)(*(_QWORD *)v14 + 380LL); else v8 = 0; if ( (*(_WORD *)(v13 + 10) & 0x28) != 0 ) { v12 += v8 + 2; *a4 = 0; while ( (unsigned long long)v12 < a5 ) { *a6 = (*(long long ( **)(long long, _QWORD, _BYTE **, _BYTE *))(v13 + 72))(v13, v8, &v12, a4); if ( !*a6 ) { v6 = *(const char **)(*(_QWORD *)v14 + 616LL); mi_report_error(126, (long long)v6); *(_DWORD *)my_thread_var(126LL, v6) = 126; return 1; } } return 0; } else { *a6 = *(unsigned __int16 *)(v13 + 18); memmove(a4, a5 - (unsigned int)*a6 - v8, (unsigned int)*a6); return 0; } }
_mi_get_prev_key: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001455c3 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x40],EAX JMP 0x001455ca LAB_001455c3: XOR EAX,EAX MOV dword ptr [RBP + -0x40],EAX JMP 0x001455ca LAB_001455ca: MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x28 CMP EAX,0x0 JNZ 0x00145629 MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX + 0x12] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV EDX,EAX CALL 0x00128600 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001456aa LAB_00145629: MOV ECX,dword ptr [RBP + -0x3c] ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 LAB_00145643: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001456a2 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x28] LEA RDX,[RBP + -0x20] CALL RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX],0x0 JNZ 0x001456a0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00134490 CALL 0x00182360 MOV dword ptr [RAX],0x7e MOV byte ptr [RBP + -0x1],0x1 JMP 0x001456aa LAB_001456a0: JMP 0x00145643 LAB_001456a2: JMP 0x001456a4 LAB_001456a4: JMP 0x001456a6 LAB_001456a6: MOV byte ptr [RBP + -0x1],0x0 LAB_001456aa: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 _mi_get_prev_key(long *param_1,long param_2,byte *param_3,int1 *param_4,byte *param_5, uint *param_6) { uint uVar1; int4 *puVar2; uint local_48; byte *local_28; long local_20; long *local_18; int1 local_9; if ((*param_3 & 0x80) == 0) { local_48 = 0; } else { local_48 = *(uint *)(*param_1 + 0x17c); } local_20 = param_2; local_18 = param_1; if ((*(ushort *)(param_2 + 10) & 0x28) == 0) { *param_6 = (uint)*(ushort *)(param_2 + 0x12); local_28 = param_3; memmove(param_4,param_5 + (-(ulong)local_48 - (ulong)*param_6),(ulong)*param_6); local_9 = 0; } else { local_28 = param_3 + (local_48 + 2); *param_4 = 0; do { if (param_5 <= local_28) { return 0; } uVar1 = (**(code **)(local_20 + 0x48))(local_20,local_48,&local_28,param_4); *param_6 = uVar1; } while (*param_6 != 0); mi_report_error(0x7e,*(int8 *)(*local_18 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_9 = 1; } return local_9; }
39,142
pvio_socket_connect_sync_or_async
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
static int pvio_socket_connect_sync_or_async(MARIADB_PVIO *pvio, const struct sockaddr *name, uint namelen) { MYSQL *mysql= pvio->mysql; if (mysql->options.extension && mysql->options.extension->async_context && mysql->options.extension->async_context->active) { /* even if we are not connected yet, application needs to check socket * via mysql_get_socket api call, so we need to assign pvio */ return pvio_socket_connect_async(pvio, name, namelen); } return pvio_socket_internal_connect(pvio, name, namelen); }
O3
c
pvio_socket_connect_sync_or_async: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %edx, -0x2c(%rbp) movq %rsi, -0x38(%rbp) movq %rdi, %rbx movq 0x40(%rdi), %rax movq 0x480(%rax), %rax testq %rax, %rax je 0x8ccbc movq 0x28(%rax), %rax testq %rax, %rax je 0x8ccbc cmpb $0x0, 0x14(%rax) je 0x8ccbc movq %rbx, %rdi movq -0x38(%rbp), %rsi movl -0x2c(%rbp), %edx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x8ce19 xorl %edi, %edi callq 0x5f890 movq (%rbx), %r14 testq %r14, %r14 je 0x8cd85 movq %rax, %r12 movslq 0x24(%rbx), %r15 movq %rbx, -0x58(%rbp) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x8c192 movq %r14, -0x50(%rbp) movl (%r14), %edi movq -0x38(%rbp), %rsi movl -0x2c(%rbp), %edx callq 0x5f460 movl %eax, %r13d xorl %edi, %edi callq 0x5f890 subq %r12, %rax movq %r15, -0x48(%rbp) imulq $0x10624dd3, %r15, %rcx # imm = 0x10624DD3 movq %rcx, %rdx shrq $0x3f, %rdx sarq $0x26, %rcx addl %edx, %ecx movslq %ecx, %r14 cmpq %r14, %rax jg 0x8cd93 movl $0x1, %ebx movl %ebx, %edi callq 0x5fcf0 cmpl $-0x1, %r13d jne 0x8ce07 callq 0x5fc00 movl (%rax), %eax cmpl $0xb, %eax je 0x8cd4d cmpl $0x4, %eax jne 0x8cd8d leal (%rbx,%rbx), %r15d movl $0xf4240, %eax # imm = 0xF4240 cmpl %eax, %ebx cmovael %eax, %r15d movq -0x50(%rbp), %rax movl (%rax), %edi movq -0x38(%rbp), %rsi movl -0x2c(%rbp), %edx callq 0x5f460 movl %eax, %r13d xorl %edi, %edi callq 0x5f890 subq %r12, %rax movl %r15d, %ebx cmpq %r14, %rax jle 0x8cd2b jmp 0x8cd93 movl $0x1, %r13d jmp 0x8ce07 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF cmpl $0x0, -0x48(%rbp) setne %al cmpl $-0x1, %r13d sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x8ce07 callq 0x5fc00 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF cmpl $0x73, (%rax) jne 0x8ce07 movq %rax, %rbx movq -0x58(%rbp), %rdi xorl %esi, %esi movq -0x48(%rbp), %rdx callq 0x8c0d8 testl %eax, %eax jle 0x8ce07 leaq -0x5c(%rbp), %r8 movl $0x4, (%r8) movq -0x50(%rbp), %rax movl (%rax), %edi leaq -0x3c(%rbp), %rcx movl $0x1, %esi movl $0x4, %edx callq 0x5f8c0 testl %eax, %eax js 0x8ce04 movl %eax, %r13d movl -0x3c(%rbp), %eax testl %eax, %eax cmovnel %eax, %r13d jmp 0x8ce07 movl (%rbx), %r13d movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
pvio_socket_connect_sync_or_async: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_2C], edx mov [rbp+var_38], rsi mov rbx, rdi mov rax, [rdi+40h] mov rax, [rax+480h] test rax, rax jz short loc_8CCBC mov rax, [rax+28h] test rax, rax jz short loc_8CCBC cmp byte ptr [rax+14h], 0 jz short loc_8CCBC mov rdi, rbx mov rsi, [rbp+var_38] mov edx, [rbp+var_2C] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp pvio_socket_connect_async loc_8CCBC: xor edi, edi call _time mov r14, [rbx] test r14, r14 jz loc_8CD85 mov r12, rax movsxd r15, dword ptr [rbx+24h] mov [rbp+var_58], rbx mov rdi, rbx xor esi, esi xor edx, edx call pvio_socket_blocking mov [rbp+var_50], r14 mov edi, [r14] mov rsi, [rbp+var_38] mov edx, [rbp+var_2C] call _connect mov r13d, eax xor edi, edi call _time sub rax, r12 mov [rbp+var_48], r15 imul rcx, r15, 10624DD3h mov rdx, rcx shr rdx, 3Fh sar rcx, 26h add ecx, edx movsxd r14, ecx cmp rax, r14 jg short loc_8CD93 mov ebx, 1 loc_8CD2B: mov edi, ebx call _usleep cmp r13d, 0FFFFFFFFh jnz loc_8CE07 call ___errno_location mov eax, [rax] cmp eax, 0Bh jz short loc_8CD4D cmp eax, 4 jnz short loc_8CD8D loc_8CD4D: lea r15d, [rbx+rbx] mov eax, (offset aKeyColumn192sD+29h); "le" cmp ebx, eax cmovnb r15d, eax mov rax, [rbp+var_50] mov edi, [rax] mov rsi, [rbp+var_38] mov edx, [rbp+var_2C] call _connect mov r13d, eax xor edi, edi call _time sub rax, r12 mov ebx, r15d cmp rax, r14 jle short loc_8CD2B jmp short loc_8CD93 loc_8CD85: mov r13d, 1 jmp short loc_8CE07 loc_8CD8D: mov r13d, 0FFFFFFFFh loc_8CD93: cmp dword ptr [rbp+var_48], 0 setnz al cmp r13d, 0FFFFFFFFh setz cl and cl, al cmp cl, 1 jnz short loc_8CE07 call ___errno_location mov r13d, 0FFFFFFFFh cmp dword ptr [rax], 73h ; 's' jnz short loc_8CE07 mov rbx, rax mov rdi, [rbp+var_58] xor esi, esi mov rdx, [rbp+var_48] call pvio_socket_wait_io_or_timeout test eax, eax jle short loc_8CE07 lea r8, [rbp+var_5C] mov dword ptr [r8], 4 mov rax, [rbp+var_50] mov edi, [rax] lea rcx, [rbp+var_3C] mov esi, 1 mov edx, 4 call _getsockopt test eax, eax js short loc_8CE04 mov r13d, eax mov eax, [rbp+var_3C] test eax, eax cmovnz r13d, eax jmp short loc_8CE07 loc_8CE04: mov r13d, [rbx] loc_8CE07: mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long pvio_socket_connect_sync_or_async(long long a1, long long a2, unsigned int a3) { long long v3; // rax long long v4; // rax long long v6; // rax unsigned int *v7; // r14 long long v8; // r12 long long v9; // r15 unsigned int v10; // r13d long long v11; // rdi long long v12; // r14 unsigned int v13; // ebx int v14; // eax int v15; // r15d unsigned int *v16; // rax unsigned int *v17; // rbx int v18; // eax int v19; // [rsp+4h] [rbp-5Ch] BYREF long long v20; // [rsp+8h] [rbp-58h] unsigned int *v21; // [rsp+10h] [rbp-50h] long long v22; // [rsp+18h] [rbp-48h] unsigned int v23; // [rsp+24h] [rbp-3Ch] BYREF long long v24; // [rsp+28h] [rbp-38h] unsigned int v25; // [rsp+34h] [rbp-2Ch] v25 = a3; v24 = a2; v3 = *(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL); if ( v3 ) { v4 = *(_QWORD *)(v3 + 40); if ( v4 ) { if ( *(_BYTE *)(v4 + 20) ) return pvio_socket_connect_async(a1, v24, v25); } } v6 = time(0LL); v7 = *(unsigned int **)a1; if ( *(_QWORD *)a1 ) { v8 = v6; v9 = *(int *)(a1 + 36); v20 = a1; pvio_socket_blocking((unsigned int **)a1, 0, 0LL); v21 = v7; v10 = connect(*v7, v24, v25); v11 = 0LL; v22 = v9; v12 = (int)v9 / 1000; if ( time(0LL) - v8 > v12 ) { LABEL_17: if ( (_DWORD)v22 != 0 && v10 == -1 ) { v16 = (unsigned int *)__errno_location(v11); v10 = -1; if ( *v16 == 115 ) { v17 = v16; if ( (int)pvio_socket_wait_io_or_timeout(v20, 0, v22) > 0 ) { v19 = 4; v18 = getsockopt(*v21, 1LL, 4LL, &v23, &v19); if ( v18 < 0 ) { return *v17; } else { v10 = v18; if ( v23 ) return v23; } } } } } else { v13 = 1; while ( 1 ) { v11 = v13; usleep(v13); if ( v10 != -1 ) break; v14 = *(_DWORD *)__errno_location(v13); if ( v14 != 11 && v14 != 4 ) { v10 = -1; goto LABEL_17; } v15 = 2 * v13; if ( v13 >= (unsigned int)"le" ) v15 = (unsigned int)"le"; v10 = connect(*v21, v24, v25); v11 = 0LL; v13 = v15; if ( time(0LL) - v8 > v12 ) goto LABEL_17; } } } else { return 1; } return v10; }
pvio_socket_connect_sync_or_async: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV dword ptr [RBP + -0x2c],EDX MOV qword ptr [RBP + -0x38],RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x40] MOV RAX,qword ptr [RAX + 0x480] TEST RAX,RAX JZ 0x0018ccbc MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x0018ccbc CMP byte ptr [RAX + 0x14],0x0 JZ 0x0018ccbc MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0018ce19 LAB_0018ccbc: XOR EDI,EDI CALL 0x0015f890 MOV R14,qword ptr [RBX] TEST R14,R14 JZ 0x0018cd85 MOV R12,RAX MOVSXD R15,dword ptr [RBX + 0x24] MOV qword ptr [RBP + -0x58],RBX MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0018c192 MOV qword ptr [RBP + -0x50],R14 MOV EDI,dword ptr [R14] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] CALL 0x0015f460 MOV R13D,EAX XOR EDI,EDI CALL 0x0015f890 SUB RAX,R12 MOV qword ptr [RBP + -0x48],R15 IMUL RCX,R15,0x10624dd3 MOV RDX,RCX SHR RDX,0x3f SAR RCX,0x26 ADD ECX,EDX MOVSXD R14,ECX CMP RAX,R14 JG 0x0018cd93 MOV EBX,0x1 LAB_0018cd2b: MOV EDI,EBX CALL 0x0015fcf0 CMP R13D,-0x1 JNZ 0x0018ce07 CALL 0x0015fc00 MOV EAX,dword ptr [RAX] CMP EAX,0xb JZ 0x0018cd4d CMP EAX,0x4 JNZ 0x0018cd8d LAB_0018cd4d: LEA R15D,[RBX + RBX*0x1] MOV EAX,0xf4240 CMP EBX,EAX CMOVNC R15D,EAX MOV RAX,qword ptr [RBP + -0x50] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] CALL 0x0015f460 MOV R13D,EAX XOR EDI,EDI CALL 0x0015f890 SUB RAX,R12 MOV EBX,R15D CMP RAX,R14 JLE 0x0018cd2b JMP 0x0018cd93 LAB_0018cd85: MOV R13D,0x1 JMP 0x0018ce07 LAB_0018cd8d: MOV R13D,0xffffffff LAB_0018cd93: CMP dword ptr [RBP + -0x48],0x0 SETNZ AL CMP R13D,-0x1 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x0018ce07 CALL 0x0015fc00 MOV R13D,0xffffffff CMP dword ptr [RAX],0x73 JNZ 0x0018ce07 MOV RBX,RAX MOV RDI,qword ptr [RBP + -0x58] XOR ESI,ESI MOV RDX,qword ptr [RBP + -0x48] CALL 0x0018c0d8 TEST EAX,EAX JLE 0x0018ce07 LEA R8,[RBP + -0x5c] MOV dword ptr [R8],0x4 MOV RAX,qword ptr [RBP + -0x50] MOV EDI,dword ptr [RAX] LEA RCX,[RBP + -0x3c] MOV ESI,0x1 MOV EDX,0x4 CALL 0x0015f8c0 TEST EAX,EAX JS 0x0018ce04 MOV R13D,EAX MOV EAX,dword ptr [RBP + -0x3c] TEST EAX,EAX CMOVNZ R13D,EAX JMP 0x0018ce07 LAB_0018ce04: MOV R13D,dword ptr [RBX] LAB_0018ce07: MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong pvio_socket_connect_sync_or_async(int8 *param_1,sockaddr *param_2,socklen_t param_3) { long lVar1; uint uVar2; int iVar3; ulong uVar4; time_t tVar5; time_t tVar6; int *piVar7; uint *puVar8; uint __useconds; bool bVar9; socklen_t local_64; int8 *local_60; int *local_58; long local_50; uint local_44; sockaddr *local_40; socklen_t local_34; local_40 = param_2; local_34 = param_3; if (((*(long *)(param_1[8] + 0x480) != 0) && (lVar1 = *(long *)(*(long *)(param_1[8] + 0x480) + 0x28), lVar1 != 0)) && (*(char *)(lVar1 + 0x14) != '\0')) { uVar4 = pvio_socket_connect_async(param_1,param_2,param_3); return uVar4; } tVar5 = time((time_t *)0x0); local_58 = (int *)*param_1; if (local_58 == (int *)0x0) { uVar2 = 1; } else { iVar3 = *(int *)((long)param_1 + 0x24); local_60 = param_1; pvio_socket_blocking(param_1,0,0); uVar2 = connect(*local_58,local_40,local_34); tVar6 = time((time_t *)0x0); local_50 = (long)iVar3; if (tVar6 - tVar5 <= (long)(iVar3 / 1000)) { __useconds = 1; do { usleep(__useconds); if (uVar2 != 0xffffffff) goto LAB_0018ce07; piVar7 = __errno_location(); if ((*piVar7 != 0xb) && (*piVar7 != 4)) { uVar2 = 0xffffffff; break; } bVar9 = 999999 < __useconds; __useconds = __useconds * 2; if (bVar9) { __useconds = 1000000; } uVar2 = connect(*local_58,local_40,local_34); tVar6 = time((time_t *)0x0); } while (tVar6 - tVar5 <= (long)(iVar3 / 1000)); } if (uVar2 == 0xffffffff && (int)local_50 != 0) { puVar8 = (uint *)__errno_location(); uVar2 = 0xffffffff; if ((*puVar8 == 0x73) && (iVar3 = pvio_socket_wait_io_or_timeout(local_60,0,local_50), 0 < iVar3)) { local_64 = 4; uVar2 = getsockopt(*local_58,1,4,&local_44,&local_64); if ((int)uVar2 < 0) { uVar2 = *puVar8; } else if (local_44 != 0) { uVar2 = local_44; } } } } LAB_0018ce07: return (ulong)uVar2; }
39,143
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp
void FaceTopology::Finalize() { // // Inspect all corner vertex topologies -- accumulating the presence // of irregular features for the face and assigning other internal // members used to assemble the limit surface: // // WIP - potentially want to identify presence of degenerate faces // below too, i.e. face size < 3. A subclass may specify these in // an ordered set and that would mess up some of the topological // traversals. In such case, we can initialize the vertex subset // to excludes such faces -- treating their edges as non-manifold. // // Probably need to add yet another bit per vertex here to know when // to process an otherwise simple manifold ring, i.e. hasDegenFaces // assert(_isInitialized); for (int i = 0; i < _faceSize; ++i) { FaceVertex & cTop = GetTopology(i); _combinedTag.Combine(cTop.GetTag()); _numFaceVertsTotal += cTop.GetNumFaceVertices(); } _isFinalized = true; }
O0
cpp
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize(): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) movb 0x16(%rax), %al andb $0x1, %al movzbl %al, %eax cmpw $0x0, %ax je 0x1879c4 jmp 0x1879e3 leaq 0x6eee4(%rip), %rdi # 0x1f68af leaq 0x6eeec(%rip), %rsi # 0x1f68be movl $0x55, %edx leaq 0x6ef3e(%rip), %rcx # 0x1f691c callq 0xc9440 movl $0x0, -0xc(%rbp) movq -0x38(%rbp), %rcx movl -0xc(%rbp), %eax cmpl 0x8(%rcx), %eax jge 0x187a75 movq -0x38(%rbp), %rdi movl -0xc(%rbp), %esi callq 0xc92c0 movq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, -0x18(%rbp) addq $0x14, %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rsi leaq -0x1a(%rbp), %rdi movq %rdi, -0x40(%rbp) callq 0xd3840 movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0xd3430 jmp 0x187a35 leaq -0x1a(%rbp), %rdi callq 0xc8e30 movq -0x18(%rbp), %rdi callq 0xd2a20 movl %eax, %ecx movq -0x38(%rbp), %rax addl 0x10(%rax), %ecx movl %ecx, 0x10(%rax) movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x1879ea movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) leaq -0x1a(%rbp), %rdi callq 0xc8e30 jmp 0x187a8b movq -0x38(%rbp), %rax movb 0x16(%rax), %cl andb $-0x3, %cl orb $0x2, %cl movb %cl, 0x16(%rax) addq $0x50, %rsp popq %rbp retq movq -0x28(%rbp), %rdi callq 0xd58b0 nopw %cs:(%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Bfr12FaceTopology8FinalizeEv: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_38], rax mov al, [rax+16h] and al, 1 movzx eax, al cmp ax, 0 jz short loc_1879C4 jmp short loc_1879E3 loc_1879C4: lea rdi, aIsinitialized; "_isInitialized" lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github/2025_star3"... mov edx, 55h ; 'U' lea rcx, aVoidOpensubdiv_117; "void OpenSubdiv::v3_6_0::Bfr::FaceTopol"... call ___assert_fail loc_1879E3: mov [rbp+var_C], 0 loc_1879EA: mov rcx, [rbp+var_38] mov eax, [rbp+var_C] cmp eax, [rcx+8] jge short loc_187A75 mov rdi, [rbp+var_38]; this mov esi, [rbp+var_C]; int call __ZN10OpenSubdiv6v3_6_03Bfr12FaceTopology11GetTopologyEi; OpenSubdiv::v3_6_0::Bfr::FaceTopology::GetTopology(int) mov rcx, rax mov rax, [rbp+var_38] mov [rbp+var_18], rcx add rax, 14h mov [rbp+var_48], rax mov rsi, [rbp+var_18] lea rdi, [rbp+var_1A]; this mov [rbp+var_40], rdi call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex6GetTagEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetTag(void) mov rdi, [rbp+var_48]; this mov rsi, [rbp+var_40]; OpenSubdiv::v3_6_0::Bfr::VertexTag * call __ZN10OpenSubdiv6v3_6_03Bfr14MultiVertexTag7CombineERKNS1_9VertexTagE; OpenSubdiv::v3_6_0::Bfr::MultiVertexTag::Combine(OpenSubdiv::v3_6_0::Bfr::VertexTag const&) jmp short $+2 loc_187A35: lea rdi, [rbp+var_1A]; this call __ZN10OpenSubdiv6v3_6_03Bfr9VertexTagD2Ev; OpenSubdiv::v3_6_0::Bfr::VertexTag::~VertexTag() mov rdi, [rbp+var_18]; this call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex18GetNumFaceVerticesEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetNumFaceVertices(void) mov ecx, eax mov rax, [rbp+var_38] add ecx, [rax+10h] mov [rax+10h], ecx mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_1879EA mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax lea rdi, [rbp+var_1A]; this call __ZN10OpenSubdiv6v3_6_03Bfr9VertexTagD2Ev; OpenSubdiv::v3_6_0::Bfr::VertexTag::~VertexTag() jmp short loc_187A8B loc_187A75: mov rax, [rbp+var_38] mov cl, [rax+16h] and cl, 0FDh or cl, 2 mov [rax+16h], cl add rsp, 50h pop rbp retn loc_187A8B: mov rdi, [rbp+var_28] call __Unwind_Resume
OpenSubdiv::v3_6_0::Bfr::FaceTopology * OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize( OpenSubdiv::v3_6_0::Bfr::FaceTopology *this) { OpenSubdiv::v3_6_0::Bfr::FaceTopology *result; // rax _BYTE v2[2]; // [rsp+36h] [rbp-1Ah] BYREF OpenSubdiv::v3_6_0::Bfr::FaceVertex *Topology; // [rsp+38h] [rbp-18h] int i; // [rsp+44h] [rbp-Ch] OpenSubdiv::v3_6_0::Bfr::FaceTopology *v5; // [rsp+48h] [rbp-8h] v5 = this; if ( (*((_BYTE *)this + 22) & 1) == 0 ) __assert_fail( "_isInitialized", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp", 85LL, "void OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize()"); for ( i = 0; i < *((_DWORD *)this + 2); ++i ) { Topology = (OpenSubdiv::v3_6_0::Bfr::FaceVertex *)OpenSubdiv::v3_6_0::Bfr::FaceTopology::GetTopology(this, i); OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetTag((OpenSubdiv::v3_6_0::Bfr::FaceVertex *)v2); OpenSubdiv::v3_6_0::Bfr::MultiVertexTag::Combine( (OpenSubdiv::v3_6_0::Bfr::FaceTopology *)((char *)this + 20), (const OpenSubdiv::v3_6_0::Bfr::VertexTag *)v2); OpenSubdiv::v3_6_0::Bfr::VertexTag::~VertexTag((OpenSubdiv::v3_6_0::Bfr::VertexTag *)v2); *((_DWORD *)this + 4) += OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetNumFaceVertices(Topology); } result = this; *((_BYTE *)this + 22) = *((_BYTE *)this + 22) & 0xFD | 2; return result; }
39,144
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp
void FaceTopology::Finalize() { // // Inspect all corner vertex topologies -- accumulating the presence // of irregular features for the face and assigning other internal // members used to assemble the limit surface: // // WIP - potentially want to identify presence of degenerate faces // below too, i.e. face size < 3. A subclass may specify these in // an ordered set and that would mess up some of the topological // traversals. In such case, we can initialize the vertex subset // to excludes such faces -- treating their edges as non-manifold. // // Probably need to add yet another bit per vertex here to know when // to process an otherwise simple manifold ring, i.e. hasDegenFaces // assert(_isInitialized); for (int i = 0; i < _faceSize; ++i) { FaceVertex & cTop = GetTopology(i); _combinedTag.Combine(cTop.GetTag()); _numFaceVertsTotal += cTop.GetNumFaceVertices(); } _isFinalized = true; }
O2
cpp
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize(): pushq %rax movb 0x16(%rdi), %al testb $0x1, %al je 0x96151 movq 0x18(%rdi), %rcx movzwl 0x14(%rdi), %edx movl 0x8(%rdi), %r9d movl 0x10(%rdi), %esi xorl %r8d, %r8d testl %r9d, %r9d cmovlel %r8d, %r9d imulq $0xe0, %r9, %r9 cmpq %r8, %r9 je 0x9614a orw 0x98(%rcx,%r8), %dx movw %dx, 0x14(%rdi) addl 0xa0(%rcx,%r8), %esi movl %esi, 0x10(%rdi) addq $0xe0, %r8 jmp 0x96124 orb $0x2, %al movb %al, 0x16(%rdi) popq %rax retq leaq 0x32927(%rip), %rdi # 0xc8a7f leaq 0x3292f(%rip), %rsi # 0xc8a8e leaq 0x32986(%rip), %rcx # 0xc8aec pushq $0x55 popq %rdx callq 0x512a0
_ZN10OpenSubdiv6v3_6_03Bfr12FaceTopology8FinalizeEv: push rax mov al, [rdi+16h] test al, 1 jz short loc_96151 mov rcx, [rdi+18h] movzx edx, word ptr [rdi+14h] mov r9d, [rdi+8] mov esi, [rdi+10h] xor r8d, r8d test r9d, r9d cmovle r9d, r8d imul r9, 0E0h loc_96124: cmp r9, r8 jz short loc_9614A or dx, [rcx+r8+98h] mov [rdi+14h], dx add esi, [rcx+r8+0A0h] mov [rdi+10h], esi add r8, 0E0h jmp short loc_96124 loc_9614A: or al, 2 mov [rdi+16h], al pop rax retn loc_96151: lea rdi, aIsinitialized; "_isInitialized" lea rsi, aWorkspaceLlm4b_31; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_113; "void OpenSubdiv::v3_6_0::Bfr::FaceTopol"... push 55h ; 'U' pop rdx call ___assert_fail
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize( OpenSubdiv::v3_6_0::Bfr::FaceTopology *this) { char v1; // al long long v2; // rcx __int16 v3; // dx long long v4; // r9 int v5; // esi long long v6; // r8 long long v7; // r9 v1 = *((_BYTE *)this + 22); if ( (v1 & 1) == 0 ) __assert_fail( "_isInitialized", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp", 85LL, "void OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize()"); v2 = *((_QWORD *)this + 3); v3 = *((_WORD *)this + 10); v4 = *((unsigned int *)this + 2); v5 = *((_DWORD *)this + 4); v6 = 0LL; if ( (int)v4 <= 0 ) v4 = 0LL; v7 = 224 * v4; while ( v7 != v6 ) { v3 |= *(_WORD *)(v2 + v6 + 152); *((_WORD *)this + 10) = v3; v5 += *(_DWORD *)(v2 + v6 + 160); *((_DWORD *)this + 4) = v5; v6 += 224LL; } *((_BYTE *)this + 22) = v1 | 2; }
Finalize: PUSH RAX MOV AL,byte ptr [RDI + 0x16] TEST AL,0x1 JZ 0x00196151 MOV RCX,qword ptr [RDI + 0x18] MOVZX EDX,word ptr [RDI + 0x14] MOV R9D,dword ptr [RDI + 0x8] MOV ESI,dword ptr [RDI + 0x10] XOR R8D,R8D TEST R9D,R9D CMOVLE R9D,R8D IMUL R9,R9,0xe0 LAB_00196124: CMP R9,R8 JZ 0x0019614a OR DX,word ptr [RCX + R8*0x1 + 0x98] MOV word ptr [RDI + 0x14],DX ADD ESI,dword ptr [RCX + R8*0x1 + 0xa0] MOV dword ptr [RDI + 0x10],ESI ADD R8,0xe0 JMP 0x00196124 LAB_0019614a: OR AL,0x2 MOV byte ptr [RDI + 0x16],AL POP RAX RET LAB_00196151: LEA RDI,[0x1c8a7f] LEA RSI,[0x1c8a8e] LEA RCX,[0x1c8aec] PUSH 0x55 POP RDX CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize() */ int8 __thiscall OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize(FaceTopology *this) { int8 in_RAX; ushort uVar1; int iVar2; ulong uVar3; ulong uVar4; if (((byte)this[0x16] & 1) != 0) { uVar1 = *(ushort *)(this + 0x14); iVar2 = *(int *)(this + 0x10); uVar3 = 0; uVar4 = (ulong)*(uint *)(this + 8); if ((int)*(uint *)(this + 8) < 1) { uVar4 = uVar3; } for (; uVar4 * 0xe0 - uVar3 != 0; uVar3 = uVar3 + 0xe0) { uVar1 = uVar1 | *(ushort *)(*(long *)(this + 0x18) + 0x98 + uVar3); *(ushort *)(this + 0x14) = uVar1; iVar2 = iVar2 + *(int *)(*(long *)(this + 0x18) + 0xa0 + uVar3); *(int *)(this + 0x10) = iVar2; } this[0x16] = (FaceTopology)((byte)this[0x16] | 2); return in_RAX; } /* WARNING: Subroutine does not return */ __assert_fail("_isInitialized", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp" ,0x55,"void OpenSubdiv::v3_6_0::Bfr::FaceTopology::Finalize()"); }
39,145
Settings::getCount(int) const
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
uint64_t Settings::getCount(int typeShip) const { std::lock_guard<std::mutex> lock(settings_mutex); auto it = shipCounts.find(typeShip); if (it != shipCounts.end()) { return it->second; } return 0; }
O0
cpp
Settings::getCount(int) const: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x58(%rbp) leaq -0x20(%rbp), %rdi callq 0xb6f0 movq -0x58(%rbp), %rdi addq $0x60, %rdi leaq -0x14(%rbp), %rsi callq 0xbaf0 movq %rax, -0x50(%rbp) jmp 0xa3e7 movq -0x58(%rbp), %rdi movq -0x50(%rbp), %rax movq %rax, -0x28(%rbp) addq $0x60, %rdi callq 0xbb50 movq %rax, -0x40(%rbp) leaq -0x28(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0xbb20 xorb $-0x1, %al testb $0x1, %al jne 0xa415 jmp 0xa446 leaq -0x28(%rbp), %rdi callq 0xbb80 movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) movl $0x1, -0x44(%rbp) jmp 0xa455 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) leaq -0x20(%rbp), %rdi callq 0xb780 jmp 0xa468 movq $0x0, -0x8(%rbp) movl $0x1, -0x44(%rbp) leaq -0x20(%rbp), %rdi callq 0xb780 movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq movq -0x30(%rbp), %rdi callq 0x7630 nopw %cs:(%rax,%rax)
_ZNK8Settings8getCountEi: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rsi, [rbp+var_10] mov [rbp+var_58], rsi lea rdi, [rbp+var_20] call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) mov rdi, [rbp+var_58] add rdi, 60h ; '`' lea rsi, [rbp+var_14] call _ZNKSt3mapIimSt4lessIiESaISt4pairIKimEEE4findERS3_; std::map<int,ulong>::find(int const&) mov [rbp+var_50], rax jmp short $+2 loc_A3E7: mov rdi, [rbp+var_58] mov rax, [rbp+var_50] mov [rbp+var_28], rax add rdi, 60h ; '`' call _ZNKSt3mapIimSt4lessIiESaISt4pairIKimEEE3endEv; std::map<int,ulong>::end(void) mov [rbp+var_40], rax lea rdi, [rbp+var_28] lea rsi, [rbp+var_40] call _ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIKimEES5_; std::operator==(std::_Rb_tree_const_iterator<std::pair<int const,ulong>> const&,std::_Rb_tree_const_iterator<std::pair<int const,ulong>> const&) xor al, 0FFh test al, 1 jnz short loc_A415 jmp short loc_A446 loc_A415: lea rdi, [rbp+var_28] call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKimEEptEv; std::_Rb_tree_const_iterator<std::pair<int const,ulong>>::operator->(void) mov rax, [rax+8] mov [rbp+var_8], rax mov [rbp+var_44], 1 jmp short loc_A455 mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax lea rdi, [rbp+var_20] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() jmp short loc_A468 loc_A446: mov [rbp+var_8], 0 mov [rbp+var_44], 1 loc_A455: lea rdi, [rbp+var_20] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() mov rax, [rbp+var_8] add rsp, 60h pop rbp retn loc_A468: mov rdi, [rbp+var_30] call __Unwind_Resume
long long Settings::getCount(Settings *this, int a2) { long long v3; // [rsp+20h] [rbp-40h] BYREF long long v4; // [rsp+38h] [rbp-28h] BYREF _BYTE v5[12]; // [rsp+40h] [rbp-20h] BYREF int v6; // [rsp+4Ch] [rbp-14h] BYREF Settings *v7; // [rsp+50h] [rbp-10h] long long v8; // [rsp+58h] [rbp-8h] v7 = this; v6 = a2; std::lock_guard<std::mutex>::lock_guard(v5); v4 = std::map<int,unsigned long>::find((char *)this + 96, &v6); v3 = std::map<int,unsigned long>::end((char *)this + 96); if ( (std::operator==(&v4, &v3) & 1) != 0 ) v8 = 0LL; else v8 = *(_QWORD *)(std::_Rb_tree_const_iterator<std::pair<int const,unsigned long>>::operator->(&v4) + 8); std::lock_guard<std::mutex>::~lock_guard(v5); return v8; }
getCount: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RSI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RSI LEA RDI,[RBP + -0x20] CALL 0x0010b6f0 MOV RDI,qword ptr [RBP + -0x58] ADD RDI,0x60 LAB_0010a3d8: LEA RSI,[RBP + -0x14] CALL 0x0010baf0 LAB_0010a3e1: MOV qword ptr [RBP + -0x50],RAX JMP 0x0010a3e7 LAB_0010a3e7: MOV RDI,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x28],RAX ADD RDI,0x60 CALL 0x0010bb50 MOV qword ptr [RBP + -0x40],RAX LEA RDI,[RBP + -0x28] LEA RSI,[RBP + -0x40] CALL 0x0010bb20 XOR AL,0xff TEST AL,0x1 JNZ 0x0010a415 JMP 0x0010a446 LAB_0010a415: LEA RDI,[RBP + -0x28] CALL 0x0010bb80 MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x44],0x1 JMP 0x0010a455 LAB_0010a446: MOV qword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x44],0x1 LAB_0010a455: LEA RDI,[RBP + -0x20] CALL 0x0010b780 MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
/* Settings::getCount(int) const */ int8 __thiscall Settings::getCount(Settings *this,int param_1) { byte bVar1; long lVar2; int8 local_48 [3]; int8 local_30; lock_guard<std::mutex> local_28 [12]; int local_1c; Settings *local_18; int8 local_10; local_1c = param_1; local_18 = this; std::lock_guard<std::mutex>::lock_guard(local_28,(mutex *)this); /* try { // try from 0010a3d8 to 0010a3e0 has its CatchHandler @ 0010a42f */ local_30 = std:: map<int,unsigned_long,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> ::find((map<int,unsigned_long,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> *)(this + 0x60),&local_1c); local_48[0] = std:: map<int,unsigned_long,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> ::end((map<int,unsigned_long,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> *)(this + 0x60)); bVar1 = std::operator==((_Rb_tree_const_iterator *)&local_30,(_Rb_tree_const_iterator *)local_48); if (((bVar1 ^ 0xff) & 1) == 0) { local_10 = 0; } else { lVar2 = std::_Rb_tree_const_iterator<std::pair<int_const,unsigned_long>>::operator-> ((_Rb_tree_const_iterator<std::pair<int_const,unsigned_long>> *)&local_30); local_10 = *(int8 *)(lVar2 + 8); } std::lock_guard<std::mutex>::~lock_guard(local_28); return local_10; }
39,146
Settings::getCount(int) const
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
uint64_t Settings::getCount(int typeShip) const { std::lock_guard<std::mutex> lock(settings_mutex); auto it = shipCounts.find(typeShip); if (it != shipCounts.end()) { return it->second; } return 0; }
O2
cpp
Settings::getCount(int) const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x4(%rsp), %r14 movl %esi, (%r14) callq 0x6e34 leaq 0x60(%rbx), %rdi movq %r14, %rsi callq 0x12e76 leaq 0x68(%rbx), %rcx cmpq %rcx, %rax je 0x6337 movq 0x28(%rax), %r14 jmp 0x633a xorl %r14d, %r14d movq %rbx, %rdi callq 0x52c0 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi callq 0x52c0 movq %r14, %rdi callq 0x5590
_ZNK8Settings8getCountEi: push r14 push rbx push rax mov rbx, rdi lea r14, [rsp+18h+var_14] mov [r14], esi call _ZNSt5mutex4lockEv; std::mutex::lock(void) lea rdi, [rbx+60h] mov rsi, r14 call _ZNKSt8_Rb_treeIiSt4pairIKimESt10_Select1stIS2_ESt4lessIiESaIS2_EE4findERS1_; std::_Rb_tree<int,std::pair<int const,ulong>,std::_Select1st<std::pair<int const,ulong>>,std::less<int>,std::allocator<std::pair<int const,ulong>>>::find(int const&) lea rcx, [rbx+68h] cmp rax, rcx jz short loc_6337 mov r14, [rax+28h] jmp short loc_633A loc_6337: xor r14d, r14d loc_633A: mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 8 pop rbx pop r14 retn mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long Settings::getCount(Settings *this, int a2) { _QWORD *v2; // rax long long v3; // r14 _DWORD v5[5]; // [rsp+0h] [rbp-14h] BYREF v5[0] = a2; std::mutex::lock(this); v2 = (_QWORD *)std::_Rb_tree<int,std::pair<int const,unsigned long>,std::_Select1st<std::pair<int const,unsigned long>>,std::less<int>,std::allocator<std::pair<int const,unsigned long>>>::find( (char *)this + 96, v5); if ( v2 == (_QWORD *)((char *)this + 104) ) v3 = 0LL; else v3 = v2[5]; pthread_mutex_unlock(this); return v3; }
getCount: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RSP + 0x4] MOV dword ptr [R14],ESI CALL 0x00106e34 LEA RDI,[RBX + 0x60] LAB_00106320: MOV RSI,R14 CALL 0x00112e76 LAB_00106328: LEA RCX,[RBX + 0x68] CMP RAX,RCX JZ 0x00106337 MOV R14,qword ptr [RAX + 0x28] JMP 0x0010633a LAB_00106337: XOR R14D,R14D LAB_0010633a: MOV RDI,RBX CALL 0x001052c0 MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* Settings::getCount(int) const */ int8 Settings::getCount(int param_1) { long lVar1; int4 in_register_0000003c; pthread_mutex_t *__mutex; int8 uVar2; int local_14; __mutex = (pthread_mutex_t *)CONCAT44(in_register_0000003c,param_1); std::mutex::lock(); /* try { // try from 00106320 to 00106327 has its CatchHandler @ 0010634d */ lVar1 = std:: _Rb_tree<int,std::pair<int_const,unsigned_long>,std::_Select1st<std::pair<int_const,unsigned_long>>,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> ::find((_Rb_tree<int,std::pair<int_const,unsigned_long>,std::_Select1st<std::pair<int_const,unsigned_long>>,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> *)((long)__mutex + 0x60),&local_14); if (lVar1 == (long)__mutex + 0x68) { uVar2 = 0; } else { uVar2 = *(int8 *)(lVar1 + 0x28); } pthread_mutex_unlock(__mutex); return uVar2; }
39,147
Settings::getCount(int) const
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
uint64_t Settings::getCount(int typeShip) const { std::lock_guard<std::mutex> lock(settings_mutex); auto it = shipCounts.find(typeShip); if (it != shipCounts.end()) { return it->second; } return 0; }
O3
cpp
Settings::getCount(int) const: pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebp movq %rdi, %rbx callq 0x5500 testl %eax, %eax jne 0x68c8 movq 0x70(%rbx), %rcx testq %rcx, %rcx je 0x68af leaq 0x68(%rbx), %rdx movq %rdx, %rax xorl %esi, %esi cmpl %ebp, 0x20(%rcx) setl %sil cmovgeq %rcx, %rax movq 0x10(%rcx,%rsi,8), %rcx testq %rcx, %rcx jne 0x688e cmpq %rdx, %rax je 0x68af cmpl %ebp, 0x20(%rax) jle 0x68c2 xorl %r14d, %r14d movq %rbx, %rdi callq 0x52d0 movq %r14, %rax popq %rbx popq %r14 popq %rbp retq movq 0x28(%rax), %r14 jmp 0x68b2 movl %eax, %edi callq 0x5260 nop
_ZNK8Settings8getCountEi: push rbp push r14 push rbx mov ebp, esi mov rbx, rdi call _pthread_mutex_lock test eax, eax jnz short loc_68C8 mov rcx, [rbx+70h] test rcx, rcx jz short loc_68AF lea rdx, [rbx+68h] mov rax, rdx loc_688E: xor esi, esi cmp [rcx+20h], ebp setl sil cmovge rax, rcx mov rcx, [rcx+rsi*8+10h] test rcx, rcx jnz short loc_688E cmp rax, rdx jz short loc_68AF cmp [rax+20h], ebp jle short loc_68C2 loc_68AF: xor r14d, r14d loc_68B2: mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 pop rbx pop r14 pop rbp retn loc_68C2: mov r14, [rax+28h] jmp short loc_68B2 loc_68C8: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long Settings::getCount(Settings *this, int a2) { int v2; // eax char *v3; // rcx char *v4; // rax long long v5; // r14 v2 = pthread_mutex_lock(this); if ( v2 ) std::__throw_system_error(v2); v3 = (char *)*((_QWORD *)this + 14); if ( !v3 ) goto LABEL_9; v4 = (char *)this + 104; do { if ( *((_DWORD *)v3 + 8) >= a2 ) v4 = v3; v3 = *(char **)&v3[8 * (*((_DWORD *)v3 + 8) < a2) + 16]; } while ( v3 ); if ( v4 != (char *)this + 104 && *((_DWORD *)v4 + 8) <= a2 ) v5 = *((_QWORD *)v4 + 5); else LABEL_9: v5 = 0LL; pthread_mutex_unlock(this); return v5; }
getCount: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ESI MOV RBX,RDI CALL 0x00105500 TEST EAX,EAX JNZ 0x001068c8 MOV RCX,qword ptr [RBX + 0x70] TEST RCX,RCX JZ 0x001068af LEA RDX,[RBX + 0x68] MOV RAX,RDX LAB_0010688e: XOR ESI,ESI CMP dword ptr [RCX + 0x20],EBP SETL SIL CMOVGE RAX,RCX MOV RCX,qword ptr [RCX + RSI*0x8 + 0x10] TEST RCX,RCX JNZ 0x0010688e CMP RAX,RDX JZ 0x001068af CMP dword ptr [RAX + 0x20],EBP JLE 0x001068c2 LAB_001068af: XOR R14D,R14D LAB_001068b2: MOV RDI,RBX CALL 0x001052d0 MOV RAX,R14 POP RBX POP R14 POP RBP RET LAB_001068c2: MOV R14,qword ptr [RAX + 0x28] JMP 0x001068b2 LAB_001068c8: MOV EDI,EAX CALL 0x00105260
/* Settings::getCount(int) const */ int8 __thiscall Settings::getCount(Settings *this,int param_1) { int iVar1; Settings *pSVar2; Settings *pSVar3; int8 uVar4; iVar1 = pthread_mutex_lock((pthread_mutex_t *)this); if (iVar1 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } pSVar3 = *(Settings **)(this + 0x70); if (pSVar3 != (Settings *)0x0) { pSVar2 = this + 0x68; do { if (param_1 <= *(int *)(pSVar3 + 0x20)) { pSVar2 = pSVar3; } pSVar3 = *(Settings **)(pSVar3 + (ulong)(*(int *)(pSVar3 + 0x20) < param_1) * 8 + 0x10); } while (pSVar3 != (Settings *)0x0); if ((pSVar2 != this + 0x68) && (*(int *)(pSVar2 + 0x20) <= param_1)) { uVar4 = *(int8 *)(pSVar2 + 0x28); goto LAB_001068b2; } } uVar4 = 0; LAB_001068b2: pthread_mutex_unlock((pthread_mutex_t *)this); return uVar4; }
39,148
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>> 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>::erase<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>>, 0>(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>>)
monkey531[P]llama/common/json.hpp
IteratorType erase(IteratorType pos) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } IteratorType result = end(); switch (m_data.m_type) { case value_t::boolean: case value_t::number_float: case value_t::number_integer: case value_t::number_unsigned: case value_t::string: case value_t::binary: { if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) { JSON_THROW(invalid_iterator::create(205, "iterator out of range", this)); } if (is_string()) { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); m_data.m_value.string = nullptr; } else if (is_binary()) { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); m_data.m_value.binary = nullptr; } m_data.m_type = value_t::null; assert_invariant(); break; } case value_t::object: { result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator); break; } case value_t::array: { result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator); break; } case value_t::null: case value_t::discarded: default: JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); } return result; }
O0
cpp
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>> 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>::erase<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>>, 0>(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>>): subq $0x138, %rsp # imm = 0x138 movq %rdx, 0x50(%rsp) movq %rdi, 0x58(%rsp) movq %rdi, %rax movq %rax, 0x60(%rsp) movq %rdi, 0x130(%rsp) movq %rsi, 0x128(%rsp) movq %rdx, 0x120(%rsp) movq 0x128(%rsp), %rax movq %rax, 0x68(%rsp) cmpq (%rdx), %rax setne %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xf5281 jmp 0xf5367 movb $0x1, 0xeb(%rsp) movl $0x20, %edi callq 0x565c0 movq %rax, 0x40(%rsp) leaq 0xff(%rsp), %rdi movq %rdi, 0x48(%rsp) callq 0x56f00 movq 0x48(%rsp), %rdx leaq 0xf3aff(%rip), %rsi # 0x1e8db5 leaq 0x100(%rsp), %rdi callq 0x66600 jmp 0xf52c5 movq 0x68(%rsp), %rcx movq 0x40(%rsp), %rdi movl $0xca, %esi leaq 0x100(%rsp), %rdx callq 0xf5d80 jmp 0xf52e3 movq 0x40(%rsp), %rdi movb $0x0, 0xeb(%rsp) leaq 0x177f39(%rip), %rsi # 0x26d230 leaq 0xc32(%rip), %rdx # 0xf5f30 callq 0x569b0 jmp 0xf5773 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf533f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0x100(%rsp), %rdi callq 0x572d0 leaq 0xff(%rsp), %rdi callq 0x572b0 testb $0x1, 0xeb(%rsp) jne 0xf5358 jmp 0xf5362 movq 0x40(%rsp), %rdi callq 0x56dd0 jmp 0xf5766 movq 0x68(%rsp), %rsi movq 0x58(%rsp), %rdi callq 0xf4f80 movq 0x68(%rsp), %rax movzbl (%rax), %eax movq %rax, 0x38(%rsp) subq $0x9, %rax ja 0xf5692 movq 0x38(%rsp), %rax leaq 0xf0bff(%rip), %rcx # 0x1e5f98 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x50(%rsp), %rdi addq $0x8, %rdi addq $0x10, %rdi callq 0xf6190 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xf53c3 jmp 0xf54a9 movb $0x1, 0xc6(%rsp) movl $0x20, %edi callq 0x565c0 movq %rax, 0x28(%rsp) leaq 0xc7(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x56f00 movq 0x30(%rsp), %rdx leaq 0xf39e1(%rip), %rsi # 0x1e8dd9 leaq 0xc8(%rsp), %rdi callq 0x66600 jmp 0xf5407 movq 0x68(%rsp), %rcx movq 0x28(%rsp), %rdi movl $0xcd, %esi leaq 0xc8(%rsp), %rdx callq 0xf5d80 jmp 0xf5425 movq 0x28(%rsp), %rdi movb $0x0, 0xc6(%rsp) leaq 0x177df7(%rip), %rsi # 0x26d230 leaq 0xaf0(%rip), %rdx # 0xf5f30 callq 0x569b0 jmp 0xf5773 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf5481 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xc8(%rsp), %rdi callq 0x572d0 leaq 0xc7(%rsp), %rdi callq 0x572b0 testb $0x1, 0xc6(%rsp) jne 0xf549a jmp 0xf54a4 movq 0x28(%rsp), %rdi callq 0x56dd0 jmp 0xf5766 movq 0x68(%rsp), %rdi callq 0xde6f0 testb $0x1, %al jne 0xf54bc jmp 0xf5540 leaq 0xc5(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x666c0 movq 0x68(%rsp), %rax movq 0x20(%rsp), %rdi movq 0x8(%rax), %rsi callq 0x685c0 movq 0x68(%rsp), %rax movq 0x20(%rsp), %rdi movq 0x8(%rax), %rsi movl $0x1, %edx callq 0x68610 jmp 0xf54fb movq 0x68(%rsp), %rax movq $0x0, 0x8(%rax) leaq 0xc5(%rsp), %rdi callq 0x66d60 jmp 0xf55d6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xc5(%rsp), %rdi callq 0x66d60 jmp 0xf5766 movq 0x68(%rsp), %rdi callq 0xf61b0 testb $0x1, %al jne 0xf5553 jmp 0xf55d4 leaq 0xc4(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0xdf980 movq 0x68(%rsp), %rax movq 0x18(%rsp), %rdi movq 0x8(%rax), %rsi callq 0xdf990 movq 0x68(%rsp), %rax movq 0x18(%rsp), %rdi movq 0x8(%rax), %rsi movl $0x1, %edx callq 0xdf9c0 jmp 0xf5592 movq 0x68(%rsp), %rax movq $0x0, 0x8(%rax) leaq 0xc4(%rsp), %rdi callq 0xdf9f0 jmp 0xf55d4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xc4(%rsp), %rdi callq 0xdf9f0 jmp 0xf5766 jmp 0xf55d6 movq 0x68(%rsp), %rdi movb $0x0, (%rdi) movl $0x1, %esi callq 0xdc830 jmp 0xf5759 movq 0x50(%rsp), %rax movq 0x68(%rsp), %rcx movq 0x8(%rcx), %rdi movq 0x8(%rax), %rax movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rsi callq 0xf61d0 movq %rax, %rcx movq 0x58(%rsp), %rax movq %rcx, 0xb8(%rsp) movq 0xb8(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xf5759 movq 0x50(%rsp), %rsi movq 0x68(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) addq $0x8, %rsi addq $0x8, %rsi leaq 0xa0(%rsp), %rdi callq 0xf62b0 movq 0x10(%rsp), %rdi movq 0xa0(%rsp), %rsi callq 0xf6240 movq %rax, %rcx movq 0x58(%rsp), %rax movq %rcx, 0xa8(%rsp) movq 0xa8(%rsp), %rcx movq %rcx, 0x10(%rax) jmp 0xf5759 jmp 0xf5692 movb $0x1, 0x77(%rsp) movl $0x20, %edi callq 0x565c0 movq 0x68(%rsp), %rdi movq %rax, 0x8(%rsp) callq 0xdd300 movq %rax, 0x78(%rsp) leaq 0xf3733(%rip), %rsi # 0x1e8def leaq 0x80(%rsp), %rdi leaq 0x78(%rsp), %rdx callq 0xf64a0 jmp 0xf56d0 movq 0x68(%rsp), %rcx movq 0x8(%rsp), %rdi movl $0x133, %esi # imm = 0x133 leaq 0x80(%rsp), %rdx callq 0xf62f0 jmp 0xf56ee movq 0x8(%rsp), %rdi movb $0x0, 0x77(%rsp) leaq 0x177a09(%rip), %rsi # 0x26d108 leaq -0x18356(%rip), %rdx # 0xdd3b0 callq 0x569b0 jmp 0xf5773 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf5744 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0x80(%rsp), %rdi callq 0x572d0 testb $0x1, 0x77(%rsp) jne 0xf574d jmp 0xf5757 movq 0x8(%rsp), %rdi callq 0x56dd0 jmp 0xf5766 movq 0x60(%rsp), %rax addq $0x138, %rsp # imm = 0x138 retq movq 0xf0(%rsp), %rdi callq 0x56a10 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: sub rsp, 138h mov qword ptr [rsp+138h+var_E8], rdx; char mov qword ptr [rsp+138h+var_E0], rdi; int mov rax, rdi mov qword ptr [rsp+138h+var_D8], rax; int mov [rsp+138h+var_8], rdi mov qword ptr [rsp+138h+var_10], rsi mov [rsp+138h+var_18], rdx mov rax, qword ptr [rsp+138h+var_10] mov qword ptr [rsp+138h+var_D0], rax; int cmp rax, [rdx] setnz al xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_F5281 jmp loc_F5367 loc_F5281: mov [rsp+138h+var_4D], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+138h+var_F8], rax; __int64 lea rdi, [rsp+138h+var_39] mov qword ptr [rsp+138h+var_F0], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+138h+var_F0] lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdi, [rsp+138h+var_39+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_F52C5: mov rcx, qword ptr [rsp+138h+var_D0] mov rdi, [rsp+138h+var_F8]; int mov esi, 0CAh lea rdx, [rsp+138h+var_39+1] call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_F52E3: mov rdi, [rsp+138h+var_F8]; void * mov [rsp+138h+var_4D], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_F5773 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F533F mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F533F: lea rdi, [rsp+arg_F7] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_E3], 1 jnz short loc_F5358 jmp short loc_F5362 loc_F5358: mov rdi, [rsp+arg_38]; void * call ___cxa_free_exception loc_F5362: jmp loc_F5766 loc_F5367: mov rsi, qword ptr [rsp+138h+var_D0] mov rdi, qword ptr [rsp+138h+var_E0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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 rax, qword ptr [rsp+138h+var_D0] movzx eax, byte ptr [rax] mov qword ptr [rsp+138h+var_100], rax; int sub rax, 9; switch 10 cases ja def_F53A0; jumptable 00000000000F53A0 default case mov rax, qword ptr [rsp+138h+var_100] lea rcx, jpt_F53A0 movsxd rax, ds:(jpt_F53A0 - 1E5F98h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_F53A2: mov rdi, qword ptr [rsp+138h+var_E8]; jumptable 00000000000F53A0 cases 3-8 add rdi, 8 add rdi, 10h; this call _ZNK8nlohmann16json_abi_v3_11_36detail20primitive_iterator_t8is_beginEv; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::is_begin(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_F53C3 jmp loc_F54A9 loc_F53C3: mov [rsp+138h+var_72], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+138h+var_110], rax; int lea rdi, [rsp+138h+var_71] mov qword ptr [rsp+138h+var_108], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+138h+var_108] lea rsi, aIteratorOutOfR; "iterator out of range" lea rdi, [rsp+138h+var_71+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_F5407: mov rcx, qword ptr [rsp+138h+var_D0] mov rdi, [rsp+138h+var_110]; int mov esi, 0CDh lea rdx, [rsp+138h+var_71+1] call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_F5425: mov rdi, [rsp+138h+var_110]; void * mov [rsp+138h+var_72], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_F5773 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F5481 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F5481: lea rdi, [rsp+arg_BF] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_BE], 1 jnz short loc_F549A jmp short loc_F54A4 loc_F549A: mov rdi, [rsp+arg_20]; void * call ___cxa_free_exception loc_F54A4: jmp loc_F5766 loc_F54A9: mov rdi, qword ptr [rsp+138h+var_D0] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_stringEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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_string(void) test al, 1 jnz short loc_F54BC jmp loc_F5540 loc_F54BC: lea rdi, [rsp+138h+var_73] mov [rsp+138h+var_118], rdi call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; std::allocator<std::string>::allocator(void) mov rax, qword ptr [rsp+138h+var_D0] mov rdi, [rsp+138h+var_118] mov rsi, [rax+8] call _ZNSt16allocator_traitsISaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE7destroyIS5_EEvRS6_PT_; std::allocator_traits<std::allocator<std::string>>::destroy<std::string>(std::allocator<std::string>&,std::string *) mov rax, qword ptr [rsp+138h+var_D0] mov rdi, [rsp+138h+var_118] mov rsi, [rax+8] mov edx, 1 call _ZNSt16allocator_traitsISaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE10deallocateERS6_PS5_m; std::allocator_traits<std::allocator<std::string>>::deallocate(std::allocator<std::string>&,std::string*,ulong) jmp short $+2 loc_F54FB: mov rax, qword ptr [rsp+138h+var_D0] mov qword ptr [rax+8], 0 lea rdi, [rsp+138h+var_73] call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator() jmp loc_F55D6 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_BD] call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator() jmp loc_F5766 loc_F5540: mov rdi, qword ptr [rsp+138h+var_D0] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_binaryEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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_binary(void) test al, 1 jnz short loc_F5553 jmp loc_F55D4 loc_F5553: lea rdi, [rsp+138h+var_74] mov [rsp+138h+var_120], rdi call _ZNSaIN8nlohmann16json_abi_v3_11_327byte_container_with_subtypeISt6vectorIhSaIhEEEEEC2Ev; std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>>::allocator(void) mov rax, qword ptr [rsp+138h+var_D0] mov rdi, [rsp+138h+var_120] mov rsi, [rax+8] call _ZNSt16allocator_traitsISaIN8nlohmann16json_abi_v3_11_327byte_container_with_subtypeISt6vectorIhSaIhEEEEEE7destroyIS6_EEvRS7_PT_; std::allocator_traits<std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>>>::destroy<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>>(std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>>&,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> *) mov rax, qword ptr [rsp+138h+var_D0] mov rdi, [rsp+138h+var_120] mov rsi, [rax+8] mov edx, 1 call _ZNSt16allocator_traitsISaIN8nlohmann16json_abi_v3_11_327byte_container_with_subtypeISt6vectorIhSaIhEEEEEE10deallocateERS7_PS6_m; std::allocator_traits<std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>>>::deallocate(std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>>&,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>*,ulong) jmp short $+2 loc_F5592: mov rax, qword ptr [rsp+138h+var_D0] mov qword ptr [rax+8], 0 lea rdi, [rsp+138h+var_74] call _ZNSaIN8nlohmann16json_abi_v3_11_327byte_container_with_subtypeISt6vectorIhSaIhEEEEED2Ev; std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>>::~allocator() jmp short loc_F55D4 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_BC] call _ZNSaIN8nlohmann16json_abi_v3_11_327byte_container_with_subtypeISt6vectorIhSaIhEEEEED2Ev; std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>>::~allocator() jmp loc_F5766 loc_F55D4: jmp short $+2 loc_F55D6: mov rdi, qword ptr [rsp+138h+var_D0] mov byte ptr [rdi], 0 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp loc_F5759 loc_F55ED: mov rax, qword ptr [rsp+138h+var_E8]; jumptable 00000000000F53A0 case 1 mov rcx, qword ptr [rsp+138h+var_D0] mov rdi, [rcx+8] mov rax, [rax+8] mov [rsp+138h+var_88], rax mov rsi, [rsp+138h+var_88] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEE; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::erase(__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>>>>) mov rcx, rax mov rax, qword ptr [rsp+138h+var_E0] mov [rsp+138h+var_80], rcx mov rcx, [rsp+138h+var_80] mov [rax+8], rcx jmp loc_F5759 loc_F5635: mov rsi, qword ptr [rsp+138h+var_E8]; jumptable 00000000000F53A0 case 2 mov rax, qword ptr [rsp+138h+var_D0] mov rax, [rax+8] mov [rsp+138h+var_128], rax add rsi, 8 add rsi, 8 lea rdi, [rsp+138h+var_98] call _ZN9__gnu_cxx17__normal_iteratorIPKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEC2IPSF_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISN_SM_EE7__valueESJ_E6__typeEEE mov rdi, [rsp+138h+var_128] mov rsi, [rsp+138h+var_98] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EE; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::erase(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) mov rcx, rax mov rax, qword ptr [rsp+138h+var_E0] mov [rsp+138h+var_90], rcx mov rcx, [rsp+138h+var_90] mov [rax+10h], rcx jmp loc_F5759 loc_F5690: jmp short $+2; jumptable 00000000000F53A0 cases 0,9 def_F53A0: mov [rsp+138h+var_C1], 1; jumptable 00000000000F53A0 default case mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, qword ptr [rsp+138h+var_D0] mov [rsp+138h+var_130], rax; int 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+138h+var_C0], rax; int lea rsi, aCannotUseErase; "cannot use erase() with " lea rdi, [rsp+138h+var_B8]; int lea rdx, [rsp+138h+var_C0]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&) jmp short $+2 loc_F56D0: mov rcx, qword ptr [rsp+138h+var_D0] mov rdi, [rsp+138h+var_130]; int mov esi, 133h lea rdx, [rsp+138h+var_B8] 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_F56EE: mov rdi, [rsp+138h+var_130]; void * mov [rsp+138h+var_C1], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_F5773 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F5744 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F5744: test [rsp+arg_6F], 1 jnz short loc_F574D jmp short loc_F5757 loc_F574D: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_F5757: jmp short loc_F5766 loc_F5759: mov rax, qword ptr [rsp+138h+var_D8] add rsp, 138h retn loc_F5766: mov rdi, [rsp+arg_E8] call __Unwind_Resume loc_F5773: nop word ptr [rax+rax+00000000h] nop dword ptr [rax]
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_( long long a1, unsigned __int8 *a2, unsigned __int8 **a3) { long long v3; // rcx long long v4; // r8 long long v5; // r9 long long v6; // rcx long long v7; // r8 long long v8; // r9 int v9; // ecx int v10; // r8d int v11; // r9d int v13; // [rsp+0h] [rbp-138h] int v14; // [rsp+0h] [rbp-138h] int v15; // [rsp+8h] [rbp-130h] void *v16; // [rsp+8h] [rbp-130h] int v17; // [rsp+8h] [rbp-130h] void *v18; // [rsp+8h] [rbp-130h] int v19; // [rsp+10h] [rbp-128h] long long v20; // [rsp+10h] [rbp-128h] int v21; // [rsp+10h] [rbp-128h] long long v22; // [rsp+18h] [rbp-120h] char v23; // [rsp+18h] [rbp-120h] int v24; // [rsp+20h] [rbp-118h] int v25; // [rsp+28h] [rbp-110h] int v26; // [rsp+28h] [rbp-110h] void *v27; // [rsp+28h] [rbp-110h] int v28; // [rsp+30h] [rbp-108h] int v29; // [rsp+38h] [rbp-100h] int v30; // [rsp+38h] [rbp-100h] void *v31; // [rsp+40h] [rbp-F8h] void *exception; // [rsp+40h] [rbp-F8h] void *v33; // [rsp+40h] [rbp-F8h] int v34; // [rsp+48h] [rbp-F0h] char v36; // [rsp+70h] [rbp-C8h] int v37[2]; // [rsp+78h] [rbp-C0h] BYREF int v38; // [rsp+80h] [rbp-B8h] BYREF int v39; // [rsp+88h] [rbp-B0h] char v40; // [rsp+90h] [rbp-A8h] long long v41; // [rsp+A0h] [rbp-98h] BYREF long long v42; // [rsp+A8h] [rbp-90h] char v43; // [rsp+C4h] [rbp-74h] BYREF _BYTE v44[2]; // [rsp+C5h] [rbp-73h] BYREF int v45[9]; // [rsp+C7h] [rbp-71h] BYREF char v46; // [rsp+EBh] [rbp-4Dh] int v47[8]; // [rsp+FFh] [rbp-39h] BYREF unsigned __int8 **v48; // [rsp+120h] [rbp-18h] int v49[2]; // [rsp+128h] [rbp-10h] long long v50; // [rsp+130h] [rbp-8h] v50 = a1; *(_QWORD *)v49 = a2; v48 = a3; if ( a2 != *a3 ) { exception = __cxa_allocate_exception(0x20uLL); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>( (long long)v47 + 1, (long long)"iterator does not fit current value", (long long)v47); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( (int)exception, v13, v15, v19, v22, v24, v25, v28, v29, (long long)exception, (int)v47, (char)a3, a1, a1, (int)a2, v36, v37[0], v38, v39, v40); v46 = 0; __cxa_throw( v33, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, nlohmann::json_abi_v3_11_3::detail::invalid_iterator::~invalid_iterator); } 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, (long long)a2); v30 = *a2; switch ( *a2 ) { case 1u: *(_QWORD *)(a1 + 8) = 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>>>>::erase( *((_QWORD *)a2 + 1), a3[1]); break; case 2u: v20 = *((_QWORD *)a2 + 1); __gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::__normal_iterator<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>*>( &v41, a3 + 2); v42 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::erase( v20, v41); *(_QWORD *)(a1 + 16) = v42; break; case 3u: case 4u: case 5u: case 6u: case 7u: case 8u: if ( (nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::is_begin((nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t *)(a3 + 3)) & 1) == 0 ) { v26 = (unsigned int)__cxa_allocate_exception(0x20uLL); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>( (long long)v45 + 1, (long long)"iterator out of range", (long long)v45); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v26, v13, v15, v19, v22, v24, v26, (int)v45, v30, (long long)v31, v34, (char)a3, a1, a1, (int)a2, v36, v37[0], v38, v39, v40); v44[1] = 0; __cxa_throw( v27, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, nlohmann::json_abi_v3_11_3::detail::invalid_iterator::~invalid_iterator); } 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_string(a2) ) { std::allocator<std::string>::allocator((long long)v44); std::allocator_traits<std::allocator<std::string>>::destroy<std::string>((long long)v44, *((_QWORD *)a2 + 1)); std::allocator_traits<std::allocator<std::string>>::deallocate( (long long)v44, *((_QWORD *)a2 + 1), 1LL, v3, v4, v5); *((_QWORD *)a2 + 1) = 0LL; std::allocator<std::string>::~allocator((long long)v44); } else 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_binary(a2) & 1) != 0 ) { std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>>::allocator((long long)&v43); std::allocator_traits<std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>>>::destroy<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>>( (long long)&v43, *((_QWORD *)a2 + 1)); std::allocator_traits<std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>>>::deallocate( (long long)&v43, *((_QWORD *)a2 + 1), 1LL, v6, v7, v8); *((_QWORD *)a2 + 1) = 0LL; std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>>::~allocator((long long)&v43); } *a2 = 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>::assert_invariant((long long)a2); break; default: v16 = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v37 = 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(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>( (int)&v38, (int)"cannot use erase() with ", (int)v37, v9, v10, v11, v13, v16, v19, v22); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v17, v14, v17, v21, v23, v24, v25, v28, v30, (long long)v31, v34, (char)a3, a1, a1, (int)a2, v36, v37[0], v38, v39, v40); __cxa_throw( v18, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } return a1; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: SUB RSP,0x138 MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x58],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x130],RDI MOV qword ptr [RSP + 0x128],RSI MOV qword ptr [RSP + 0x120],RDX MOV RAX,qword ptr [RSP + 0x128] MOV qword ptr [RSP + 0x68],RAX CMP RAX,qword ptr [RDX] SETNZ AL XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001f5281 JMP 0x001f5367 LAB_001f5281: MOV byte ptr [RSP + 0xeb],0x1 MOV EDI,0x20 CALL 0x001565c0 MOV qword ptr [RSP + 0x40],RAX LEA RDI,[RSP + 0xff] MOV qword ptr [RSP + 0x48],RDI CALL 0x00156f00 MOV RDX,qword ptr [RSP + 0x48] LAB_001f52af: LEA RSI,[0x2e8db5] LEA RDI,[RSP + 0x100] CALL 0x00166600 JMP 0x001f52c5 LAB_001f52c5: MOV RCX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x40] MOV ESI,0xca LEA RDX,[RSP + 0x100] CALL 0x001f5d80 JMP 0x001f52e3 LAB_001f52e3: MOV RDI,qword ptr [RSP + 0x40] MOV byte ptr [RSP + 0xeb],0x0 LEA RSI,[0x36d230] LEA RDX,[0x1f5f30] CALL 0x001569b0 LAB_001f5367: MOV RSI,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x58] CALL 0x001f4f80 MOV RAX,qword ptr [RSP + 0x68] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RSP + 0x38],RAX SUB RAX,0x9 JA 0x001f5692 MOV RAX,qword ptr [RSP + 0x38] LEA RCX,[0x2e5f98] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_3: MOV RDI,qword ptr [RSP + 0x50] ADD RDI,0x8 ADD RDI,0x10 CALL 0x001f6190 XOR AL,0xff XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001f53c3 JMP 0x001f54a9 LAB_001f53c3: MOV byte ptr [RSP + 0xc6],0x1 MOV EDI,0x20 CALL 0x001565c0 MOV qword ptr [RSP + 0x28],RAX LEA RDI,[RSP + 0xc7] MOV qword ptr [RSP + 0x30],RDI CALL 0x00156f00 MOV RDX,qword ptr [RSP + 0x30] LAB_001f53f1: LEA RSI,[0x2e8dd9] LEA RDI,[RSP + 0xc8] CALL 0x00166600 JMP 0x001f5407 LAB_001f5407: MOV RCX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x28] MOV ESI,0xcd LEA RDX,[RSP + 0xc8] CALL 0x001f5d80 JMP 0x001f5425 LAB_001f5425: MOV RDI,qword ptr [RSP + 0x28] MOV byte ptr [RSP + 0xc6],0x0 LEA RSI,[0x36d230] LEA RDX,[0x1f5f30] CALL 0x001569b0 LAB_001f54a9: MOV RDI,qword ptr [RSP + 0x68] CALL 0x001de6f0 TEST AL,0x1 JNZ 0x001f54bc JMP 0x001f5540 LAB_001f54bc: LEA RDI,[RSP + 0xc5] MOV qword ptr [RSP + 0x20],RDI CALL 0x001666c0 MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001685c0 MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x8] LAB_001f54ef: MOV EDX,0x1 CALL 0x00168610 JMP 0x001f54fb LAB_001f54fb: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RAX + 0x8],0x0 LEA RDI,[RSP + 0xc5] CALL 0x00166d60 JMP 0x001f55d6 LAB_001f5540: MOV RDI,qword ptr [RSP + 0x68] CALL 0x001f61b0 TEST AL,0x1 JNZ 0x001f5553 JMP 0x001f55d4 LAB_001f5553: LEA RDI,[RSP + 0xc4] MOV qword ptr [RSP + 0x18],RDI CALL 0x001df980 MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001df990 MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RAX + 0x8] LAB_001f5586: MOV EDX,0x1 CALL 0x001df9c0 LAB_001f5590: JMP 0x001f5592 LAB_001f5592: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RAX + 0x8],0x0 LEA RDI,[RSP + 0xc4] CALL 0x001df9f0 JMP 0x001f55d4 LAB_001f55d4: JMP 0x001f55d6 LAB_001f55d6: MOV RDI,qword ptr [RSP + 0x68] MOV byte ptr [RDI],0x0 MOV ESI,0x1 CALL 0x001dc830 JMP 0x001f5759 caseD_1: MOV RAX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RCX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xb0],RAX MOV RSI,qword ptr [RSP + 0xb0] CALL 0x001f61d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xb8],RCX MOV RCX,qword ptr [RSP + 0xb8] MOV qword ptr [RAX + 0x8],RCX JMP 0x001f5759 caseD_2: MOV RSI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX ADD RSI,0x8 ADD RSI,0x8 LEA RDI,[RSP + 0xa0] CALL 0x001f62b0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0xa0] CALL 0x001f6240 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xa8],RCX MOV RCX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001f5759 caseD_0: JMP 0x001f5692 default: MOV byte ptr [RSP + 0x77],0x1 MOV EDI,0x20 CALL 0x001565c0 MOV RDI,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x8],RAX CALL 0x001dd300 MOV qword ptr [RSP + 0x78],RAX LAB_001f56b5: LEA RSI,[0x2e8def] LEA RDI,[RSP + 0x80] LEA RDX,[RSP + 0x78] CALL 0x001f64a0 JMP 0x001f56d0 LAB_001f56d0: MOV RCX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x133 LEA RDX,[RSP + 0x80] CALL 0x001f62f0 JMP 0x001f56ee LAB_001f56ee: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x77],0x0 LEA RSI,[0x36d108] LEA RDX,[0x1dd3b0] CALL 0x001569b0 LAB_001f5759: MOV RAX,qword ptr [RSP + 0x60] ADD RSP,0x138 RET
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (long 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> *param_2,long *param_3) { vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *pvVar1; byte bVar2; ulong uVar3; int8 uVar4; char *local_c0; detail local_b8 [32]; int8 local_98 [2]; long local_88; allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>> local_74; allocator<std::__cxx11::string> local_73; int1 local_72; allocator local_71; string local_70 [35]; int1 local_4d; allocator local_39; string local_38 [32]; long *local_18; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_10; long local_8; local_18 = param_3; local_10 = param_2; local_8 = param_1; if (param_2 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*param_3) { local_4d = 1; uVar4 = __cxa_allocate_exception(0x20); std::allocator<char>::allocator(); /* try { // try from 001f52af to 001f52c2 has its CatchHandler @ 001f5308 */ std::__cxx11::string::string<std::allocator<char>> (local_38,"iterator does not fit current value",&local_39); /* try { // try from 001f52c5 to 001f5302 has its CatchHandler @ 001f531e */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0xca,local_38,param_2); local_4d = 0; /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::invalid_iterator::~invalid_iterator); } 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> ::end(); switch(*param_2) { case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x9: default: uVar4 = __cxa_allocate_exception(0x20); local_c0 = (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_2); /* try { // try from 001f56b5 to 001f56cd has its CatchHandler @ 001f570d */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*> (local_b8,"cannot use erase() with ",&local_c0); /* try { // try from 001f56d0 to 001f570a has its CatchHandler @ 001f5723 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x133,local_b8,param_2); /* 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::type_error::~type_error); case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1: local_88 = param_3[1]; uVar4 = 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>>>> ::erase(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(param_2 + 8),local_88); *(int8 *)(param_1 + 8) = uVar4; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: pvVar1 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(param_2 + 8); __gnu_cxx:: __normal_iterator<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*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> :: __normal_iterator<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>*> ((__normal_iterator<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*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)local_98,(__normal_iterator *)(param_3 + 2)); uVar4 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::erase(pvVar1,local_98[0]); *(int8 *)(param_1 + 0x10) = uVar4; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x4: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8: bVar2 = nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::is_begin ((primitive_iterator_t *)(param_3 + 3)); if (((bVar2 ^ 0xff) & 1) != 0) { local_72 = 1; uVar4 = __cxa_allocate_exception(0x20); std::allocator<char>::allocator(); /* try { // try from 001f53f1 to 001f5404 has its CatchHandler @ 001f544a */ std::__cxx11::string::string<std::allocator<char>>(local_70,"iterator out of range",&local_71) ; /* try { // try from 001f5407 to 001f5444 has its CatchHandler @ 001f5460 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0xcd,local_70,param_2); local_72 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::invalid_iterator::~invalid_iterator); } uVar3 = 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> ::is_string(param_2); if ((uVar3 & 1) == 0) { uVar3 = 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> ::is_binary(param_2); if ((uVar3 & 1) != 0) { std:: allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>> ::allocator(&local_74); std:: allocator_traits<std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>>> :: destroy<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>> ((allocator *)&local_74,*(byte_container_with_subtype **)(param_2 + 8)); /* try { // try from 001f5586 to 001f558f has its CatchHandler @ 001f55ae */ std:: allocator_traits<std::allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>>> ::deallocate((allocator *)&local_74,*(byte_container_with_subtype **)(param_2 + 8),1); *(int8 *)(param_2 + 8) = 0; std:: allocator<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>> ::~allocator(&local_74); } } else { std::allocator<std::__cxx11::string>::allocator(&local_73); std::allocator_traits<std::allocator<std::__cxx11::string>>::destroy<std::__cxx11::string> ((allocator *)&local_73,*(string **)(param_2 + 8)); /* try { // try from 001f54ef to 001f54f8 has its CatchHandler @ 001f551a */ std::allocator_traits<std::allocator<std::__cxx11::string>>::deallocate ((allocator *)&local_73,*(string **)(param_2 + 8),1); *(int8 *)(param_2 + 8) = 0; std::allocator<std::__cxx11::string>::~allocator(&local_73); } *param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_2,0)); } return param_1; }
39,149
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>> 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>::erase<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>>, 0>(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>>)
monkey531[P]llama/common/json.hpp
IteratorType erase(IteratorType pos) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } IteratorType result = end(); switch (m_data.m_type) { case value_t::boolean: case value_t::number_float: case value_t::number_integer: case value_t::number_unsigned: case value_t::string: case value_t::binary: { if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) { JSON_THROW(invalid_iterator::create(205, "iterator out of range", this)); } if (is_string()) { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); m_data.m_value.string = nullptr; } else if (is_binary()) { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); m_data.m_value.binary = nullptr; } m_data.m_type = value_t::null; assert_invariant(); break; } case value_t::object: { result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator); break; } case value_t::array: { result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator); break; } case value_t::null: case value_t::discarded: default: JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); } return result; }
O3
cpp
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>> 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>::erase<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>>, 0>(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>>): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 cmpq %rsi, (%rdx) jne 0x5c265 movq %rdx, %r15 movq %rdi, %rbx movq %r14, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x18(%rdi) callq 0x5c79e movzbl (%r14), %eax leal -0x3(%rax), %ecx cmpl $0x6, %ecx jae 0x5c1d2 cmpq $0x0, 0x18(%r15) jne 0x5c2c8 cmpl $0x8, %eax je 0x5c1f3 cmpl $0x3, %eax jne 0x5c226 leaq 0x8(%r14), %r15 movq 0x8(%r14), %rdi movq (%rdi), %rax leaq 0x10(%rdi), %rcx cmpq %rcx, %rax je 0x5c1cb movq (%rcx), %rsi incq %rsi movq %rax, %rdi callq 0x197f0 movq (%r15), %rdi movl $0x20, %esi jmp 0x5c21a cmpl $0x1, %eax je 0x5c247 cmpl $0x2, %eax jne 0x5c328 movq 0x8(%r14), %rdi movq 0x10(%r15), %rsi callq 0x5cf32 movq %rax, 0x10(%rbx) jmp 0x5c237 leaq 0x8(%r14), %r15 movq 0x8(%r14), %rdi movq (%rdi), %rax testq %rax, %rax je 0x5c215 movq 0x10(%rdi), %rsi subq %rax, %rsi movq %rax, %rdi callq 0x197f0 movq (%r15), %rdi movl $0x28, %esi callq 0x197f0 movq $0x0, (%r15) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x5099a movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rbx, %r12 addq $0x8, %r12 movq 0x8(%r14), %rdi movq 0x8(%r15), %rsi leaq 0x30(%rsi), %rdx callq 0x5ca5c movq %rax, (%r12) jmp 0x5c237 movl $0x20, %edi callq 0x193b0 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x6004a(%rip), %rsi # 0xbc2cc leaq 0x60066(%rip), %rdx # 0xbc2ef leaq 0x8(%rsp), %rdi callq 0x25304 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x5c59c xorl %ebp, %ebp leaq 0x9313c(%rip), %rsi # 0xef3f0 leaq 0x2be5(%rip), %rdx # 0x5eea0 movq %rbx, %rdi callq 0x19d60 jmp 0x5c386 movl $0x20, %edi callq 0x193b0 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x6000b(%rip), %rsi # 0xbc2f0 leaq 0x60019(%rip), %rdx # 0xbc305 leaq 0x8(%rsp), %rdi callq 0x25304 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xcd, %esi movq %r14, %rcx callq 0x5c59c xorl %ebp, %ebp leaq 0x930d9(%rip), %rsi # 0xef3f0 leaq 0x2b82(%rip), %rdx # 0x5eea0 movq %rbx, %rdi callq 0x19d60 jmp 0x5c386 movl $0x20, %edi callq 0x193b0 movq %rax, %rbx movq %r14, %rdi callq 0x5108e leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x5ffba(%rip), %rsi # 0xbc306 leaq 0x8(%rsp), %rdi callq 0x5c9d3 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x133, %esi # imm = 0x133 movq %r14, %rcx callq 0x5c804 xorl %ebp, %ebp leaq 0x92f51(%rip), %rsi # 0xef2c8 leaq 0x2b22(%rip), %rdx # 0x5eea0 movq %rbx, %rdi callq 0x19d60 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi jne 0x5c3ac jmp 0x5c3b9 jmp 0x5c3c0 jmp 0x5c39f jmp 0x5c3c0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x5c3b9 movq 0x18(%rsp), %rsi incq %rsi callq 0x197f0 testb %bpl, %bpl jne 0x5c3c3 jmp 0x5c3cb movq %rax, %r14 movq %rbx, %rdi callq 0x195a0 movq %r14, %rdi callq 0x19dc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: push rbp; int push r15; int push r14; char push r12; int push rbx; __int64 sub rsp, 30h mov r14, rsi cmp [rdx], rsi jnz loc_5C265 mov r15, rdx mov rbx, rdi mov [rdi], r14 xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 mov rax, 8000000000000000h mov [rdi+18h], rax call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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>>::set_end(void) movzx eax, byte ptr [r14] lea ecx, [rax-3] cmp ecx, 6 jnb short loc_5C1D2 cmp qword ptr [r15+18h], 0 jnz loc_5C2C8 cmp eax, 8 jz short loc_5C1F3 cmp eax, 3 jnz loc_5C226 lea r15, [r14+8] mov rdi, [r14+8] mov rax, [rdi] lea rcx, [rdi+10h] cmp rax, rcx jz short loc_5C1CB mov rsi, [rcx] inc rsi; unsigned __int64 mov rdi, rax; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, [r15] loc_5C1CB: mov esi, 20h ; ' ' jmp short loc_5C21A loc_5C1D2: cmp eax, 1 jz short loc_5C247 cmp eax, 2 jnz loc_5C328 mov rdi, [r14+8] mov rsi, [r15+10h] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPSD_SF_EE; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::_M_erase(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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+10h], rax jmp short loc_5C237 loc_5C1F3: lea r15, [r14+8] mov rdi, [r14+8] mov rax, [rdi] test rax, rax jz short loc_5C215 mov rsi, [rdi+10h] sub rsi, rax; unsigned __int64 mov rdi, rax; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, [r15]; void * loc_5C215: mov esi, 28h ; '('; unsigned __int64 loc_5C21A: call __ZdlPvm; operator delete(void *,ulong) mov qword ptr [r15], 0 loc_5C226: mov byte ptr [r14], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_5C237: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_5C247: mov r12, rbx add r12, 8 mov rdi, [r14+8] mov rsi, [r15+8] lea rdx, [rsi+30h] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::erase(__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>>>>,__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>>>>) mov [r12], rax jmp short loc_5C237 loc_5C265: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_40] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_5C386 loc_5C2C8: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_40] mov [r15-10h], r15 lea rsi, aIteratorOutOfR; "iterator out of range" lea rdx, aIteratorOutOfR+15h; "" lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 0CDh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_5C386 loc_5C328: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+58h+var_30] mov [rdx], rax lea rsi, aCannotUseErase; "cannot use erase() with " lea rdi, [rsp+58h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 133h; 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 loc_5C386: mov r14, rax lea rax, [rsp+58h+var_40] mov rdi, [rax-10h] cmp rdi, rax jnz short loc_5C3AC jmp short loc_5C3B9 jmp short loc_5C3C0 jmp short loc_5C39F jmp short loc_5C3C0 loc_5C39F: mov r14, rax mov rdi, [rsp+58h+var_50]; void * cmp rdi, r15 jz short loc_5C3B9 loc_5C3AC: mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5C3B9: test bpl, bpl jnz short loc_5C3C3 jmp short loc_5C3CB loc_5C3C0: mov r14, rax loc_5C3C3: mov rdi, rbx; void * call ___cxa_free_exception loc_5C3CB: mov rdi, r14 call __Unwind_Resume
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R14,RSI CMP qword ptr [RDX],RSI JNZ 0x0015c265 MOV R15,RDX MOV RBX,RDI MOV qword ptr [RDI],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOV RAX,-0x8000000000000000 MOV qword ptr [RDI + 0x18],RAX CALL 0x0015c79e MOVZX EAX,byte ptr [R14] LEA ECX,[RAX + -0x3] CMP ECX,0x6 JNC 0x0015c1d2 CMP qword ptr [R15 + 0x18],0x0 JNZ 0x0015c2c8 CMP EAX,0x8 JZ 0x0015c1f3 CMP EAX,0x3 JNZ 0x0015c226 LEA R15,[R14 + 0x8] MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] LEA RCX,[RDI + 0x10] CMP RAX,RCX JZ 0x0015c1cb MOV RSI,qword ptr [RCX] INC RSI MOV RDI,RAX CALL 0x001197f0 MOV RDI,qword ptr [R15] LAB_0015c1cb: MOV ESI,0x20 JMP 0x0015c21a LAB_0015c1d2: CMP EAX,0x1 JZ 0x0015c247 CMP EAX,0x2 JNZ 0x0015c328 MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x10] CALL 0x0015cf32 MOV qword ptr [RBX + 0x10],RAX JMP 0x0015c237 LAB_0015c1f3: LEA R15,[R14 + 0x8] MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0015c215 MOV RSI,qword ptr [RDI + 0x10] SUB RSI,RAX MOV RDI,RAX CALL 0x001197f0 MOV RDI,qword ptr [R15] LAB_0015c215: MOV ESI,0x28 LAB_0015c21a: CALL 0x001197f0 MOV qword ptr [R15],0x0 LAB_0015c226: MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0015099a LAB_0015c237: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0015c247: MOV R12,RBX ADD R12,0x8 MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x8] LEA RDX,[RSI + 0x30] CALL 0x0015ca5c MOV qword ptr [R12],RAX JMP 0x0015c237 LAB_0015c265: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0015c27b: LEA RSI,[0x1bc2cc] LEA RDX,[0x1bc2ef] LEA RDI,[RSP + 0x8] CALL 0x00125304 MOV BPL,0x1 LAB_0015c296: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x0015c59c XOR EBP,EBP LEA RSI,[0x1ef3f0] LEA RDX,[0x15eea0] MOV RDI,RBX CALL 0x00119d60 LAB_0015c2c8: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0015c2de: LEA RSI,[0x1bc2f0] LEA RDX,[0x1bc305] LEA RDI,[RSP + 0x8] CALL 0x00125304 MOV BPL,0x1 LAB_0015c2f9: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xcd MOV RCX,R14 CALL 0x0015c59c XOR EBP,EBP LEA RSI,[0x1ef3f0] LEA RDX,[0x15eea0] MOV RDI,RBX CALL 0x00119d60 LAB_0015c328: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX MOV RDI,R14 CALL 0x0015108e LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0015c345: LEA RSI,[0x1bc306] LEA RDI,[RSP + 0x8] CALL 0x0015c9d3 MOV BPL,0x1 LAB_0015c359: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x133 MOV RCX,R14 CALL 0x0015c804 XOR EBP,EBP LEA RSI,[0x1ef2c8] LEA RDX,[0x15eea0] MOV RDI,RBX CALL 0x00119d60
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>> * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (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>> *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> *param_2,long *param_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> bVar1; void *pvVar2; int8 uVar3; ulong uVar4; int8 *puVar5; int1 *local_50 [2]; int1 local_40 [16]; char *local_30; if ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_3 != param_2) { uVar3 = __cxa_allocate_exception(0x20); local_50[0] = local_40; /* try { // try from 0015c27b to 0015c292 has its CatchHandler @ 0015c3c0 */ std::__cxx11::string::_M_construct<char_const*> (local_50,"iterator does not fit current value",""); /* try { // try from 0015c296 to 0015c2c2 has its CatchHandler @ 0015c39f */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xca,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } *(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 = param_2; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0x8000000000000000; 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>> ::set_end(param_1); bVar1 = *param_2; if (5 < (byte)bVar1 - 3) { if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar3 = 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>>>> ::erase(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(param_2 + 8),param_3[1],param_3[1] + 0x30); *(int8 *)(param_1 + 8) = uVar3; return param_1; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar3 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::_M_erase(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(param_2 + 8),param_3[2]); *(int8 *)(param_1 + 0x10) = uVar3; return param_1; } uVar3 = __cxa_allocate_exception(0x20); local_30 = (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_2); /* try { // try from 0015c345 to 0015c355 has its CatchHandler @ 0015c399 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*> ((detail *)local_50,"cannot use erase() with ",&local_30); /* try { // try from 0015c359 to 0015c385 has its CatchHandler @ 0015c386 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0x133,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (param_3[3] != 0) { uVar3 = __cxa_allocate_exception(0x20); local_50[0] = local_40; /* try { // try from 0015c2de to 0015c2f5 has its CatchHandler @ 0015c39d */ std::__cxx11::string::_M_construct<char_const*>(local_50,"iterator out of range",""); /* try { // try from 0015c2f9 to 0015c325 has its CatchHandler @ 0015c39b */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xcd,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8) { puVar5 = *(int8 **)(param_2 + 8); pvVar2 = (void *)*puVar5; if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,puVar5[2] - (long)pvVar2); puVar5 = *(int8 **)(param_2 + 8); } uVar4 = 0x28; } else { if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3) goto LAB_0015c226; puVar5 = *(int8 **)(param_2 + 8); if ((long *)*puVar5 != puVar5 + 2) { operator_delete((long *)*puVar5,puVar5[2] + 1); puVar5 = *(int8 **)(param_2 + 8); } uVar4 = 0x20; } operator_delete(puVar5,uVar4); *(int8 *)(param_2 + 8) = 0; LAB_0015c226: *param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_2,0)); return param_1; }
39,150
minja::CommentTemplateToken::~CommentTemplateToken()
monkey531[P]llama/common/minja.hpp
CommentTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, location, pre, post), text(t) {}
O3
cpp
minja::CommentTemplateToken::~CommentTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x9fdcd(%rip), %rax # 0xdf180 addq $0x10, %rax movq %rax, (%rdi) movq 0x30(%rdi), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0x3f3d2 movq (%rax), %rsi incq %rsi callq 0x186e0 leaq 0x9fdef(%rip), %rax # 0xdf1c8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x3f3ef popq %rbx jmp 0x32e06 popq %rbx retq nop
_ZN5minja20CommentTemplateTokenD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_3F3D2 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F3D2: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_3F3EF pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3F3EF: pop rbx retn
void minja::CommentTemplateToken::~CommentTemplateToken(minja::CommentTemplateToken *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::CommentTemplateToken + 2; v2 = (char *)*((_QWORD *)this + 6); if ( v2 != (char *)this + 64 ) operator delete(v2, *((_QWORD *)this + 8) + 1LL); *(_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); }
~CommentTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x1df180] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x0013f3d2 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001186e0 LAB_0013f3d2: LEA RAX,[0x1df1c8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0013f3ef POP RBX JMP 0x00132e06 LAB_0013f3ef: POP RBX RET
/* minja::CommentTemplateToken::~CommentTemplateToken() */ void __thiscall minja::CommentTemplateToken::~CommentTemplateToken(CommentTemplateToken *this) { *(int ***)this = &PTR__CommentTemplateToken_001df190; if (*(CommentTemplateToken **)(this + 0x30) != this + 0x40) { operator_delete(*(CommentTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1); } *(int ***)this = &PTR__TemplateToken_001df1d8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); return; } return; }
39,151
my_uni_utf16le
eloqsql/strings/ctype-ucs2.c
static int my_uni_utf16le(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { uint32 first, second, total; if (wc < MY_UTF16_SURROGATE_HIGH_FIRST || (wc > MY_UTF16_SURROGATE_LOW_LAST && wc <= 0xFFFF)) { if (s + 2 > e) return MY_CS_TOOSMALL2; int2store(s, wc); return 2; /* [0000-D7FF,E000-FFFF] */ } if (wc < 0xFFFF || wc > 0x10FFFF) return MY_CS_ILUNI; /* [D800-DFFF,10FFFF+] */ if (s + 4 > e) return MY_CS_TOOSMALL4; wc-= 0x10000; first= (0xD800 | ((wc >> 10) & 0x3FF)); second= (0xDC00 | (wc & 0x3FF)); total= first | (second << 16); int4store(s, total); return 4; /* [010000-10FFFF] */ }
O0
c
my_uni_utf16le: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xd800, -0x18(%rbp) # imm = 0xD800 jb 0x60cd2 cmpq $0xdfff, -0x18(%rbp) # imm = 0xDFFF jbe 0x60d10 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x60d10 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x60cec movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x60da2 jmp 0x60cee movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movw %ax, %cx movq -0x40(%rbp), %rax movw %cx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x60da2 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jb 0x60d24 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF jbe 0x60d2d movl $0x0, -0x4(%rbp) jmp 0x60da2 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x60d44 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x60da2 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax shrq $0xa, %rax andq $0x3ff, %rax # imm = 0x3FF orq $0xd800, %rax # imm = 0xD800 movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax andq $0x3ff, %rax # imm = 0x3FF orq $0xdc00, %rax # imm = 0xDC00 movl %eax, -0x30(%rbp) movl -0x2c(%rbp), %eax movl -0x30(%rbp), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movl -0x34(%rbp), %ecx movq -0x48(%rbp), %rax movl %ecx, (%rax) movl $0x4, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16le: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_18], 0D800h jb short loc_60CD2 cmp [rbp+var_18], 0DFFFh jbe short loc_60D10 cmp [rbp+var_18], 0FFFFh ja short loc_60D10 loc_60CD2: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_60CEC mov [rbp+var_4], 0FFFFFF9Ah jmp loc_60DA2 loc_60CEC: jmp short $+2 loc_60CEE: mov rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov cx, ax mov rax, [rbp+var_40] mov [rax], cx mov [rbp+var_4], 2 jmp loc_60DA2 loc_60D10: cmp [rbp+var_18], 0FFFFh jb short loc_60D24 cmp [rbp+var_18], offset a26d; "2`:6D" jbe short loc_60D2D loc_60D24: mov [rbp+var_4], 0 jmp short loc_60DA2 loc_60D2D: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_60D44 mov [rbp+var_4], 0FFFFFF98h jmp short loc_60DA2 loc_60D44: mov rax, [rbp+var_18] sub rax, 10000h mov [rbp+var_18], rax mov rax, [rbp+var_18] shr rax, 0Ah and rax, 3FFh or rax, 0D800h mov [rbp+var_2C], eax mov rax, [rbp+var_18] and rax, 3FFh or rax, 0DC00h mov [rbp+var_30], eax mov eax, [rbp+var_2C] mov ecx, [rbp+var_30] shl ecx, 10h or eax, ecx mov [rbp+var_34], eax mov rax, [rbp+var_20] mov [rbp+var_48], rax mov ecx, [rbp+var_34] mov rax, [rbp+var_48] mov [rax], ecx mov [rbp+var_4], 4 loc_60DA2: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16le(long long a1, unsigned long long a2, _DWORD *a3, unsigned long long a4) { if ( a2 >= 0xD800 && (a2 <= 0xDFFF || a2 > 0xFFFF) ) { if ( a2 >= 0xFFFF && a2 <= (unsigned long long)"2`:6D" ) { if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = ((a2 & 0x3FF | 0xDC00) << 16) | ((a2 - 0x10000) >> 10) & 0x3FF | 0xD800; return 4; } else { return (unsigned int)-104; } } else { return 0; } } else if ( (unsigned long long)a3 + 2 <= a4 ) { *(_WORD *)a3 = a2; return 2; } else { return (unsigned int)-102; } }
my_uni_utf16le: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x18],0xd800 JC 0x00160cd2 CMP qword ptr [RBP + -0x18],0xdfff JBE 0x00160d10 CMP qword ptr [RBP + -0x18],0xffff JA 0x00160d10 LAB_00160cd2: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00160cec MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00160da2 LAB_00160cec: JMP 0x00160cee LAB_00160cee: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CX,AX MOV RAX,qword ptr [RBP + -0x40] MOV word ptr [RAX],CX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00160da2 LAB_00160d10: CMP qword ptr [RBP + -0x18],0xffff JC 0x00160d24 CMP qword ptr [RBP + -0x18],0x10ffff JBE 0x00160d2d LAB_00160d24: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00160da2 LAB_00160d2d: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00160d44 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00160da2 LAB_00160d44: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa AND RAX,0x3ff OR RAX,0xd800 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x3ff OR RAX,0xdc00 MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,dword ptr [RBP + -0x30] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x4 LAB_00160da2: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16le(int8 param_1,ulong param_2,uint *param_3,uint *param_4) { int4 local_c; if ((param_2 < 0xd800) || ((0xdfff < param_2 && (param_2 < 0x10000)))) { if (param_4 < (uint *)((long)param_3 + 2)) { local_c = 0xffffff9a; } else { *(short *)param_3 = (short)param_2; local_c = 2; } } else if ((param_2 < 0xffff) || (0x10ffff < param_2)) { local_c = 0; } else if (param_4 < param_3 + 1) { local_c = 0xffffff98; } else { *param_3 = (uint)(param_2 - 0x10000 >> 10) & 0x3ff | 0xd800 | ((uint)(param_2 - 0x10000) & 0x3ff | 0xdc00) << 0x10; local_c = 4; } return local_c; }
39,152
my_uni_utf16le
eloqsql/strings/ctype-ucs2.c
static int my_uni_utf16le(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { uint32 first, second, total; if (wc < MY_UTF16_SURROGATE_HIGH_FIRST || (wc > MY_UTF16_SURROGATE_LOW_LAST && wc <= 0xFFFF)) { if (s + 2 > e) return MY_CS_TOOSMALL2; int2store(s, wc); return 2; /* [0000-D7FF,E000-FFFF] */ } if (wc < 0xFFFF || wc > 0x10FFFF) return MY_CS_ILUNI; /* [D800-DFFF,10FFFF+] */ if (s + 4 > e) return MY_CS_TOOSMALL4; wc-= 0x10000; first= (0xD800 | ((wc >> 10) & 0x3FF)); second= (0xDC00 | (wc & 0x3FF)); total= first | (second << 16); int4store(s, total); return 4; /* [010000-10FFFF] */ }
O3
c
my_uni_utf16le: pushq %rbp movq %rsp, %rbp cmpq $0xd800, %rsi # imm = 0xD800 setae %al movq %rsi, %rdi andq $-0x2000, %rdi # imm = 0xE000 cmpq $0xe000, %rdi # imm = 0xE000 setne %dil testb %dil, %al jne 0x4b377 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x4b3bc movw %si, (%rdx) movl $0x2, %eax jmp 0x4b3bc leaq -0x110000(%rsi), %rdi xorl %eax, %eax cmpq $-0x100001, %rdi # imm = 0xFFEFFFFF jb 0x4b3bc leaq 0x4(%rdx), %rdi movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rcx, %rdi ja 0x4b3bc leal 0xf0000(%rsi), %eax shrl $0xa, %eax andl $0x3ff, %eax # imm = 0x3FF shll $0x10, %esi andl $0x3ff0000, %esi # imm = 0x3FF0000 addl %esi, %eax addl $0xdc00d800, %eax # imm = 0xDC00D800 movl %eax, (%rdx) movl $0x4, %eax popq %rbp retq
my_uni_utf16le: push rbp mov rbp, rsp cmp rsi, 0D800h setnb al mov rdi, rsi and rdi, 0FFFFFFFFFFFFE000h cmp rdi, 0E000h setnz dil test al, dil jnz short loc_4B377 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_4B3BC mov [rdx], si mov eax, 2 jmp short loc_4B3BC loc_4B377: lea rdi, [rsi-110000h] xor eax, eax cmp rdi, 0FFFFFFFFFFEFFFFFh jb short loc_4B3BC lea rdi, [rdx+4] mov eax, 0FFFFFF98h cmp rdi, rcx ja short loc_4B3BC lea eax, unk_F0000[rsi] shr eax, 0Ah and eax, 3FFh shl esi, 10h and esi, 3FF0000h add eax, esi add eax, 0DC00D800h mov [rdx], eax mov eax, 4 loc_4B3BC: pop rbp retn
long long my_uni_utf16le(long long a1, unsigned long long a2, _DWORD *a3, unsigned long long a4) { long long result; // rax if ( (a2 & 0xFFFFFFFFFFFFE000LL) != 57344 && a2 >= 0xD800 ) { result = 0LL; if ( a2 - 1114112 >= 0xFFFFFFFFFFEFFFFFLL ) { result = 4294967192LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = (((_DWORD)a2 << 16) & 0x3FF0000) + (((unsigned int)((unsigned int)&unk_F0000 + a2) >> 10) & 0x3FF) - 603924480; return 4LL; } } } else { result = 4294967194LL; if ( (unsigned long long)a3 + 2 <= a4 ) { *(_WORD *)a3 = a2; return 2LL; } } return result; }
my_uni_utf16le: PUSH RBP MOV RBP,RSP CMP RSI,0xd800 SETNC AL MOV RDI,RSI AND RDI,-0x2000 CMP RDI,0xe000 SETNZ DIL TEST AL,DIL JNZ 0x0014b377 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0014b3bc MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x0014b3bc LAB_0014b377: LEA RDI,[RSI + -0x110000] XOR EAX,EAX CMP RDI,-0x100001 JC 0x0014b3bc LEA RDI,[RDX + 0x4] MOV EAX,0xffffff98 CMP RDI,RCX JA 0x0014b3bc LEA EAX,[RSI + 0xf0000] SHR EAX,0xa AND EAX,0x3ff SHL ESI,0x10 AND ESI,0x3ff0000 ADD EAX,ESI ADD EAX,0xdc00d800 MOV dword ptr [RDX],EAX MOV EAX,0x4 LAB_0014b3bc: POP RBP RET
int8 my_uni_utf16le(int8 param_1,ulong param_2,int *param_3,int *param_4) { int8 uVar1; if (param_2 < 0xd800 || (param_2 & 0xffffffffffffe000) == 0xe000) { uVar1 = 0xffffff9a; if ((int *)((long)param_3 + 2U) <= param_4) { *(short *)param_3 = (short)param_2; uVar1 = 2; } } else { uVar1 = 0; if ((0xffffffffffeffffe < param_2 - 0x110000) && (uVar1 = 0xffffff98, param_3 + 1 <= param_4)) { *param_3 = ((uint)param_2 + 0xf0000 >> 10 & 0x3ff) + ((uint)param_2 & 0x3ff) * 0x10000 + -0x23ff2800; uVar1 = 4; } } return uVar1; }
39,153
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++()
llama.cpp/common/json.hpp
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } 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: { ++m_it.primitive_iterator; break; } } return *this; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++(): movq (%rdi), %rax testq %rax, %rax je 0xaed3f movzbl (%rax), %eax cmpl $0x2, %eax je 0xaed30 cmpl $0x1, %eax jne 0xaed37 addq $0x30, 0x8(%rdi) jmp 0xaed3b addq $0x10, 0x10(%rdi) jmp 0xaed3b incq 0x18(%rdi) movq %rdi, %rax retq pushq %rax leaq 0x697c1(%rip), %rdi # 0x118508 leaq 0x697f5(%rip), %rdx # 0x118543 leaq 0x6fb23(%rip), %rcx # 0x11e878 movl $0x33c0, %esi # imm = 0x33C0 xorl %eax, %eax callq 0x20e00
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv: mov rax, [rdi] test rax, rax jz short loc_AED3F movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_AED30 cmp eax, 1 jnz short loc_AED37 add qword ptr [rdi+8], 30h ; '0' jmp short loc_AED3B loc_AED30: add qword ptr [rdi+10h], 10h jmp short loc_AED3B loc_AED37: inc qword ptr [rdi+18h] loc_AED3B: mov rax, rdi retn loc_AED3F: push rax lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 33C0h xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++( unsigned __int8 **a1) { int v1; // eax long long v3; // rdx if ( *a1 ) { v1 = **a1; if ( v1 == 2 ) { a1[2] += 16; } else if ( v1 == 1 ) { a1[1] += 48; } else { ++a1[3]; } return (long long)a1; } else { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 13248LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); return std::operator+<char>("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 13248LL, v3); } }
operator++: MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001aed3f MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x001aed30 CMP EAX,0x1 JNZ 0x001aed37 ADD qword ptr [RDI + 0x8],0x30 JMP 0x001aed3b LAB_001aed30: ADD qword ptr [RDI + 0x10],0x10 JMP 0x001aed3b LAB_001aed37: INC qword ptr [RDI + 0x18] LAB_001aed3b: MOV RAX,RDI RET LAB_001aed3f: PUSH RAX LEA RDI,[0x218508] LEA RDX,[0x218543] LEA RCX,[0x21e878] MOV ESI,0x33c0 XOR EAX,EAX CALL 0x00120e00
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>::TEMPNAMEPLACEHOLDERVALUE() */ iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *this) { char cVar1; int8 in_R8; int8 in_R9; if (*(char **)this != (char *)0x0) { cVar1 = **(char **)this; if (cVar1 == '\x02') { *(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10; } else if (cVar1 == '\x01') { *(long *)(this + 8) = *(long *)(this + 8) + 0x30; } else { *(long *)(this + 0x18) = *(long *)(this + 0x18) + 1; } return this; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x33c0, "GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0); }
39,154
mp_shr
bluesky950520[P]quickjs/libbf.c
static limb_t mp_shr(limb_t *tab_r, const limb_t *tab, mp_size_t n, int shift, limb_t high) { mp_size_t i; limb_t l, a; assert(shift >= 1 && shift < LIMB_BITS); l = high; for(i = n - 1; i >= 0; i--) { a = tab[i]; tab_r[i] = (a >> shift) | (l << (LIMB_BITS - shift)); l = a; } return l & (((limb_t)1 << shift) - 1); }
O2
c
mp_shr: movq %rcx, %rax testq %rdx, %rdx jle 0x71c6e movq -0x8(%rsi,%rdx,8), %rcx shldq $0x3f, %rcx, %rax movq %rax, -0x8(%rdi,%rdx,8) decq %rdx jmp 0x71c52 andl $0x1, %eax retq
mp_shr: mov rax, rcx test rdx, rdx jle short loc_71C6E mov rcx, [rsi+rdx*8-8] shld rax, rcx, 3Fh mov [rdi+rdx*8-8], rax dec rdx jmp short mp_shr loc_71C6E: and eax, 1 retn
long long mp_shr(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax __int128 v5; // rt0 while ( 1 ) { v4 = a4; if ( a3 <= 0 ) break; a4 = *(_QWORD *)(a2 + 8 * a3 - 8); *((_QWORD *)&v5 + 1) = v4; *(_QWORD *)&v5 = a4; *(_QWORD *)(a1 + 8 * a3-- - 8) = v5 >> 1; } return a4 & 1; }
mp_shr: MOV RAX,RCX TEST RDX,RDX JLE 0x00171c6e MOV RCX,qword ptr [RSI + RDX*0x8 + -0x8] SHLD RAX,RCX,0x3f MOV qword ptr [RDI + RDX*0x8 + -0x8],RAX DEC RDX JMP 0x00171c52 LAB_00171c6e: AND EAX,0x1 RET
uint mp_shr(long param_1,long param_2,long param_3,ulong param_4) { ulong uVar1; for (; 0 < param_3; param_3 = param_3 + -1) { uVar1 = *(ulong *)(param_2 + -8 + param_3 * 8); *(ulong *)(param_1 + -8 + param_3 * 8) = param_4 << 0x3f | uVar1 >> 1; param_4 = uVar1; } return (uint)param_4 & 1; }
39,155
pvio_socket_async_read
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
ssize_t pvio_socket_async_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) { ssize_t r= -1; #ifndef _WIN32 int read_flags= MSG_DONTWAIT; #endif struct st_pvio_socket *csock= NULL; if (!pvio || !pvio->data) return -1; csock= (struct st_pvio_socket *)pvio->data; #ifndef _WIN32 r= recv(csock->socket,(void *)buffer, length, read_flags); #else /* Windows doesn't support MSG_DONTWAIT, so we need to set socket to non blocking */ pvio_socket_blocking(pvio, 0, 0); r= recv(csock->socket, (char *)buffer, (int)length, 0); #endif return r; }
O3
c
pvio_socket_async_read: pushq %rbp movq %rsp, %rbp testq %rdi, %rdi je 0x31534 movq (%rdi), %rax testq %rax, %rax je 0x31534 movl (%rax), %edi movl $0x40, %ecx popq %rbp jmp 0x13170 movq $-0x1, %rax popq %rbp retq
pvio_socket_async_read: push rbp mov rbp, rsp test rdi, rdi jz short loc_31534 mov rax, [rdi] test rax, rax jz short loc_31534 mov edi, [rax] mov ecx, 40h ; '@' pop rbp jmp _recv loc_31534: mov rax, 0FFFFFFFFFFFFFFFFh pop rbp retn
long long pvio_socket_async_read(_QWORD *a1, long long a2, long long a3) { if ( a1 && *a1 ) return recv(*(unsigned int *)*a1, a2, a3, 64LL); else return -1LL; }
pvio_socket_async_read: PUSH RBP MOV RBP,RSP TEST RDI,RDI JZ 0x00131534 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00131534 MOV EDI,dword ptr [RAX] MOV ECX,0x40 POP RBP JMP 0x00113170 LAB_00131534: MOV RAX,-0x1 POP RBP RET
ssize_t pvio_socket_async_read(int8 *param_1,void *param_2,size_t param_3) { ssize_t sVar1; if ((param_1 != (int8 *)0x0) && ((int *)*param_1 != (int *)0x0)) { sVar1 = recv(*(int *)*param_1,param_2,param_3,0x40); return sVar1; } return -1; }
39,156
common_arg::to_string[abi:cxx11]()
monkey531[P]llama/common/arg.cpp
std::string common_arg::to_string() { // params for printing to console const static int n_leading_spaces = 40; const static int n_char_per_line_help = 70; // TODO: detect this based on current console std::string leading_spaces(n_leading_spaces, ' '); std::ostringstream ss; for (const auto arg : args) { if (arg == args.front()) { if (args.size() == 1) { ss << arg; } else { // first arg is usually abbreviation, we need padding to make it more beautiful auto tmp = std::string(arg) + ", "; auto spaces = std::string(std::max(0, 7 - (int)tmp.size()), ' '); ss << tmp << spaces; } } else { ss << arg << (arg != args.back() ? ", " : ""); } } if (value_hint) ss << " " << value_hint; if (value_hint_2) ss << " " << value_hint_2; if (ss.tellp() > n_leading_spaces - 3) { // current line is too long, add new line ss << "\n" << leading_spaces; } else { // padding between arg and help, same line ss << std::string(leading_spaces.size() - ss.tellp(), ' '); } const auto help_lines = break_str_into_lines(help, n_char_per_line_help); for (const auto & line : help_lines) { ss << (&line == &help_lines.front() ? "" : leading_spaces) << line << "\n"; } return ss.str(); }
O2
cpp
common_arg::to_string[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x558, %rsp # imm = 0x558 movq %rsi, %r14 movq %rdi, 0x18(%rsp) leaq 0x50(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x40(%rsp), %rdi pushq $0x28 popq %rsi pushq $0x20 popq %rdx callq 0x23a40 leaq 0x260(%rsp), %rdi callq 0x23bd0 movq 0x60(%r14), %r15 movq 0x68(%r14), %r13 leaq 0x260(%rsp), %rbx leaq 0x3d8(%rsp), %rbp cmpq %r13, %r15 je 0x28460 movq (%r15), %r12 movq 0x60(%r14), %rax cmpq (%rax), %r12 je 0x283aa movq %rbx, %rdi movq %r12, %rsi callq 0x238b0 movq 0x68(%r14), %rcx cmpq -0x8(%rcx), %r12 leaq 0x8b2c1(%rip), %rsi # 0xb3653 leaq 0x87740(%rip), %rcx # 0xafad9 cmoveq %rcx, %rsi movq %rax, %rdi callq 0x238b0 jmp 0x28457 movq 0x68(%r14), %rcx subq %rax, %rcx cmpq $0x8, %rcx jne 0x283c7 movq %rbx, %rdi movq %r12, %rsi callq 0x238b0 jmp 0x28457 movq %rbp, %rdi movq %r12, %rsi leaq 0x20(%rsp), %rdx callq 0x27686 leaq 0xe0(%rsp), %rdi movq %rbp, %rsi leaq 0x8b26a(%rip), %rdx # 0xb3653 callq 0x384dc movq %rbp, %rdi callq 0x241f8 pushq $0x7 popq %rax movl %eax, %esi subl 0xe8(%rsp), %esi testl %esi, %esi movl $0x0, %eax cmovlel %eax, %esi leaq 0x3e8(%rsp), %rax movq %rax, 0x3d8(%rsp) movq %rbp, %rdi pushq $0x20 popq %rdx callq 0x23a40 movq %rbx, %rdi leaq 0xe0(%rsp), %rsi callq 0x237d0 movq %rax, %rdi movq %rbp, %rsi callq 0x237d0 movq %rbp, %rdi callq 0x241f8 leaq 0xe0(%rsp), %rdi callq 0x241f8 addq $0x8, %r15 jmp 0x28363 cmpq $0x0, 0x78(%r14) je 0x28487 leaq 0x8b08f(%rip), %rsi # 0xb34fd leaq 0x260(%rsp), %rdi callq 0x238b0 movq 0x78(%r14), %rsi movq %rax, %rdi callq 0x238b0 cmpq $0x0, 0x80(%r14) je 0x284b4 leaq 0x8b065(%rip), %rsi # 0xb34fd leaq 0x260(%rsp), %rdi callq 0x238b0 movq 0x80(%r14), %rsi movq %rax, %rdi callq 0x238b0 leaq 0x260(%rsp), %rdi callq 0x23770 cmpq $0x26, %rax jl 0x284ea leaq 0x8760a(%rip), %rsi # 0xafad8 leaq 0x260(%rsp), %rdi callq 0x238b0 leaq 0x40(%rsp), %rsi movq %rax, %rdi callq 0x237d0 jmp 0x28540 movq 0x48(%rsp), %rbx leaq 0x260(%rsp), %rdi callq 0x23770 subq %rax, %rbx leaq 0xf0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0xe0(%rsp), %rdi pushq $0x20 popq %rdx movq %rbx, %rsi callq 0x23a40 leaq 0x260(%rsp), %rdi leaq 0xe0(%rsp), %rsi callq 0x237d0 leaq 0xe0(%rsp), %rdi callq 0x241f8 addq $0x90, %r14 leaq 0xa0(%rsp), %rdi movq %r14, %rsi callq 0x23c30 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) leaq 0x3d8(%rsp), %rdi leaq 0xa0(%rsp), %rsi pushq $0x8 popq %rdx callq 0x23f00 leaq 0x70(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0xe0(%rsp), %r12 leaq 0x20(%rsp), %r13 movq %rsp, %rbx leaq 0x80(%rsp), %rbp leaq 0x8af51(%rip), %r15 # 0xb34fd leaq 0xc0(%rsp), %r14 leaq 0x3d8(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x23160 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x286ee cmpq $0x46, 0x68(%rsp) jbe 0x286af movq %r12, %rdi leaq 0x60(%rsp), %rsi pushq $0x8 popq %rdx callq 0x23f00 leaq 0x30(%rsp), %rax movq %rax, 0x20(%rsp) andq $0x0, 0x28(%rsp) xorl %ecx, %ecx movb %cl, 0x30(%rsp) leaq 0x90(%rsp), %rax movq %rax, 0x80(%rsp) andq $0x0, 0x88(%rsp) movb %cl, 0x90(%rsp) movq %r12, %rdi movq %r13, %rsi callq 0x23b40 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) movq 0x88(%rsp), %rax jne 0x286c1 cmpq $0x1, %rax movq %rax, %rcx sbbq $-0x1, %rcx addq 0x28(%rsp), %rcx cmpq $0x47, %rcx jb 0x2867e testq %rax, %rax je 0x28671 movq %rbx, %rdi movq %rbp, %rsi callq 0x3970c movq %rbp, %rdi movq %r13, %rsi callq 0x234e0 jmp 0x2862a testq %rax, %rax leaq 0x87451(%rip), %rsi # 0xafad9 cmovneq %r15, %rsi movq %r14, %rdi movq %r13, %rdx callq 0x39738 movq %rbp, %rdi movq %r14, %rsi callq 0x24160 movq %r14, %rdi callq 0x241f8 jmp 0x2862a movq %rbx, %rdi leaq 0x60(%rsp), %rsi callq 0x3970c jmp 0x285b4 testq %rax, %rax je 0x286d1 movq %rbx, %rdi movq %rbp, %rsi callq 0x3970c movq %rbp, %rdi callq 0x241f8 movq %r13, %rdi callq 0x241f8 movq %r12, %rdi callq 0x23440 jmp 0x285b4 leaq 0x60(%rsp), %rdi callq 0x241f8 leaq 0x3d8(%rsp), %rdi callq 0x23440 leaq 0xa0(%rsp), %rdi callq 0x241f8 movq (%rsp), %r14 movq 0x8(%rsp), %r15 leaq 0xe0(%rsp), %r12 leaq 0x260(%rsp), %r13 leaq 0x873a6(%rip), %rbp # 0xafad8 cmpq %r15, %r14 je 0x28798 movq (%rsp), %rbx cmpq %rbx, %r14 je 0x2874f movq %r12, %rdi leaq 0x40(%rsp), %rsi callq 0x23c30 jmp 0x28766 movq %r12, %rdi leaq 0x87380(%rip), %rsi # 0xafad9 leaq 0x3d8(%rsp), %rdx callq 0x27686 movq %r13, %rdi movq %r12, %rsi callq 0x237d0 movq %rax, %rdi movq %r14, %rsi callq 0x237d0 movq %rax, %rdi movq %rbp, %rsi callq 0x238b0 movq %r12, %rdi callq 0x241f8 cmpq %rbx, %r14 addq $0x20, %r14 jmp 0x28732 leaq 0x268(%rsp), %rsi movq 0x18(%rsp), %rbx movq %rbx, %rdi callq 0x23df0 movq %rsp, %rdi callq 0x276c2 leaq 0x260(%rsp), %rdi callq 0x23200 leaq 0x40(%rsp), %rdi callq 0x241f8 movq %rbx, %rax addq $0x558, %rsp # imm = 0x558 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x28802 jmp 0x2883d jmp 0x2883d movq %rax, %r15 jmp 0x2885d movq %rax, %r15 jmp 0x288b9 jmp 0x2883d jmp 0x2883d movq %rax, %r15 jmp 0x288db jmp 0x2883d movq %rax, %r15 jmp 0x2882b movq %rax, %r15 leaq 0x3d8(%rsp), %rdi jmp 0x288c9 jmp 0x2883d jmp 0x2887b movq %rax, %r15 leaq 0x3d8(%rsp), %rdi callq 0x241f8 leaq 0xe0(%rsp), %rdi jmp 0x288c9 movq %rax, %r15 jmp 0x2885a movq %rax, %r15 jmp 0x288ce movq %rax, %r15 jmp 0x288a2 movq %rax, %r15 leaq 0xe0(%rsp), %rdi callq 0x241f8 cmpq %rbx, %r14 movq %rsp, %rdi callq 0x276c2 jmp 0x288ce movq %rax, %r15 leaq 0xc0(%rsp), %rdi callq 0x241f8 jmp 0x2887e jmp 0x2887b movq %rax, %r15 leaq 0x80(%rsp), %rdi callq 0x241f8 leaq 0x20(%rsp), %rdi callq 0x241f8 leaq 0xe0(%rsp), %rdi callq 0x23440 leaq 0x60(%rsp), %rdi callq 0x241f8 leaq 0x3d8(%rsp), %rdi callq 0x23440 movq %rsp, %rdi callq 0x276c2 leaq 0xa0(%rsp), %rdi callq 0x241f8 leaq 0x260(%rsp), %rdi callq 0x23200 leaq 0x40(%rsp), %rdi callq 0x241f8 movq %r15, %rdi callq 0x23fc0
_ZN10common_arg9to_stringB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 558h mov r14, rsi mov [rsp+588h+var_570], rdi lea rax, [rsp+588h+var_538] mov [rax-10h], rax lea rdi, [rsp+588h+var_548] push 28h ; '(' pop rsi push 20h ; ' ' pop rdx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) lea rdi, [rsp+588h+var_328] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov r15, [r14+60h] mov r13, [r14+68h] lea rbx, [rsp+588h+var_328] lea rbp, [rsp+588h+var_1B0] loc_28363: cmp r15, r13 jz loc_28460 mov r12, [r15] mov rax, [r14+60h] cmp r12, [rax] jz short loc_283AA mov rdi, rbx mov rsi, r12 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [r14+68h] cmp r12, [rcx-8] lea rsi, aZuD+6; ", " lea rcx, aErrorWhileHand_0+34h; "" cmovz rsi, rcx mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp loc_28457 loc_283AA: mov rcx, [r14+68h] sub rcx, rax cmp rcx, 8 jnz short loc_283C7 mov rdi, rbx mov rsi, r12 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp loc_28457 loc_283C7: mov rdi, rbp mov rsi, r12 lea rdx, [rsp+588h+var_568] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+588h+var_4A8] mov rsi, rbp lea rdx, aZuD+6; ", " call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() push 7 pop rax mov esi, eax sub esi, [rsp+588h+var_4A0] test esi, esi mov eax, 0 cmovle esi, eax lea rax, [rsp+588h+var_1A0] mov [rsp+588h+var_1B0], rax mov rdi, rbp push 20h ; ' ' pop rdx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, rbx lea rsi, [rsp+588h+var_4A8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, rbp call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+588h+var_4A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28457: add r15, 8 jmp loc_28363 loc_28460: cmp qword ptr [r14+78h], 0 jz short loc_28487 lea rsi, aForMessageInMe+144h; " " lea rdi, [rsp+588h+var_328] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+78h] mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_28487: cmp qword ptr [r14+80h], 0 jz short loc_284B4 lea rsi, aForMessageInMe+144h; " " lea rdi, [rsp+588h+var_328] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+80h] mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_284B4: lea rdi, [rsp+588h+var_328]; this call __ZNSo5tellpEv; std::ostream::tellp(void) cmp rax, 26h ; '&' jl short loc_284EA lea rsi, aErrorWhileHand_0+33h; "\n" lea rdi, [rsp+588h+var_328] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+588h+var_548] mov rdi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short loc_28540 loc_284EA: mov rbx, [rsp+588h+var_540] lea rdi, [rsp+588h+var_328]; this call __ZNSo5tellpEv; std::ostream::tellp(void) sub rbx, rax lea rax, [rsp+588h+var_498] mov [rax-10h], rax lea rdi, [rsp+588h+var_4A8] push 20h ; ' ' pop rdx mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) lea rdi, [rsp+588h+var_328] lea rsi, [rsp+588h+var_4A8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rdi, [rsp+588h+var_4A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28540: add r14, 90h lea rdi, [rsp+588h+var_4E8] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) xorps xmm0, xmm0 movaps [rsp+588h+var_588], xmm0 and [rsp+588h+var_578], 0 lea rdi, [rsp+588h+var_1B0] lea rsi, [rsp+588h+var_4E8] 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+588h+var_518] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r12, [rsp+588h+var_4A8] lea r13, [rsp+588h+var_568] mov rbx, rsp lea rbp, [rsp+588h+var_508] lea r15, aForMessageInMe+144h; " " lea r14, [rsp+588h+var_4C8] loc_285B4: lea rdi, [rsp+588h+var_1B0] lea rsi, [rsp+588h+var_528] call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz loc_286EE cmp [rsp+588h+var_520], 46h ; 'F' jbe loc_286AF mov rdi, r12 lea rsi, [rsp+588h+var_528] 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+588h+var_558] mov [rsp+588h+var_568], rax and [rsp+588h+var_560], 0 xor ecx, ecx mov [rsp+588h+var_558], cl lea rax, [rsp+588h+var_4F8] mov [rsp+588h+var_508], rax and [rsp+588h+var_500], 0 mov [rsp+588h+var_4F8], cl loc_2862A: mov rdi, r12 mov rsi, r13 call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 mov rax, [rsp+588h+var_500] jnz short loc_286C1 cmp rax, 1 mov rcx, rax sbb rcx, 0FFFFFFFFFFFFFFFFh add rcx, [rsp+588h+var_560] cmp rcx, 47h ; 'G' jb short loc_2867E test rax, rax jz short loc_28671 mov rdi, rbx mov rsi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) loc_28671: mov rdi, rbp mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_2862A loc_2867E: test rax, rax lea rsi, aErrorWhileHand_0+34h; "" cmovnz rsi, r15 mov rdi, r14 mov rdx, r13 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, rbp mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_2862A loc_286AF: mov rdi, rbx lea rsi, [rsp+588h+var_528] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp loc_285B4 loc_286C1: test rax, rax jz short loc_286D1 mov rdi, rbx mov rsi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) loc_286D1: mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() jmp loc_285B4 loc_286EE: lea rdi, [rsp+588h+var_528]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+588h+var_1B0] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() lea rdi, [rsp+588h+var_4E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov r14, qword ptr [rsp+588h+var_588] mov r15, qword ptr [rsp+588h+var_588+8] lea r12, [rsp+588h+var_4A8] lea r13, [rsp+588h+var_328] lea rbp, aErrorWhileHand_0+33h; "\n" loc_28732: cmp r14, r15 jz short loc_28798 mov rbx, qword ptr [rsp+588h+var_588] cmp r14, rbx jz short loc_2874F mov rdi, r12 lea rsi, [rsp+588h+var_548] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short loc_28766 loc_2874F: mov rdi, r12 lea rsi, aErrorWhileHand_0+34h; "" lea rdx, [rsp+588h+var_1B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_28766: mov rdi, r13 mov rsi, r12 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, rbp call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp r14, rbx add r14, 20h ; ' ' jmp short loc_28732 loc_28798: lea rsi, [rsp+588h+var_320] mov rbx, [rsp+588h+var_570] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+588h+var_328] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+588h+var_548]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 558h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_28802 jmp short loc_2883D jmp short loc_2883D mov r15, rax jmp short loc_2885D mov r15, rax jmp loc_288B9 jmp short loc_2883D jmp short loc_2883D mov r15, rax jmp loc_288DB jmp short loc_2883D loc_28802: mov r15, rax jmp short loc_2882B mov r15, rax lea rdi, [rsp+arg_3D0] jmp loc_288C9 jmp short loc_2883D jmp short loc_2887B mov r15, rax lea rdi, [rsp+arg_3D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2882B: lea rdi, [rsp+arg_D8] jmp loc_288C9 mov r15, rax jmp short loc_2885A loc_2883D: mov r15, rax jmp loc_288CE mov r15, rax jmp short loc_288A2 mov r15, rax lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2885A: cmp r14, rbx loc_2885D: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_288CE mov r15, rax lea rdi, [rsp+arg_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2887E jmp short $+2 loc_2887B: mov r15, rax loc_2887E: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_D8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_288A2: lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_3D0] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_288B9: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+arg_98]; void * loc_288C9: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_288CE: lea rdi, [rsp+arg_258] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() loc_288DB: lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r15 call __Unwind_Resume
long long common_arg::to_string[abi:cxx11](long long a1, _QWORD *a2) { long long *v3; // r15 long long *v4; // r13 long long v5; // r12 _QWORD *v6; // rax long long v7; // rax char *v8; // rsi long long v9; // rsi long long v10; // rax long long v11; // rax long long v12; // rax long long v13; // rax long long v14; // rbx long long v15; // rax _QWORD *v16; // rax _QWORD *v17; // rax char *v18; // rsi long long i; // r14 long long v20; // r15 long long v21; // rax long long v22; // rax long long v23; // rbx __int128 v25; // [rsp+0h] [rbp-588h] BYREF long long v26; // [rsp+10h] [rbp-578h] long long v27; // [rsp+18h] [rbp-570h] char *v28; // [rsp+20h] [rbp-568h] BYREF long long v29; // [rsp+28h] [rbp-560h] char v30; // [rsp+30h] [rbp-558h] BYREF _QWORD v31[2]; // [rsp+40h] [rbp-548h] BYREF char v32; // [rsp+50h] [rbp-538h] BYREF char *v33; // [rsp+60h] [rbp-528h] BYREF unsigned long long v34; // [rsp+68h] [rbp-520h] char v35; // [rsp+70h] [rbp-518h] BYREF char *v36; // [rsp+80h] [rbp-508h] BYREF long long v37; // [rsp+88h] [rbp-500h] char v38; // [rsp+90h] [rbp-4F8h] BYREF _BYTE v39[32]; // [rsp+A0h] [rbp-4E8h] BYREF _BYTE v40[32]; // [rsp+C0h] [rbp-4C8h] BYREF char *v41; // [rsp+E0h] [rbp-4A8h] BYREF int v42; // [rsp+E8h] [rbp-4A0h] char v43; // [rsp+F0h] [rbp-498h] BYREF _BYTE v44[8]; // [rsp+260h] [rbp-328h] BYREF _BYTE v45[368]; // [rsp+268h] [rbp-320h] BYREF _QWORD v46[2]; // [rsp+3D8h] [rbp-1B0h] BYREF char v47; // [rsp+3E8h] [rbp-1A0h] BYREF v27 = a1; v31[0] = &v32; std::string::_M_construct(v31, 40LL, 32LL); std::ostringstream::basic_ostringstream(v44); v3 = (long long *)a2[12]; v4 = (long long *)a2[13]; while ( v3 != v4 ) { v5 = *v3; v6 = (_QWORD *)a2[12]; if ( *v3 == *v6 ) { if ( a2[13] - (_QWORD)v6 == 8LL ) { std::operator<<<std::char_traits<char>>(v44, *v3); } else { std::string::basic_string<std::allocator<char>>(v46, *v3); std::operator+<char>(&v41, v46, ", "); std::string::~string(v46); v9 = (unsigned int)(7 - v42); if ( 7 - v42 <= 0 ) v9 = 0LL; v46[0] = &v47; std::string::_M_construct(v46, v9, 32LL); v10 = std::operator<<<char>(v44, &v41); std::operator<<<char>(v10, v46); std::string::~string(v46); std::string::~string(&v41); } } else { v7 = std::operator<<<std::char_traits<char>>(v44, *v3); v8 = ", "; if ( v5 == *(_QWORD *)(a2[13] - 8LL) ) v8 = ""; std::operator<<<std::char_traits<char>>(v7, v8); } ++v3; } if ( a2[15] ) { v11 = std::operator<<<std::char_traits<char>>(v44, " "); std::operator<<<std::char_traits<char>>(v11, a2[15]); } if ( a2[16] ) { v12 = std::operator<<<std::char_traits<char>>(v44, " "); std::operator<<<std::char_traits<char>>(v12, a2[16]); } if ( (long long)std::ostream::tellp((std::ostream *)v44) < 38 ) { v14 = v31[1]; v15 = std::ostream::tellp((std::ostream *)v44); v41 = &v43; std::string::_M_construct(&v41, v14 - v15, 32LL); std::operator<<<char>(v44, &v41); std::string::~string(&v41); } else { v13 = std::operator<<<std::char_traits<char>>(v44, "\n"); std::operator<<<char>(v13, v31); } std::string::basic_string(v39, a2 + 18); v25 = 0LL; v26 = 0LL; std::istringstream::basic_istringstream(v46, v39, 8LL); v33 = &v35; v34 = 0LL; v35 = 0; while ( 1 ) { v16 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v46, &v33); if ( (*((_BYTE *)v16 + *(_QWORD *)(*v16 - 24LL) + 32) & 5) != 0 ) break; if ( v34 <= 0x46 ) { std::vector<std::string>::push_back(&v25, &v33); } else { std::istringstream::basic_istringstream(&v41, &v33, 8LL); v28 = &v30; v29 = 0LL; v30 = 0; v36 = &v38; v37 = 0LL; v38 = 0; while ( 1 ) { v17 = (_QWORD *)std::operator>><char>(&v41, &v28); if ( (*((_BYTE *)v17 + *(_QWORD *)(*v17 - 24LL) + 32) & 5) != 0 ) break; if ( v29 + v37 - ((unsigned long long)(v37 == 0) - 1) < 0x47 ) { v18 = ""; if ( v37 ) v18 = " "; std::operator+<char>(v40, v18, &v28); std::string::append(&v36, v40); std::string::~string(v40); } else { if ( v37 ) std::vector<std::string>::push_back(&v25, &v36); std::string::_M_assign(&v36, &v28); } } if ( v37 ) std::vector<std::string>::push_back(&v25, &v36); std::string::~string(&v36); std::string::~string(&v28); std::istringstream::~istringstream(&v41); } } std::string::~string(&v33); std::istringstream::~istringstream(v46); std::string::~string(v39); v20 = *((_QWORD *)&v25 + 1); for ( i = v25; i != v20; i += 32LL ) { if ( i == (_QWORD)v25 ) std::string::basic_string<std::allocator<char>>(&v41, (long long)""); else std::string::basic_string(&v41, v31); v21 = std::operator<<<char>(v44, &v41); v22 = std::operator<<<char>(v21, i); std::operator<<<std::char_traits<char>>(v22, "\n"); std::string::~string(&v41); } v23 = v27; std::stringbuf::str(v27, v45); std::vector<std::string>::~vector((long long)&v25); std::ostringstream::~ostringstream(v44); std::string::~string(v31); return v23; }
to_string[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x558 MOV R14,RSI MOV qword ptr [RSP + 0x18],RDI LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x10],RAX LEA RDI,[RSP + 0x40] PUSH 0x28 POP RSI PUSH 0x20 POP RDX CALL 0x00123a40 LAB_0012833e: LEA RDI,[RSP + 0x260] CALL 0x00123bd0 MOV R15,qword ptr [R14 + 0x60] MOV R13,qword ptr [R14 + 0x68] LEA RBX,[RSP + 0x260] LEA RBP,[RSP + 0x3d8] LAB_00128363: CMP R15,R13 JZ 0x00128460 MOV R12,qword ptr [R15] MOV RAX,qword ptr [R14 + 0x60] CMP R12,qword ptr [RAX] JZ 0x001283aa LAB_00128378: MOV RDI,RBX MOV RSI,R12 CALL 0x001238b0 MOV RCX,qword ptr [R14 + 0x68] CMP R12,qword ptr [RCX + -0x8] LEA RSI,[0x1b3653] LEA RCX,[0x1afad9] CMOVZ RSI,RCX MOV RDI,RAX CALL 0x001238b0 JMP 0x00128457 LAB_001283aa: MOV RCX,qword ptr [R14 + 0x68] SUB RCX,RAX CMP RCX,0x8 JNZ 0x001283c7 MOV RDI,RBX MOV RSI,R12 CALL 0x001238b0 JMP 0x00128457 LAB_001283c7: MOV RDI,RBP MOV RSI,R12 LEA RDX,[RSP + 0x20] CALL 0x00127686 LAB_001283d7: LEA RDI,[RSP + 0xe0] MOV RSI,RBP LEA RDX,[0x1b3653] CALL 0x001384dc MOV RDI,RBP CALL 0x001241f8 PUSH 0x7 POP RAX MOV ESI,EAX SUB ESI,dword ptr [RSP + 0xe8] TEST ESI,ESI MOV EAX,0x0 CMOVLE ESI,EAX LEA RAX,[RSP + 0x3e8] MOV qword ptr [RSP + 0x3d8],RAX LAB_0012841c: MOV RDI,RBP PUSH 0x20 POP RDX CALL 0x00123a40 LAB_00128427: MOV RDI,RBX LEA RSI,[RSP + 0xe0] CALL 0x001237d0 MOV RDI,RAX MOV RSI,RBP CALL 0x001237d0 MOV RDI,RBP CALL 0x001241f8 LEA RDI,[RSP + 0xe0] CALL 0x001241f8 LAB_00128457: ADD R15,0x8 JMP 0x00128363 LAB_00128460: CMP qword ptr [R14 + 0x78],0x0 JZ 0x00128487 LAB_00128467: LEA RSI,[0x1b34fd] LEA RDI,[RSP + 0x260] CALL 0x001238b0 MOV RSI,qword ptr [R14 + 0x78] MOV RDI,RAX CALL 0x001238b0 LAB_00128487: CMP qword ptr [R14 + 0x80],0x0 JZ 0x001284b4 LEA RSI,[0x1b34fd] LEA RDI,[RSP + 0x260] CALL 0x001238b0 MOV RSI,qword ptr [R14 + 0x80] MOV RDI,RAX CALL 0x001238b0 LAB_001284b4: LEA RDI,[RSP + 0x260] CALL 0x00123770 CMP RAX,0x26 JL 0x001284ea LAB_001284c7: LEA RSI,[0x1afad8] LEA RDI,[RSP + 0x260] CALL 0x001238b0 LEA RSI,[RSP + 0x40] MOV RDI,RAX CALL 0x001237d0 JMP 0x00128540 LAB_001284ea: MOV RBX,qword ptr [RSP + 0x48] LAB_001284ef: LEA RDI,[RSP + 0x260] CALL 0x00123770 SUB RBX,RAX LEA RAX,[RSP + 0xf0] MOV qword ptr [RAX + -0x10],RAX LAB_0012850b: LEA RDI,[RSP + 0xe0] PUSH 0x20 POP RDX MOV RSI,RBX CALL 0x00123a40 LAB_0012851e: LEA RDI,[RSP + 0x260] LEA RSI,[RSP + 0xe0] CALL 0x001237d0 LEA RDI,[RSP + 0xe0] CALL 0x001241f8 LAB_00128540: ADD R14,0x90 LAB_00128547: LEA RDI,[RSP + 0xa0] MOV RSI,R14 CALL 0x00123c30 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_00128564: LEA RDI,[RSP + 0x3d8] LEA RSI,[RSP + 0xa0] PUSH 0x8 POP RDX CALL 0x00123f00 LEA RAX,[RSP + 0x70] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R12,[RSP + 0xe0] LEA R13,[RSP + 0x20] MOV RBX,RSP LEA RBP,[RSP + 0x80] LEA R15,[0x1b34fd] LEA R14,[RSP + 0xc0] LAB_001285b4: LEA RDI,[RSP + 0x3d8] LEA RSI,[RSP + 0x60] CALL 0x00123160 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x001286ee CMP qword ptr [RSP + 0x68],0x46 JBE 0x001286af MOV RDI,R12 LEA RSI,[RSP + 0x60] PUSH 0x8 POP RDX CALL 0x00123f00 LEA RAX,[RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX AND qword ptr [RSP + 0x28],0x0 XOR ECX,ECX MOV byte ptr [RSP + 0x30],CL LEA RAX,[RSP + 0x90] MOV qword ptr [RSP + 0x80],RAX AND qword ptr [RSP + 0x88],0x0 MOV byte ptr [RSP + 0x90],CL LAB_0012862a: MOV RDI,R12 MOV RSI,R13 CALL 0x00123b40 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 MOV RAX,qword ptr [RSP + 0x88] JNZ 0x001286c1 CMP RAX,0x1 MOV RCX,RAX SBB RCX,-0x1 ADD RCX,qword ptr [RSP + 0x28] CMP RCX,0x47 JC 0x0012867e TEST RAX,RAX JZ 0x00128671 MOV RDI,RBX MOV RSI,RBP CALL 0x0013970c LAB_00128671: MOV RDI,RBP MOV RSI,R13 CALL 0x001234e0 JMP 0x0012862a LAB_0012867e: TEST RAX,RAX LEA RSI,[0x1afad9] CMOVNZ RSI,R15 LAB_0012868c: MOV RDI,R14 MOV RDX,R13 CALL 0x00139738 LAB_00128697: MOV RDI,RBP MOV RSI,R14 CALL 0x00124160 MOV RDI,R14 CALL 0x001241f8 JMP 0x0012862a LAB_001286af: MOV RDI,RBX LEA RSI,[RSP + 0x60] CALL 0x0013970c JMP 0x001285b4 LAB_001286c1: TEST RAX,RAX JZ 0x001286d1 LAB_001286c6: MOV RDI,RBX MOV RSI,RBP CALL 0x0013970c LAB_001286d1: MOV RDI,RBP CALL 0x001241f8 MOV RDI,R13 CALL 0x001241f8 MOV RDI,R12 CALL 0x00123440 JMP 0x001285b4 LAB_001286ee: LEA RDI,[RSP + 0x60] CALL 0x001241f8 LEA RDI,[RSP + 0x3d8] CALL 0x00123440 LEA RDI,[RSP + 0xa0] CALL 0x001241f8 MOV R14,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA R12,[RSP + 0xe0] LEA R13,[RSP + 0x260] LEA RBP,[0x1afad8] LAB_00128732: CMP R14,R15 JZ 0x00128798 MOV RBX,qword ptr [RSP] CMP R14,RBX JZ 0x0012874f LAB_00128740: MOV RDI,R12 LEA RSI,[RSP + 0x40] CALL 0x00123c30 JMP 0x00128766 LAB_0012874f: MOV RDI,R12 LEA RSI,[0x1afad9] LEA RDX,[RSP + 0x3d8] CALL 0x00127686 LAB_00128766: MOV RDI,R13 MOV RSI,R12 CALL 0x001237d0 MOV RDI,RAX MOV RSI,R14 CALL 0x001237d0 MOV RDI,RAX MOV RSI,RBP CALL 0x001238b0 MOV RDI,R12 CALL 0x001241f8 CMP R14,RBX ADD R14,0x20 JMP 0x00128732 LAB_00128798: LEA RSI,[RSP + 0x268] LAB_001287a0: MOV RBX,qword ptr [RSP + 0x18] MOV RDI,RBX CALL 0x00123df0 LAB_001287ad: MOV RDI,RSP CALL 0x001276c2 LEA RDI,[RSP + 0x260] CALL 0x00123200 LEA RDI,[RSP + 0x40] CALL 0x001241f8 MOV RAX,RBX ADD RSP,0x558 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::to_string[abi:cxx11]() */ int8 common_arg::to_string_abi_cxx11_(void) { int8 *puVar1; char *pcVar2; int iVar3; char cVar4; ostream *poVar5; long lVar6; istream *piVar7; long in_RSI; char *pcVar8; string *psVar9; int8 in_RDI; string *psVar10; int8 *puVar11; string *local_588; string *psStack_580; int8 local_578; int8 local_570; int1 *local_568; long local_560; int1 local_558 [16]; int1 *local_548; char local_540; int1 local_538 [16]; int1 *local_528; ulong local_520; int1 local_518 [16]; int1 *local_508; long local_500; int1 local_4f8 [16]; string local_4e8 [32]; string local_4c8 [32]; int1 *local_4a8; int local_4a0; int1 local_498 [368]; ostringstream local_328 [376]; int1 *local_1b0 [2]; int1 local_1a0 [368]; local_548 = local_538; local_570 = in_RDI; std::__cxx11::string::_M_construct((ulong)&local_548,'('); /* try { // try from 0012833e to 0012834a has its CatchHandler @ 001287f8 */ std::__cxx11::ostringstream::ostringstream(local_328); puVar1 = *(int8 **)(in_RSI + 0x68); for (puVar11 = *(int8 **)(in_RSI + 0x60); puVar11 != puVar1; puVar11 = puVar11 + 1) { pcVar2 = (char *)*puVar11; if (pcVar2 == (char *)**(int8 **)(in_RSI + 0x60)) { if (*(long *)(in_RSI + 0x68) - (long)*(int8 **)(in_RSI + 0x60) == 8) { std::operator<<((ostream *)local_328,pcVar2); } else { /* try { // try from 001283c7 to 001283d6 has its CatchHandler @ 00128817 */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_1b0,pcVar2,(allocator *)&local_568); /* try { // try from 001283d7 to 001283ed has its CatchHandler @ 00128807 */ std::operator+((string *)&local_4a8,(char *)local_1b0); std::__cxx11::string::~string((string *)local_1b0); iVar3 = 7 - local_4a0; if (7 - local_4a0 < 1) { iVar3 = 0; } local_1b0[0] = local_1a0; /* try { // try from 0012841c to 00128426 has its CatchHandler @ 00128802 */ std::__cxx11::string::_M_construct((ulong)local_1b0,(char)iVar3); /* try { // try from 00128427 to 00128441 has its CatchHandler @ 0012881b */ poVar5 = std::operator<<((ostream *)local_328,(string *)&local_4a8); std::operator<<(poVar5,(string *)local_1b0); std::__cxx11::string::~string((string *)local_1b0); std::__cxx11::string::~string((string *)&local_4a8); } } else { /* try { // try from 00128378 to 001283c1 has its CatchHandler @ 0012883d */ poVar5 = std::operator<<((ostream *)local_328,pcVar2); pcVar8 = ", "; if (pcVar2 == *(char **)(*(long *)(in_RSI + 0x68) + -8)) { pcVar8 = ""; } std::operator<<(poVar5,pcVar8); } } if (*(long *)(in_RSI + 0x78) != 0) { /* try { // try from 00128467 to 001284b3 has its CatchHandler @ 00128800 */ poVar5 = std::operator<<((ostream *)local_328," "); std::operator<<(poVar5,*(char **)(in_RSI + 0x78)); } if (*(long *)(in_RSI + 0x80) != 0) { poVar5 = std::operator<<((ostream *)local_328," "); std::operator<<(poVar5,*(char **)(in_RSI + 0x80)); } /* try { // try from 001284b4 to 001284c0 has its CatchHandler @ 001287f6 */ lVar6 = std::ostream::tellp(); if (lVar6 < 0x26) { /* try { // try from 001284ef to 001284fb has its CatchHandler @ 001287e5 */ cVar4 = std::ostream::tellp(); local_4a8 = local_498; /* try { // try from 0012850b to 0012851d has its CatchHandler @ 001287e3 */ std::__cxx11::string::_M_construct((ulong)&local_4a8,local_540 - cVar4); /* try { // try from 0012851e to 00128532 has its CatchHandler @ 001287e1 */ std::operator<<((ostream *)local_328,(string *)&local_4a8); std::__cxx11::string::~string((string *)&local_4a8); } else { /* try { // try from 001284c7 to 001284e7 has its CatchHandler @ 00128800 */ poVar5 = std::operator<<((ostream *)local_328,"\n"); std::operator<<(poVar5,(string *)&local_548); } /* try { // try from 00128547 to 00128556 has its CatchHandler @ 001287f4 */ std::__cxx11::string::string(local_4e8,(string *)(in_RSI + 0x90)); local_588 = (string *)0x0; psStack_580 = (string *)0x0; local_578 = 0; /* try { // try from 00128564 to 0012857b has its CatchHandler @ 001287ec */ std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,local_4e8,8); local_528 = local_518; local_520 = 0; local_518[0] = 0; while( true ) { /* try { // try from 001285b4 to 001285f3 has its CatchHandler @ 00128845 */ piVar7 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_1b0,(string *)&local_528); if (((byte)piVar7[*(long *)(*(long *)piVar7 + -0x18) + 0x20] & 5) != 0) break; if (local_520 < 0x47) { /* try { // try from 001286af to 001286bb has its CatchHandler @ 00128845 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588, (string *)&local_528); } else { std::__cxx11::istringstream::istringstream((istringstream *)&local_4a8,&local_528,8); local_568 = local_558; local_560 = 0; local_558[0] = 0; local_508 = local_4f8; local_500 = 0; local_4f8[0] = 0; while( true ) { /* try { // try from 0012862a to 0012867b has its CatchHandler @ 0012887b */ piVar7 = std::operator>>((istream *)&local_4a8,(string *)&local_568); if (((byte)piVar7[*(long *)(*(long *)piVar7 + -0x18) + 0x20] & 5) != 0) break; if (((local_500 + 1) - (ulong)(local_500 == 0)) + local_560 < 0x47) { psVar9 = (string *)0x1afad9; if (local_500 != 0) { psVar9 = (string *)0x1b34fd; } /* try { // try from 0012868c to 00128696 has its CatchHandler @ 00128879 */ std::operator+((char *)local_4c8,psVar9); /* try { // try from 00128697 to 001286a1 has its CatchHandler @ 00128867 */ std::__cxx11::string::append((string *)&local_508); std::__cxx11::string::~string(local_4c8); } else { if (local_500 != 0) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) &local_588,(string *)&local_508); } std::__cxx11::string::_M_assign((string *)&local_508); } } if (local_500 != 0) { /* try { // try from 001286c6 to 001286d0 has its CatchHandler @ 00128819 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588, (string *)&local_508); } std::__cxx11::string::~string((string *)&local_508); std::__cxx11::string::~string((string *)&local_568); std::__cxx11::istringstream::~istringstream((istringstream *)&local_4a8); } } std::__cxx11::string::~string((string *)&local_528); std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0); std::__cxx11::string::~string(local_4e8); psVar9 = psStack_580; for (psVar10 = local_588; psVar10 != psVar9; psVar10 = psVar10 + 0x20) { if (psVar10 == local_588) { std::__cxx11::string::string<std::allocator<char>> ((string *)&local_4a8,"",(allocator *)local_1b0); } else { /* try { // try from 00128740 to 00128765 has its CatchHandler @ 00128838 */ std::__cxx11::string::string((string *)&local_4a8,(string *)&local_548); } /* try { // try from 00128766 to 00128786 has its CatchHandler @ 0012884a */ poVar5 = std::operator<<((ostream *)local_328,(string *)&local_4a8); poVar5 = std::operator<<(poVar5,psVar10); std::operator<<(poVar5,"\n"); std::__cxx11::string::~string((string *)&local_4a8); } /* try { // try from 001287a0 to 001287ac has its CatchHandler @ 001287e7 */ std::__cxx11::stringbuf::str(); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588); std::__cxx11::ostringstream::~ostringstream(local_328); std::__cxx11::string::~string((string *)&local_548); return local_570; }
39,157
atoi_octal
eloqsql/mysys/my_init.c
static ulong atoi_octal(const char *str) { long int tmp; while (*str && my_isspace(&my_charset_latin1, *str)) str++; str2int(str, (*str == '0' ? 8 : 10), /* Octalt or decimalt */ 0, INT_MAX, &tmp); return (ulong) tmp; }
O3
c
atoi_octal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movb (%rdi), %al movl $0xa, %esi testb %al, %al je 0xbea2e leaq 0x315f2a(%rip), %rcx # 0x3d4930 movq 0x40(%rcx), %rcx movzbl %al, %edx testb $0x8, 0x1(%rcx,%rdx) je 0xbea20 movb 0x1(%rdi), %al incq %rdi testb %al, %al jne 0xbea0a jmp 0xbea2e xorl %ecx, %ecx cmpb $0x30, %al setne %cl leal 0x8(,%rcx,2), %esi leaq -0x10(%rbp), %rbx movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF xorl %edx, %edx movq %rbx, %r8 callq 0xf6c50 movq (%rbx), %rax addq $0x8, %rsp popq %rbx popq %rbp retq
atoi_octal: push rbp mov rbp, rsp push rbx push rax mov al, [rdi] mov esi, 0Ah test al, al jz short loc_BEA2E lea rcx, my_charset_latin1 mov rcx, [rcx+40h] loc_BEA0A: movzx edx, al test byte ptr [rcx+rdx+1], 8 jz short loc_BEA20 mov al, [rdi+1] inc rdi test al, al jnz short loc_BEA0A jmp short loc_BEA2E loc_BEA20: xor ecx, ecx cmp al, 30h ; '0' setnz cl lea esi, ds:8[rcx*2] loc_BEA2E: lea rbx, [rbp+var_10] mov ecx, 7FFFFFFFh xor edx, edx mov r8, rbx call str2int mov rax, [rbx] add rsp, 8 pop rbx pop rbp retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> atoi_octal(unsigned __int8 *a1) { unsigned __int8 v1; // al long long v2; // rsi _BYTE v3[16]; // [rsp+0h] [rbp-10h] BYREF v1 = *a1; v2 = 10LL; if ( *a1 ) { while ( (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + v1 + 1LL) & 8) != 0 ) { v1 = *++a1; if ( !v1 ) goto LABEL_6; } v2 = 2 * (unsigned int)(v1 != 48) + 8; } LABEL_6: str2int(a1, v2, 0LL, 0x7FFFFFFFLL, v3); }
atoi_octal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV AL,byte ptr [RDI] MOV ESI,0xa TEST AL,AL JZ 0x001bea2e LEA RCX,[0x4d4930] MOV RCX,qword ptr [RCX + 0x40] LAB_001bea0a: MOVZX EDX,AL TEST byte ptr [RCX + RDX*0x1 + 0x1],0x8 JZ 0x001bea20 MOV AL,byte ptr [RDI + 0x1] INC RDI TEST AL,AL JNZ 0x001bea0a JMP 0x001bea2e LAB_001bea20: XOR ECX,ECX CMP AL,0x30 SETNZ CL LEA ESI,[0x8 + RCX*0x2] LAB_001bea2e: LEA RBX,[RBP + -0x10] MOV ECX,0x7fffffff XOR EDX,EDX MOV R8,RBX CALL 0x001f6c50 MOV RAX,qword ptr [RBX] ADD RSP,0x8 POP RBX POP RBP RET
int8 atoi_octal(byte *param_1) { byte bVar1; int8 in_RAX; char cVar2; int8 local_18; bVar1 = *param_1; cVar2 = '\n'; do { if (bVar1 == 0) { LAB_001bea2e: local_18 = in_RAX; str2int(param_1,cVar2,0,0x7fffffff,&local_18); return local_18; } if ((PTR_ctype_latin1_004d4970[(ulong)bVar1 + 1] & 8) == 0) { cVar2 = (bVar1 != 0x30) * '\x02' + '\b'; goto LAB_001bea2e; } bVar1 = param_1[1]; param_1 = param_1 + 1; } while( true ); }
39,158
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint()
monkey531[P]llama/common/json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint(): subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x75, 0x14(%rax) je 0xae87a leaq 0x1658ec(%rip), %rdi # 0x21414c movl $0x1d79, %esi # imm = 0x1D79 leaq 0x15eccd(%rip), %rdx # 0x20d539 leaq 0x16660c(%rip), %rcx # 0x214e7f movb $0x0, %al callq 0x5b030 movl $0x0, 0x54(%rsp) movl $0xc, 0x30(%rsp) movl $0x8, 0x34(%rsp) movl $0x4, 0x38(%rsp) movl $0x0, 0x3c(%rsp) leaq 0x30(%rsp), %rax movq %rax, 0x40(%rsp) movq $0x4, 0x48(%rsp) leaq 0x40(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0xaec60 movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rdi callq 0xaec70 movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rax cmpq 0x18(%rsp), %rax je 0xae9b8 movq 0x8(%rsp), %rdi movq 0x20(%rsp), %rax movl (%rax), %eax movl %eax, 0x14(%rsp) callq 0xad9f0 movq 0x8(%rsp), %rax cmpl $0x30, 0x14(%rax) jl 0xae933 movq 0x8(%rsp), %rax cmpl $0x39, 0x14(%rax) jg 0xae933 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x30, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xae9a3 movq 0x8(%rsp), %rax cmpl $0x41, 0x14(%rax) jl 0xae964 movq 0x8(%rsp), %rax cmpl $0x46, 0x14(%rax) jg 0xae964 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x37, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xae9a1 movq 0x8(%rsp), %rax cmpl $0x61, 0x14(%rax) jl 0xae995 movq 0x8(%rsp), %rax cmpl $0x66, 0x14(%rax) jg 0xae995 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x57, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xae99f movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0xae9f3 jmp 0xae9a1 jmp 0xae9a3 jmp 0xae9a5 movq 0x20(%rsp), %rax addq $0x4, %rax movq %rax, 0x20(%rsp) jmp 0xae8dd xorl %eax, %eax cmpl 0x54(%rsp), %eax jg 0xae9ca cmpl $0xffff, 0x54(%rsp) # imm = 0xFFFF jle 0xae9eb leaq 0x16577b(%rip), %rdi # 0x21414c movl $0x1d93, %esi # imm = 0x1D93 leaq 0x15eb5c(%rip), %rdx # 0x20d539 leaq 0x1664aa(%rip), %rcx # 0x214e8e movb $0x0, %al callq 0x5b030 movl 0x54(%rsp), %eax movl %eax, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv: sub rsp, 68h mov [rsp+68h+var_10], rdi mov rax, [rsp+68h+var_10] mov [rsp+68h+var_60], rax cmp dword ptr [rax+14h], 75h ; 'u' jz short loc_AE87A lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1D79h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov al, 0 call _ggml_abort loc_AE87A: mov [rsp+68h+var_14], 0 mov [rsp+68h+var_38], 0Ch mov [rsp+68h+var_34], 8 mov [rsp+68h+var_30], 4 mov [rsp+68h+var_2C], 0 lea rax, [rsp+68h+var_38] mov [rsp+68h+var_28], rax mov [rsp+68h+var_20], 4 lea rax, [rsp+68h+var_28] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_40] call _ZNKSt16initializer_listIjE5beginEv; std::initializer_list<uint>::begin(void) mov [rsp+68h+var_48], rax mov rdi, [rsp+68h+var_40] call _ZNKSt16initializer_listIjE3endEv; std::initializer_list<uint>::end(void) mov [rsp+68h+var_50], rax loc_AE8DD: mov rax, [rsp+68h+var_48] cmp rax, [rsp+68h+var_50] jz loc_AE9B8 mov rdi, [rsp+68h+var_60] mov rax, [rsp+68h+var_48] mov eax, [rax] mov [rsp+68h+var_54], eax call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 30h ; '0' jl short loc_AE933 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 39h ; '9' jg short loc_AE933 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 30h ; '0' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_AE9A3 loc_AE933: mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 41h ; 'A' jl short loc_AE964 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 46h ; 'F' jg short loc_AE964 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 37h ; '7' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_AE9A1 loc_AE964: mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 61h ; 'a' jl short loc_AE995 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 66h ; 'f' jg short loc_AE995 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 57h ; 'W' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_AE99F loc_AE995: mov [rsp+68h+var_4], 0FFFFFFFFh jmp short loc_AE9F3 loc_AE99F: jmp short $+2 loc_AE9A1: jmp short $+2 loc_AE9A3: jmp short $+2 loc_AE9A5: mov rax, [rsp+68h+var_48] add rax, 4 mov [rsp+68h+var_48], rax jmp loc_AE8DD loc_AE9B8: xor eax, eax cmp eax, [rsp+68h+var_14] jg short loc_AE9CA cmp [rsp+68h+var_14], 0FFFFh jle short loc_AE9EB loc_AE9CA: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1D93h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"... mov al, 0 call _ggml_abort loc_AE9EB: mov eax, [rsp+68h+var_14] mov [rsp+68h+var_4], eax loc_AE9F3: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( long long a1) { int v2; // [rsp+14h] [rbp-54h] long long v3; // [rsp+18h] [rbp-50h] int *v4; // [rsp+20h] [rbp-48h] _DWORD v5[4]; // [rsp+30h] [rbp-38h] BYREF _QWORD v6[2]; // [rsp+40h] [rbp-28h] BYREF unsigned int v7; // [rsp+54h] [rbp-14h] long long v8; // [rsp+58h] [rbp-10h] v8 = a1; if ( *(_DWORD *)(a1 + 20) != 117 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); v7 = 0; v5[0] = 12; v5[1] = 8; v5[2] = 4; v5[3] = 0; v6[0] = v5; v6[1] = 4LL; v4 = (int *)std::initializer_list<unsigned int>::begin(v6); v3 = std::initializer_list<unsigned int>::end(v6); while ( v4 != (int *)v3 ) { v2 = *v4; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( *(int *)(a1 + 20) < 48 || *(int *)(a1 + 20) > 57 ) { if ( *(int *)(a1 + 20) < 65 || *(int *)(a1 + 20) > 70 ) { if ( *(int *)(a1 + 20) < 97 || *(int *)(a1 + 20) > 102 ) return (unsigned int)-1; v7 += (*(_DWORD *)(a1 + 20) - 87) << v2; } else { v7 += (*(_DWORD *)(a1 + 20) - 55) << v2; } } else { v7 += (*(_DWORD *)(a1 + 20) - 48) << v2; } ++v4; } if ( v7 >= 0x10000 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7571LL, "GGML_ASSERT(%s) failed", "0x0000 <= codepoint && codepoint <= 0xFFFF"); return v7; }
get_codepoint: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RAX + 0x14],0x75 JZ 0x001ae87a LEA RDI,[0x31414c] MOV ESI,0x1d79 LEA RDX,[0x30d539] LEA RCX,[0x314e7f] MOV AL,0x0 CALL 0x0015b030 LAB_001ae87a: MOV dword ptr [RSP + 0x54],0x0 MOV dword ptr [RSP + 0x30],0xc MOV dword ptr [RSP + 0x34],0x8 MOV dword ptr [RSP + 0x38],0x4 MOV dword ptr [RSP + 0x3c],0x0 LEA RAX,[RSP + 0x30] MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],0x4 LEA RAX,[RSP + 0x40] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001aec60 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001aec70 MOV qword ptr [RSP + 0x18],RAX LAB_001ae8dd: MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x18] JZ 0x001ae9b8 MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x14],EAX CALL 0x001ad9f0 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x30 JL 0x001ae933 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x39 JG 0x001ae933 MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x14] SUB EAX,0x30 MOV ECX,dword ptr [RSP + 0x14] SHL EAX,CL ADD EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x54],EAX JMP 0x001ae9a3 LAB_001ae933: MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x41 JL 0x001ae964 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x46 JG 0x001ae964 MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x14] SUB EAX,0x37 MOV ECX,dword ptr [RSP + 0x14] SHL EAX,CL ADD EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x54],EAX JMP 0x001ae9a1 LAB_001ae964: MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x61 JL 0x001ae995 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x66 JG 0x001ae995 MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x14] SUB EAX,0x57 MOV ECX,dword ptr [RSP + 0x14] SHL EAX,CL ADD EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x54],EAX JMP 0x001ae99f LAB_001ae995: MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x001ae9f3 LAB_001ae99f: JMP 0x001ae9a1 LAB_001ae9a1: JMP 0x001ae9a3 LAB_001ae9a3: JMP 0x001ae9a5 LAB_001ae9a5: MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x4 MOV qword ptr [RSP + 0x20],RAX JMP 0x001ae8dd LAB_001ae9b8: XOR EAX,EAX CMP EAX,dword ptr [RSP + 0x54] JG 0x001ae9ca CMP dword ptr [RSP + 0x54],0xffff JLE 0x001ae9eb LAB_001ae9ca: LEA RDI,[0x31414c] MOV ESI,0x1d93 LEA RDX,[0x30d539] LEA RCX,[0x314e8e] MOV AL,0x0 CALL 0x0015b030 LAB_001ae9eb: MOV EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x64],EAX LAB_001ae9f3: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get_codepoint() */ int __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int4 uVar1; int iVar2; int4 *puVar3; byte bVar4; int4 *local_48; int4 local_38; int4 local_34; int4 local_30; int4 local_2c; int4 *local_28; int8 local_20; int local_14; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *local_10; local_10 = this; if (*(int *)(this + 0x14) != 0x75) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1d79, "GGML_ASSERT(%s) failed","current == \'u\'"); } local_14 = 0; local_38 = 0xc; local_34 = 8; local_30 = 4; local_2c = 0; local_28 = &local_38; local_20 = 4; local_48 = (int4 *) std::initializer_list<unsigned_int>::begin((initializer_list<unsigned_int> *)&local_28) ; puVar3 = (int4 *) std::initializer_list<unsigned_int>::end((initializer_list<unsigned_int> *)&local_28); do { if (local_48 == puVar3) { if ((local_14 < 0) || (0xffff < local_14)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 0x1d93,"GGML_ASSERT(%s) failed","0x0000 <= codepoint && codepoint <= 0xFFFF"); } return local_14; } uVar1 = *local_48; get(this); bVar4 = (byte)uVar1; if ((*(int *)(this + 0x14) < 0x30) || (0x39 < *(int *)(this + 0x14))) { if ((*(int *)(this + 0x14) < 0x41) || (0x46 < *(int *)(this + 0x14))) { if ((*(int *)(this + 0x14) < 0x61) || (0x66 < *(int *)(this + 0x14))) { return -1; } iVar2 = *(int *)(this + 0x14) + -0x57 << (bVar4 & 0x1f); } else { iVar2 = *(int *)(this + 0x14) + -0x37 << (bVar4 & 0x1f); } } else { iVar2 = *(int *)(this + 0x14) + -0x30 << (bVar4 & 0x1f); } local_14 = iVar2 + local_14; local_48 = local_48 + 1; } while( true ); }
39,159
my_mb_wc_sjis
eloqsql/strings/ctype-sjis.c
static int my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } /* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */ if (hi >= 0xA1 && hi <= 0xDF) { *pwc= sjis_to_unicode[hi]; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; /* JIS-X-0208 [81..9F,E0..FC][40..7E,80..FC] */ if (!(pwc[0]= sjis_to_unicode[(hi << 8) + s[1]])) return (issjishead(hi) && issjistail(s[1])) ? -2 : MY_CS_ILSEQ; return 2; }
O3
c
my_mb_wc_sjis: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x4c813 movzbl (%rdx), %edi testb %dil, %dil js 0x4c7f9 movq %rdi, (%rsi) jmp 0x4c80e leal 0x5f(%rdi), %eax cmpb $0x3e, %al ja 0x4c815 leaq 0x183d29(%rip), %rax # 0x1d0530 movzwl (%rax,%rdi,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x4c813 movzbl 0x1(%rdx), %eax movl %edi, %ecx shll $0x9, %ecx leal (%rcx,%rax,2), %eax leaq 0x183cfa(%rip), %rcx # 0x1d0530 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0x4c813 cmpb $-0x80, %dil setne %al cmpb $-0x60, %dil setb %cl andb %al, %cl addb $0x20, %dil cmpb $0x1d, %dil setb %sil orb %cl, %sil xorl %eax, %eax cmpb $0x1, %sil jne 0x4c813 movb 0x1(%rdx), %cl leal -0x40(%rcx), %edx movl $0xfffffffe, %eax # imm = 0xFFFFFFFE cmpb $0x3f, %dl jb 0x4c813 movl $0x0, %eax testb %cl, %cl jns 0x4c813 xorl %eax, %eax cmpb $-0x3, %cl setae %al leal -0x2(,%rax,2), %eax jmp 0x4c813
my_mb_wc_sjis: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_4C813 movzx edi, byte ptr [rdx] test dil, dil js short loc_4C7F9 mov [rsi], rdi jmp short loc_4C80E loc_4C7F9: lea eax, [rdi+5Fh] cmp al, 3Eh ; '>' ja short loc_4C815 lea rax, sjis_to_unicode movzx eax, word ptr [rax+rdi*2] mov [rsi], rax loc_4C80E: mov eax, 1 loc_4C813: pop rbp retn loc_4C815: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_4C813 movzx eax, byte ptr [rdx+1] mov ecx, edi shl ecx, 9 lea eax, [rcx+rax*2] lea rcx, sjis_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_4C813 cmp dil, 80h setnz al cmp dil, 0A0h setb cl and cl, al add dil, 20h ; ' ' cmp dil, 1Dh setb sil or sil, cl xor eax, eax cmp sil, 1 jnz short loc_4C813 mov cl, [rdx+1] lea edx, [rcx-40h] mov eax, 0FFFFFFFEh cmp dl, 3Fh ; '?' jb short loc_4C813 mov eax, 0 test cl, cl jns short loc_4C813 xor eax, eax cmp cl, 0FDh setnb al lea eax, ds:0FFFFFFFFFFFFFFFEh[rax*2] jmp loc_4C813
long long my_mb_wc_sjis(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx char v7; // cl result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x3Eu ) { *a2 = sjis_to_unicode[v5]; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = sjis_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) { result = 0LL; if ( (_BYTE)v5 != 0x80 && (unsigned __int8)v5 < 0xA0u || (unsigned __int8)(v5 + 32) < 0x1Du ) { v7 = a3[1]; result = 4294967294LL; if ( (unsigned __int8)(v7 - 64) >= 0x3Fu ) { result = 0LL; if ( v7 < 0 ) return 2 * (unsigned int)((unsigned __int8)v7 >= 0xFDu) - 2; } } } } } return result; }
my_mb_wc_sjis: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0014c813 MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x0014c7f9 MOV qword ptr [RSI],RDI JMP 0x0014c80e LAB_0014c7f9: LEA EAX,[RDI + 0x5f] CMP AL,0x3e JA 0x0014c815 LEA RAX,[0x2d0530] MOVZX EAX,word ptr [RAX + RDI*0x2] MOV qword ptr [RSI],RAX LAB_0014c80e: MOV EAX,0x1 LAB_0014c813: POP RBP RET LAB_0014c815: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x0014c813 MOVZX EAX,byte ptr [RDX + 0x1] MOV ECX,EDI SHL ECX,0x9 LEA EAX,[RCX + RAX*0x2] LEA RCX,[0x2d0530] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x0014c813 CMP DIL,0x80 SETNZ AL CMP DIL,0xa0 SETC CL AND CL,AL ADD DIL,0x20 CMP DIL,0x1d SETC SIL OR SIL,CL XOR EAX,EAX CMP SIL,0x1 JNZ 0x0014c813 MOV CL,byte ptr [RDX + 0x1] LEA EDX,[RCX + -0x40] MOV EAX,0xfffffffe CMP DL,0x3f JC 0x0014c813 MOV EAX,0x0 TEST CL,CL JNS 0x0014c813 XOR EAX,EAX CMP CL,0xfd SETNC AL LEA EAX,[-0x2 + RAX*0x2] JMP 0x0014c813
int my_mb_wc_sjis(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if (0x3e < (byte)(bVar1 + 0x5f)) { if (param_4 < param_3 + 2) { return -0x66; } uVar2 = *(ushort *)(sjis_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 2; } if (0x1c < (byte)(bVar1 + 0x20) && (0x9f < bVar1 || bVar1 == 0x80)) { return 0; } bVar1 = param_3[1]; if ((byte)(bVar1 - 0x40) < 0x3f) { return -2; } if (-1 < (char)bVar1) { return 0; } return (uint)(0xfc < bVar1) * 2 + -2; } *param_2 = (ulong)*(ushort *)(sjis_to_unicode + (ulong)bVar1 * 2); } else { *param_2 = (ulong)bVar1; } iVar3 = 1; } return iVar3; }
39,160
my_xml_scan
eloqsql/strings/xml.c
static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a) { int lex; for (; ( p->cur < p->end) && my_xml_is_space(p->cur[0]) ; p->cur++); if (p->cur >= p->end) { a->beg=p->end; a->end=p->end; lex=MY_XML_EOF; goto ret; } a->beg=p->cur; a->end=p->cur; if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<!--"))) { for (; p->cur < p->end; p->cur++) { if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("-->"))) { p->cur+= 3; break; } } a->end=p->cur; lex=MY_XML_COMMENT; } else if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<![CDATA["))) { p->cur+= 9; for (; p->cur < p->end - 2 ; p->cur++) { if (p->cur[0] == ']' && p->cur[1] == ']' && p->cur[2] == '>') { p->cur+= 3; a->end= p->cur; break; } } lex= MY_XML_CDATA; } else if (strchr("?=/<>!",p->cur[0])) { p->cur++; a->end=p->cur; lex=a->beg[0]; } else if ( (p->cur[0] == '"') || (p->cur[0] == '\'') ) { /* "string" or 'string' found. Scan until the closing quote/doublequote, or until the END-OF-INPUT. */ p->cur++; for (; ( p->cur < p->end ) && (p->cur[0] != a->beg[0]); p->cur++) {} a->end=p->cur; if (p->cur < p->end) /* Closing quote or doublequote has been found */ p->cur++; a->beg++; if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION)) my_xml_norm_text(a); lex=MY_XML_STRING; } else if (my_xml_is_id0(p->cur[0])) { p->cur++; while (p->cur < p->end && my_xml_is_id1(p->cur[0])) p->cur++; a->end=p->cur; my_xml_norm_text(a); lex=MY_XML_IDENT; } else lex= MY_XML_UNKNOWN; #if 0 printf("LEX=%s[%d]\n",lex2str(lex),a->end-a->beg); #endif ret: return lex; }
O3
c
my_xml_scan: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x130(%rdi), %rax movq 0x138(%rdi), %rcx cmpq %rcx, %rax jae 0xdc6ee leaq 0x28467a(%rip), %rbx # 0x360d50 movzbl (%rax), %edx testb $0x8, (%rdx,%rbx) je 0xdc714 incq %rax movq %rax, 0x130(%r14) cmpq %rcx, %rax jne 0xdc6d6 movq %rcx, (%rsi) movq 0x138(%r14), %rax movq %rax, 0x8(%rsi) movl $0x45, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, (%rsi) movq 0x130(%r14), %r13 movq %r13, 0x8(%rsi) movq 0x138(%r14), %r12 leaq 0x4(%r13), %rax cmpq %r12, %rax ja 0xdc73c cmpl $0x2d2d213c, (%r13) # imm = 0x2D2D213C je 0xdc7a5 leaq 0x9(%r13), %rax cmpq %r12, %rax ja 0xdc765 movabsq $0x41544144435b213c, %rcx # imm = 0x41544144435B213C xorq (%r13), %rcx movzbl 0x8(%r13), %edx xorq $0x5b, %rdx orq %rcx, %rdx je 0xdc852 movq %rsi, -0x30(%rbp) movsbl (%r13), %r15d leaq 0x8e5c(%rip), %rdi # 0xe55d1 movl $0x7, %edx movl %r15d, %esi callq 0x2a370 testq %rax, %rax je 0xdc7e1 incq %r13 movq %r13, 0x130(%r14) movq -0x30(%rbp), %rax movq %r13, 0x8(%rax) movq (%rax), %rax movsbl (%rax), %r15d jmp 0xdc702 leaq 0x3(%r13), %rax cmpq %r12, %rax ja 0xdc7ca movzwl (%r13), %ecx xorl $0x2d2d, %ecx # imm = 0x2D2D movzbl 0x2(%r13), %edx xorl $0x3e, %edx orw %cx, %dx je 0xdc8e8 incq %r13 movq %r13, 0x130(%r14) cmpq %r12, %r13 jne 0xdc7a5 movq %r12, %rax jmp 0xdc8ef movzbl %r15b, %eax cmpq $0x27, %rax movq -0x30(%rbp), %rdi je 0xdc7f8 cmpl $0x22, %eax jne 0xdc8a5 incq %r13 movq %r13, %rax movq %r13, 0x130(%r14) cmpq %r12, %r13 jae 0xdc817 movb (%rax), %cl movq (%rdi), %rdx leaq 0x1(%rax), %r13 cmpb (%rdx), %cl jne 0xdc7fb movq %rax, 0x8(%rdi) movq 0x130(%r14), %rax cmpq 0x138(%r14), %rax jae 0xdc835 incq %rax movq %rax, 0x130(%r14) incq (%rdi) movl $0x53, %r15d testb $0x2, (%r14) jne 0xdc702 callq 0xdcce3 jmp 0xdc702 leaq -0x2(%r12), %rcx movq %rax, 0x130(%r14) movl $0x44, %r15d cmpq %rcx, %rax jae 0xdc702 subq %r13, %r12 addq $0xc, %r13 addq $-0xb, %r12 cmpb $0x5d, -0x3(%r13) jne 0xdc88d cmpb $0x5d, -0x2(%r13) jne 0xdc88d cmpb $0x3e, -0x1(%r13) je 0xdc8fe leaq -0x2(%r13), %rax movq %rax, 0x130(%r14) incq %r13 decq %r12 jne 0xdc878 jmp 0xdc702 movl $0x55, %r15d testb $0x1, (%rax,%rbx) je 0xdc702 incq %r13 movq %r13, %rax movq %r13, 0x130(%r14) cmpq %r12, %r13 jae 0xdc8d4 movzbl (%rax), %ecx leaq 0x1(%rax), %r13 testb $0x2, (%rcx,%rbx) jne 0xdc8b8 movq %rax, 0x8(%rdi) callq 0xdcce3 movl $0x49, %r15d jmp 0xdc702 movq %rax, 0x130(%r14) movq %rax, 0x8(%rsi) movl $0x43, %r15d jmp 0xdc702 movq %r13, 0x130(%r14) movq %r13, 0x8(%rsi) jmp 0xdc702
my_xml_scan: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi mov rax, [rdi+130h] mov rcx, [rdi+138h] cmp rax, rcx jnb short loc_DC6EE lea rbx, my_xml_ctype loc_DC6D6: movzx edx, byte ptr [rax] test byte ptr [rdx+rbx], 8 jz short loc_DC714 inc rax mov [r14+130h], rax cmp rax, rcx jnz short loc_DC6D6 loc_DC6EE: mov [rsi], rcx mov rax, [r14+138h] mov [rsi+8], rax mov r15d, 45h ; 'E' loc_DC702: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_DC714: mov [rsi], rax mov r13, [r14+130h] mov [rsi+8], r13 mov r12, [r14+138h] lea rax, [r13+4] cmp rax, r12 ja short loc_DC73C cmp dword ptr [r13+0], 2D2D213Ch jz short loc_DC7A5 loc_DC73C: lea rax, [r13+9] cmp rax, r12 ja short loc_DC765 mov rcx, 41544144435B213Ch xor rcx, [r13+0] movzx edx, byte ptr [r13+8] xor rdx, 5Bh or rdx, rcx jz loc_DC852 loc_DC765: mov [rbp+var_30], rsi movsx r15d, byte ptr [r13+0] lea rdi, asc_E55D1; "?=/<>!" mov edx, 7 mov esi, r15d call _memchr test rax, rax jz short loc_DC7E1 inc r13 mov [r14+130h], r13 mov rax, [rbp+var_30] mov [rax+8], r13 mov rax, [rax] movsx r15d, byte ptr [rax] jmp loc_DC702 loc_DC7A5: lea rax, [r13+3] cmp rax, r12 ja short loc_DC7CA movzx ecx, word ptr [r13+0] xor ecx, 2D2Dh movzx edx, byte ptr [r13+2] xor edx, 3Eh or dx, cx jz loc_DC8E8 loc_DC7CA: inc r13 mov [r14+130h], r13 cmp r13, r12 jnz short loc_DC7A5 mov rax, r12 jmp loc_DC8EF loc_DC7E1: movzx eax, r15b cmp rax, 27h ; ''' mov rdi, [rbp+var_30] jz short loc_DC7F8 cmp eax, 22h ; '"' jnz loc_DC8A5 loc_DC7F8: inc r13 loc_DC7FB: mov rax, r13 mov [r14+130h], r13 cmp r13, r12 jnb short loc_DC817 mov cl, [rax] mov rdx, [rdi] lea r13, [rax+1] cmp cl, [rdx] jnz short loc_DC7FB loc_DC817: mov [rdi+8], rax mov rax, [r14+130h] cmp rax, [r14+138h] jnb short loc_DC835 inc rax mov [r14+130h], rax loc_DC835: inc qword ptr [rdi] mov r15d, 53h ; 'S' test byte ptr [r14], 2 jnz loc_DC702 call my_xml_norm_text jmp loc_DC702 loc_DC852: lea rcx, [r12-2] mov [r14+130h], rax mov r15d, 44h ; 'D' cmp rax, rcx jnb loc_DC702 sub r12, r13 add r13, 0Ch add r12, 0FFFFFFFFFFFFFFF5h loc_DC878: cmp byte ptr [r13-3], 5Dh ; ']' jnz short loc_DC88D cmp byte ptr [r13-2], 5Dh ; ']' jnz short loc_DC88D cmp byte ptr [r13-1], 3Eh ; '>' jz short loc_DC8FE loc_DC88D: lea rax, [r13-2] mov [r14+130h], rax inc r13 dec r12 jnz short loc_DC878 jmp loc_DC702 loc_DC8A5: mov r15d, 55h ; 'U' test byte ptr [rax+rbx], 1 jz loc_DC702 inc r13 loc_DC8B8: mov rax, r13 mov [r14+130h], r13 cmp r13, r12 jnb short loc_DC8D4 movzx ecx, byte ptr [rax] lea r13, [rax+1] test byte ptr [rcx+rbx], 2 jnz short loc_DC8B8 loc_DC8D4: mov [rdi+8], rax call my_xml_norm_text mov r15d, 49h ; 'I' jmp loc_DC702 loc_DC8E8: mov [r14+130h], rax loc_DC8EF: mov [rsi+8], rax mov r15d, 43h ; 'C' jmp loc_DC702 loc_DC8FE: mov [r14+130h], r13 mov [rsi+8], r13 jmp loc_DC702
long long my_xml_scan(long long a1, unsigned __int8 **a2) { unsigned __int8 *v2; // rax unsigned __int8 *v3; // rcx unsigned int v4; // r15d char *v6; // r13 unsigned long long v7; // r12 unsigned long long v8; // rax unsigned __int8 v9; // r15 char *v10; // r13 char *v11; // rax long long v12; // rax char *v13; // r13 char *v14; // rax unsigned long long v15; // rax unsigned long long v16; // r12 char *v17; // r13 unsigned long long v18; // r12 char *v19; // r13 char *v20; // rax long long v21; // rcx v2 = *(unsigned __int8 **)(a1 + 304); v3 = *(unsigned __int8 **)(a1 + 312); if ( v2 >= v3 ) { LABEL_4: *a2 = v3; a2[1] = *(unsigned __int8 **)(a1 + 312); return 69; } else { while ( (my_xml_ctype[*v2] & 8) != 0 ) { *(_QWORD *)(a1 + 304) = ++v2; if ( v2 == v3 ) goto LABEL_4; } *a2 = v2; v6 = *(char **)(a1 + 304); a2[1] = (unsigned __int8 *)v6; v7 = *(_QWORD *)(a1 + 312); if ( (unsigned long long)(v6 + 4) <= v7 && *(_DWORD *)v6 == 757932348 ) { while ( 1 ) { v11 = v6 + 3; if ( (unsigned long long)(v6 + 3) <= v7 && !(*(_WORD *)v6 ^ 0x2D2D | (unsigned __int8)v6[2] ^ 0x3E) ) break; *(_QWORD *)(a1 + 304) = ++v6; if ( v6 == (char *)v7 ) { v11 = (char *)v7; goto LABEL_38; } } *(_QWORD *)(a1 + 304) = v11; LABEL_38: a2[1] = (unsigned __int8 *)v11; return 67; } else { v8 = (unsigned long long)(v6 + 9); if ( (unsigned long long)(v6 + 9) > v7 || *(_QWORD *)v6 ^ 0x41544144435B213CLL | (unsigned __int8)v6[8] ^ 0x5BLL ) { v9 = *v6; if ( memchr("?=/<>!", (unsigned int)*v6, 7LL) ) { v10 = v6 + 1; *(_QWORD *)(a1 + 304) = v10; a2[1] = (unsigned __int8 *)v10; return (unsigned int)(char)**a2; } else { v12 = v9; if ( v9 == 39LL || v9 == 34 ) { v13 = v6 + 1; do { v14 = v13; *(_QWORD *)(a1 + 304) = v13; if ( (unsigned long long)v13 >= v7 ) break; ++v13; } while ( *v14 != **a2 ); a2[1] = (unsigned __int8 *)v14; v15 = *(_QWORD *)(a1 + 304); if ( v15 < *(_QWORD *)(a1 + 312) ) *(_QWORD *)(a1 + 304) = v15 + 1; ++*a2; v4 = 83; if ( (*(_BYTE *)a1 & 2) == 0 ) my_xml_norm_text(a2); } else { v4 = 85; if ( (my_xml_ctype[v12] & 1) != 0 ) { v19 = v6 + 1; do { v20 = v19; *(_QWORD *)(a1 + 304) = v19; if ( (unsigned long long)v19 >= v7 ) break; v21 = (unsigned __int8)*v19++; } while ( (my_xml_ctype[v21] & 2) != 0 ); a2[1] = (unsigned __int8 *)v20; my_xml_norm_text(a2); return 73; } } } } else { *(_QWORD *)(a1 + 304) = v8; v4 = 68; if ( v8 < v7 - 2 ) { v16 = v7 - (_QWORD)v6; v17 = v6 + 12; v18 = v16 - 11; while ( *(v17 - 3) != 93 || *(v17 - 2) != 93 || *(v17 - 1) != 62 ) { *(_QWORD *)(a1 + 304) = v17 - 2; ++v17; if ( !--v18 ) return v4; } *(_QWORD *)(a1 + 304) = v17; a2[1] = (unsigned __int8 *)v17; } } } } return v4; }
my_xml_scan: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x130] MOV RCX,qword ptr [RDI + 0x138] CMP RAX,RCX JNC 0x001dc6ee LEA RBX,[0x460d50] LAB_001dc6d6: MOVZX EDX,byte ptr [RAX] TEST byte ptr [RDX + RBX*0x1],0x8 JZ 0x001dc714 INC RAX MOV qword ptr [R14 + 0x130],RAX CMP RAX,RCX JNZ 0x001dc6d6 LAB_001dc6ee: MOV qword ptr [RSI],RCX MOV RAX,qword ptr [R14 + 0x138] MOV qword ptr [RSI + 0x8],RAX MOV R15D,0x45 LAB_001dc702: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001dc714: MOV qword ptr [RSI],RAX MOV R13,qword ptr [R14 + 0x130] MOV qword ptr [RSI + 0x8],R13 MOV R12,qword ptr [R14 + 0x138] LEA RAX,[R13 + 0x4] CMP RAX,R12 JA 0x001dc73c CMP dword ptr [R13],0x2d2d213c JZ 0x001dc7a5 LAB_001dc73c: LEA RAX,[R13 + 0x9] CMP RAX,R12 JA 0x001dc765 MOV RCX,0x41544144435b213c XOR RCX,qword ptr [R13] MOVZX EDX,byte ptr [R13 + 0x8] XOR RDX,0x5b OR RDX,RCX JZ 0x001dc852 LAB_001dc765: MOV qword ptr [RBP + -0x30],RSI MOVSX R15D,byte ptr [R13] LEA RDI,[0x1e55d1] MOV EDX,0x7 MOV ESI,R15D CALL 0x0012a370 TEST RAX,RAX JZ 0x001dc7e1 INC R13 MOV qword ptr [R14 + 0x130],R13 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x8],R13 MOV RAX,qword ptr [RAX] MOVSX R15D,byte ptr [RAX] JMP 0x001dc702 LAB_001dc7a5: LEA RAX,[R13 + 0x3] CMP RAX,R12 JA 0x001dc7ca MOVZX ECX,word ptr [R13] XOR ECX,0x2d2d MOVZX EDX,byte ptr [R13 + 0x2] XOR EDX,0x3e OR DX,CX JZ 0x001dc8e8 LAB_001dc7ca: INC R13 MOV qword ptr [R14 + 0x130],R13 CMP R13,R12 JNZ 0x001dc7a5 MOV RAX,R12 JMP 0x001dc8ef LAB_001dc7e1: MOVZX EAX,R15B CMP RAX,0x27 MOV RDI,qword ptr [RBP + -0x30] JZ 0x001dc7f8 CMP EAX,0x22 JNZ 0x001dc8a5 LAB_001dc7f8: INC R13 LAB_001dc7fb: MOV RAX,R13 MOV qword ptr [R14 + 0x130],R13 CMP R13,R12 JNC 0x001dc817 MOV CL,byte ptr [RAX] MOV RDX,qword ptr [RDI] LEA R13,[RAX + 0x1] CMP CL,byte ptr [RDX] JNZ 0x001dc7fb LAB_001dc817: MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [R14 + 0x130] CMP RAX,qword ptr [R14 + 0x138] JNC 0x001dc835 INC RAX MOV qword ptr [R14 + 0x130],RAX LAB_001dc835: INC qword ptr [RDI] MOV R15D,0x53 TEST byte ptr [R14],0x2 JNZ 0x001dc702 CALL 0x001dcce3 JMP 0x001dc702 LAB_001dc852: LEA RCX,[R12 + -0x2] MOV qword ptr [R14 + 0x130],RAX MOV R15D,0x44 CMP RAX,RCX JNC 0x001dc702 SUB R12,R13 ADD R13,0xc ADD R12,-0xb LAB_001dc878: CMP byte ptr [R13 + -0x3],0x5d JNZ 0x001dc88d CMP byte ptr [R13 + -0x2],0x5d JNZ 0x001dc88d CMP byte ptr [R13 + -0x1],0x3e JZ 0x001dc8fe LAB_001dc88d: LEA RAX,[R13 + -0x2] MOV qword ptr [R14 + 0x130],RAX INC R13 DEC R12 JNZ 0x001dc878 JMP 0x001dc702 LAB_001dc8a5: MOV R15D,0x55 TEST byte ptr [RAX + RBX*0x1],0x1 JZ 0x001dc702 INC R13 LAB_001dc8b8: MOV RAX,R13 MOV qword ptr [R14 + 0x130],R13 CMP R13,R12 JNC 0x001dc8d4 MOVZX ECX,byte ptr [RAX] LEA R13,[RAX + 0x1] TEST byte ptr [RCX + RBX*0x1],0x2 JNZ 0x001dc8b8 LAB_001dc8d4: MOV qword ptr [RDI + 0x8],RAX CALL 0x001dcce3 MOV R15D,0x49 JMP 0x001dc702 LAB_001dc8e8: MOV qword ptr [R14 + 0x130],RAX LAB_001dc8ef: MOV qword ptr [RSI + 0x8],RAX MOV R15D,0x43 JMP 0x001dc702 LAB_001dc8fe: MOV qword ptr [R14 + 0x130],R13 MOV qword ptr [RSI + 0x8],R13 JMP 0x001dc702
int my_xml_scan(byte *param_1,long *param_2) { byte bVar1; uint uVar2; byte *pbVar3; void *pvVar4; byte *pbVar5; byte *pbVar6; pbVar3 = *(byte **)(param_1 + 0x130); pbVar5 = *(byte **)(param_1 + 0x138); if (pbVar3 < pbVar5) { do { if ((my_xml_ctype[*pbVar3] & 8) == 0) { *param_2 = (long)pbVar3; pbVar3 = *(byte **)(param_1 + 0x130); param_2[1] = (long)pbVar3; pbVar5 = *(byte **)(param_1 + 0x138); if ((pbVar3 + 4 <= pbVar5) && (*(int *)pbVar3 == 0x2d2d213c)) goto LAB_001dc7a5; pbVar6 = pbVar3 + 9; if ((pbVar6 <= pbVar5) && (pbVar3[8] == 0x5b && *(long *)pbVar3 == 0x41544144435b213c)) { *(byte **)(param_1 + 0x130) = pbVar6; if (pbVar5 + -2 <= pbVar6) { return 0x44; } pbVar6 = pbVar3 + 0xc; pbVar5 = pbVar5 + (-0xb - (long)pbVar3); while (((pbVar6[-3] != 0x5d || (pbVar6[-2] != 0x5d)) || (pbVar6[-1] != 0x3e))) { *(byte **)(param_1 + 0x130) = pbVar6 + -2; pbVar6 = pbVar6 + 1; pbVar5 = pbVar5 + -1; if (pbVar5 == (byte *)0x0) { return 0x44; } } *(byte **)(param_1 + 0x130) = pbVar6; param_2[1] = (long)pbVar6; return 0x44; } bVar1 = *pbVar3; pvVar4 = memchr("?=/<>!",(int)(char)bVar1,7); if (pvVar4 != (void *)0x0) { *(byte **)(param_1 + 0x130) = pbVar3 + 1; param_2[1] = (long)(pbVar3 + 1); return (int)*(char *)*param_2; } uVar2 = (uint)bVar1; if (((ulong)uVar2 == 0x27) || (uVar2 == 0x22)) goto LAB_001dc7fb; if ((my_xml_ctype[uVar2] & 1) == 0) { return 0x55; } goto LAB_001dc8b8; } pbVar3 = pbVar3 + 1; *(byte **)(param_1 + 0x130) = pbVar3; } while (pbVar3 != pbVar5); } *param_2 = (long)pbVar5; param_2[1] = *(long *)(param_1 + 0x138); return 0x45; LAB_001dc7a5: pbVar6 = pbVar3 + 3; if ((pbVar6 <= pbVar5) && (pbVar3[2] == 0x3e && *(short *)pbVar3 == 0x2d2d)) { *(byte **)(param_1 + 0x130) = pbVar6; pbVar5 = pbVar6; goto LAB_001dc8ef; } pbVar3 = pbVar3 + 1; *(byte **)(param_1 + 0x130) = pbVar3; if (pbVar3 == pbVar5) { LAB_001dc8ef: param_2[1] = (long)pbVar5; return 0x43; } goto LAB_001dc7a5; while (*pbVar3 != *(byte *)*param_2) { LAB_001dc7fb: pbVar3 = pbVar3 + 1; *(byte **)(param_1 + 0x130) = pbVar3; if (pbVar5 <= pbVar3) break; } param_2[1] = (long)pbVar3; if (*(ulong *)(param_1 + 0x130) < *(ulong *)(param_1 + 0x138)) { *(ulong *)(param_1 + 0x130) = *(ulong *)(param_1 + 0x130) + 1; } *param_2 = *param_2 + 1; if ((*param_1 & 2) != 0) { return 0x53; } my_xml_norm_text(); return 0x53; while ((my_xml_ctype[*pbVar3] & 2) != 0) { LAB_001dc8b8: pbVar3 = pbVar3 + 1; *(byte **)(param_1 + 0x130) = pbVar3; if (pbVar5 <= pbVar3) break; } param_2[1] = (long)pbVar3; my_xml_norm_text(); return 0x49; }
39,161
stbi__bmp_set_mask_defaults(stbi__bmp_data*, int)
SDL3Lite/dependencies/stb_image.h
static int stbi__bmp_set_mask_defaults(stbi__bmp_data *info, int compress) { // BI_BITFIELDS specifies masks explicitly, don't override if (compress == 3) return 1; if (compress == 0) { if (info->bpp == 16) { info->mr = 31u << 10; info->mg = 31u << 5; info->mb = 31u << 0; } else if (info->bpp == 32) { info->mr = 0xffu << 16; info->mg = 0xffu << 8; info->mb = 0xffu << 0; info->ma = 0xffu << 24; info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 } else { // otherwise, use defaults, which is all-0 info->mr = info->mg = info->mb = info->ma = 0; } return 1; } return 0; // error }
O0
c
stbi__bmp_set_mask_defaults(stbi__bmp_data*, int): pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) cmpl $0x3, -0x14(%rbp) jne 0x328ed movl $0x1, -0x4(%rbp) jmp 0x329a3 cmpl $0x0, -0x14(%rbp) jne 0x3299c movq -0x10(%rbp), %rax cmpl $0x10, (%rax) jne 0x32923 movq -0x10(%rbp), %rax movl $0x7c00, 0xc(%rax) # imm = 0x7C00 movq -0x10(%rbp), %rax movl $0x3e0, 0x10(%rax) # imm = 0x3E0 movq -0x10(%rbp), %rax movl $0x1f, 0x14(%rax) jmp 0x32993 movq -0x10(%rbp), %rax cmpl $0x20, (%rax) jne 0x32965 movq -0x10(%rbp), %rax movl $0xff0000, 0xc(%rax) # imm = 0xFF0000 movq -0x10(%rbp), %rax movl $0xff00, 0x10(%rax) # imm = 0xFF00 movq -0x10(%rbp), %rax movl $0xff, 0x14(%rax) movq -0x10(%rbp), %rax movl $0xff000000, 0x18(%rax) # imm = 0xFF000000 movq -0x10(%rbp), %rax movl $0x0, 0x1c(%rax) jmp 0x32991 movq -0x10(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0xc(%rax) jmp 0x32993 movl $0x1, -0x4(%rbp) jmp 0x329a3 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
_ZL27stbi__bmp_set_mask_defaultsP14stbi__bmp_datai: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi cmp [rbp+var_14], 3 jnz short loc_328ED mov [rbp+var_4], 1 jmp loc_329A3 loc_328ED: cmp [rbp+var_14], 0 jnz loc_3299C mov rax, [rbp+var_10] cmp dword ptr [rax], 10h jnz short loc_32923 mov rax, [rbp+var_10] mov dword ptr [rax+0Ch], 7C00h mov rax, [rbp+var_10] mov dword ptr [rax+10h], 3E0h mov rax, [rbp+var_10] mov dword ptr [rax+14h], 1Fh jmp short loc_32993 loc_32923: mov rax, [rbp+var_10] cmp dword ptr [rax], 20h ; ' ' jnz short loc_32965 mov rax, [rbp+var_10] mov dword ptr [rax+0Ch], 0FF0000h mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0FF00h mov rax, [rbp+var_10] mov dword ptr [rax+14h], 0FFh mov rax, [rbp+var_10] mov dword ptr [rax+18h], 0FF000000h mov rax, [rbp+var_10] mov dword ptr [rax+1Ch], 0 jmp short loc_32991 loc_32965: mov rax, [rbp+var_10] mov dword ptr [rax+18h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+0Ch], 0 loc_32991: jmp short $+2 loc_32993: mov [rbp+var_4], 1 jmp short loc_329A3 loc_3299C: mov [rbp+var_4], 0 loc_329A3: mov eax, [rbp+var_4] pop rbp retn
long long stbi__bmp_set_mask_defaults(_DWORD *a1, int a2) { if ( a2 == 3 ) { return 1; } else if ( a2 ) { return 0; } else { if ( *a1 == 16 ) { a1[3] = 31744; a1[4] = 992; a1[5] = 31; } else if ( *a1 == 32 ) { a1[3] = 16711680; a1[4] = 65280; a1[5] = 255; a1[6] = -16777216; a1[7] = 0; } else { a1[6] = 0; a1[5] = 0; a1[4] = 0; a1[3] = 0; } return 1; } }
stbi__bmp_set_mask_defaults: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI CMP dword ptr [RBP + -0x14],0x3 JNZ 0x001328ed MOV dword ptr [RBP + -0x4],0x1 JMP 0x001329a3 LAB_001328ed: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x0013299c MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x10 JNZ 0x00132923 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],0x7c00 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0x3e0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],0x1f JMP 0x00132993 LAB_00132923: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x20 JNZ 0x00132965 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],0xff0000 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0xff00 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],0xff MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x18],0xff000000 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x1c],0x0 JMP 0x00132991 LAB_00132965: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],0x0 LAB_00132991: JMP 0x00132993 LAB_00132993: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001329a3 LAB_0013299c: MOV dword ptr [RBP + -0x4],0x0 LAB_001329a3: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
/* stbi__bmp_set_mask_defaults(stbi__bmp_data*, int) */ int4 stbi__bmp_set_mask_defaults(stbi__bmp_data *param_1,int param_2) { int4 local_c; if (param_2 == 3) { local_c = 1; } else if (param_2 == 0) { if (*(int *)param_1 == 0x10) { *(int4 *)(param_1 + 0xc) = 0x7c00; *(int4 *)(param_1 + 0x10) = 0x3e0; *(int4 *)(param_1 + 0x14) = 0x1f; } else if (*(int *)param_1 == 0x20) { *(int4 *)(param_1 + 0xc) = 0xff0000; *(int4 *)(param_1 + 0x10) = 0xff00; *(int4 *)(param_1 + 0x14) = 0xff; *(int4 *)(param_1 + 0x18) = 0xff000000; *(int4 *)(param_1 + 0x1c) = 0; } else { *(int4 *)(param_1 + 0x18) = 0; *(int4 *)(param_1 + 0x14) = 0; *(int4 *)(param_1 + 0x10) = 0; *(int4 *)(param_1 + 0xc) = 0; } local_c = 1; } else { local_c = 0; } return local_c; }
39,162
common_params_sampling::print[abi:cxx11]() const
monkey531[P]llama/common/sampling.cpp
std::string common_params_sampling::print() const { char result[1024]; snprintf(result, sizeof(result), "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", penalty_last_n, penalty_repeat, penalty_freq, penalty_present, dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n, top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, temp, mirostat, mirostat_eta, mirostat_tau); return std::string(result); }
O3
cpp
common_params_sampling::print[abi:cxx11]() const: pushq %r14 pushq %rbx subq $0x448, %rsp # imm = 0x448 movq %rdi, %rbx movl 0x10(%rsi), %eax cvtss2sd 0x38(%rsi), %xmm0 cvtss2sd 0x3c(%rsi), %xmm1 cvtss2sd 0x40(%rsi), %xmm2 cvtss2sd 0x44(%rsi), %xmm3 cvtss2sd 0x48(%rsi), %xmm4 movl 0x34(%rsi), %ecx movl 0x4c(%rsi), %r8d cvtss2sd 0x14(%rsi), %xmm5 cvtss2sd 0x18(%rsi), %xmm6 cvtss2sd 0x1c(%rsi), %xmm7 cvtss2sd 0x20(%rsi), %xmm8 cvtss2sd 0x24(%rsi), %xmm9 movl 0x50(%rsi), %r9d cvtss2sd 0x28(%rsi), %xmm10 movl 0x54(%rsi), %edx cvtss2sd 0x5c(%rsi), %xmm11 cvtss2sd 0x58(%rsi), %xmm12 movsd %xmm12, 0x30(%rsp) movsd %xmm11, 0x28(%rsp) movl %edx, 0x20(%rsp) movsd %xmm10, 0x18(%rsp) movsd %xmm9, 0x10(%rsp) movsd %xmm8, 0x8(%rsp) movl %eax, (%rsp) leaq 0x27c0f(%rip), %rdx # 0xf5450 leaq 0x40(%rsp), %r14 movl $0x400, %esi # imm = 0x400 movq %r14, %rdi movb $0x8, %al callq 0x1ad70 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %r14, %rdi callq 0x1a3d0 leaq (%rsp,%rax), %rdx addq $0x40, %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x229de movq %rbx, %rax addq $0x448, %rsp # imm = 0x448 popq %rbx popq %r14 retq
_ZNK22common_params_sampling5printB5cxx11Ev: push r14 push rbx sub rsp, 448h mov rbx, rdi mov eax, [rsi+10h] cvtss2sd xmm0, dword ptr [rsi+38h] cvtss2sd xmm1, dword ptr [rsi+3Ch] cvtss2sd xmm2, dword ptr [rsi+40h] cvtss2sd xmm3, dword ptr [rsi+44h] cvtss2sd xmm4, dword ptr [rsi+48h] mov ecx, [rsi+34h] mov r8d, [rsi+4Ch] cvtss2sd xmm5, dword ptr [rsi+14h] cvtss2sd xmm6, dword ptr [rsi+18h] cvtss2sd xmm7, dword ptr [rsi+1Ch] cvtss2sd xmm8, dword ptr [rsi+20h] cvtss2sd xmm9, dword ptr [rsi+24h] mov r9d, [rsi+50h] cvtss2sd xmm10, dword ptr [rsi+28h] mov edx, [rsi+54h] cvtss2sd xmm11, dword ptr [rsi+5Ch] cvtss2sd xmm12, dword ptr [rsi+58h] movsd [rsp+458h+var_428], xmm12 movsd [rsp+458h+var_430], xmm11 mov [rsp+458h+var_438], edx movsd [rsp+458h+var_440], xmm10 movsd [rsp+458h+var_448], xmm9 movsd [rsp+458h+var_450], xmm8 mov [rsp+458h+var_458], eax lea rdx, aRepeatLastNDRe; "\trepeat_last_n = %d, repeat_penalty = "... lea r14, [rsp+458h+var_418] mov esi, 400h mov rdi, r14 mov al, 8 call _snprintf lea rax, [rbx+10h] mov [rbx], rax mov rdi, r14 call _strlen lea rdx, [rsp+rax+458h+var_458] add rdx, 40h ; '@' mov rdi, rbx mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx add rsp, 448h pop rbx pop r14 retn
_QWORD * common_params_sampling::print[abi:cxx11](_QWORD *a1, long long a2) { long long v2; // rax _BYTE v4[1048]; // [rsp+40h] [rbp-418h] BYREF snprintf( v4, 1024LL, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3" "f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", *(_DWORD *)(a2 + 52), *(float *)(a2 + 56), *(float *)(a2 + 60), *(float *)(a2 + 64), *(float *)(a2 + 68), *(float *)(a2 + 72), *(_DWORD *)(a2 + 76), *(_DWORD *)(a2 + 80), *(_DWORD *)(a2 + 16), *(float *)(a2 + 20), *(float *)(a2 + 24), *(float *)(a2 + 28), *(float *)(a2 + 32), *(float *)(a2 + 36), *(float *)(a2 + 40), *(_DWORD *)(a2 + 84), *(float *)(a2 + 92), *(float *)(a2 + 88)); *a1 = a1 + 2; v2 = strlen(v4); std::string::_M_construct<char const*>((long long)a1, v4, (long long)&v4[v2]); return a1; }
print[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x448 MOV RBX,RDI MOV EAX,dword ptr [RSI + 0x10] CVTSS2SD XMM0,dword ptr [RSI + 0x38] CVTSS2SD XMM1,dword ptr [RSI + 0x3c] CVTSS2SD XMM2,dword ptr [RSI + 0x40] CVTSS2SD XMM3,dword ptr [RSI + 0x44] CVTSS2SD XMM4,dword ptr [RSI + 0x48] MOV ECX,dword ptr [RSI + 0x34] MOV R8D,dword ptr [RSI + 0x4c] CVTSS2SD XMM5,dword ptr [RSI + 0x14] CVTSS2SD XMM6,dword ptr [RSI + 0x18] CVTSS2SD XMM7,dword ptr [RSI + 0x1c] CVTSS2SD XMM8,dword ptr [RSI + 0x20] CVTSS2SD XMM9,dword ptr [RSI + 0x24] MOV R9D,dword ptr [RSI + 0x50] CVTSS2SD XMM10,dword ptr [RSI + 0x28] MOV EDX,dword ptr [RSI + 0x54] CVTSS2SD XMM11,dword ptr [RSI + 0x5c] CVTSS2SD XMM12,dword ptr [RSI + 0x58] MOVSD qword ptr [RSP + 0x30],XMM12 MOVSD qword ptr [RSP + 0x28],XMM11 MOV dword ptr [RSP + 0x20],EDX MOVSD qword ptr [RSP + 0x18],XMM10 MOVSD qword ptr [RSP + 0x10],XMM9 MOVSD qword ptr [RSP + 0x8],XMM8 MOV dword ptr [RSP],EAX LEA RDX,[0x1f5450] LEA R14,[RSP + 0x40] MOV ESI,0x400 MOV RDI,R14 MOV AL,0x8 CALL 0x0011ad70 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RDI,R14 CALL 0x0011a3d0 LEA RDX,[RSP + RAX*0x1] ADD RDX,0x40 MOV RDI,RBX MOV RSI,R14 CALL 0x001229de MOV RAX,RBX ADD RSP,0x448 POP RBX POP R14 RET
/* common_params_sampling::print[abi:cxx11]() const */ void common_params_sampling::print_abi_cxx11_(void) { long in_RSI; long *in_RDI; char local_418 [1032]; snprintf(local_418,0x400, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f" ,(double)*(float *)(in_RSI + 0x38),(double)*(float *)(in_RSI + 0x3c), (double)*(float *)(in_RSI + 0x40),(double)*(float *)(in_RSI + 0x44), (double)*(float *)(in_RSI + 0x48),(double)*(float *)(in_RSI + 0x14), (double)*(float *)(in_RSI + 0x18),(double)*(float *)(in_RSI + 0x1c), (ulong)*(uint *)(in_RSI + 0x34),(ulong)*(uint *)(in_RSI + 0x4c), (ulong)*(uint *)(in_RSI + 0x50),*(int4 *)(in_RSI + 0x10), (double)*(float *)(in_RSI + 0x20),(double)*(float *)(in_RSI + 0x24), (double)*(float *)(in_RSI + 0x28),*(int4 *)(in_RSI + 0x54), (double)*(float *)(in_RSI + 0x5c),(double)*(float *)(in_RSI + 0x58)); *in_RDI = (long)(in_RDI + 2); strlen(local_418); std::__cxx11::string::_M_construct<char_const*>(); return; }
39,163
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!left) throw std::runtime_error("BinaryOpExpr.left is null"); if (!right) throw std::runtime_error("BinaryOpExpr.right is null"); auto l = left->evaluate(context); auto do_eval = [&](const Value & l) -> Value { if (op == Op::Is || op == Op::IsNot) { auto t = dynamic_cast<VariableExpr*>(right.get()); if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable"); auto eval = [&]() { const auto & name = t->get_name(); if (name == "none") return l.is_null(); if (name == "boolean") return l.is_boolean(); if (name == "integer") return l.is_number_integer(); if (name == "float") return l.is_number_float(); if (name == "number") return l.is_number(); if (name == "string") return l.is_string(); if (name == "mapping") return l.is_object(); if (name == "iterable") return l.is_iterable(); if (name == "sequence") return l.is_array(); if (name == "defined") return !l.is_null(); throw std::runtime_error("Unknown type for 'is' operator: " + name); }; auto value = eval(); return Value(op == Op::Is ? value : !value); } if (op == Op::And) { if (!l.to_bool()) return Value(false); return right->evaluate(context).to_bool(); } else if (op == Op::Or) { if (l.to_bool()) return l; return right->evaluate(context); } auto r = right->evaluate(context); switch (op) { case Op::StrConcat: return l.to_str() + r.to_str(); case Op::Add: return l + r; case Op::Sub: return l - r; case Op::Mul: return l * r; case Op::Div: return l / r; case Op::MulMul: return std::pow(l.get<double>(), r.get<double>()); case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>(); case Op::Mod: return l.get<int64_t>() % r.get<int64_t>(); case Op::Eq: return l == r; case Op::Ne: return l != r; case Op::Lt: return l < r; case Op::Gt: return l > r; case Op::Le: return l <= r; case Op::Ge: return l >= r; case Op::In: return (r.is_array() || r.is_object()) && r.contains(l); case Op::NotIn: return !(r.is_array() && r.contains(l)); default: break; } throw std::runtime_error("Unknown binary operator"); }; if (l.is_callable()) { return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) { auto ll = l.call(context, args); return do_eval(ll); //args[0].second); }); } else { return do_eval(l); } }
O3
cpp
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0xa21cb cmpq $0x0, 0x30(%r15) je 0xa21e9 movq %rdx, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi callq 0x96f0a movq %r15, 0x8(%rsp) movq %r14, 0x10(%rsp) cmpq $0x0, 0x30(%r12) je 0xa2123 leaq 0x88(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x74a14 movups 0x8(%rsp), %xmm0 leaq 0x88(%rsp), %rsi movups %xmm0, 0x50(%rsi) leaq 0x18(%rsp), %rdi callq 0xa2306 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x72a46 movq 0x28(%rsp), %rax testq %rax, %rax je 0xa20bf leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0xc8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x732fc movq %r14, %rdi callq 0x300e0 leaq 0xc0(%rsp), %rdi callq 0x34564 leaq 0xb0(%rsp), %rdi callq 0x34564 leaq 0xa0(%rsp), %r14 movq %r14, %rdi callq 0x34564 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xa214c movq 0x5de7d(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0xa2137 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa2141 leaq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0xa23e0 jmp 0xa214c movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa214c movq (%rdi), %rax callq *0x18(%rax) leaq 0x78(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x732fc movq %r14, %rdi callq 0x300e0 leaq 0x70(%rsp), %rdi callq 0x34564 leaq 0x60(%rsp), %rdi callq 0x34564 leaq 0x50(%rsp), %r14 movq %r14, %rdi callq 0x34564 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xa21b9 movq 0x5ddfc(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0xa21a4 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa21ae movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa21b9 movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x1c460 movq %rax, %r14 leaq 0x2c5dd(%rip), %rsi # 0xce7bc movq %rax, %rdi callq 0x1c280 jmp 0xa2205 movl $0x10, %edi callq 0x1c460 movq %rax, %r14 leaq 0x2c5d9(%rip), %rsi # 0xce7d6 movq %rax, %rdi callq 0x1c280 movq 0x5ddac(%rip), %rsi # 0xfffb8 movq 0x5dd65(%rip), %rdx # 0xfff78 movq %r14, %rdi callq 0x1c7b0 jmp 0xa2266 jmp 0xa224c jmp 0xa2221 movq %rax, %rbx movq %r14, %rdi callq 0x1caa0 jmp 0xa2273 movq %rax, %rbx movq 0x28(%rsp), %rax testq %rax, %rax je 0xa2257 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xa2257 movq %rax, %rdi callq 0x2a81a movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0xa2364 jmp 0xa2269 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x6cc36 movq %rbx, %rdi callq 0x1c7d0 nop
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0E8h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_A21CB cmp qword ptr [r15+30h], 0 jz loc_A21E9 mov r14, rdx mov rbx, rdi lea r12, [rsp+108h+var_D0] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov qword ptr [rsp+108h+var_100], r15 mov qword ptr [rsp+108h+var_100+8], r14 cmp qword ptr [r12+30h], 0 jz loc_A2123 lea rdi, [rsp+108h+var_80]; this lea rsi, [rsp+108h+var_D0]; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) movups xmm0, [rsp+108h+var_100] lea rsi, [rsp+108h+var_80] movups xmmword ptr [rsi+50h], xmm0 lea rdi, [rsp+108h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&) lea rsi, [rsp+108h+var_F0] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) mov rax, [rsp+108h+var_E0] test rax, rax jz short loc_A20BF lea rdi, [rsp+108h+var_F0] mov rsi, rdi mov edx, 3 call rax loc_A20BF: lea r14, [rsp+108h+var_40] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+108h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+108h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+108h+var_68] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_A214C mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_A2137 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A2141 loc_A2123: lea rsi, [rsp+108h+var_100] lea rdx, [rsp+108h+var_D0] mov rdi, rbx; this call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&) jmp short loc_A214C loc_A2137: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A2141: cmp eax, 1 jnz short loc_A214C mov rax, [rdi] call qword ptr [rax+18h] loc_A214C: lea r14, [rsp+108h+var_90] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+108h+var_98] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+108h+var_A8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+108h+var_B8] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_A21B9 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_A21A4 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A21AE loc_A21A4: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A21AE: cmp eax, 1 jnz short loc_A21B9 mov rax, [rdi] call qword ptr [rax+18h] loc_A21B9: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r14 pop r15 retn loc_A21CB: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_A2205 loc_A21E9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_A2205: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_A2266 jmp short loc_A224C jmp short $+2 loc_A2221: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_A2273 mov rbx, rax mov rax, [rsp+108h+var_E0] test rax, rax jz short loc_A2257 lea rdi, [rsp+108h+var_F0] mov rsi, rdi mov edx, 3 call rax jmp short loc_A2257 loc_A224C: mov rdi, rax call __clang_call_terminate mov rbx, rax loc_A2257: lea rdi, [rsp+108h+var_80] call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue() jmp short loc_A2269 loc_A2266: mov rbx, rax loc_A2269: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_A2273: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3) { void (***v4)(void); // rsi long long v7; // rdi signed __int32 v8; // eax long long v9; // rdi signed __int32 v10; // eax std::runtime_error *exception; // r14 __int128 v13; // [rsp+8h] [rbp-100h] _BYTE v14[16]; // [rsp+18h] [rbp-F0h] BYREF void ( *v15)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h] _BYTE v16[8]; // [rsp+38h] [rbp-D0h] BYREF long long v17; // [rsp+40h] [rbp-C8h] volatile signed __int32 *v18; // [rsp+50h] [rbp-B8h] BYREF volatile signed __int32 *v19[2]; // [rsp+60h] [rbp-A8h] BYREF volatile signed __int32 *v20; // [rsp+70h] [rbp-98h] BYREF char v21[16]; // [rsp+78h] [rbp-90h] BYREF _BYTE v22[8]; // [rsp+88h] [rbp-80h] BYREF long long v23; // [rsp+90h] [rbp-78h] volatile signed __int32 *v24; // [rsp+A0h] [rbp-68h] BYREF volatile signed __int32 *v25; // [rsp+B0h] [rbp-58h] BYREF volatile signed __int32 *v26; // [rsp+C0h] [rbp-48h] BYREF char v27[16]; // [rsp+C8h] [rbp-40h] BYREF __int128 v28; // [rsp+D8h] [rbp-30h] v4 = *(void (****)(void))(a2 + 32); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null"); goto LABEL_22; } if ( !*(_QWORD *)(a2 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null"); LABEL_22: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v16, v4); *(_QWORD *)&v13 = a2; *((_QWORD *)&v13 + 1) = a3; if ( v19[1] ) { minja::Value::Value((minja::Value *)v22, (const minja::Value *)v16); v28 = v13; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v14); minja::Value::callable((long long)this, (long long)v14); if ( v15 ) v15(v14, v14, 3LL); 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(v27); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v27); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v26); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v25); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v24); v7 = v23; if ( v23 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v23 + 12); *(_DWORD *)(v23 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v23 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } } else { minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v21); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v19); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18); v9 = v17; if ( v17 ) { if ( _libc_single_threaded ) { v10 = *(_DWORD *)(v17 + 12); *(_DWORD *)(v17 + 12) = v10 - 1; } else { v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( v10 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL); } return this; }
do_evaluate: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x001a21cb CMP qword ptr [R15 + 0x30],0x0 JZ 0x001a21e9 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x38] MOV RDI,R12 CALL 0x00196f0a MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],R14 CMP qword ptr [R12 + 0x30],0x0 JZ 0x001a2123 LAB_001a206c: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x38] CALL 0x00174a14 MOVUPS XMM0,xmmword ptr [RSP + 0x8] LEA RSI,[RSP + 0x88] MOVUPS xmmword ptr [RSI + 0x50],XMM0 LAB_001a208f: LEA RDI,[RSP + 0x18] CALL 0x001a2306 LAB_001a2099: LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x00172a46 MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x001a20bf LAB_001a20b0: LEA RDI,[RSP + 0x18] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a20bf: LEA R14,[RSP + 0xc8] MOV RDI,R14 XOR ESI,ESI CALL 0x001732fc MOV RDI,R14 CALL 0x001300e0 LEA RDI,[RSP + 0xc0] CALL 0x00134564 LEA RDI,[RSP + 0xb0] CALL 0x00134564 LEA R14,[RSP + 0xa0] MOV RDI,R14 CALL 0x00134564 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001a214c MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x001a2137 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a2141 LAB_001a2123: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x38] MOV RDI,RBX CALL 0x001a23e0 LAB_001a2135: JMP 0x001a214c LAB_001a2137: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a2141: CMP EAX,0x1 JNZ 0x001a214c MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a214c: LEA R14,[RSP + 0x78] MOV RDI,R14 XOR ESI,ESI CALL 0x001732fc MOV RDI,R14 CALL 0x001300e0 LEA RDI,[RSP + 0x70] CALL 0x00134564 LEA RDI,[RSP + 0x60] CALL 0x00134564 LEA R14,[RSP + 0x50] MOV RDI,R14 CALL 0x00134564 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001a21b9 MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x001a21a4 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a21ae LAB_001a21a4: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a21ae: CMP EAX,0x1 JNZ 0x001a21b9 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a21b9: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R14 POP R15 RET LAB_001a21cb: MOV EDI,0x10 CALL 0x0011c460 MOV R14,RAX LAB_001a21d8: LEA RSI,[0x1ce7bc] MOV RDI,RAX CALL 0x0011c280 LAB_001a21e7: JMP 0x001a2205 LAB_001a21e9: MOV EDI,0x10 CALL 0x0011c460 MOV R14,RAX LAB_001a21f6: LEA RSI,[0x1ce7d6] MOV RDI,RAX CALL 0x0011c280 LAB_001a2205: MOV RSI,qword ptr [0x001fffb8] MOV RDX,qword ptr [0x001fff78] MOV RDI,R14 CALL 0x0011c7b0
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1) { int *piVar1; int iVar2; runtime_error *this; int8 in_RDX; long in_RSI; long local_100; int8 uStack_f8; _lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16]; code *local_e0; Expression local_d0 [8]; long *local_c8; __shared_count<(__gnu_cxx::_Lock_policy)2> local_b8 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_a8 [8]; long local_a0; __shared_count<(__gnu_cxx::_Lock_policy)2> local_98 [8]; data local_90 [16]; Value local_80 [8]; long *local_78; __shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8]; data local_40 [16]; long local_30; int8 uStack_28; if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a21d8 to 001a21e6 has its CatchHandler @ 001a2221 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null"); } else { if (*(long *)(in_RSI + 0x30) != 0) { Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20)); if (local_a0 == 0) { /* try { // try from 001a2123 to 001a2134 has its CatchHandler @ 001a221b */ const::{lambda(minja::Value_const&)#1}::operator() ((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100); } else { /* try { // try from 001a206c to 001a207d has its CatchHandler @ 001a2266 */ local_100 = in_RSI; uStack_f8 = in_RDX; Value::Value(local_80,(Value *)local_d0); local_30 = local_100; uStack_28 = uStack_f8; /* try { // try from 001a208f to 001a2098 has its CatchHandler @ 001a2254 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void> (local_f0); /* try { // try from 001a2099 to 001a20a5 has its CatchHandler @ 001a222e */ Value::callable((Value *)param_1,local_f0); if (local_e0 != (code *)0x0) { /* try { // try from 001a20b0 to 001a20be has its CatchHandler @ 001a221d */ (*local_e0)(local_f0,local_f0,3); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68); if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_78 + 0x18))(); } } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_90); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_98); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_a8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b8); if (local_c8 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_c8 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_c8 + 0xc); *(int *)((long)local_c8 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_c8 + 0x18))(); } } return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a21f6 to 001a2204 has its CatchHandler @ 001a221f */ std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78); }
39,164
trnman_destroy
eloqsql/storage/maria/trnman.c
void trnman_destroy() { DBUG_ENTER("trnman_destroy"); if (short_trid_to_active_trn == NULL) /* trnman already destroyed */ DBUG_VOID_RETURN; DBUG_ASSERT(trid_to_trn.count == 0); DBUG_ASSERT(trnman_active_transactions == 0); DBUG_ASSERT(trnman_committed_transactions == 0); DBUG_ASSERT(active_list_max.prev == &active_list_min); DBUG_ASSERT(active_list_min.next == &active_list_max); DBUG_ASSERT(committed_list_max.prev == &committed_list_min); DBUG_ASSERT(committed_list_min.next == &committed_list_max); while (pool) { TRN *trn= pool; pool= pool->next; DBUG_ASSERT(trn->wt == NULL); mysql_mutex_destroy(&trn->state_lock); my_free(trn); } lf_hash_destroy(&trid_to_trn); DBUG_PRINT("info", ("mysql_mutex_destroy LOCK_trn_list")); mysql_mutex_destroy(&LOCK_trn_list); my_free(short_trid_to_active_trn+1); short_trid_to_active_trn= NULL; DBUG_VOID_RETURN; }
O0
c
trnman_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp cmpq $0x0, 0x4061c0(%rip) # 0x479dc0 jne 0x73c09 jmp 0x73c04 jmp 0x73c9f jmp 0x73c0b jmp 0x73c0d jmp 0x73c0f jmp 0x73c11 jmp 0x73c13 jmp 0x73c15 jmp 0x73c17 jmp 0x73c19 jmp 0x73c1b jmp 0x73c1d jmp 0x73c1f jmp 0x73c21 jmp 0x73c23 jmp 0x73c25 jmp 0x73c27 cmpq $0x0, 0x406469(%rip) # 0x47a098 je 0x73c68 movq 0x406460(%rip), %rax # 0x47a098 movq %rax, -0x8(%rbp) movq 0x406455(%rip), %rax # 0x47a098 movq 0x68(%rax), %rax movq %rax, 0x40644a(%rip) # 0x47a098 jmp 0x73c50 movq -0x8(%rbp), %rdi addq $0x10, %rdi callq 0x73cb0 movq -0x8(%rbp), %rdi callq 0xf5510 jmp 0x73c27 leaq 0x406439(%rip), %rdi # 0x47a0a8 callq 0xfef20 jmp 0x73c76 leaq 0x4064f3(%rip), %rdi # 0x47a170 callq 0x73cb0 movq 0x406137(%rip), %rdi # 0x479dc0 addq $0x8, %rdi callq 0xf5510 movq $0x0, 0x406123(%rip) # 0x479dc0 jmp 0x73c9f addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
trnman_destroy: push rbp mov rbp, rsp sub rsp, 10h cmp cs:short_trid_to_active_trn, 0 jnz short loc_73C09 jmp short $+2 loc_73C04: jmp loc_73C9F loc_73C09: jmp short $+2 loc_73C0B: jmp short $+2 loc_73C0D: jmp short $+2 loc_73C0F: jmp short $+2 loc_73C11: jmp short $+2 loc_73C13: jmp short $+2 loc_73C15: jmp short $+2 loc_73C17: jmp short $+2 loc_73C19: jmp short $+2 loc_73C1B: jmp short $+2 loc_73C1D: jmp short $+2 loc_73C1F: jmp short $+2 loc_73C21: jmp short $+2 loc_73C23: jmp short $+2 loc_73C25: jmp short $+2 loc_73C27: cmp cs:pool, 0 jz short loc_73C68 mov rax, cs:pool mov [rbp+var_8], rax mov rax, cs:pool mov rax, [rax+68h] mov cs:pool, rax jmp short $+2 loc_73C50: mov rdi, [rbp+var_8] add rdi, 10h call inline_mysql_mutex_destroy_2 mov rdi, [rbp+var_8] call my_free jmp short loc_73C27 loc_73C68: lea rdi, trid_to_trn call lf_hash_destroy jmp short $+2 loc_73C76: lea rdi, LOCK_trn_list call inline_mysql_mutex_destroy_2 mov rdi, cs:short_trid_to_active_trn add rdi, 8 call my_free mov cs:short_trid_to_active_trn, 0 jmp short $+2 loc_73C9F: add rsp, 10h pop rbp retn
long long trnman_destroy() { long long result; // rax long long v1; // [rsp+8h] [rbp-8h] if ( short_trid_to_active_trn ) { while ( pool ) { v1 = pool; pool = *(_QWORD *)(pool + 104); inline_mysql_mutex_destroy_2(v1 + 16); my_free(v1); } lf_hash_destroy(&trid_to_trn); inline_mysql_mutex_destroy_2(&LOCK_trn_list); result = my_free(short_trid_to_active_trn + 8); short_trid_to_active_trn = 0LL; } return result; }
trnman_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 CMP qword ptr [0x00579dc0],0x0 JNZ 0x00173c09 JMP 0x00173c04 LAB_00173c04: JMP 0x00173c9f LAB_00173c09: JMP 0x00173c0b LAB_00173c0b: JMP 0x00173c0d LAB_00173c0d: JMP 0x00173c0f LAB_00173c0f: JMP 0x00173c11 LAB_00173c11: JMP 0x00173c13 LAB_00173c13: JMP 0x00173c15 LAB_00173c15: JMP 0x00173c17 LAB_00173c17: JMP 0x00173c19 LAB_00173c19: JMP 0x00173c1b LAB_00173c1b: JMP 0x00173c1d LAB_00173c1d: JMP 0x00173c1f LAB_00173c1f: JMP 0x00173c21 LAB_00173c21: JMP 0x00173c23 LAB_00173c23: JMP 0x00173c25 LAB_00173c25: JMP 0x00173c27 LAB_00173c27: CMP qword ptr [0x0057a098],0x0 JZ 0x00173c68 MOV RAX,qword ptr [0x0057a098] MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [0x0057a098] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [0x0057a098],RAX JMP 0x00173c50 LAB_00173c50: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x10 CALL 0x00173cb0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001f5510 JMP 0x00173c27 LAB_00173c68: LEA RDI,[0x57a0a8] CALL 0x001fef20 JMP 0x00173c76 LAB_00173c76: LEA RDI,[0x57a170] CALL 0x00173cb0 MOV RDI,qword ptr [0x00579dc0] ADD RDI,0x8 CALL 0x001f5510 MOV qword ptr [0x00579dc0],0x0 JMP 0x00173c9f LAB_00173c9f: ADD RSP,0x10 POP RBP RET
void trnman_destroy(void) { long lVar1; long lVar2; if (short_trid_to_active_trn != 0) { while (lVar1 = pool, pool != 0) { lVar2 = pool + 0x10; pool = *(long *)(pool + 0x68); inline_mysql_mutex_destroy(lVar2); my_free(lVar1); } lf_hash_destroy(trid_to_trn); inline_mysql_mutex_destroy(LOCK_trn_list); my_free(short_trid_to_active_trn + 8); short_trid_to_active_trn = 0; } return; }
39,165
trnman_destroy
eloqsql/storage/maria/trnman.c
void trnman_destroy() { DBUG_ENTER("trnman_destroy"); if (short_trid_to_active_trn == NULL) /* trnman already destroyed */ DBUG_VOID_RETURN; DBUG_ASSERT(trid_to_trn.count == 0); DBUG_ASSERT(trnman_active_transactions == 0); DBUG_ASSERT(trnman_committed_transactions == 0); DBUG_ASSERT(active_list_max.prev == &active_list_min); DBUG_ASSERT(active_list_min.next == &active_list_max); DBUG_ASSERT(committed_list_max.prev == &committed_list_min); DBUG_ASSERT(committed_list_min.next == &committed_list_max); while (pool) { TRN *trn= pool; pool= pool->next; DBUG_ASSERT(trn->wt == NULL); mysql_mutex_destroy(&trn->state_lock); my_free(trn); } lf_hash_destroy(&trid_to_trn); DBUG_PRINT("info", ("mysql_mutex_destroy LOCK_trn_list")); mysql_mutex_destroy(&LOCK_trn_list); my_free(short_trid_to_active_trn+1); short_trid_to_active_trn= NULL; DBUG_VOID_RETURN; }
O3
c
trnman_destroy: cmpq $0x0, 0x3a3247(%rip) # 0x3ff150 je 0x5bfc3 pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x3a350b(%rip), %rbx # 0x3ff428 testq %rbx, %rbx je 0x5bf68 leaq 0x32b127(%rip), %r14 # 0x387050 movq 0x68(%rbx), %rax movq %rax, 0x3a34f4(%rip) # 0x3ff428 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x5bf4b movq (%r14), %rax callq *0x48(%rax) movq $0x0, 0x50(%rbx) leaq 0x10(%rbx), %rdi callq 0x290c0 movq %rbx, %rdi callq 0xa1586 movq 0x3a34c5(%rip), %rbx # 0x3ff428 testq %rbx, %rbx jne 0x5bf29 leaq 0x3a34c9(%rip), %rdi # 0x3ff438 callq 0xa739e movq 0x3a35c5(%rip), %rdi # 0x3ff540 testq %rdi, %rdi je 0x5bf98 leaq 0x32b0c9(%rip), %rax # 0x387050 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x3a35a8(%rip) # 0x3ff540 leaq 0x3a3561(%rip), %rdi # 0x3ff500 callq 0x290c0 movq 0x3a31a5(%rip), %rdi # 0x3ff150 addq $0x8, %rdi callq 0xa1586 movq $0x0, 0x3a3191(%rip) # 0x3ff150 popq %rbx popq %r14 popq %rbp retq
trnman_destroy: cmp cs:short_trid_to_active_trn, 0 jz locret_5BFC3 push rbp mov rbp, rsp push r14 push rbx mov rbx, cs:pool test rbx, rbx jz short loc_5BF68 lea r14, PSI_server loc_5BF29: mov rax, [rbx+68h] mov cs:pool, rax mov rdi, [rbx+50h] test rdi, rdi jz short loc_5BF4B mov rax, [r14] call qword ptr [rax+48h] mov qword ptr [rbx+50h], 0 loc_5BF4B: lea rdi, [rbx+10h] call _pthread_mutex_destroy mov rdi, rbx call my_free mov rbx, cs:pool test rbx, rbx jnz short loc_5BF29 loc_5BF68: lea rdi, trid_to_trn call lf_hash_destroy mov rdi, cs:qword_3FF540 test rdi, rdi jz short loc_5BF98 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov cs:qword_3FF540, 0 loc_5BF98: lea rdi, LOCK_trn_list call _pthread_mutex_destroy mov rdi, cs:short_trid_to_active_trn add rdi, 8 call my_free mov cs:short_trid_to_active_trn, 0 pop rbx pop r14 pop rbp locret_5BFC3: retn
long long trnman_destroy() { long long i; // rbx long long result; // rax if ( short_trid_to_active_trn ) { for ( i = pool; pool; i = pool ) { pool = *(_QWORD *)(i + 104); if ( *(_QWORD *)(i + 80) ) { PSI_server[9](); *(_QWORD *)(i + 80) = 0LL; } pthread_mutex_destroy(i + 16); my_free(i); } lf_hash_destroy(&trid_to_trn); if ( qword_3FF540 ) { PSI_server[9](); qword_3FF540 = 0LL; } pthread_mutex_destroy(&LOCK_trn_list); result = my_free(short_trid_to_active_trn + 8); short_trid_to_active_trn = 0LL; } return result; }
trnman_destroy: CMP qword ptr [0x004ff150],0x0 JZ 0x0015bfc3 PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,qword ptr [0x004ff428] TEST RBX,RBX JZ 0x0015bf68 LEA R14,[0x487050] LAB_0015bf29: MOV RAX,qword ptr [RBX + 0x68] MOV qword ptr [0x004ff428],RAX MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x0015bf4b MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x50],0x0 LAB_0015bf4b: LEA RDI,[RBX + 0x10] CALL 0x001290c0 MOV RDI,RBX CALL 0x001a1586 MOV RBX,qword ptr [0x004ff428] TEST RBX,RBX JNZ 0x0015bf29 LAB_0015bf68: LEA RDI,[0x4ff438] CALL 0x001a739e MOV RDI,qword ptr [0x004ff540] TEST RDI,RDI JZ 0x0015bf98 LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [0x004ff540],0x0 LAB_0015bf98: LEA RDI,[0x4ff500] CALL 0x001290c0 MOV RDI,qword ptr [0x004ff150] ADD RDI,0x8 CALL 0x001a1586 MOV qword ptr [0x004ff150],0x0 POP RBX POP R14 POP RBP LAB_0015bfc3: RET
void trnman_destroy(void) { long lVar1; if (short_trid_to_active_trn != 0) { lVar1 = pool; if (pool != 0) { do { pool = *(long *)(lVar1 + 0x68); if (*(long *)(lVar1 + 0x50) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(lVar1 + 0x50) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(lVar1 + 0x10)); my_free(lVar1); lVar1 = pool; } while (pool != 0); } lf_hash_destroy(trid_to_trn); if (LOCK_trn_list._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); LOCK_trn_list._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)LOCK_trn_list); my_free(short_trid_to_active_trn + 8); short_trid_to_active_trn = 0; } return; }
39,166
my_hash_next
eloqsql/mysys/hash.c
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; uint idx; if (*current_record != NO_RECORD) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { *current_record= idx; return pos->data; } } *current_record= NO_RECORD; } return 0; }
O3
c
my_hash_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, -0x38(%rbp) movl (%rcx), %ebx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %rbx je 0x94dd5 movq %rsi, %r15 movq %rdi, %r12 movq %rcx, -0x30(%rbp) movq 0x28(%rdi), %r13 shlq $0x4, %rbx addq %r13, %rbx movl (%rbx), %r14d movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 je 0x94dcb movq %r14, %rax shlq $0x4, %rax leaq (%rax,%r13), %rbx movq 0x8(%r13,%rax), %rsi movq %r12, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq 0x94ccd testl %eax, %eax jne 0x94d8e movq -0x30(%rbp), %rax movl %r14d, (%rax) movq 0x8(%rbx), %rax jmp 0x94dd7 movq -0x30(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_next: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdx mov ebx, [rcx] mov eax, 0FFFFFFFFh cmp rbx, rax jz short loc_94DD5 mov r15, rsi mov r12, rdi mov [rbp+var_30], rcx mov r13, [rdi+28h] shl rbx, 4 add rbx, r13 loc_94D8E: mov r14d, [rbx] mov eax, 0FFFFFFFFh cmp r14, rax jz short loc_94DCB mov rax, r14 shl rax, 4 lea rbx, [rax+r13] mov rsi, [r13+rax+8] mov rdi, r12 mov rdx, r15 mov rcx, [rbp+var_38] call hashcmp test eax, eax jnz short loc_94D8E mov rax, [rbp+var_30] mov [rax], r14d mov rax, [rbx+8] jmp short loc_94DD7 loc_94DCB: mov rax, [rbp+var_30] mov dword ptr [rax], 0FFFFFFFFh loc_94DD5: xor eax, eax loc_94DD7: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_hash_next(_QWORD *a1, long long a2, long long a3, _DWORD *a4) { long long v4; // rbx long long v5; // r13 unsigned int *v6; // rbx long long v7; // r14 v4 = (unsigned int)*a4; if ( v4 != 0xFFFFFFFFLL ) { v5 = a1[5]; v6 = (unsigned int *)(v5 + 16 * v4); while ( 1 ) { v7 = *v6; if ( v7 == 0xFFFFFFFFLL ) break; v6 = (unsigned int *)(16 * v7 + v5); if ( !hashcmp(a1, *((_QWORD *)v6 + 1), a2, a3) ) { *a4 = v7; return *((_QWORD *)v6 + 1); } } *a4 = -1; } return 0LL; }
my_hash_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDX MOV EBX,dword ptr [RCX] MOV EAX,0xffffffff CMP RBX,RAX JZ 0x00194dd5 MOV R15,RSI MOV R12,RDI MOV qword ptr [RBP + -0x30],RCX MOV R13,qword ptr [RDI + 0x28] SHL RBX,0x4 ADD RBX,R13 LAB_00194d8e: MOV R14D,dword ptr [RBX] MOV EAX,0xffffffff CMP R14,RAX JZ 0x00194dcb MOV RAX,R14 SHL RAX,0x4 LEA RBX,[RAX + R13*0x1] MOV RSI,qword ptr [R13 + RAX*0x1 + 0x8] MOV RDI,R12 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL 0x00194ccd TEST EAX,EAX JNZ 0x00194d8e MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],R14D MOV RAX,qword ptr [RBX + 0x8] JMP 0x00194dd7 LAB_00194dcb: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0xffffffff LAB_00194dd5: XOR EAX,EAX LAB_00194dd7: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4) { uint uVar1; long lVar2; int iVar3; long lVar4; int8 uVar5; uint *puVar6; if ((ulong)*param_4 == 0xffffffff) { LAB_00194dd5: uVar5 = 0; } else { lVar2 = *(long *)(param_1 + 0x28); puVar6 = (uint *)((ulong)*param_4 * 0x10 + lVar2); do { uVar1 = *puVar6; if ((ulong)uVar1 == 0xffffffff) { *param_4 = 0xffffffff; goto LAB_00194dd5; } lVar4 = (ulong)uVar1 * 0x10; puVar6 = (uint *)(lVar4 + lVar2); iVar3 = hashcmp(param_1,*(int8 *)(lVar2 + 8 + lVar4),param_2,param_3); } while (iVar3 != 0); *param_4 = uVar1; uVar5 = *(int8 *)(puVar6 + 2); } return uVar5; }
39,167
testing::UnitTest::Run()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
int UnitTest::Run() { #ifdef GTEST_HAS_DEATH_TEST const bool in_death_test_child_process = !GTEST_FLAG_GET(internal_run_death_test).empty(); // Google Test implements this protocol for catching that a test // program exits before returning control to Google Test: // // 1. Upon start, Google Test creates a file whose absolute path // is specified by the environment variable // TEST_PREMATURE_EXIT_FILE. // 2. When Google Test has finished its work, it deletes the file. // // This allows a test runner to set TEST_PREMATURE_EXIT_FILE before // running a Google-Test-based test program and check the existence // of the file at the end of the test execution to see if it has // exited prematurely. // If we are in the child process of a death test, don't // create/delete the premature exit file, as doing so is unnecessary // and will confuse the parent process. Otherwise, create/delete // the file upon entering/leaving this function. If the program // somehow exits before this function has a chance to return, the // premature-exit file will be left undeleted, causing a test runner // that understands the premature-exit-file protocol to report the // test as having failed. const internal::ScopedPrematureExitFile premature_exit_file( in_death_test_child_process ? nullptr : internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE")); #else const bool in_death_test_child_process = false; #endif // GTEST_HAS_DEATH_TEST // Captures the value of GTEST_FLAG(catch_exceptions). This value will be // used for the duration of the program. impl()->set_catch_exceptions(GTEST_FLAG_GET(catch_exceptions)); #ifdef GTEST_OS_WINDOWS // Either the user wants Google Test to catch exceptions thrown by the // tests or this is executing in the context of death test child // process. In either case the user does not want to see pop-up dialogs // about crashes - they are expected. if (impl()->catch_exceptions() || in_death_test_child_process) { #if !defined(GTEST_OS_WINDOWS_MOBILE) && !defined(GTEST_OS_WINDOWS_PHONE) && \ !defined(GTEST_OS_WINDOWS_RT) && !defined(GTEST_OS_WINDOWS_GAMES) // SetErrorMode doesn't exist on CE. SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); #endif // !GTEST_OS_WINDOWS_MOBILE #if (defined(_MSC_VER) || defined(GTEST_OS_WINDOWS_MINGW)) && \ !defined(GTEST_OS_WINDOWS_MOBILE) // Death test children can be terminated with _abort(). On Windows, // _abort() can show a dialog with a warning message. This forces the // abort message to go to stderr instead. _set_error_mode(_OUT_TO_STDERR); #endif #if defined(_MSC_VER) && !defined(GTEST_OS_WINDOWS_MOBILE) // In the debug version, Visual Studio pops up a separate dialog // offering a choice to debug the aborted program. We need to suppress // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement // executed. Google Test will notify the user of any unexpected // failure via stderr. if (!GTEST_FLAG_GET(break_on_failure)) _set_abort_behavior( 0x0, // Clear the following flags: _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. // In debug mode, the Windows CRT can crash with an assertion over invalid // input (e.g. passing an invalid file descriptor). The default handling // for these assertions is to pop up a dialog and wait for user input. // Instead ask the CRT to dump such assertions to stderr non-interactively. if (!IsDebuggerPresent()) { (void)_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); (void)_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); } #endif } #else (void)in_death_test_child_process; // Needed inside the #if block above #endif // GTEST_OS_WINDOWS return internal::HandleExceptionsInMethodIfSupported( impl(), &internal::UnitTestImpl::RunAllTests, "auxiliary test code (environments or event listeners)") ? 0 : 1; }
O0
cpp
testing::UnitTest::Run(): subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x60b16(%rip), %rdi # 0x9c5d0 callq 0x45090 xorb $-0x1, %al andb $0x1, %al movb %al, 0x6f(%rsp) testb $0x1, 0x6f(%rsp) je 0x3bad7 xorl %eax, %eax movq %rax, 0x18(%rsp) jmp 0x3bae8 leaq 0x39c62(%rip), %rdi # 0x75740 callq 0x47350 movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rsi leaq 0x48(%rsp), %rdi callq 0x4d2d0 movq 0x20(%rsp), %rdi callq 0x47f80 movq %rax, 0x10(%rsp) jmp 0x3bb08 movq 0x10(%rsp), %rdi leaq 0x60b21(%rip), %rax # 0x9c635 movzbl (%rax), %esi andl $0x1, %esi callq 0x4d3f0 jmp 0x3bb21 movq 0x20(%rsp), %rdi callq 0x47f80 movq %rax, 0x8(%rsp) jmp 0x3bb32 movq 0x8(%rsp), %rdi leaq 0x72(%rip), %rax # 0x3bbb0 movq %rax, 0x28(%rsp) movq $0x0, 0x30(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x39bfc(%rip), %rcx # 0x75759 callq 0x4d420 movb %al, 0x7(%rsp) jmp 0x3bb68 movb 0x7(%rsp), %dl movl $0x1, %eax xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, (%rsp) leaq 0x48(%rsp), %rdi callq 0x4d730 movl (%rsp), %eax addq $0x78, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) leaq 0x48(%rsp), %rdi callq 0x4d730 movq 0x40(%rsp), %rdi callq 0xb910
_ZN7testing8UnitTest3RunEv: sub rsp, 78h mov [rsp+78h+var_8], rdi mov rax, [rsp+78h+var_8] mov [rsp+78h+var_58], rax lea rdi, _ZN7testing35FLAGS_gtest_internal_run_death_testB5cxx11E; testing::FLAGS_gtest_internal_run_death_test call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) xor al, 0FFh and al, 1 mov [rsp+78h+var_9], al test [rsp+78h+var_9], 1 jz short loc_3BAD7 xor eax, eax mov [rsp+78h+var_60], rax jmp short loc_3BAE8 loc_3BAD7: lea rdi, aTestPrematureE; "TEST_PREMATURE_EXIT_FILE" call _ZN7testing8internal5posix6GetEnvEPKc; testing::internal::posix::GetEnv(char const*) mov [rsp+78h+var_60], rax loc_3BAE8: mov rsi, [rsp+78h+var_60]; char * lea rdi, [rsp+78h+var_30]; this call _ZN7testing8internal23ScopedPrematureExitFileC2EPKc; testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile(char const*) mov rdi, [rsp+78h+var_58]; this call _ZN7testing8UnitTest4implEv; testing::UnitTest::impl(void) mov [rsp+78h+var_68], rax jmp short $+2 loc_3BB08: mov rdi, [rsp+78h+var_68]; this lea rax, _ZN7testing28FLAGS_gtest_catch_exceptionsE; testing::FLAGS_gtest_catch_exceptions movzx esi, byte ptr [rax] and esi, 1; bool call _ZN7testing8internal12UnitTestImpl20set_catch_exceptionsEb; testing::internal::UnitTestImpl::set_catch_exceptions(bool) jmp short $+2 loc_3BB21: mov rdi, [rsp+78h+var_58]; this call _ZN7testing8UnitTest4implEv; testing::UnitTest::impl(void) mov [rsp+78h+var_70], rax jmp short $+2 loc_3BB32: mov rdi, [rsp+78h+var_70] lea rax, _ZN7testing8internal12UnitTestImpl11RunAllTestsEv; testing::internal::UnitTestImpl::RunAllTests(void) mov [rsp+78h+var_50], rax mov [rsp+78h+var_48], 0 mov rsi, [rsp+78h+var_50] mov rdx, [rsp+78h+var_48] lea rcx, aAuxiliaryTestC; "auxiliary test code (environments or ev"... call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(testing::internal::UnitTestImpl *,bool (testing::internal::UnitTestImpl::*)(void),char const*) mov [rsp+78h+var_71], al jmp short $+2 loc_3BB68: mov dl, [rsp+78h+var_71] mov eax, 1 xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rsp+78h+var_78], eax lea rdi, [rsp+78h+var_30]; this call _ZN7testing8internal23ScopedPrematureExitFileD2Ev; testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile() mov eax, [rsp+78h+var_78] add rsp, 78h retn mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax lea rdi, [rsp+arg_40]; this call _ZN7testing8internal23ScopedPrematureExitFileD2Ev; testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile() mov rdi, [rsp+arg_38] call __Unwind_Resume
Run: SUB RSP,0x78 MOV qword ptr [RSP + 0x70],RDI MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[0x19c5d0] CALL 0x00145090 XOR AL,0xff AND AL,0x1 MOV byte ptr [RSP + 0x6f],AL TEST byte ptr [RSP + 0x6f],0x1 JZ 0x0013bad7 XOR EAX,EAX MOV qword ptr [RSP + 0x18],RAX JMP 0x0013bae8 LAB_0013bad7: LEA RDI,[0x175740] CALL 0x00147350 MOV qword ptr [RSP + 0x18],RAX LAB_0013bae8: MOV RSI,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x48] CALL 0x0014d2d0 MOV RDI,qword ptr [RSP + 0x20] LAB_0013bafc: CALL 0x00147f80 MOV qword ptr [RSP + 0x10],RAX JMP 0x0013bb08 LAB_0013bb08: MOV RDI,qword ptr [RSP + 0x10] LEA RAX,[0x19c635] MOVZX ESI,byte ptr [RAX] AND ESI,0x1 CALL 0x0014d3f0 JMP 0x0013bb21 LAB_0013bb21: MOV RDI,qword ptr [RSP + 0x20] CALL 0x00147f80 MOV qword ptr [RSP + 0x8],RAX JMP 0x0013bb32 LAB_0013bb32: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[0x13bbb0] MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],0x0 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LEA RCX,[0x175759] CALL 0x0014d420 LAB_0013bb62: MOV byte ptr [RSP + 0x7],AL JMP 0x0013bb68 LAB_0013bb68: MOV DL,byte ptr [RSP + 0x7] MOV EAX,0x1 XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RSP],EAX LEA RDI,[RSP + 0x48] CALL 0x0014d730 MOV EAX,dword ptr [RSP] ADD RSP,0x78 RET
/* testing::UnitTest::Run() */ bool __thiscall testing::UnitTest::Run(UnitTest *this) { byte bVar1; bool bVar2; UnitTestImpl *pUVar3; char *local_60; ScopedPrematureExitFile local_30 [39]; byte local_9; UnitTest *local_8; local_8 = this; bVar1 = std::__cxx11::string::empty((string *)FLAGS_gtest_internal_run_death_test_abi_cxx11_); local_9 = (bVar1 ^ 0xff) & 1; if (local_9 == 0) { local_60 = (char *)internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE"); } else { local_60 = (char *)0x0; } internal::ScopedPrematureExitFile::ScopedPrematureExitFile(local_30,local_60); /* try { // try from 0013bafc to 0013bb61 has its CatchHandler @ 0013bb8e */ pUVar3 = (UnitTestImpl *)impl(this); internal::UnitTestImpl::set_catch_exceptions(pUVar3,(bool)(FLAGS_gtest_catch_exceptions & 1)); pUVar3 = (UnitTestImpl *)impl(this); bVar2 = internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool> (pUVar3,internal::UnitTestImpl::RunAllTests,(char *)0x0); internal::ScopedPrematureExitFile::~ScopedPrematureExitFile(local_30); return !bVar2; }
39,168
process_int_arg
eloqsql/strings/my_vsnprintf.c
static char *process_int_arg(char *to, const char *end, size_t length, longlong par, char arg_type, uint print_type) { size_t res_length, to_length; char *store_start= to, *store_end; char buff[32]; if ((to_length= (size_t) (end-to)) < 16 || length) store_start= buff; if (arg_type == 'd' || arg_type == 'i') store_end= longlong10_to_str(par, store_start, -10); else if (arg_type == 'u') store_end= longlong10_to_str(par, store_start, 10); else if (arg_type == 'p') { store_start[0]= '0'; store_start[1]= 'x'; store_end= ll2str(par, store_start + 2, 16, 0); } else if (arg_type == 'o') { store_end= ll2str(par, store_start, 8, 0); } else { DBUG_ASSERT(arg_type == 'X' || arg_type =='x'); store_end= ll2str(par, store_start, 16, (arg_type == 'X')); } if ((res_length= (size_t) (store_end - store_start)) > to_length) return to; /* num doesn't fit in output */ /* If %#d syntax was used, we have to pre-zero/pre-space the string */ if (store_start == buff) { length= MY_MIN(length, to_length); if (res_length < length) { size_t diff= (length- res_length); bfill(to, diff, (print_type & PREZERO_ARG) ? '0' : ' '); if (arg_type == 'p' && print_type & PREZERO_ARG) { if (diff > 1) to[1]= 'x'; else store_start[0]= 'x'; store_start[1]= '0'; } to+= diff; } bmove(to, store_start, res_length); } to+= res_length; return to; }
O0
c
process_int_arg: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movb %r8b, %al movq %fs:0x28, %r8 movq %r8, -0x8(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq %rdx, -0x50(%rbp) movq %rcx, -0x58(%rbp) movb %al, -0x59(%rbp) movl %r9d, -0x60(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax movq %rax, -0x70(%rbp) cmpq $0x10, %rax jb 0x7ee36 cmpq $0x0, -0x50(%rbp) je 0x7ee3e leaq -0x30(%rbp), %rax movq %rax, -0x78(%rbp) movsbl -0x59(%rbp), %eax cmpl $0x64, %eax je 0x7ee50 movsbl -0x59(%rbp), %eax cmpl $0x69, %eax jne 0x7ee6b movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 callq 0x7c3d0 movq %rax, -0x80(%rbp) jmp 0x7ef17 movsbl -0x59(%rbp), %eax cmpl $0x75, %eax jne 0x7ee8f movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi movl $0xa, %edx callq 0x7c3d0 movq %rax, -0x80(%rbp) jmp 0x7ef15 movsbl -0x59(%rbp), %eax cmpl $0x70, %eax jne 0x7eec5 movq -0x78(%rbp), %rax movb $0x30, (%rax) movq -0x78(%rbp), %rax movb $0x78, 0x1(%rax) movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi addq $0x2, %rsi movl $0x10, %edx xorl %ecx, %ecx callq 0x7c1d0 movq %rax, -0x80(%rbp) jmp 0x7ef13 movsbl -0x59(%rbp), %eax cmpl $0x6f, %eax jne 0x7eee8 movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi movl $0x8, %edx xorl %ecx, %ecx callq 0x7c1d0 movq %rax, -0x80(%rbp) jmp 0x7ef11 jmp 0x7eeea jmp 0x7eeec movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi movsbl -0x59(%rbp), %eax cmpl $0x58, %eax sete %al andb $0x1, %al movzbl %al, %ecx movl $0x10, %edx callq 0x7c1d0 movq %rax, -0x80(%rbp) jmp 0x7ef13 jmp 0x7ef15 jmp 0x7ef17 movq -0x80(%rbp), %rax movq -0x78(%rbp), %rcx subq %rcx, %rax movq %rax, -0x68(%rbp) cmpq -0x70(%rbp), %rax jbe 0x7ef39 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x7f024 movq -0x78(%rbp), %rax leaq -0x30(%rbp), %rcx cmpq %rcx, %rax jne 0x7f010 movq -0x50(%rbp), %rax cmpq -0x70(%rbp), %rax jae 0x7ef61 movq -0x50(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x7ef6c movq -0x70(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x68(%rbp), %rax cmpq -0x50(%rbp), %rax jae 0x7efff movq -0x50(%rbp), %rax subq -0x68(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x40(%rbp), %rdi movl -0x60(%rbp), %edx andl $0x4, %edx movl $0x20, %eax movl $0x30, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movq -0x88(%rbp), %rdx movzbl %al, %esi callq 0x25190 movsbl -0x59(%rbp), %eax cmpl $0x70, %eax jne 0x7eff0 movl -0x60(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x7eff0 cmpq $0x1, -0x88(%rbp) jbe 0x7efe1 movq -0x40(%rbp), %rax movb $0x78, 0x1(%rax) jmp 0x7efe8 movq -0x78(%rbp), %rax movb $0x78, (%rax) movq -0x78(%rbp), %rax movb $0x30, 0x1(%rax) movq -0x88(%rbp), %rax addq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi movq -0x78(%rbp), %rsi movq -0x68(%rbp), %rdx callq 0x255a0 movq -0x68(%rbp), %rax addq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x98(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x7f051 movq -0x98(%rbp), %rax addq $0xa0, %rsp popq %rbp retq callq 0x25330 nopw %cs:(%rax,%rax)
process_int_arg: push rbp mov rbp, rsp sub rsp, 0A0h mov al, r8b mov r8, fs:28h mov [rbp+var_8], r8 mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov [rbp+var_50], rdx mov [rbp+var_58], rcx mov [rbp+var_59], al mov [rbp+var_60], r9d mov rax, [rbp+var_40] mov [rbp+var_78], rax mov rax, [rbp+var_48] mov rcx, [rbp+var_40] sub rax, rcx mov [rbp+var_70], rax cmp rax, 10h jb short loc_7EE36 cmp [rbp+var_50], 0 jz short loc_7EE3E loc_7EE36: lea rax, [rbp+var_30] mov [rbp+var_78], rax loc_7EE3E: movsx eax, [rbp+var_59] cmp eax, 64h ; 'd' jz short loc_7EE50 movsx eax, [rbp+var_59] cmp eax, 69h ; 'i' jnz short loc_7EE6B loc_7EE50: mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] mov edx, 0FFFFFFF6h call int10_to_str mov [rbp+var_80], rax jmp loc_7EF17 loc_7EE6B: movsx eax, [rbp+var_59] cmp eax, 75h ; 'u' jnz short loc_7EE8F mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] mov edx, 0Ah call int10_to_str mov [rbp+var_80], rax jmp loc_7EF15 loc_7EE8F: movsx eax, [rbp+var_59] cmp eax, 70h ; 'p' jnz short loc_7EEC5 mov rax, [rbp+var_78] mov byte ptr [rax], 30h ; '0' mov rax, [rbp+var_78] mov byte ptr [rax+1], 78h ; 'x' mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] add rsi, 2 mov edx, 10h xor ecx, ecx call int2str mov [rbp+var_80], rax jmp short loc_7EF13 loc_7EEC5: movsx eax, [rbp+var_59] cmp eax, 6Fh ; 'o' jnz short loc_7EEE8 mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] mov edx, 8 xor ecx, ecx call int2str mov [rbp+var_80], rax jmp short loc_7EF11 loc_7EEE8: jmp short $+2 loc_7EEEA: jmp short $+2 loc_7EEEC: mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] movsx eax, [rbp+var_59] cmp eax, 58h ; 'X' setz al and al, 1 movzx ecx, al mov edx, 10h call int2str mov [rbp+var_80], rax loc_7EF11: jmp short $+2 loc_7EF13: jmp short $+2 loc_7EF15: jmp short $+2 loc_7EF17: mov rax, [rbp+var_80] mov rcx, [rbp+var_78] sub rax, rcx mov [rbp+var_68], rax cmp rax, [rbp+var_70] jbe short loc_7EF39 mov rax, [rbp+var_40] mov [rbp+var_38], rax jmp loc_7F024 loc_7EF39: mov rax, [rbp+var_78] lea rcx, [rbp+var_30] cmp rax, rcx jnz loc_7F010 mov rax, [rbp+var_50] cmp rax, [rbp+var_70] jnb short loc_7EF61 mov rax, [rbp+var_50] mov [rbp+var_90], rax jmp short loc_7EF6C loc_7EF61: mov rax, [rbp+var_70] mov [rbp+var_90], rax loc_7EF6C: mov rax, [rbp+var_90] mov [rbp+var_50], rax mov rax, [rbp+var_68] cmp rax, [rbp+var_50] jnb short loc_7EFFF mov rax, [rbp+var_50] sub rax, [rbp+var_68] mov [rbp+var_88], rax mov rdi, [rbp+var_40] mov edx, [rbp+var_60] and edx, 4 mov eax, 20h ; ' ' mov ecx, 30h ; '0' cmp edx, 0 cmovnz eax, ecx mov rdx, [rbp+var_88] movzx esi, al call _memset movsx eax, [rbp+var_59] cmp eax, 70h ; 'p' jnz short loc_7EFF0 mov eax, [rbp+var_60] and eax, 4 cmp eax, 0 jz short loc_7EFF0 cmp [rbp+var_88], 1 jbe short loc_7EFE1 mov rax, [rbp+var_40] mov byte ptr [rax+1], 78h ; 'x' jmp short loc_7EFE8 loc_7EFE1: mov rax, [rbp+var_78] mov byte ptr [rax], 78h ; 'x' loc_7EFE8: mov rax, [rbp+var_78] mov byte ptr [rax+1], 30h ; '0' loc_7EFF0: mov rax, [rbp+var_88] add rax, [rbp+var_40] mov [rbp+var_40], rax loc_7EFFF: mov rdi, [rbp+var_40] mov rsi, [rbp+var_78] mov rdx, [rbp+var_68] call _memmove loc_7F010: mov rax, [rbp+var_68] add rax, [rbp+var_40] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_7F024: mov rax, [rbp+var_38] mov [rbp+var_98], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_7F051 mov rax, [rbp+var_98] add rsp, 0A0h pop rbp retn loc_7F051: call ___stack_chk_fail
_BYTE * process_int_arg(_BYTE *a1, long long a2, unsigned long long a3, long long a4, char a5, char a6) { unsigned __int8 v6; // al unsigned long long v8; // [rsp+10h] [rbp-90h] unsigned long long v9; // [rsp+18h] [rbp-88h] _BYTE *v10; // [rsp+20h] [rbp-80h] _BYTE *v11; // [rsp+28h] [rbp-78h] unsigned long long v12; // [rsp+30h] [rbp-70h] unsigned long long v13; // [rsp+38h] [rbp-68h] _BYTE *v17; // [rsp+60h] [rbp-40h] _BYTE v19[40]; // [rsp+70h] [rbp-30h] BYREF unsigned long long v20; // [rsp+98h] [rbp-8h] v20 = __readfsqword(0x28u); v17 = a1; v11 = a1; v12 = a2 - (_QWORD)a1; if ( (unsigned long long)(a2 - (_QWORD)a1) < 0x10 || a3 ) v11 = v19; switch ( a5 ) { case 'd': case 'i': v10 = int10_to_str(a4, v11, -10); break; case 'u': v10 = int10_to_str(a4, v11, 10); break; case 'p': *v11 = 48; v11[1] = 120; v10 = int2str(a4, v11 + 2, 16, 0); break; case 'o': v10 = int2str(a4, v11, 8, 0); break; default: v10 = int2str(a4, v11, 16, a5 == 88); break; } v13 = v10 - v11; if ( v10 - v11 > v12 ) return a1; if ( v11 == v19 ) { if ( a3 >= v12 ) v8 = a2 - (_QWORD)a1; else v8 = a3; if ( v13 < v8 ) { v9 = v8 - v13; v6 = 32; if ( (a6 & 4) != 0 ) v6 = 48; memset(a1, v6, v9); if ( a5 == 112 && (a6 & 4) != 0 ) { if ( v9 <= 1 ) *v11 = 120; else a1[1] = 120; v11[1] = 48; } v17 = &a1[v9]; } memmove(v17, v11, v13); } return &v17[v13]; }
process_int_arg: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV AL,R8B MOV R8,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RSI MOV qword ptr [RBP + -0x50],RDX MOV qword ptr [RBP + -0x58],RCX MOV byte ptr [RBP + -0x59],AL MOV dword ptr [RBP + -0x60],R9D MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX CMP RAX,0x10 JC 0x0017ee36 CMP qword ptr [RBP + -0x50],0x0 JZ 0x0017ee3e LAB_0017ee36: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x78],RAX LAB_0017ee3e: MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x64 JZ 0x0017ee50 MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x69 JNZ 0x0017ee6b LAB_0017ee50: MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,0xfffffff6 CALL 0x0017c3d0 MOV qword ptr [RBP + -0x80],RAX JMP 0x0017ef17 LAB_0017ee6b: MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x75 JNZ 0x0017ee8f MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,0xa CALL 0x0017c3d0 MOV qword ptr [RBP + -0x80],RAX JMP 0x0017ef15 LAB_0017ee8f: MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x70 JNZ 0x0017eec5 MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x30 MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + 0x1],0x78 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] ADD RSI,0x2 MOV EDX,0x10 XOR ECX,ECX CALL 0x0017c1d0 MOV qword ptr [RBP + -0x80],RAX JMP 0x0017ef13 LAB_0017eec5: MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x6f JNZ 0x0017eee8 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,0x8 XOR ECX,ECX CALL 0x0017c1d0 MOV qword ptr [RBP + -0x80],RAX JMP 0x0017ef11 LAB_0017eee8: JMP 0x0017eeea LAB_0017eeea: JMP 0x0017eeec LAB_0017eeec: MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x58 SETZ AL AND AL,0x1 MOVZX ECX,AL MOV EDX,0x10 CALL 0x0017c1d0 MOV qword ptr [RBP + -0x80],RAX LAB_0017ef11: JMP 0x0017ef13 LAB_0017ef13: JMP 0x0017ef15 LAB_0017ef15: JMP 0x0017ef17 LAB_0017ef17: MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x78] SUB RAX,RCX MOV qword ptr [RBP + -0x68],RAX CMP RAX,qword ptr [RBP + -0x70] JBE 0x0017ef39 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX JMP 0x0017f024 LAB_0017ef39: MOV RAX,qword ptr [RBP + -0x78] LEA RCX,[RBP + -0x30] CMP RAX,RCX JNZ 0x0017f010 MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x70] JNC 0x0017ef61 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x90],RAX JMP 0x0017ef6c LAB_0017ef61: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x90],RAX LAB_0017ef6c: MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x50] JNC 0x0017efff MOV RAX,qword ptr [RBP + -0x50] SUB RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x88],RAX MOV RDI,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x60] AND EDX,0x4 MOV EAX,0x20 MOV ECX,0x30 CMP EDX,0x0 CMOVNZ EAX,ECX MOV RDX,qword ptr [RBP + -0x88] MOVZX ESI,AL CALL 0x00125190 MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x70 JNZ 0x0017eff0 MOV EAX,dword ptr [RBP + -0x60] AND EAX,0x4 CMP EAX,0x0 JZ 0x0017eff0 CMP qword ptr [RBP + -0x88],0x1 JBE 0x0017efe1 MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x1],0x78 JMP 0x0017efe8 LAB_0017efe1: MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x78 LAB_0017efe8: MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + 0x1],0x30 LAB_0017eff0: MOV RAX,qword ptr [RBP + -0x88] ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX LAB_0017efff: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x68] CALL 0x001255a0 LAB_0017f010: MOV RAX,qword ptr [RBP + -0x68] ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX LAB_0017f024: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0017f051 MOV RAX,qword ptr [RBP + -0x98] ADD RSP,0xa0 POP RBP RET LAB_0017f051: CALL 0x00125330
int1 * process_int_arg(int1 *param_1,long param_2,ulong param_3,int8 param_4,char param_5, uint param_6) { byte bVar1; ulong __n; long in_FS_OFFSET; ulong local_98; long local_88; int1 *local_80; int1 *local_48; int1 *local_40; int1 local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_98 = param_2 - (long)param_1; if ((local_98 < 0x10) || (local_80 = param_1, param_3 != 0)) { local_80 = local_38; } if ((param_5 == 'd') || (param_5 == 'i')) { local_88 = int10_to_str(param_4,local_80,0xfffffff6); } else if (param_5 == 'u') { local_88 = int10_to_str(param_4,local_80,10); } else if (param_5 == 'p') { *local_80 = 0x30; local_80[1] = 0x78; local_88 = int2str(param_4,local_80 + 2,0x10,0); } else if (param_5 == 'o') { local_88 = int2str(param_4,local_80,8,0); } else { local_88 = int2str(param_4,local_80,0x10,param_5 == 'X'); } __n = local_88 - (long)local_80; local_40 = param_1; if (__n <= local_98) { local_48 = param_1; if (local_80 == local_38) { if (param_3 < local_98) { local_98 = param_3; } if (__n < local_98) { local_98 = local_98 - __n; bVar1 = 0x20; if ((param_6 & 4) != 0) { bVar1 = 0x30; } memset(param_1,(uint)bVar1,local_98); if ((param_5 == 'p') && ((param_6 & 4) != 0)) { if (local_98 < 2) { *local_80 = 0x78; } else { param_1[1] = 0x78; } local_80[1] = 0x30; } local_48 = param_1 + local_98; } memmove(local_48,local_80,__n); } local_40 = local_48 + __n; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_40; }
39,169
OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double, double, int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTree.cpp
int PatchTree::searchQuadtree(double u, double v, int subFace, int searchDepth) const { // // These details warrant closer inspection and possible tweaking // since non-leaf patches were optionally added to the tree... // // // Identify the root patch and make a quick exit when seeking it. If // there is no patch at level 0 but subpatches present (possible e.g. // if adjacent to an irregular face) force the search to level 1: // TreeNode const * node = &_treeNodes[subFace]; if (_treeDepth == 0) { assert(node->patchIndex >= 0); return node->patchIndex; } int maxDepth = ((searchDepth >= 0) && _patchesIncludeNonLeaf) ? searchDepth : _treeDepth; if (maxDepth == (_numSubFaces > 0)) { if (node->patchIndex >= 0) { return node->patchIndex; } maxDepth = 1; } // // Search the tree for the sub-patch containing the given (u,v) // double median = 0.5f; bool triRotated = false; for (int depth = 1; depth <= maxDepth; ++depth, median *= 0.5f) { int quadrant = _patchesAreTriangular ? transformUVToTriQuadrant(median, u, v, triRotated) : transformUVToQuadQuadrant(median, u, v); // Identify child patch if leaf, otherwise child node: if (node->children[quadrant].isLeaf) { return node->children[quadrant].index; } else if (node->children[quadrant].isSet) { node = &_treeNodes[node->children[quadrant].index]; } } assert(node->patchIndex >= 0); return node->patchIndex; }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double, double, int, int) const: pushq %rax movslq %esi, %rax movq 0x60(%rdi), %rsi leaq (%rax,%rax,4), %rax leaq (%rsi,%rax,4), %rcx movl 0x78(%rdi), %eax testl %eax, %eax je 0x8e8f6 testl %edx, %edx js 0x8e8d6 testb $0x2, (%rdi) jne 0x8e8d8 movl %eax, %edx xorl %eax, %eax cmpl $0x0, 0x18(%rdi) setg %al cmpl %eax, %edx jne 0x8e91f movl (%rcx), %eax testl %eax, %eax jns 0x8ea6c movl $0x1, %edx jmp 0x8e927 movl (%rcx), %eax testl %eax, %eax jns 0x8ea6c leaq 0x33f80(%rip), %rdi # 0xc2887 leaq 0x33d93(%rip), %rsi # 0xc26a1 leaq 0x33f88(%rip), %rcx # 0xc289d movl $0x1bb, %edx # imm = 0x1BB callq 0x39540 testl %edx, %edx jle 0x8ea3f movb (%rdi), %dil movsd 0x28c8e(%rip), %xmm2 # 0xb75c0 xorl %r8d, %r8d movapd %xmm2, %xmm3 testb $0x4, %dil jne 0x8e984 xorl %eax, %eax ucomisd %xmm3, %xmm0 setae %r9b jb 0x8e94f subsd %xmm3, %xmm0 xorl %r10d, %r10d ucomisd %xmm3, %xmm1 setae %r10b movapd %xmm3, %xmm4 cmpnlesd %xmm1, %xmm4 movapd %xmm4, %xmm5 andpd %xmm1, %xmm4 subsd %xmm3, %xmm1 andnpd %xmm1, %xmm5 orpd %xmm5, %xmm4 movb %r9b, %al leaq (%rax,%r10,2), %rax movapd %xmm4, %xmm1 jmp 0x8ea03 testb $0x1, %r8b je 0x8e99e ucomisd %xmm0, %xmm3 jbe 0x8e9bd subsd %xmm3, %xmm1 movl $0x1, %eax movb $0x1, %r8b jmp 0x8ea03 ucomisd %xmm3, %xmm0 jae 0x8e9e8 ucomisd %xmm3, %xmm1 jae 0x8e9f3 movapd %xmm0, %xmm4 addsd %xmm1, %xmm4 ucomisd %xmm3, %xmm4 jae 0x8ea35 xorl %r8d, %r8d jmp 0x8ea01 ucomisd %xmm1, %xmm3 subsd %xmm3, %xmm0 movl $0x2, %eax movb $0x1, %r8b ja 0x8ea03 subsd %xmm3, %xmm1 movapd %xmm1, %xmm4 addsd %xmm0, %xmm4 ucomisd %xmm4, %xmm3 jbe 0x8ea01 movl $0x3, %eax jmp 0x8ea03 subsd %xmm3, %xmm0 movl $0x1, %eax jmp 0x8e9fc subsd %xmm3, %xmm1 movl $0x2, %eax xorl %r8d, %r8d jmp 0x8ea03 xorl %eax, %eax movl 0x4(%rcx,%rax,4), %eax testb $0x2, %al jne 0x8ea64 movl %eax, %r9d shrl $0x2, %r9d andl $0xfffffff, %r9d # imm = 0xFFFFFFF testb $0x1, %al leaq (%r9,%r9,4), %rax leaq (%rsi,%rax,4), %rax cmovneq %rax, %rcx mulsd %xmm2, %xmm3 decl %edx jne 0x8e939 jmp 0x8ea3f movl $0x3, %eax jmp 0x8e999 movl (%rcx), %eax testl %eax, %eax jns 0x8ea6c leaq 0x33e3b(%rip), %rdi # 0xc2887 leaq 0x33c4e(%rip), %rsi # 0xc26a1 leaq 0x33e43(%rip), %rcx # 0xc289d movl $0x1db, %edx # imm = 0x1DB callq 0x39540 shrl $0x2, %eax andl $0xfffffff, %eax # imm = 0xFFFFFFF popq %rcx retq
_ZNK10OpenSubdiv6v3_6_03Bfr9PatchTree14searchQuadtreeEddii: push rax movsxd rax, esi mov rsi, [rdi+60h] lea rax, [rax+rax*4] lea rcx, [rsi+rax*4] mov eax, [rdi+78h] test eax, eax jz short loc_8E8F6 test edx, edx js short loc_8E8D6 test byte ptr [rdi], 2 jnz short loc_8E8D8 loc_8E8D6: mov edx, eax loc_8E8D8: xor eax, eax cmp dword ptr [rdi+18h], 0 setnle al cmp edx, eax jnz short loc_8E91F mov eax, [rcx] test eax, eax jns loc_8EA6C mov edx, 1 jmp short loc_8E927 loc_8E8F6: mov eax, [rcx] test eax, eax jns loc_8EA6C lea rdi, aNodePatchindex; "node->patchIndex >= 0" lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github/2025_star3"... lea rcx, aIntOpensubdivV_27; "int OpenSubdiv::v3_6_0::Bfr::PatchTree:"... mov edx, 1BBh call ___assert_fail loc_8E91F: test edx, edx jle loc_8EA3F loc_8E927: mov dil, [rdi] movsd xmm2, cs:qword_B75C0 xor r8d, r8d movapd xmm3, xmm2 loc_8E939: test dil, 4 jnz short loc_8E984 xor eax, eax ucomisd xmm0, xmm3 setnb r9b jb short loc_8E94F subsd xmm0, xmm3 loc_8E94F: xor r10d, r10d ucomisd xmm1, xmm3 setnb r10b movapd xmm4, xmm3 cmpnlesd xmm4, xmm1 movapd xmm5, xmm4 andpd xmm4, xmm1 subsd xmm1, xmm3 andnpd xmm5, xmm1 orpd xmm4, xmm5 mov al, r9b lea rax, [rax+r10*2] movapd xmm1, xmm4 jmp short loc_8EA03 loc_8E984: test r8b, 1 jz short loc_8E99E ucomisd xmm3, xmm0 jbe short loc_8E9BD subsd xmm1, xmm3 mov eax, 1 loc_8E999: mov r8b, 1 jmp short loc_8EA03 loc_8E99E: ucomisd xmm0, xmm3 jnb short loc_8E9E8 ucomisd xmm1, xmm3 jnb short loc_8E9F3 movapd xmm4, xmm0 addsd xmm4, xmm1 ucomisd xmm4, xmm3 jnb short loc_8EA35 xor r8d, r8d jmp short loc_8EA01 loc_8E9BD: ucomisd xmm3, xmm1 subsd xmm0, xmm3 mov eax, 2 mov r8b, 1 ja short loc_8EA03 subsd xmm1, xmm3 movapd xmm4, xmm1 addsd xmm4, xmm0 ucomisd xmm3, xmm4 jbe short loc_8EA01 mov eax, 3 jmp short loc_8EA03 loc_8E9E8: subsd xmm0, xmm3 mov eax, 1 jmp short loc_8E9FC loc_8E9F3: subsd xmm1, xmm3 mov eax, 2 loc_8E9FC: xor r8d, r8d jmp short loc_8EA03 loc_8EA01: xor eax, eax loc_8EA03: mov eax, [rcx+rax*4+4] test al, 2 jnz short loc_8EA64 mov r9d, eax shr r9d, 2 and r9d, 0FFFFFFFh test al, 1 lea rax, [r9+r9*4] lea rax, [rsi+rax*4] cmovnz rcx, rax mulsd xmm3, xmm2 dec edx jnz loc_8E939 jmp short loc_8EA3F loc_8EA35: mov eax, 3 jmp loc_8E999 loc_8EA3F: mov eax, [rcx] test eax, eax jns short loc_8EA6C lea rdi, aNodePatchindex; "node->patchIndex >= 0" lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github/2025_star3"... lea rcx, aIntOpensubdivV_27; "int OpenSubdiv::v3_6_0::Bfr::PatchTree:"... mov edx, 1DBh call ___assert_fail loc_8EA64: shr eax, 2 and eax, 0FFFFFFFh loc_8EA6C: pop rcx retn
long long OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree( OpenSubdiv::v3_6_0::Bfr::PatchTree *this, double a2, __m128d a3, int a4, int a5) { long long v5; // rax long long v6; // rsi unsigned int *v7; // rcx long long result; // rax char v9; // di char v10; // r8 __m128d v11; // xmm3 long long v12; // rax bool v13; // r9 _BOOL8 v14; // r10 __m128d v15; // xmm5 __m128d v16; // xmm4 long long v17; // rax unsigned int v18; // eax v5 = a4; v6 = *((_QWORD *)this + 12); v7 = (unsigned int *)(v6 + 20 * v5); if ( *((_DWORD *)this + 30) ) { if ( a5 < 0 || (*(_BYTE *)this & 2) == 0 ) a5 = *((_DWORD *)this + 30); if ( a5 == *((_DWORD *)this + 6) > 0 ) { result = *v7; if ( (int)result >= 0 ) return result; a5 = 1; goto LABEL_11; } if ( a5 > 0 ) { LABEL_11: v9 = *(_BYTE *)this; v10 = 0; v11 = (__m128d)0x3FE0000000000000uLL; do { if ( (v9 & 4) != 0 ) { if ( (v10 & 1) == 0 ) { if ( a2 >= v11.m128d_f64[0] ) { a2 = a2 - v11.m128d_f64[0]; v17 = 1LL; LABEL_29: v10 = 0; goto LABEL_31; } if ( a3.m128d_f64[0] >= v11.m128d_f64[0] ) { a3.m128d_f64[0] = a3.m128d_f64[0] - v11.m128d_f64[0]; v17 = 2LL; goto LABEL_29; } if ( a2 + a3.m128d_f64[0] >= v11.m128d_f64[0] ) { v17 = 3LL; goto LABEL_19; } v10 = 0; goto LABEL_30; } if ( v11.m128d_f64[0] > a2 ) { a3.m128d_f64[0] = a3.m128d_f64[0] - v11.m128d_f64[0]; v17 = 1LL; LABEL_19: v10 = 1; goto LABEL_31; } a2 = a2 - v11.m128d_f64[0]; v17 = 2LL; v10 = 1; if ( v11.m128d_f64[0] <= a3.m128d_f64[0] ) { a3.m128d_f64[0] = a3.m128d_f64[0] - v11.m128d_f64[0]; if ( v11.m128d_f64[0] > a3.m128d_f64[0] + a2 ) { v17 = 3LL; goto LABEL_31; } LABEL_30: v17 = 0LL; } } else { v12 = 0LL; v13 = a2 >= v11.m128d_f64[0]; if ( a2 >= v11.m128d_f64[0] ) a2 = a2 - v11.m128d_f64[0]; v14 = a3.m128d_f64[0] >= v11.m128d_f64[0]; v15 = _mm_cmpgt_sd(v11, a3); v16 = _mm_and_pd(v15, a3); a3.m128d_f64[0] = a3.m128d_f64[0] - v11.m128d_f64[0]; LOBYTE(v12) = v13; v17 = v12 + 2 * v14; a3 = _mm_or_pd(v16, _mm_andn_pd(v15, a3)); } LABEL_31: v18 = v7[v17 + 1]; if ( (v18 & 2) != 0 ) return (v18 >> 2) & 0xFFFFFFF; if ( (v18 & 1) != 0 ) v7 = (unsigned int *)(v6 + 20LL * ((v18 >> 2) & 0xFFFFFFF)); v11.m128d_f64[0] = v11.m128d_f64[0] * 0.5; --a5; } while ( a5 ); } result = *v7; if ( (int)result < 0 ) __assert_fail( "node->patchIndex >= 0", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTree.cpp", 475LL, "int OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double, double, int, int) const"); } else { result = *v7; if ( (int)result < 0 ) __assert_fail( "node->patchIndex >= 0", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTree.cpp", 443LL, "int OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double, double, int, int) const"); } return result; }
searchQuadtree: PUSH RAX MOVSXD RAX,ESI MOV RSI,qword ptr [RDI + 0x60] LEA RAX,[RAX + RAX*0x4] LEA RCX,[RSI + RAX*0x4] MOV EAX,dword ptr [RDI + 0x78] TEST EAX,EAX JZ 0x0018e8f6 TEST EDX,EDX JS 0x0018e8d6 TEST byte ptr [RDI],0x2 JNZ 0x0018e8d8 LAB_0018e8d6: MOV EDX,EAX LAB_0018e8d8: XOR EAX,EAX CMP dword ptr [RDI + 0x18],0x0 SETG AL CMP EDX,EAX JNZ 0x0018e91f MOV EAX,dword ptr [RCX] TEST EAX,EAX JNS 0x0018ea6c MOV EDX,0x1 JMP 0x0018e927 LAB_0018e8f6: MOV EAX,dword ptr [RCX] TEST EAX,EAX JNS 0x0018ea6c LEA RDI,[0x1c2887] LEA RSI,[0x1c26a1] LEA RCX,[0x1c289d] MOV EDX,0x1bb CALL 0x00139540 LAB_0018e91f: TEST EDX,EDX JLE 0x0018ea3f LAB_0018e927: MOV DIL,byte ptr [RDI] MOVSD XMM2,qword ptr [0x001b75c0] XOR R8D,R8D MOVAPD XMM3,XMM2 LAB_0018e939: TEST DIL,0x4 JNZ 0x0018e984 XOR EAX,EAX UCOMISD XMM0,XMM3 SETNC R9B JC 0x0018e94f SUBSD XMM0,XMM3 LAB_0018e94f: XOR R10D,R10D UCOMISD XMM1,XMM3 SETNC R10B MOVAPD XMM4,XMM3 CMPNLESD XMM4,XMM1 MOVAPD XMM5,XMM4 ANDPD XMM4,XMM1 SUBSD XMM1,XMM3 ANDNPD XMM5,XMM1 ORPD XMM4,XMM5 MOV AL,R9B LEA RAX,[RAX + R10*0x2] MOVAPD XMM1,XMM4 JMP 0x0018ea03 LAB_0018e984: TEST R8B,0x1 JZ 0x0018e99e UCOMISD XMM3,XMM0 JBE 0x0018e9bd SUBSD XMM1,XMM3 MOV EAX,0x1 LAB_0018e999: MOV R8B,0x1 JMP 0x0018ea03 LAB_0018e99e: UCOMISD XMM0,XMM3 JNC 0x0018e9e8 UCOMISD XMM1,XMM3 JNC 0x0018e9f3 MOVAPD XMM4,XMM0 ADDSD XMM4,XMM1 UCOMISD XMM4,XMM3 JNC 0x0018ea35 XOR R8D,R8D JMP 0x0018ea01 LAB_0018e9bd: UCOMISD XMM3,XMM1 SUBSD XMM0,XMM3 MOV EAX,0x2 MOV R8B,0x1 JA 0x0018ea03 SUBSD XMM1,XMM3 MOVAPD XMM4,XMM1 ADDSD XMM4,XMM0 UCOMISD XMM3,XMM4 JBE 0x0018ea01 MOV EAX,0x3 JMP 0x0018ea03 LAB_0018e9e8: SUBSD XMM0,XMM3 MOV EAX,0x1 JMP 0x0018e9fc LAB_0018e9f3: SUBSD XMM1,XMM3 MOV EAX,0x2 LAB_0018e9fc: XOR R8D,R8D JMP 0x0018ea03 LAB_0018ea01: XOR EAX,EAX LAB_0018ea03: MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4] TEST AL,0x2 JNZ 0x0018ea64 MOV R9D,EAX SHR R9D,0x2 AND R9D,0xfffffff TEST AL,0x1 LEA RAX,[R9 + R9*0x4] LEA RAX,[RSI + RAX*0x4] CMOVNZ RCX,RAX MULSD XMM3,XMM2 DEC EDX JNZ 0x0018e939 JMP 0x0018ea3f LAB_0018ea35: MOV EAX,0x3 JMP 0x0018e999 LAB_0018ea3f: MOV EAX,dword ptr [RCX] TEST EAX,EAX JNS 0x0018ea6c LEA RDI,[0x1c2887] LEA RSI,[0x1c26a1] LEA RCX,[0x1c289d] MOV EDX,0x1db CALL 0x00139540 LAB_0018ea64: SHR EAX,0x2 AND EAX,0xfffffff LAB_0018ea6c: POP RCX RET
/* OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double, double, int, int) const */ uint __thiscall OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree (PatchTree *this,double param_1,double param_2,int param_3,int param_4) { uint uVar1; bool bVar2; bool bVar3; long lVar4; uint *puVar5; bool bVar6; double dVar7; puVar5 = (uint *)(*(long *)(this + 0x60) + (long)param_3 * 0x14); if (*(uint *)(this + 0x78) == 0) { if (-1 < (int)*puVar5) { return *puVar5; } /* WARNING: Subroutine does not return */ __assert_fail("node->patchIndex >= 0", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTree.cpp" ,0x1bb, "int OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double, double, int, int) const" ); } if ((param_4 < 0) || (((byte)*this & 2) == 0)) { param_4 = *(uint *)(this + 0x78); } if (param_4 == (uint)(0 < *(int *)(this + 0x18))) { if (-1 < (int)*puVar5) { return *puVar5; } param_4 = 1; } else if (param_4 < 1) goto LAB_0018ea3f; bVar6 = false; dVar7 = DAT_001b75c0; do { if (((byte)*this & 4) == 0) { bVar2 = dVar7 <= param_1; if (bVar2) { param_1 = param_1 - dVar7; } bVar3 = dVar7 <= param_2; param_2 = (double)(-(ulong)(param_2 < dVar7) & (ulong)param_2 | ~-(ulong)(param_2 < dVar7) & (ulong)(param_2 - dVar7)); lVar4 = (ulong)bVar2 + (ulong)bVar3 * 2; } else if (bVar6) { if (dVar7 <= param_1) { param_1 = param_1 - dVar7; lVar4 = 2; bVar6 = true; if (dVar7 <= param_2) { param_2 = param_2 - dVar7; if (dVar7 <= param_2 + param_1) { LAB_0018ea01: lVar4 = 0; } else { lVar4 = 3; } } } else { param_2 = param_2 - dVar7; lVar4 = 1; LAB_0018e999: bVar6 = true; } } else { if (dVar7 <= param_1) { param_1 = param_1 - dVar7; lVar4 = 1; } else { if (param_2 < dVar7) { if (param_1 + param_2 < dVar7) { bVar6 = false; goto LAB_0018ea01; } lVar4 = 3; goto LAB_0018e999; } param_2 = param_2 - dVar7; lVar4 = 2; } bVar6 = false; } uVar1 = puVar5[lVar4 + 1]; if ((uVar1 & 2) != 0) { return uVar1 >> 2 & 0xfffffff; } if ((uVar1 & 1) != 0) { puVar5 = (uint *)(*(long *)(this + 0x60) + (ulong)(uVar1 >> 2 & 0xfffffff) * 0x14); } dVar7 = dVar7 * DAT_001b75c0; param_4 = param_4 - 1; } while (param_4 != 0); LAB_0018ea3f: if (-1 < (int)*puVar5) { return *puVar5; } /* WARNING: Subroutine does not return */ __assert_fail("node->patchIndex >= 0", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTree.cpp" ,0x1db, "int OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double, double, int, int) const" ); }
39,170
hi0bits
eloqsql/strings/dtoa.c
static int hi0bits(register ULong x) { register int k= 0; if (!(x & 0xffff0000)) { k= 16; x<<= 16; } if (!(x & 0xff000000)) { k+= 8; x<<= 8; } if (!(x & 0xf0000000)) { k+= 4; x<<= 4; } if (!(x & 0xc0000000)) { k+= 2; x<<= 2; } if (!(x & 0x80000000)) { k++; if (!(x & 0x40000000)) return 32; } return k; }
O0
c
hi0bits: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0x8(%rbp), %eax andl $0xffff0000, %eax # imm = 0xFFFF0000 cmpl $0x0, %eax jne 0xaa01b movl $0x10, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x10, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xff000000, %eax # imm = 0xFF000000 cmpl $0x0, %eax jne 0xaa03a movl -0xc(%rbp), %eax addl $0x8, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x8, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xf0000000, %eax # imm = 0xF0000000 cmpl $0x0, %eax jne 0xaa059 movl -0xc(%rbp), %eax addl $0x4, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x4, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xc0000000, %eax # imm = 0xC0000000 cmpl $0x0, %eax jne 0xaa078 movl -0xc(%rbp), %eax addl $0x2, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x2, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax jne 0xaa0a6 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax andl $0x40000000, %eax # imm = 0x40000000 cmpl $0x0, %eax jne 0xaa0a4 movl $0x20, -0x4(%rbp) jmp 0xaa0ac jmp 0xaa0a6 movl -0xc(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
hi0bits: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_C], 0 mov eax, [rbp+var_8] and eax, 0FFFF0000h cmp eax, 0 jnz short loc_AA01B mov [rbp+var_C], 10h mov eax, [rbp+var_8] shl eax, 10h mov [rbp+var_8], eax loc_AA01B: mov eax, [rbp+var_8] and eax, 0FF000000h cmp eax, 0 jnz short loc_AA03A mov eax, [rbp+var_C] add eax, 8 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 8 mov [rbp+var_8], eax loc_AA03A: mov eax, [rbp+var_8] and eax, 0F0000000h cmp eax, 0 jnz short loc_AA059 mov eax, [rbp+var_C] add eax, 4 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 4 mov [rbp+var_8], eax loc_AA059: mov eax, [rbp+var_8] and eax, 0C0000000h cmp eax, 0 jnz short loc_AA078 mov eax, [rbp+var_C] add eax, 2 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 2 mov [rbp+var_8], eax loc_AA078: mov eax, [rbp+var_8] and eax, 80000000h cmp eax, 0 jnz short loc_AA0A6 mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax mov eax, [rbp+var_8] and eax, 40000000h cmp eax, 0 jnz short loc_AA0A4 mov [rbp+var_4], 20h ; ' ' jmp short loc_AA0AC loc_AA0A4: jmp short $+2 loc_AA0A6: mov eax, [rbp+var_C] mov [rbp+var_4], eax loc_AA0AC: mov eax, [rbp+var_4] pop rbp retn
long long hi0bits(int a1) { unsigned int v2; // [rsp+0h] [rbp-Ch] int v3; // [rsp+4h] [rbp-8h] v3 = a1; v2 = 0; if ( (a1 & 0xFFFF0000) == 0 ) { v2 = 16; v3 = a1 << 16; } if ( (v3 & 0xFF000000) == 0 ) { v2 += 8; v3 <<= 8; } if ( (v3 & 0xF0000000) == 0 ) { v2 += 4; v3 *= 16; } if ( (v3 & 0xC0000000) == 0 ) { v2 += 2; v3 *= 4; } if ( v3 < 0 ) return v2; ++v2; if ( (v3 & 0x40000000) != 0 ) return v2; else return 32; }
hi0bits: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],0x0 MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xffff0000 CMP EAX,0x0 JNZ 0x001aa01b MOV dword ptr [RBP + -0xc],0x10 MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x10 MOV dword ptr [RBP + -0x8],EAX LAB_001aa01b: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xff000000 CMP EAX,0x0 JNZ 0x001aa03a MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x8 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x8 MOV dword ptr [RBP + -0x8],EAX LAB_001aa03a: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xf0000000 CMP EAX,0x0 JNZ 0x001aa059 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x4 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x4 MOV dword ptr [RBP + -0x8],EAX LAB_001aa059: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xc0000000 CMP EAX,0x0 JNZ 0x001aa078 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x2 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x2 MOV dword ptr [RBP + -0x8],EAX LAB_001aa078: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0x80000000 CMP EAX,0x0 JNZ 0x001aa0a6 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] AND EAX,0x40000000 CMP EAX,0x0 JNZ 0x001aa0a4 MOV dword ptr [RBP + -0x4],0x20 JMP 0x001aa0ac LAB_001aa0a4: JMP 0x001aa0a6 LAB_001aa0a6: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x4],EAX LAB_001aa0ac: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int hi0bits(uint param_1) { int local_14; uint local_10; int local_c; local_14 = 0; local_10 = param_1; if ((param_1 & 0xffff0000) == 0) { local_14 = 0x10; local_10 = param_1 << 0x10; } if ((local_10 & 0xff000000) == 0) { local_14 = local_14 + 8; local_10 = local_10 << 8; } if ((local_10 & 0xf0000000) == 0) { local_14 = local_14 + 4; local_10 = local_10 << 4; } if ((local_10 & 0xc0000000) == 0) { local_14 = local_14 + 2; local_10 = local_10 << 2; } if (((local_10 & 0x80000000) == 0) && (local_14 = local_14 + 1, (local_10 & 0x40000000) == 0)) { local_c = 0x20; } else { local_c = local_14; } return local_c; }
39,171
add_fast_array_element
bluesky950520[P]quickjs/quickjs.c
static int add_fast_array_element(JSContext *ctx, JSObject *p, JSValue val, int flags) { uint32_t new_len, array_len; /* extend the array by one */ /* XXX: convert to slow array if new_len > 2^31-1 elements */ new_len = p->u.array.count + 1; /* update the length if necessary. We assume that if the length is not an integer, then if it >= 2^31. */ if (likely(JS_VALUE_GET_TAG(p->prop[0].u.value) == JS_TAG_INT)) { array_len = JS_VALUE_GET_INT(p->prop[0].u.value); if (new_len > array_len) { if (unlikely(!(get_shape_prop(p->shape)->flags & JS_PROP_WRITABLE))) { JS_FreeValue(ctx, val); return JS_ThrowTypeErrorReadOnly(ctx, flags, JS_ATOM_length); } p->prop[0].u.value = js_int32(new_len); } } if (unlikely(new_len > p->u.array.u1.size)) { if (expand_fast_array(ctx, p, new_len)) { JS_FreeValue(ctx, val); return -1; } } p->u.array.u.values[new_len - 1] = val; p->u.array.count = new_len; return TRUE; }
O0
c
add_fast_array_element: subq $0x58, %rsp movq %rdx, 0x40(%rsp) movq %rcx, 0x48(%rsp) movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movl %r8d, 0x2c(%rsp) movq 0x30(%rsp), %rax movl 0x40(%rax), %eax addl $0x1, %eax movl %eax, 0x28(%rsp) movq 0x30(%rsp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rax cmpl $0x0, %eax sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x60f2c movq 0x30(%rsp), %rax movq 0x20(%rax), %rax movl (%rax), %eax movl %eax, 0x24(%rsp) movl 0x28(%rsp), %eax cmpl 0x24(%rsp), %eax jbe 0x60f2a movq 0x30(%rsp), %rax movq 0x18(%rax), %rdi callq 0x2c280 movl (%rax), %eax shrl $0x1a, %eax andl $0x2, %eax cmpl $0x0, %eax setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x60ef0 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x23c90 movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movl $0x32, %edx callq 0x60fd0 movl %eax, 0x54(%rsp) jmp 0x60fc2 movq 0x30(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x8(%rsp) movl 0x28(%rsp), %edi callq 0x33cc0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rcx movq %rcx, (%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0x60f2c movl 0x28(%rsp), %eax movq 0x30(%rsp), %rcx cmpl 0x30(%rcx), %eax seta %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x60f84 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi movl 0x28(%rsp), %edx callq 0x61050 cmpl $0x0, %eax je 0x60f82 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x23c90 movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF jmp 0x60fc2 jmp 0x60f84 movq 0x30(%rsp), %rax movq 0x38(%rax), %rax movl 0x28(%rsp), %ecx subl $0x1, %ecx movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x40(%rsp), %rcx movq %rcx, (%rax) movq 0x48(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0x28(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, 0x40(%rax) movl $0x1, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nopl (%rax,%rax)
add_fast_array_element: sub rsp, 58h mov [rsp+58h+var_18], rdx mov [rsp+58h+var_10], rcx mov [rsp+58h+var_20], rdi mov [rsp+58h+var_28], rsi mov [rsp+58h+var_2C], r8d mov rax, [rsp+58h+var_28] mov eax, [rax+40h] add eax, 1 mov [rsp+58h+var_30], eax mov rax, [rsp+58h+var_28] mov rax, [rax+20h] mov rax, [rax+8] cmp eax, 0 setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_60F2C mov rax, [rsp+58h+var_28] mov rax, [rax+20h] mov eax, [rax] mov [rsp+58h+var_34], eax mov eax, [rsp+58h+var_30] cmp eax, [rsp+58h+var_34] jbe loc_60F2A mov rax, [rsp+58h+var_28] mov rdi, [rax+18h] call get_shape_prop mov eax, [rax] shr eax, 1Ah and eax, 2 cmp eax, 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_60EF0 mov rdi, [rsp+58h+var_20] mov rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_10] call JS_FreeValue mov rdi, [rsp+58h+var_20] mov esi, [rsp+58h+var_2C] mov edx, 32h ; '2' call JS_ThrowTypeErrorReadOnly mov [rsp+58h+var_4], eax jmp loc_60FC2 loc_60EF0: mov rax, [rsp+58h+var_28] mov rax, [rax+20h] mov [rsp+58h+var_50], rax mov edi, [rsp+58h+var_30] call js_int32 mov rcx, rax mov rax, [rsp+58h+var_50] mov [rsp+58h+var_48], rcx mov [rsp+58h+var_40], rdx mov rcx, [rsp+58h+var_48] mov [rax], rcx mov rcx, [rsp+58h+var_40] mov [rax+8], rcx loc_60F2A: jmp short $+2 loc_60F2C: mov eax, [rsp+58h+var_30] mov rcx, [rsp+58h+var_28] cmp eax, [rcx+30h] setnbe al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_60F84 mov rdi, [rsp+58h+var_20] mov rsi, [rsp+58h+var_28] mov edx, [rsp+58h+var_30] call expand_fast_array cmp eax, 0 jz short loc_60F82 mov rdi, [rsp+58h+var_20] mov rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_10] call JS_FreeValue mov [rsp+58h+var_4], 0FFFFFFFFh jmp short loc_60FC2 loc_60F82: jmp short $+2 loc_60F84: mov rax, [rsp+58h+var_28] mov rax, [rax+38h] mov ecx, [rsp+58h+var_30] sub ecx, 1 mov ecx, ecx shl rcx, 4 add rax, rcx mov rcx, [rsp+58h+var_18] mov [rax], rcx mov rcx, [rsp+58h+var_10] mov [rax+8], rcx mov ecx, [rsp+58h+var_30] mov rax, [rsp+58h+var_28] mov [rax+40h], ecx mov [rsp+58h+var_4], 1 loc_60FC2: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long add_fast_array_element(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v5; // rdx long long *v6; // rax long long *v8; // [rsp+8h] [rbp-50h] unsigned int v9; // [rsp+28h] [rbp-30h] v9 = *(_DWORD *)(a2 + 64) + 1; if ( !(unsigned int)*(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL) && v9 > **(_DWORD **)(a2 + 32) ) { if ( ((*(_DWORD *)get_shape_prop(*(_QWORD *)(a2 + 24)) >> 26) & 2) == 0 ) { JS_FreeValue(a1, a3, a4); return (unsigned int)JS_ThrowTypeErrorReadOnly(a1, a5, 50LL); } v8 = *(long long **)(a2 + 32); *v8 = js_int32(v9); v8[1] = v5; } if ( v9 > *(_DWORD *)(a2 + 48) && (unsigned int)expand_fast_array(a1, a2, v9) ) { JS_FreeValue(a1, a3, a4); return (unsigned int)-1; } else { v6 = (long long *)(16LL * (v9 - 1) + *(_QWORD *)(a2 + 56)); *v6 = a3; v6[1] = a4; *(_DWORD *)(a2 + 64) = v9; return 1; } }
add_fast_array_element: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV dword ptr [RSP + 0x2c],R8D MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0x40] ADD EAX,0x1 MOV dword ptr [RSP + 0x28],EAX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x8] CMP EAX,0x0 SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00160f2c MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x20] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x24],EAX MOV EAX,dword ptr [RSP + 0x28] CMP EAX,dword ptr [RSP + 0x24] JBE 0x00160f2a MOV RAX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0012c280 MOV EAX,dword ptr [RAX] SHR EAX,0x1a AND EAX,0x2 CMP EAX,0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00160ef0 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOV EDX,0x32 CALL 0x00160fd0 MOV dword ptr [RSP + 0x54],EAX JMP 0x00160fc2 LAB_00160ef0: MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0x28] CALL 0x00133cc0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],RDX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x8],RCX LAB_00160f2a: JMP 0x00160f2c LAB_00160f2c: MOV EAX,dword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX + 0x30] SETA AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00160f84 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] MOV EDX,dword ptr [RSP + 0x28] CALL 0x00161050 CMP EAX,0x0 JZ 0x00160f82 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00123c90 MOV dword ptr [RSP + 0x54],0xffffffff JMP 0x00160fc2 LAB_00160f82: JMP 0x00160f84 LAB_00160f84: MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RSP + 0x28] SUB ECX,0x1 MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0x40],ECX MOV dword ptr [RSP + 0x54],0x1 LAB_00160fc2: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
int4 add_fast_array_element (int8 param_1,long param_2,int8 param_3,int8 param_4,int4 param_5) { uint uVar1; int1 (*pauVar2) [16]; uint uVar3; int4 uVar4; int iVar5; uint *puVar6; int8 *puVar7; int1 auVar8 [16]; int4 local_4; uVar1 = *(uint *)(param_2 + 0x40); uVar3 = uVar1 + 1; if (((int)*(int8 *)(*(long *)(param_2 + 0x20) + 8) == 0) && (**(uint **)(param_2 + 0x20) < uVar3)) { puVar6 = (uint *)get_shape_prop(*(int8 *)(param_2 + 0x18)); if ((*puVar6 >> 0x1a & 2) == 0) { JS_FreeValue(param_1,param_3,param_4); uVar4 = JS_ThrowTypeErrorReadOnly(param_1,param_5,0x32); return uVar4; } pauVar2 = *(int1 (**) [16])(param_2 + 0x20); auVar8 = js_int32(uVar3); *pauVar2 = auVar8; } if ((*(uint *)(param_2 + 0x30) < uVar3) && (iVar5 = expand_fast_array(param_1,param_2,uVar3), iVar5 != 0)) { JS_FreeValue(param_1,param_3,param_4); local_4 = 0xffffffff; } else { puVar7 = (int8 *)(*(long *)(param_2 + 0x38) + (ulong)uVar1 * 0x10); *puVar7 = param_3; puVar7[1] = param_4; *(uint *)(param_2 + 0x40) = uVar3; local_4 = 1; } return local_4; }
39,172
string_get_sortable_timestamp[abi:cxx11]()
llama.cpp/common/common.cpp
std::string string_get_sortable_timestamp() { using clock = std::chrono::system_clock; const clock::time_point current_time = clock::now(); const time_t as_time_t = clock::to_time_t(current_time); char timestamp_no_ns[100]; std::strftime(timestamp_no_ns, 100, "%Y_%m_%d-%H_%M_%S", std::localtime(&as_time_t)); const int64_t ns = std::chrono::duration_cast<std::chrono::nanoseconds>( current_time.time_since_epoch() % 1000000000).count(); char timestamp_ns[11]; snprintf(timestamp_ns, 11, "%09" PRId64, ns); return std::string(timestamp_no_ns) + "." + std::string(timestamp_ns); }
O3
cpp
string_get_sortable_timestamp[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rdi, %rbx callq 0x20c50 movq %rax, %r14 movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3 imulq %rcx movq %rdx, %r12 movq %rdx, %rax shrq $0x3f, %rax sarq $0x1a, %r12 addq %rax, %r12 leaq 0x78(%rsp), %rdi movq %r12, (%rdi) callq 0x20b10 leaq 0x2d8ab(%rip), %rdx # 0x12448c leaq 0x80(%rsp), %r15 movl $0x64, %esi movq %r15, %rdi movq %rax, %rcx callq 0x20f10 imulq $0x3b9aca00, %r12, %rax # imm = 0x3B9ACA00 subq %rax, %r14 leaq 0x2d894(%rip), %rdx # 0x12449e leaq 0x4d(%rsp), %rdi movl $0xb, %esi movq %r14, %rcx xorl %eax, %eax callq 0x20870 leaq 0x68(%rsp), %r13 movq %r13, -0x10(%r13) movq %r15, %rdi callq 0x20670 leaq (%rsp,%rax), %rdx addq $0x80, %rdx leaq 0x58(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x28870 leaq 0x1ffbd(%rip), %rsi # 0x116c0e movq %r14, %rdi callq 0x20b30 movq %rax, %r15 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rax movq %r15, %r12 addq $0x10, %r12 cmpq %r12, %rax je 0xf6c88 movq %rax, 0x8(%rsp) movq 0x10(%r15), %rax movq %rax, 0x18(%rsp) movq 0x8(%r15), %rbp jmp 0xf6c9b movq 0x8(%r15), %rbp leaq 0x1(%rbp), %rdx movq %r14, %rdi movq %r12, %rsi callq 0x200f0 movq %rbp, 0x10(%rsp) movq %r12, (%r15) movq $0x0, 0x8(%r15) movb $0x0, 0x10(%r15) leaq 0x38(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x4d(%rsp), %r15 movq %r15, %rdi callq 0x20670 leaq (%rsp,%rax), %rdx addq $0x4d, %rdx leaq 0x28(%rsp), %rdi movq %r15, %rsi callq 0x28870 movq 0x8(%rsp), %rcx movq 0x10(%rsp), %r8 movq 0x30(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r14, %rcx je 0xf6cfd movq 0x18(%rsp), %rdi movq 0x28(%rsp), %rsi cmpq %rdi, %rax jbe 0xf6d1b movl $0xf, %edi cmpq %rbp, %rsi je 0xf6d16 movq 0x38(%rsp), %rdi cmpq %rdi, %rax jbe 0xf6d27 leaq 0x8(%rsp), %rdi callq 0x20550 jmp 0xf6d35 leaq 0x28(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x20240 movq %rax, %r12 leaq 0x10(%rbx), %rdi movq %rdi, (%rbx) movq (%rax), %rax leaq 0x10(%r12), %r15 cmpq %r15, %rax je 0xf6d58 movq %rax, (%rbx) movq (%r15), %rax movq %rax, 0x10(%rbx) jmp 0xf6d68 movq 0x8(%r12), %rdx incq %rdx movq %r15, %rsi callq 0x200f0 movq %r12, %rax addq $0x8, %rax movq 0x8(%r12), %rcx movq %rcx, 0x8(%rbx) movq %r15, (%r12) movq $0x0, (%rax) movb $0x0, (%r15) movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0xf6d9e movq 0x38(%rsp), %rsi incq %rsi callq 0x20180 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0xf6db5 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 movq 0x58(%rsp), %rdi cmpq %r13, %rdi je 0xf6dcc movq 0x68(%rsp), %rsi incq %rsi callq 0x20180 movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0xf6e00 movq 0x38(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xf6e00 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0xf6e1c movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xf6e1c movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r13, %rdi je 0xf6e33 movq 0x68(%rsp), %rsi incq %rsi callq 0x20180 movq %rbx, %rdi callq 0x20ae0
_Z29string_get_sortable_timestampB5cxx11v: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov rbx, rdi call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov r14, rax mov rcx, 112E0BE826D694B3h imul rcx mov r12, rdx mov rax, rdx shr rax, 3Fh sar r12, 1Ah add r12, rax lea rdi, [rsp+118h+var_A0] mov [rdi], r12 call _localtime lea rdx, aYMDHMS; "%Y_%m_%d-%H_%M_%S" lea r15, [rsp+118h+var_98] mov esi, 64h ; 'd' mov rdi, r15 mov rcx, rax call _strftime imul rax, r12, 3B9ACA00h sub r14, rax lea rdx, a09ld; "%09ld" lea rdi, [rsp+118h+var_CB] mov esi, 0Bh mov rcx, r14 xor eax, eax call _snprintf lea r13, [rsp+118h+var_B0] mov [r13-10h], r13 mov rdi, r15 call _strlen lea rdx, [rsp+rax+118h+var_118] add rdx, 80h lea r14, [rsp+118h+var_C0] mov rdi, r14 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, aN0N1+8; "." mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov r15, rax lea r14, [rsp+118h+var_100] mov [r14-10h], r14 mov rax, [rax] mov r12, r15 add r12, 10h cmp rax, r12 jz short loc_F6C88 mov [rsp+118h+var_110], rax mov rax, [r15+10h] mov [rsp+118h+var_100], rax mov rbp, [r15+8] jmp short loc_F6C9B loc_F6C88: mov rbp, [r15+8] lea rdx, [rbp+1] mov rdi, r14 mov rsi, r12 call _memcpy loc_F6C9B: mov [rsp+118h+var_108], rbp mov [r15], r12 mov qword ptr [r15+8], 0 mov byte ptr [r15+10h], 0 lea rbp, [rsp+118h+var_E0] mov [rbp-10h], rbp lea r15, [rsp+118h+var_CB] mov rdi, r15 call _strlen lea rdx, [rsp+rax+118h+var_118] add rdx, 4Dh ; 'M' lea rdi, [rsp+118h+var_F0] 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) mov rcx, [rsp+118h+var_110] mov r8, [rsp+118h+var_108] mov rdx, [rsp+118h+var_E8] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r14 jz short loc_F6CFD mov rdi, [rsp+118h+var_100] loc_F6CFD: mov rsi, [rsp+118h+var_F0] cmp rax, rdi jbe short loc_F6D1B mov edi, 0Fh cmp rsi, rbp jz short loc_F6D16 mov rdi, [rsp+118h+var_E0] loc_F6D16: cmp rax, rdi jbe short loc_F6D27 loc_F6D1B: lea rdi, [rsp+118h+var_110] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) jmp short loc_F6D35 loc_F6D27: lea rdi, [rsp+118h+var_F0] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_F6D35: mov r12, rax lea rdi, [rbx+10h] mov [rbx], rdi mov rax, [rax] lea r15, [r12+10h] cmp rax, r15 jz short loc_F6D58 mov [rbx], rax mov rax, [r15] mov [rbx+10h], rax jmp short loc_F6D68 loc_F6D58: mov rdx, [r12+8] inc rdx mov rsi, r15 call _memcpy loc_F6D68: mov rax, r12 add rax, 8 mov rcx, [r12+8] mov [rbx+8], rcx mov [r12], r15 mov qword ptr [rax], 0 mov byte ptr [r15], 0 mov rdi, [rsp+118h+var_F0]; void * cmp rdi, rbp jz short loc_F6D9E mov rsi, [rsp+118h+var_E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F6D9E: mov rdi, [rsp+118h+var_110]; void * cmp rdi, r14 jz short loc_F6DB5 mov rsi, [rsp+118h+var_100] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F6DB5: mov rdi, [rsp+118h+var_C0]; void * cmp rdi, r13 jz short loc_F6DCC mov rsi, [rsp+118h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F6DCC: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, rbp jz short loc_F6E00 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F6E00 mov rbx, rax loc_F6E00: mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_F6E1C mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F6E1C mov rbx, rax loc_F6E1C: mov rdi, [rsp+arg_50]; void * cmp rdi, r13 jz short loc_F6E33 mov rsi, [rsp+arg_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F6E33: mov rdi, rbx call __Unwind_Resume
std::chrono::_V2::system_clock * string_get_sortable_timestamp[abi:cxx11](std::chrono::_V2::system_clock *a1) { long long v2; // r14 long long v3; // rax long long v4; // rax long long v5; // r15 long long v6; // rbp long long v7; // rax unsigned long long v8; // rax unsigned long long v9; // rdi unsigned long long v10; // rdi _QWORD *v11; // rax _QWORD *v12; // r12 _QWORD *v13; // rax _QWORD *v14; // r15 void *v16; // [rsp+8h] [rbp-110h] BYREF long long v17; // [rsp+10h] [rbp-108h] _QWORD v18[2]; // [rsp+18h] [rbp-100h] BYREF void *v19; // [rsp+28h] [rbp-F0h] BYREF long long v20; // [rsp+30h] [rbp-E8h] _QWORD v21[2]; // [rsp+38h] [rbp-E0h] BYREF _BYTE v22[11]; // [rsp+4Dh] [rbp-CBh] BYREF void *v23[2]; // [rsp+58h] [rbp-C0h] BYREF _QWORD v24[3]; // [rsp+68h] [rbp-B0h] BYREF _BYTE v25[152]; // [rsp+80h] [rbp-98h] BYREF v2 = std::chrono::_V2::system_clock::now(a1); v24[2] = v2 / 1000000000; v3 = localtime(); strftime(v25, 100LL, "%Y_%m_%d-%H_%M_%S", v3); snprintf(v22, 11LL, "%09ld", v2 % 1000000000); v23[0] = v24; v4 = strlen(v25); std::string::_M_construct<char const*>((long long)v23, v25, (long long)&v25[v4]); v5 = std::string::append(v23, "."); v16 = v18; if ( *(_QWORD *)v5 == v5 + 16 ) { v6 = *(_QWORD *)(v5 + 8); memcpy(v18, v5 + 16, v6 + 1); } else { v16 = *(void **)v5; v18[0] = *(_QWORD *)(v5 + 16); v6 = *(_QWORD *)(v5 + 8); } v17 = v6; *(_QWORD *)v5 = v5 + 16; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; v19 = v21; v7 = strlen(v22); std::string::_M_construct<char const*>((long long)&v19, v22, (long long)&v22[v7]); v8 = v20 + v17; v9 = 15LL; if ( v16 != v18 ) v9 = v18[0]; if ( v8 <= v9 ) goto LABEL_10; v10 = 15LL; if ( v19 != v21 ) v10 = v21[0]; if ( v8 <= v10 ) v11 = (_QWORD *)std::string::replace(&v19, 0LL, 0LL); else LABEL_10: v11 = (_QWORD *)std::string::append(&v16, v19, v20); v12 = v11; *(_QWORD *)a1 = (char *)a1 + 16; v13 = (_QWORD *)*v11; v14 = v12 + 2; if ( v13 == v12 + 2 ) { memcpy((char *)a1 + 16, v12 + 2, v12[1] + 1LL); } else { *(_QWORD *)a1 = v13; *((_QWORD *)a1 + 2) = *v14; } *((_QWORD *)a1 + 1) = v12[1]; *v12 = v14; v12[1] = 0LL; *(_BYTE *)v14 = 0; if ( v19 != v21 ) operator delete(v19, v21[0] + 1LL); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); if ( v23[0] != v24 ) operator delete(v23[0], v24[0] + 1LL); return a1; }
string_get_sortable_timestamp[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV RBX,RDI CALL 0x00120c50 MOV R14,RAX MOV RCX,0x112e0be826d694b3 IMUL RCX MOV R12,RDX MOV RAX,RDX SHR RAX,0x3f SAR R12,0x1a ADD R12,RAX LEA RDI,[RSP + 0x78] MOV qword ptr [RDI],R12 CALL 0x00120b10 LEA RDX,[0x22448c] LEA R15,[RSP + 0x80] MOV ESI,0x64 MOV RDI,R15 MOV RCX,RAX CALL 0x00120f10 IMUL RAX,R12,0x3b9aca00 SUB R14,RAX LEA RDX,[0x22449e] LEA RDI,[RSP + 0x4d] MOV ESI,0xb MOV RCX,R14 XOR EAX,EAX CALL 0x00120870 LEA R13,[RSP + 0x68] MOV qword ptr [R13 + -0x10],R13 MOV RDI,R15 CALL 0x00120670 LEA RDX,[RSP + RAX*0x1] ADD RDX,0x80 LEA R14,[RSP + 0x58] MOV RDI,R14 MOV RSI,R15 CALL 0x00128870 LAB_001f6c4a: LEA RSI,[0x216c0e] MOV RDI,R14 CALL 0x00120b30 LAB_001f6c59: MOV R15,RAX LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 MOV RAX,qword ptr [RAX] MOV R12,R15 ADD R12,0x10 CMP RAX,R12 JZ 0x001f6c88 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RBP,qword ptr [R15 + 0x8] JMP 0x001f6c9b LAB_001f6c88: MOV RBP,qword ptr [R15 + 0x8] LEA RDX,[RBP + 0x1] MOV RDI,R14 MOV RSI,R12 CALL 0x001200f0 LAB_001f6c9b: MOV qword ptr [RSP + 0x10],RBP MOV qword ptr [R15],R12 MOV qword ptr [R15 + 0x8],0x0 MOV byte ptr [R15 + 0x10],0x0 LEA RBP,[RSP + 0x38] MOV qword ptr [RBP + -0x10],RBP LEA R15,[RSP + 0x4d] MOV RDI,R15 CALL 0x00120670 LEA RDX,[RSP + RAX*0x1] ADD RDX,0x4d LAB_001f6cce: LEA RDI,[RSP + 0x28] MOV RSI,R15 CALL 0x00128870 MOV RCX,qword ptr [RSP + 0x8] MOV R8,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x30] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R14 JZ 0x001f6cfd MOV RDI,qword ptr [RSP + 0x18] LAB_001f6cfd: MOV RSI,qword ptr [RSP + 0x28] CMP RAX,RDI JBE 0x001f6d1b MOV EDI,0xf CMP RSI,RBP JZ 0x001f6d16 MOV RDI,qword ptr [RSP + 0x38] LAB_001f6d16: CMP RAX,RDI JBE 0x001f6d27 LAB_001f6d1b: LEA RDI,[RSP + 0x8] CALL 0x00120550 JMP 0x001f6d35 LAB_001f6d27: LEA RDI,[RSP + 0x28] XOR ESI,ESI XOR EDX,EDX CALL 0x00120240 LAB_001f6d35: MOV R12,RAX LEA RDI,[RBX + 0x10] MOV qword ptr [RBX],RDI MOV RAX,qword ptr [RAX] LEA R15,[R12 + 0x10] CMP RAX,R15 JZ 0x001f6d58 MOV qword ptr [RBX],RAX MOV RAX,qword ptr [R15] MOV qword ptr [RBX + 0x10],RAX JMP 0x001f6d68 LAB_001f6d58: MOV RDX,qword ptr [R12 + 0x8] INC RDX MOV RSI,R15 CALL 0x001200f0 LAB_001f6d68: MOV RAX,R12 ADD RAX,0x8 MOV RCX,qword ptr [R12 + 0x8] MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [R12],R15 MOV qword ptr [RAX],0x0 MOV byte ptr [R15],0x0 MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBP JZ 0x001f6d9e MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00120180 LAB_001f6d9e: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x001f6db5 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120180 LAB_001f6db5: MOV RDI,qword ptr [RSP + 0x58] CMP RDI,R13 JZ 0x001f6dcc MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x00120180 LAB_001f6dcc: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* string_get_sortable_timestamp[abi:cxx11]() */ void string_get_sortable_timestamp_abi_cxx11_(void) { int8 *__src; long lVar1; tm *__tp; size_t sVar2; int8 *puVar3; int8 *in_RDI; ulong uVar4; ulong *__src_00; ulong *local_110; long local_108; ulong local_100 [2]; ulong *local_f0; long local_e8; ulong local_e0 [2]; char local_cb [11]; long *local_c0 [2]; long local_b0 [2]; long local_a0; char local_98 [104]; lVar1 = std::chrono::_V2::system_clock::now(); local_a0 = lVar1 / 1000000000; __tp = localtime(&local_a0); strftime(local_98,100,"%Y_%m_%d-%H_%M_%S",__tp); snprintf(local_cb,0xb,"%09ld",lVar1 % 1000000000); local_c0[0] = local_b0; sVar2 = strlen(local_98); std::__cxx11::string::_M_construct<char_const*>(local_c0,local_98,local_98 + sVar2); /* try { // try from 001f6c4a to 001f6c58 has its CatchHandler @ 001f6e19 */ puVar3 = (int8 *)std::__cxx11::string::append((char *)local_c0); local_110 = (ulong *)*puVar3; __src_00 = puVar3 + 2; if (local_110 == __src_00) { lVar1 = puVar3[1]; local_110 = local_100; memcpy(local_100,__src_00,lVar1 + 1); } else { local_100[0] = puVar3[2]; lVar1 = puVar3[1]; } *puVar3 = __src_00; puVar3[1] = 0; *(int1 *)(puVar3 + 2) = 0; local_108 = lVar1; local_f0 = local_e0; sVar2 = strlen(local_cb); /* try { // try from 001f6cce to 001f6cda has its CatchHandler @ 001f6dfd */ std::__cxx11::string::_M_construct<char_const*>(&local_f0,local_cb,local_cb + sVar2); uVar4 = 0xf; if (local_110 != local_100) { uVar4 = local_100[0]; } if (uVar4 < (ulong)(local_e8 + local_108)) { uVar4 = 0xf; if (local_f0 != local_e0) { uVar4 = local_e0[0]; } if ((ulong)(local_e8 + local_108) <= uVar4) { puVar3 = (int8 *) std::__cxx11::string::replace((ulong)&local_f0,0,(char *)0x0,(ulong)local_110); goto LAB_001f6d35; } } /* try { // try from 001f6d1b to 001f6d34 has its CatchHandler @ 001f6de1 */ puVar3 = (int8 *)std::__cxx11::string::append((char *)&local_110,(ulong)local_f0); LAB_001f6d35: *in_RDI = in_RDI + 2; __src = puVar3 + 2; if ((int8 *)*puVar3 == __src) { memcpy(in_RDI + 2,__src,puVar3[1] + 1); } else { *in_RDI = (int8 *)*puVar3; in_RDI[2] = *__src; } in_RDI[1] = puVar3[1]; *puVar3 = __src; puVar3[1] = 0; *(int1 *)__src = 0; if (local_f0 != local_e0) { operator_delete(local_f0,local_e0[0] + 1); } if (local_110 != local_100) { operator_delete(local_110,local_100[0] + 1); } if (local_c0[0] != local_b0) { operator_delete(local_c0[0],local_b0[0] + 1); } return; }
39,173
rsa_unblind
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/rsa.c
static int rsa_unblind(mbedtls_mpi *T, mbedtls_mpi *Vf, const mbedtls_mpi *N) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; const size_t nlimbs = N->n; const size_t tlimbs = 2 * (nlimbs + 1); mbedtls_mpi_uint mm = mbedtls_mpi_montmul_init(N->p); mbedtls_mpi RR, M_T; mbedtls_mpi_init(&RR); mbedtls_mpi_init(&M_T); MBEDTLS_MPI_CHK(mbedtls_mpi_get_mont_r2_unsafe(&RR, N)); MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&M_T, tlimbs)); MBEDTLS_MPI_CHK(mbedtls_mpi_grow(T, nlimbs)); MBEDTLS_MPI_CHK(mbedtls_mpi_grow(Vf, nlimbs)); /* T = T * Vf mod N * Reminder: montmul(A, B, N) = A * B * R^-1 mod N * Usually both operands are multiplied by R mod N beforehand, yielding a * result that's also * R mod N (aka "in the Montgomery domain"). Here we * only multiply one operand by R mod N, so the result is directly what we * want - no need to call `mpi_montred()` on it. */ mbedtls_mpi_montmul(T, &RR, N, mm, &M_T); mbedtls_mpi_montmul(T, Vf, N, mm, &M_T); cleanup: mbedtls_mpi_free(&RR); mbedtls_mpi_free(&M_T); return ret; }
O3
c
rsa_unblind: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x8(%rdx), %r13 movq 0x10(%rdx), %rdi callq 0x8015e movq %rax, %r12 leaq 0x20(%rsp), %rbp movq %rbp, %rdi callq 0x7defc leaq 0x8(%rsp), %rdi callq 0x7defc movq %rbp, %rdi movq %rbx, %rsi callq 0x802f5 testl %eax, %eax jne 0x90b0e leaq 0x2(,%r13,2), %rsi leaq 0x8(%rsp), %rdi callq 0x7df41 testl %eax, %eax jne 0x90b0e movq %r15, %rdi movq %r13, %rsi callq 0x7df41 testl %eax, %eax jne 0x90b0e movq %r14, %rdi movq %r13, %rsi callq 0x7df41 testl %eax, %eax je 0x90b35 movl %eax, %ebp leaq 0x20(%rsp), %rdi callq 0x7df0a leaq 0x8(%rsp), %rdi callq 0x7df0a movl %ebp, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x20(%rsp), %rsi leaq 0x8(%rsp), %r13 movq %r15, %rdi movq %rbx, %rdx movq %r12, %rcx movq %r13, %r8 callq 0x8019b movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r12, %rcx movq %r13, %r8 callq 0x8019b xorl %ebp, %ebp jmp 0x90b10
rsa_unblind: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdx mov r14, rsi mov r15, rdi mov r13, [rdx+8] mov rdi, [rdx+10h] call mbedtls_mpi_montmul_init mov r12, rax lea rbp, [rsp+68h+var_48] mov rdi, rbp call mbedtls_mpi_init lea rdi, [rsp+68h+var_60] call mbedtls_mpi_init mov rdi, rbp mov rsi, rbx call mbedtls_mpi_get_mont_r2_unsafe test eax, eax jnz short loc_90B0E lea rsi, ds:2[r13*2] lea rdi, [rsp+68h+var_60] call mbedtls_mpi_grow test eax, eax jnz short loc_90B0E mov rdi, r15 mov rsi, r13 call mbedtls_mpi_grow test eax, eax jnz short loc_90B0E mov rdi, r14 mov rsi, r13 call mbedtls_mpi_grow test eax, eax jz short loc_90B35 loc_90B0E: mov ebp, eax loc_90B10: lea rdi, [rsp+68h+var_48] call mbedtls_mpi_free lea rdi, [rsp+68h+var_60] call mbedtls_mpi_free mov eax, ebp add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_90B35: lea rsi, [rsp+68h+var_48] lea r13, [rsp+68h+var_60] mov rdi, r15 mov rdx, rbx mov rcx, r12 mov r8, r13 call mbedtls_mpi_montmul mov rdi, r15 mov rsi, r14 mov rdx, rbx mov rcx, r12 mov r8, r13 call mbedtls_mpi_montmul xor ebp, ebp jmp short loc_90B10
long long rsa_unblind(long long a1, long long a2, long long a3) { unsigned long long v4; // r13 long long v5; // r12 unsigned int mont_r2_unsafe; // eax unsigned int v7; // ebp _BYTE v9[24]; // [rsp+8h] [rbp-60h] BYREF _BYTE v10[72]; // [rsp+20h] [rbp-48h] BYREF v4 = *(_QWORD *)(a3 + 8); v5 = mbedtls_mpi_montmul_init(*(_QWORD **)(a3 + 16)); mbedtls_mpi_init((long long)v10); mbedtls_mpi_init((long long)v9); mont_r2_unsafe = mbedtls_mpi_get_mont_r2_unsafe((long long)v10, (_QWORD *)a3); if ( mont_r2_unsafe || (mont_r2_unsafe = mbedtls_mpi_grow((long long)v9, 2 * v4 + 2)) != 0 || (mont_r2_unsafe = mbedtls_mpi_grow(a1, v4)) != 0 || (mont_r2_unsafe = mbedtls_mpi_grow(a2, v4)) != 0 ) { v7 = mont_r2_unsafe; } else { mbedtls_mpi_montmul(a1, (long long)v10, a3, v5, (long long)v9); mbedtls_mpi_montmul(a1, a2, a3, v5, (long long)v9); v7 = 0; } mbedtls_mpi_free((long long)v10); mbedtls_mpi_free((long long)v9); return v7; }
rsa_unblind: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV R13,qword ptr [RDX + 0x8] MOV RDI,qword ptr [RDX + 0x10] CALL 0x0018015e MOV R12,RAX LEA RBP,[RSP + 0x20] MOV RDI,RBP CALL 0x0017defc LEA RDI,[RSP + 0x8] CALL 0x0017defc MOV RDI,RBP MOV RSI,RBX CALL 0x001802f5 TEST EAX,EAX JNZ 0x00190b0e LEA RSI,[0x2 + R13*0x2] LEA RDI,[RSP + 0x8] CALL 0x0017df41 TEST EAX,EAX JNZ 0x00190b0e MOV RDI,R15 MOV RSI,R13 CALL 0x0017df41 TEST EAX,EAX JNZ 0x00190b0e MOV RDI,R14 MOV RSI,R13 CALL 0x0017df41 TEST EAX,EAX JZ 0x00190b35 LAB_00190b0e: MOV EBP,EAX LAB_00190b10: LEA RDI,[RSP + 0x20] CALL 0x0017df0a LEA RDI,[RSP + 0x8] CALL 0x0017df0a MOV EAX,EBP ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00190b35: LEA RSI,[RSP + 0x20] LEA R13,[RSP + 0x8] MOV RDI,R15 MOV RDX,RBX MOV RCX,R12 MOV R8,R13 CALL 0x0018019b MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX MOV RCX,R12 MOV R8,R13 CALL 0x0018019b XOR EBP,EBP JMP 0x00190b10
int rsa_unblind(int8 param_1,int8 param_2,long param_3) { long lVar1; int iVar2; int8 uVar3; int1 local_60 [24]; int1 local_48 [24]; lVar1 = *(long *)(param_3 + 8); uVar3 = mbedtls_mpi_montmul_init(*(int8 *)(param_3 + 0x10)); mbedtls_mpi_init(local_48); mbedtls_mpi_init(local_60); iVar2 = mbedtls_mpi_get_mont_r2_unsafe(local_48,param_3); if ((((iVar2 == 0) && (iVar2 = mbedtls_mpi_grow(local_60,lVar1 * 2 + 2), iVar2 == 0)) && (iVar2 = mbedtls_mpi_grow(param_1,lVar1), iVar2 == 0)) && (iVar2 = mbedtls_mpi_grow(param_2,lVar1), iVar2 == 0)) { mbedtls_mpi_montmul(param_1,local_48,param_3,uVar3,local_60); mbedtls_mpi_montmul(param_1,param_2,param_3,uVar3,local_60); iVar2 = 0; } mbedtls_mpi_free(local_48); mbedtls_mpi_free(local_60); return iVar2; }
39,174
copy_uca_collation
eloqsql/mysys/charset.c
static void copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from, CHARSET_INFO *loaded) { to->cset= from->cset; to->coll= from->coll; /* Single-level UCA collation have strnxfrm_multiple=8. In case of a multi-level UCA collation we use strnxfrm_multiply=4. That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller to allocate a buffer smaller size for each level, for performance purpose, and to fit longer VARCHARs to @@max_sort_length. This makes filesort produce non-precise order for some rare Unicode characters that produce more than 4 weights (long expansions). UCA requires 2 bytes per weight multiplied by the number of levels. In case of a 2-level collation, each character requires 4*2=8 bytes. Therefore, the longest VARCHAR that fits into the default @@max_sort_length is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64) would fit. Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4, for the same purpose. TODO: we could add a new LDML syntax to choose strxfrm_multiply value. */ to->strxfrm_multiply= loaded->levels_for_order > 1 ? 4 : from->strxfrm_multiply; to->min_sort_char= from->min_sort_char; to->max_sort_char= from->max_sort_char; to->mbminlen= from->mbminlen; to->mbmaxlen= from->mbmaxlen; to->caseup_multiply= from->caseup_multiply; to->casedn_multiply= from->casedn_multiply; to->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_STRNXFRM | MY_CS_UNICODE; }
O0
c
copy_uca_collation: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb8(%rax) movq -0x10(%rbp), %rax movq 0xc0(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xc0(%rax) movq -0x18(%rbp), %rax movzbl 0xb2(%rax), %eax cmpl $0x1, %eax jle 0x6b446 movl $0x4, %eax movl %eax, -0x1c(%rbp) jmp 0x6b453 movq -0x10(%rbp), %rax movl 0x90(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x90(%rax) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) movq -0x10(%rbp), %rax movl 0x98(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x98(%rax) movq -0x10(%rbp), %rax movl 0x9c(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x9c(%rax) movq -0x10(%rbp), %rax movb 0x94(%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x94(%rax) movq -0x10(%rbp), %rax movb 0x95(%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x95(%rax) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x2c8, %ecx # imm = 0x2C8 movl %ecx, 0xc(%rax) popq %rbp retq nop
copy_uca_collation: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rcx, [rax+0B8h] mov rax, [rbp+var_8] mov [rax+0B8h], rcx mov rax, [rbp+var_10] mov rcx, [rax+0C0h] mov rax, [rbp+var_8] mov [rax+0C0h], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+0B2h] cmp eax, 1 jle short loc_6B446 mov eax, 4 mov [rbp+var_1C], eax jmp short loc_6B453 loc_6B446: mov rax, [rbp+var_10] mov eax, [rax+90h] mov [rbp+var_1C], eax loc_6B453: mov ecx, [rbp+var_1C] mov rax, [rbp+var_8] mov [rax+90h], ecx mov rax, [rbp+var_10] mov rcx, [rax+0A0h] mov rax, [rbp+var_8] mov [rax+0A0h], rcx mov rax, [rbp+var_10] mov rcx, [rax+0A8h] mov rax, [rbp+var_8] mov [rax+0A8h], rcx mov rax, [rbp+var_10] mov ecx, [rax+98h] mov rax, [rbp+var_8] mov [rax+98h], ecx mov rax, [rbp+var_10] mov ecx, [rax+9Ch] mov rax, [rbp+var_8] mov [rax+9Ch], ecx mov rax, [rbp+var_10] mov cl, [rax+94h] mov rax, [rbp+var_8] mov [rax+94h], cl mov rax, [rbp+var_10] mov cl, [rax+95h] mov rax, [rbp+var_8] mov [rax+95h], cl mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 2C8h mov [rax+0Ch], ecx pop rbp retn
long long copy_uca_collation(long long a1, long long a2, long long a3) { long long result; // rax int v4; // [rsp+0h] [rbp-1Ch] *(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184); *(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192); if ( *(unsigned __int8 *)(a3 + 178) <= 1u ) v4 = *(_DWORD *)(a2 + 144); else v4 = 4; *(_DWORD *)(a1 + 144) = v4; *(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160); *(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168); *(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152); *(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156); *(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148); *(_BYTE *)(a1 + 149) = *(_BYTE *)(a2 + 149); result = a1; *(_DWORD *)(a1 + 12) |= 0x2C8u; return result; }
copy_uca_collation: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc0],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0xb2] CMP EAX,0x1 JLE 0x0016b446 MOV EAX,0x4 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0016b453 LAB_0016b446: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x90] MOV dword ptr [RBP + -0x1c],EAX LAB_0016b453: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x90],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xa8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x98] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x98],ECX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x9c] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x9c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x94] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x94],CL MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x95] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x95],CL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x2c8 MOV dword ptr [RAX + 0xc],ECX POP RBP RET
void copy_uca_collation(long param_1,long param_2,long param_3) { int4 local_24; *(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0); if (*(byte *)(param_3 + 0xb2) < 2) { local_24 = *(int4 *)(param_2 + 0x90); } else { local_24 = 4; } *(int4 *)(param_1 + 0x90) = local_24; *(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0); *(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8); *(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98); *(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c); *(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94); *(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95); *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8; return; }
39,175
nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...)
ng-log[P]ng-log/src/raw_logging.cc
void RawLog(LogSeverity severity, const char* file, int line, const char* format, ...) { if (!(FLAGS_logtostdout || FLAGS_logtostderr || severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr || !IsLoggingInitialized())) { return; // this stderr log message is suppressed } // We do not have any any option other that string streams to obtain the // thread identifier as the corresponding value is not convertible to an // integer. Use a statically allocated buffer to avoid dynamic memory // allocations. StaticStringBuf<kLogBufSize> sbuf; std::ostream oss(&sbuf); oss << std::setw(5) << std::this_thread::get_id(); // can't call localtime_r here: it can allocate char buffer[kLogBufSize]; char* buf = buffer; size_t size = sizeof(buffer); // NOTE: this format should match the specification in base/logging.h DoRawLog(&buf, &size, "%c00000000 00:00:00.000000 %s %s:%d] RAW: ", GetLogSeverityName(severity)[0], sbuf.data(), const_basename(const_cast<char*>(file)), line); // Record the position and size of the buffer after the prefix const char* msg_start = buf; const size_t msg_size = size; va_list ap; va_start(ap, format); bool no_chop = VADoRawLog(&buf, &size, format, ap); va_end(ap); if (no_chop) { DoRawLog(&buf, &size, "\n"); } else { DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n"); } // We make a raw syscall to write directly to the stderr file descriptor, // avoiding FILE buffering (to avoid invoking malloc()), and bypassing // libc (to side-step any libc interception). // We write just once to avoid races with other invocations of RawLog. safe_write(fileno(stderr), buffer, strlen(buffer)); if (severity == NGLOG_FATAL) { std::call_once(crashed, [file, line, msg_start, msg_size] { crash_reason.filename = file; crash_reason.line_number = line; memcpy(crash_buf, msg_start, msg_size); // Don't include prefix crash_reason.message = crash_buf; #ifdef HAVE_STACKTRACE crash_reason.depth = GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1); #else crash_reason.depth = 0; #endif SetCrashReason(&crash_reason); }); LogMessage::Fail(); // abort() } }
O1
cpp
nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x19e8, %rsp # imm = 0x19E8 movq %rcx, %r15 movl %edx, %r12d movq %rsi, 0x28(%rsp) movl %edi, 0xc(%rsp) testb %al, %al je 0x1f6ac movaps %xmm0, 0x1b0(%rsp) movaps %xmm1, 0x1c0(%rsp) movaps %xmm2, 0x1d0(%rsp) movaps %xmm3, 0x1e0(%rsp) movaps %xmm4, 0x1f0(%rsp) movaps %xmm5, 0x200(%rsp) movaps %xmm6, 0x210(%rsp) movaps %xmm7, 0x220(%rsp) movq %r8, 0x1a0(%rsp) movq %r9, 0x1a8(%rsp) leaq 0x1045f(%rip), %rax # 0x2fb22 cmpb $0x0, (%rax) je 0x1f770 movq 0xf865(%rip), %rbx # 0x2ef38 addq $0x10, %rbx leaq 0x270(%rsp), %r14 movq %rbx, -0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, -0x30(%r14) movups %xmm0, -0x20(%r14) movups %xmm0, -0x10(%r14) movq %r14, %rdi callq 0x7a00 leaq 0xf4ec(%rip), %rax # 0x2ebf0 movq %rax, -0x38(%r14) leaq 0x278(%rsp), %r13 leaq 0xe30(%rsp), %rax movq %r13, -0x18(%r13) movq %r13, -0x20(%r13) movq %rax, -0x10(%r13) movq %r13, -0x38(%r13) movq %r13, -0x30(%r13) movq %rax, -0x28(%r13) leaq 0x70(%rsp), %rdi leaq 0x238(%rsp), %rsi callq 0x71c0 movq 0x70(%rsp), %rax movq -0x18(%rax), %rax movq $0x5, 0x80(%rsp,%rax) callq 0x7450 testq %rax, %rax je 0x1f7b5 leaq 0x70(%rsp), %rdi movq %rax, %rsi callq 0x7350 jmp 0x1f7cb leaq 0x103a3(%rip), %rax # 0x2fb1a cmpb $0x0, (%rax) jne 0x1f6cc leaq 0x103a1(%rip), %rax # 0x2fb28 movl 0xc(%rsp), %ecx cmpl %ecx, (%rax) jle 0x1f6cc leaq 0x10382(%rip), %rax # 0x2fb1c cmpb $0x0, (%rax) jne 0x1f6cc callq 0x21510 testb %al, %al je 0x1f6cc jmp 0x1f935 leaq 0x3e32(%rip), %rsi # 0x235ee leaq 0x70(%rsp), %rdi movl $0x24, %edx callq 0x75d0 leaq 0xe30(%rsp), %rax movq %rax, 0x18(%rsp) movq $0xbb8, 0x10(%rsp) # imm = 0xBB8 movl 0xc(%rsp), %edi callq 0x9994 movsbl (%rax), %ebp movq 0x260(%rsp), %rax cmpq 0x258(%rsp), %rax je 0x1f826 movq 0x268(%rsp), %rcx cmpq %rcx, %rax je 0x1f826 cmpb $0x0, -0x1(%rax) je 0x1f826 cmpq %rcx, %rax jae 0x1f947 movb $0x0, (%rax) incq 0x260(%rsp) movq 0x28(%rsp), %rdi callq 0x2151d movl %r12d, 0x24(%rsp) movl %r12d, (%rsp) leaq 0x43ad(%rip), %rdx # 0x23bed leaq 0x18(%rsp), %r14 leaq 0x10(%rsp), %r12 movq %r14, %rdi movq %r12, %rsi movl %ebp, %ecx movq %r13, %r8 movq %rax, %r9 xorl %eax, %eax callq 0x1f9bf movq (%r14), %r13 movq (%r12), %rbp leaq 0x180(%rsp), %rax leaq 0x30(%rsp), %rcx movq %rax, 0x10(%rcx) leaq 0x1a20(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, (%rcx) movq %r13, %rdi movq %rbp, %rsi movq %r15, %rdx callq 0x72f0 leaq 0x4373(%rip), %rdx # 0x23c18 testl %eax, %eax js 0x1f8c7 movl %eax, %eax movq %rbp, %rcx subq %rax, %rcx jb 0x1f8c7 movq %rcx, 0x10(%rsp) addq %r13, %rax movq %rax, 0x18(%rsp) leaq 0x32be(%rip), %rdx # 0x22b85 leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi xorl %eax, %eax callq 0x1f9bf movq 0xf6b9(%rip), %rax # 0x2ef98 movq (%rax), %rdi callq 0x7550 movl %eax, %r14d leaq 0xe30(%rsp), %r12 movq %r12, %rdi callq 0x71f0 movl $0x1, %edi movl %r14d, %esi movq %r12, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x7070 cmpl $0x3, 0xc(%rsp) je 0x1f95c leaq 0x78(%rsp), %rdi callq 0x7160 movq %rbx, 0x238(%rsp) leaq 0x270(%rsp), %rdi callq 0x7760 addq $0x19e8, %rsp # imm = 0x19E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x238(%rsp), %rdi movq (%rdi), %rax xorl %esi, %esi callq *0x68(%rax) jmp 0x1f826 leaq 0x50(%rsp), %rdi movq 0x28(%rsp), %rax movq %rax, (%rdi) movl 0x24(%rsp), %eax movl %eax, 0x8(%rdi) movq %r13, 0x10(%rdi) movq %rbp, 0x18(%rdi) callq 0x1fa65 callq 0xb042 movq %rax, %rdi callq 0x9275 jmp 0x1f995 jmp 0x1f995 jmp 0x1f995 movq %rax, %r14 jmp 0x1f9a2 movq %rax, %r14 leaq 0x78(%rsp), %rdi callq 0x7160 movq %rbx, 0x238(%rsp) leaq 0x270(%rsp), %rdi callq 0x7760 movq %r14, %rdi callq 0x7930
_ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 19E8h mov r15, rcx mov r12d, edx mov [rsp+1A18h+var_19F0], rsi mov [rsp+1A18h+var_1A0C], edi test al, al jz short loc_1F6AC movaps [rsp+1A18h+var_1868], xmm0 movaps [rsp+1A18h+var_1858], xmm1 movaps [rsp+1A18h+var_1848], xmm2 movaps [rsp+1A18h+var_1838], xmm3 movaps [rsp+1A18h+var_1828], xmm4 movaps [rsp+1A18h+var_1818], xmm5 movaps [rsp+1A18h+var_1808], xmm6 movaps [rsp+1A18h+var_17F8], xmm7 loc_1F6AC: mov [rsp+1A18h+var_1878], r8 mov [rsp+1A18h+var_1870], r9 lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout cmp byte ptr [rax], 0 jz loc_1F770 loc_1F6CC: mov rbx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rbx, 10h lea r14, [rsp+1A18h+var_17A8] mov [r14-38h], rbx xorps xmm0, xmm0 movups xmmword ptr [r14-30h], xmm0 movups xmmword ptr [r14-20h], xmm0 movups xmmword ptr [r14-10h], xmm0 mov rdi, r14; this call __ZNSt6localeC1Ev; std::locale::locale(void) lea rax, off_2EBF0 mov [r14-38h], rax lea r13, [rsp+1A18h+var_17A0] lea rax, [rsp+1A18h+var_BE8] mov [r13-18h], r13 mov [r13-20h], r13 mov [r13-10h], rax mov [r13-38h], r13 mov [r13-30h], r13 mov [r13-28h], rax lea rdi, [rsp+1A18h+var_19A8] lea rsi, [rsp+1A18h+var_17E0] call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *) mov rax, [rsp+1A18h+var_19A8] mov rax, [rax-18h] mov [rsp+rax+1A18h+var_1998], 5 call _pthread_self test rax, rax jz short loc_1F7B5 lea rdi, [rsp+1A18h+var_19A8]; this mov rsi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) jmp short loc_1F7CB loc_1F770: lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr cmp byte ptr [rax], 0 jnz loc_1F6CC lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold mov ecx, [rsp+1A18h+var_1A0C] cmp [rax], ecx jle loc_1F6CC lea rax, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr cmp byte ptr [rax], 0 jnz loc_1F6CC call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) test al, al jz loc_1F6CC jmp loc_1F935 loc_1F7B5: lea rsi, aThreadIdOfANon; "thread::id of a non-executing thread" lea rdi, [rsp+1A18h+var_19A8] mov edx, 24h ; '$' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_1F7CB: lea rax, [rsp+1A18h+var_BE8] mov [rsp+1A18h+var_1A00], rax mov [rsp+1A18h+var_1A08], 0BB8h mov edi, [rsp+1A18h+var_1A0C] call _ZN5nglog18GetLogSeverityNameENS_11LogSeverityE; nglog::GetLogSeverityName(nglog::LogSeverity) movsx ebp, byte ptr [rax] mov rax, [rsp+1A18h+var_17B8] cmp rax, [rsp+1A18h+var_17C0] jz short loc_1F826 mov rcx, [rsp+1A18h+var_17B0] cmp rax, rcx jz short loc_1F826 cmp byte ptr [rax-1], 0 jz short loc_1F826 cmp rax, rcx jnb loc_1F947 mov byte ptr [rax], 0 inc [rsp+1A18h+var_17B8] loc_1F826: mov rdi, [rsp+1A18h+var_19F0]; this call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*) mov [rsp+1A18h+var_19F4], r12d mov [rsp+1A18h+var_1A18], r12d lea rdx, aC0000000000000; "%c00000000 00:00:00.000000 %s %s:%d] RA"... lea r14, [rsp+1A18h+var_1A00] lea r12, [rsp+1A18h+var_1A08] mov rdi, r14; this mov rsi, r12; char ** mov ecx, ebp; char * mov r8, r13 mov r9, rax xor eax, eax call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) mov r13, [r14] mov rbp, [r12] lea rax, [rsp+1A18h+var_1898] lea rcx, [rsp+1A18h+var_19E8] mov [rcx+10h], rax lea rax, [rsp+1A18h+arg_0] mov [rcx+8], rax mov rax, 3000000020h mov [rcx], rax mov rdi, r13 mov rsi, rbp mov rdx, r15 call _vsnprintf lea rdx, aRawLogErrorThe; "RAW_LOG ERROR: The Message was too long"... test eax, eax js short loc_1F8C7 mov eax, eax mov rcx, rbp sub rcx, rax; char * jb short loc_1F8C7 mov [rsp+1A18h+var_1A08], rcx add rax, r13 mov [rsp+1A18h+var_1A00], rax lea rdx, asc_22B84+1; unsigned __int64 * loc_1F8C7: lea rdi, [rsp+1A18h+var_1A00]; this lea rsi, [rsp+1A18h+var_1A08]; char ** xor eax, eax call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) mov rax, cs:stderr_ptr mov rdi, [rax] call _fileno mov r14d, eax lea r12, [rsp+1A18h+var_BE8] mov rdi, r12 call _strlen mov edi, 1 mov esi, r14d mov rdx, r12 mov rcx, rax xor eax, eax call _syscall cmp [rsp+1A18h+var_1A0C], 3 jz short loc_1F95C lea rdi, [rsp+1A18h+var_19A0]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov [rsp+1A18h+var_17E0], rbx lea rdi, [rsp+1A18h+var_17A8]; this call __ZNSt6localeD1Ev; std::locale::~locale() loc_1F935: add rsp, 19E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1F947: lea rdi, [rsp+1A18h+var_17E0] mov rax, [rdi] xor esi, esi call qword ptr [rax+68h] jmp loc_1F826 loc_1F95C: lea rdi, [rsp+1A18h+var_19C8]; this mov rax, [rsp+1A18h+var_19F0] mov [rdi], rax mov eax, [rsp+1A18h+var_19F4] mov [rdi+8], eax mov [rdi+10h], r13 mov [rdi+18h], rbp call _ZSt9call_onceIZN5nglog6RawLogENS0_11LogSeverityEPKciS3_zE3$_0JEEvRSt9once_flagOT_DpOT0_; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag &,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&) call _ZN5nglog10LogMessage4FailEv; nglog::LogMessage::Fail(void) mov rdi, rax call __clang_call_terminate jmp short loc_1F995 jmp short loc_1F995 jmp short loc_1F995 mov r14, rax jmp short loc_1F9A2 loc_1F995: mov r14, rax lea rdi, [rsp+1A18h+var_19A0]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_1F9A2: mov [rsp+1A18h+var_17E0], rbx lea rdi, [rsp+1A18h+var_17A8]; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, r14 call __Unwind_Resume
void nglog::RawLog( nglog *a1, nglog::tools *a2, int 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) { long long v17; // rax const char *v18; // rsi unsigned int v19; // ebp long long v20; // rax _BYTE *v21; // r13 char *v22; // rbp unsigned int v23; // eax const char *v24; // rcx char *v25; // rdx unsigned int v26; // r14d long long v27; // rax char *v28; // [rsp+10h] [rbp-1A08h] BYREF _BYTE *v29; // [rsp+18h] [rbp-1A00h] BYREF int v30; // [rsp+24h] [rbp-19F4h] nglog::tools *v31; // [rsp+28h] [rbp-19F0h] _QWORD v32[4]; // [rsp+30h] [rbp-19E8h] BYREF nglog::tools *v33; // [rsp+50h] [rbp-19C8h] BYREF int v34; // [rsp+58h] [rbp-19C0h] _BYTE *v35; // [rsp+60h] [rbp-19B8h] char *v36; // [rsp+68h] [rbp-19B0h] long long v37; // [rsp+70h] [rbp-19A8h] BYREF _BYTE v38[264]; // [rsp+78h] [rbp-19A0h] BYREF char v39; // [rsp+180h] [rbp-1898h] BYREF long long v40; // [rsp+1A0h] [rbp-1878h] long long v41; // [rsp+1A8h] [rbp-1870h] __m128 v42; // [rsp+1B0h] [rbp-1868h] __m128 v43; // [rsp+1C0h] [rbp-1858h] __m128 v44; // [rsp+1D0h] [rbp-1848h] __m128 v45; // [rsp+1E0h] [rbp-1838h] __m128 v46; // [rsp+1F0h] [rbp-1828h] __m128 v47; // [rsp+200h] [rbp-1818h] __m128 v48; // [rsp+210h] [rbp-1808h] __m128 v49; // [rsp+220h] [rbp-17F8h] _QWORD v50[4]; // [rsp+238h] [rbp-17E0h] BYREF _BYTE *v51; // [rsp+258h] [rbp-17C0h] _BYTE *v52; // [rsp+260h] [rbp-17B8h] _BYTE *v53; // [rsp+268h] [rbp-17B0h] char v54[8]; // [rsp+270h] [rbp-17A8h] BYREF _BYTE v55[3000]; // [rsp+278h] [rbp-17A0h] BYREF _BYTE v56[3048]; // [rsp+E30h] [rbp-BE8h] BYREF v42 = a7; v43 = a8; v44 = a9; v45 = a10; v46 = a11; v47 = a12; v48 = a13; v49 = a14; v31 = a2; v40 = a5; v41 = a6; if ( fLB::FLAGS_logtostdout || fLB::FLAGS_logtostderr || fLI::FLAGS_stderrthreshold <= (int)a1 || fLB::FLAGS_alsologtostderr || !(unsigned __int8)nglog::IsLoggingInitialized(a1) ) { std::locale::locale((std::locale *)v54); v50[0] = &off_2EBF0; v52 = v55; v51 = v55; v53 = v56; v50[1] = v55; v50[2] = v55; v50[3] = v56; std::ostream::ostream(&v37, v50); *(_QWORD *)&v38[*(_QWORD *)(v37 - 24) + 8] = 5LL; v17 = pthread_self(); if ( v17 ) { v18 = (const char *)v17; std::ostream::_M_insert<unsigned long>(&v37); } else { v18 = "thread::id of a non-executing thread"; std::__ostream_insert<char,std::char_traits<char>>(&v37, "thread::id of a non-executing thread", 36LL); } v29 = v56; v28 = (_BYTE *)&stru_BB8; v19 = *nglog::GetLogSeverityName((int)a1); if ( v52 != v51 && v52 != v53 && *(v52 - 1) ) { if ( v52 >= v53 ) { v18 = 0LL; (*(void ( **)(_QWORD *, _QWORD))(v50[0] + 104LL))(v50, 0LL); } else { *v52++ = 0; } } v20 = nglog::tools::const_basename(v31, v18); v30 = a3; nglog::DoRawLog( (nglog *)&v29, &v28, (unsigned long long *)"%c00000000 00:00:00.000000 %s %s:%d] RAW: ", (const char *)v19, v55, v20, a3); v21 = v29; v22 = v28; v32[2] = &v39; v32[1] = &a15; v32[0] = 0x3000000020LL; v23 = vsnprintf(v29, v28, a4, v32); v25 = "RAW_LOG ERROR: The Message was too long!\n"; if ( (v23 & 0x80000000) == 0 ) { v24 = &v22[-v23]; if ( (unsigned long long)v22 >= v23 ) { v28 = &v22[-v23]; v29 = &v21[v23]; v25 = "\n"; } } nglog::DoRawLog((nglog *)&v29, &v28, (unsigned long long *)v25, v24); v26 = fileno(stderr); v27 = strlen(v56); syscall(1LL, v26, v56, v27); if ( (_DWORD)a1 == 3 ) { v33 = v31; v34 = v30; v35 = v21; v36 = v22; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(); nglog::LogMessage::Fail((nglog::LogMessage *)&v33); } std::ios_base::~ios_base((std::ios_base *)v38); v50[0] = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((std::locale *)v54); } }
RawLog: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x19e8 MOV R15,RCX MOV R12D,EDX MOV qword ptr [RSP + 0x28],RSI MOV dword ptr [RSP + 0xc],EDI TEST AL,AL JZ 0x0011f6ac MOVAPS xmmword ptr [RSP + 0x1b0],XMM0 MOVAPS xmmword ptr [RSP + 0x1c0],XMM1 MOVAPS xmmword ptr [RSP + 0x1d0],XMM2 MOVAPS xmmword ptr [RSP + 0x1e0],XMM3 MOVAPS xmmword ptr [RSP + 0x1f0],XMM4 MOVAPS xmmword ptr [RSP + 0x200],XMM5 MOVAPS xmmword ptr [RSP + 0x210],XMM6 MOVAPS xmmword ptr [RSP + 0x220],XMM7 LAB_0011f6ac: MOV qword ptr [RSP + 0x1a0],R8 MOV qword ptr [RSP + 0x1a8],R9 LEA RAX,[0x12fb22] CMP byte ptr [RAX],0x0 JZ 0x0011f770 LAB_0011f6cc: MOV RBX,qword ptr [0x0012ef38] ADD RBX,0x10 LEA R14,[RSP + 0x270] MOV qword ptr [R14 + -0x38],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + -0x30],XMM0 MOVUPS xmmword ptr [R14 + -0x20],XMM0 MOVUPS xmmword ptr [R14 + -0x10],XMM0 MOV RDI,R14 CALL 0x00107a00 LEA RAX,[0x12ebf0] MOV qword ptr [R14 + -0x38],RAX LEA R13,[RSP + 0x278] LEA RAX,[RSP + 0xe30] MOV qword ptr [R13 + -0x18],R13 MOV qword ptr [R13 + -0x20],R13 MOV qword ptr [R13 + -0x10],RAX MOV qword ptr [R13 + -0x38],R13 MOV qword ptr [R13 + -0x30],R13 MOV qword ptr [R13 + -0x28],RAX LAB_0011f730: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x238] CALL 0x001071c0 MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x80],0x5 CALL 0x00107450 TEST RAX,RAX JZ 0x0011f7b5 LAB_0011f761: LEA RDI,[RSP + 0x70] MOV RSI,RAX CALL 0x00107350 LAB_0011f76e: JMP 0x0011f7cb LAB_0011f770: LEA RAX,[0x12fb1a] CMP byte ptr [RAX],0x0 JNZ 0x0011f6cc LEA RAX,[0x12fb28] MOV ECX,dword ptr [RSP + 0xc] CMP dword ptr [RAX],ECX JLE 0x0011f6cc LEA RAX,[0x12fb1c] CMP byte ptr [RAX],0x0 JNZ 0x0011f6cc CALL 0x00121510 TEST AL,AL JZ 0x0011f6cc JMP 0x0011f935 LAB_0011f7b5: LEA RSI,[0x1235ee] LEA RDI,[RSP + 0x70] MOV EDX,0x24 CALL 0x001075d0 LAB_0011f7cb: LEA RAX,[RSP + 0xe30] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0xbb8 LAB_0011f7e1: MOV EDI,dword ptr [RSP + 0xc] CALL 0x00109994 MOVSX EBP,byte ptr [RAX] MOV RAX,qword ptr [RSP + 0x260] CMP RAX,qword ptr [RSP + 0x258] JZ 0x0011f826 MOV RCX,qword ptr [RSP + 0x268] CMP RAX,RCX JZ 0x0011f826 CMP byte ptr [RAX + -0x1],0x0 JZ 0x0011f826 CMP RAX,RCX JNC 0x0011f947 MOV byte ptr [RAX],0x0 INC qword ptr [RSP + 0x260] LAB_0011f826: MOV RDI,qword ptr [RSP + 0x28] CALL 0x0012151d MOV dword ptr [RSP + 0x24],R12D MOV dword ptr [RSP],R12D LEA RDX,[0x123bed] LEA R14,[RSP + 0x18] LEA R12,[RSP + 0x10] MOV RDI,R14 MOV RSI,R12 MOV ECX,EBP MOV R8,R13 MOV R9,RAX XOR EAX,EAX CALL 0x0011f9bf MOV R13,qword ptr [R14] MOV RBP,qword ptr [R12] LEA RAX,[RSP + 0x180] LEA RCX,[RSP + 0x30] MOV qword ptr [RCX + 0x10],RAX LEA RAX,[RSP + 0x1a20] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000020 MOV qword ptr [RCX],RAX MOV RDI,R13 MOV RSI,RBP MOV RDX,R15 CALL 0x001072f0 LEA RDX,[0x123c18] TEST EAX,EAX JS 0x0011f8c7 MOV EAX,EAX MOV RCX,RBP SUB RCX,RAX JC 0x0011f8c7 MOV qword ptr [RSP + 0x10],RCX ADD RAX,R13 MOV qword ptr [RSP + 0x18],RAX LEA RDX,[0x122b85] LAB_0011f8c7: LEA RDI,[RSP + 0x18] LEA RSI,[RSP + 0x10] XOR EAX,EAX CALL 0x0011f9bf MOV RAX,qword ptr [0x0012ef98] MOV RDI,qword ptr [RAX] CALL 0x00107550 MOV R14D,EAX LEA R12,[RSP + 0xe30] MOV RDI,R12 CALL 0x001071f0 MOV EDI,0x1 MOV ESI,R14D MOV RDX,R12 MOV RCX,RAX XOR EAX,EAX CALL 0x00107070 CMP dword ptr [RSP + 0xc],0x3 JZ 0x0011f95c LEA RDI,[RSP + 0x78] CALL 0x00107160 MOV qword ptr [RSP + 0x238],RBX LEA RDI,[RSP + 0x270] CALL 0x00107760 LAB_0011f935: ADD RSP,0x19e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011f947: LEA RDI,[RSP + 0x238] MOV RAX,qword ptr [RDI] LAB_0011f952: XOR ESI,ESI CALL qword ptr [RAX + 0x68] JMP 0x0011f826 LAB_0011f95c: LEA RDI,[RSP + 0x50] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RDI],RAX MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RDI + 0x8],EAX MOV qword ptr [RDI + 0x10],R13 MOV qword ptr [RDI + 0x18],RBP LAB_0011f978: CALL 0x0011fa65 LAB_0011f97d: CALL 0x0010b042 LAB_0011f982: MOV RDI,RAX CALL 0x00109275
/* nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) */ void nglog::RawLog(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,int4 param_11,char *param_12,int8 param_13, int8 param_14,...) { ulong uVar1; char in_AL; char cVar2; uint uVar3; pthread_t pVar4; char *pcVar5; int8 uVar6; ulong uVar7; size_t sVar8; char *pcVar9; int **ppuVar10; __0 *p_Var11; ulong local_1a08; char *local_1a00; int4 local_19f4; char *local_19f0; int8 local_19e8; int1 *local_19e0; int1 *local_19d8; char *local_19c8; int4 local_19c0; char *local_19b8; ulong local_19b0; long local_19a8; ios_base local_19a0 [8]; int8 auStack_1998 [32]; int1 local_1898 [32]; int8 local_1878; int8 local_1870; int4 local_1868; int8 local_1858; int8 local_1848; int8 local_1838; int8 local_1828; int8 local_1818; int8 local_1808; int8 local_17f8; int **local_17e0; char *local_17d8; char *pcStack_17d0; char *local_17c8; char *pcStack_17c0; char *local_17b8; char *pcStack_17b0; locale local_17a8 [8]; char local_17a0 [3000]; char local_be8 [3000]; if (in_AL != '\0') { local_1868 = param_1; local_1858 = param_2; local_1848 = param_3; local_1838 = param_4; local_1828 = param_5; local_1818 = param_6; local_1808 = param_7; local_17f8 = param_8; } local_19f0 = param_10; local_1878 = param_13; local_1870 = param_14; if ((((fLB::FLAGS_logtostdout != '\0') || (fLB::FLAGS_logtostderr != '\0')) || (fLI::FLAGS_stderrthreshold <= param_9)) || ((fLB::FLAGS_alsologtostderr != '\0' || (cVar2 = IsLoggingInitialized(), cVar2 == '\0')))) { ppuVar10 = (int **)(PTR_vtable_0012ef38 + 0x10); local_17d8 = (char *)0x0; pcStack_17d0 = (char *)0x0; local_17c8 = (char *)0x0; pcStack_17c0 = (char *)0x0; local_17b8 = (char *)0x0; pcStack_17b0 = (char *)0x0; local_17e0 = ppuVar10; std::locale::locale(local_17a8); local_17e0 = &PTR__streambuf_0012ebf0; local_17c8 = local_be8; /* try { // try from 0011f730 to 0011f741 has its CatchHandler @ 0011f990 */ local_17d8 = local_17a0; pcStack_17d0 = local_17a0; pcStack_17c0 = local_17a0; local_17b8 = local_17a0; pcStack_17b0 = local_17c8; std::ostream::ostream((ostream *)&local_19a8,(streambuf *)&local_17e0); *(int8 *)((long)auStack_1998 + *(long *)(local_19a8 + -0x18)) = 5; pVar4 = pthread_self(); if (pVar4 == 0) { /* try { // try from 0011f7b5 to 0011f7ca has its CatchHandler @ 0011f98e */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)&local_19a8,"thread::id of a non-executing thread",0x24); } else { /* try { // try from 0011f761 to 0011f76d has its CatchHandler @ 0011f98e */ std::ostream::_M_insert<unsigned_long>((ulong)&local_19a8); } local_1a00 = local_be8; local_1a08 = 3000; /* try { // try from 0011f7e1 to 0011f82f has its CatchHandler @ 0011f995 */ pcVar5 = (char *)GetLogSeverityName(param_9); cVar2 = *pcVar5; if (((local_17b8 != pcStack_17c0) && (local_17b8 != pcStack_17b0)) && (local_17b8[-1] != '\0')) { if (local_17b8 < pcStack_17b0) { *local_17b8 = '\0'; local_17b8 = local_17b8 + 1; } else { /* try { // try from 0011f952 to 0011f956 has its CatchHandler @ 0011f982 */ (*(code *)local_17e0[0xd])(&local_17e0,0); } } uVar6 = tools::const_basename(local_19f0); local_19f4 = param_11; DoRawLog(&local_1a00,&local_1a08,"%c00000000 00:00:00.000000 %s %s:%d] RAW: ", (ulong)(uint)(int)cVar2,local_17a0,uVar6,param_11); pcVar5 = local_1a00; uVar1 = local_1a08; local_19d8 = local_1898; local_19e0 = &stack0x00000008; local_19e8 = 0x3000000020; uVar3 = vsnprintf(local_1a00,local_1a08,param_12,&local_19e8); pcVar9 = "RAW_LOG ERROR: The Message was too long!\n"; if (-1 < (int)uVar3) { uVar7 = (ulong)uVar3; if (uVar7 <= uVar1) { local_1a00 = pcVar5 + uVar7; pcVar9 = "\n"; local_1a08 = uVar1 - uVar7; } } DoRawLog(&local_1a00,&local_1a08,pcVar9); uVar3 = fileno(*(FILE **)PTR_stderr_0012ef98); sVar8 = strlen(local_be8); p_Var11 = (__0 *)(ulong)uVar3; syscall(1,p_Var11,local_be8,sVar8); if (param_9 == 3) { local_19c8 = local_19f0; local_19c0 = local_19f4; local_19b8 = pcVar5; local_19b0 = uVar1; /* try { // try from 0011f978 to 0011f97c has its CatchHandler @ 0011f98c */ std::call_once<nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,___)::__0> ((once_flag *)&local_19c8,p_Var11); /* try { // try from 0011f97d to 0011f981 has its CatchHandler @ 0011f98a */ uVar6 = LogMessage::Fail(); /* catch(type#1 @ 00000000) { ... } // from try @ 0011f952 with catch @ 0011f982 */ /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar6); } std::ios_base::~ios_base(local_19a0); local_17e0 = ppuVar10; std::locale::~locale(local_17a8); } return; }
39,176
nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...)
ng-log[P]ng-log/src/raw_logging.cc
void RawLog(LogSeverity severity, const char* file, int line, const char* format, ...) { if (!(FLAGS_logtostdout || FLAGS_logtostderr || severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr || !IsLoggingInitialized())) { return; // this stderr log message is suppressed } // We do not have any any option other that string streams to obtain the // thread identifier as the corresponding value is not convertible to an // integer. Use a statically allocated buffer to avoid dynamic memory // allocations. StaticStringBuf<kLogBufSize> sbuf; std::ostream oss(&sbuf); oss << std::setw(5) << std::this_thread::get_id(); // can't call localtime_r here: it can allocate char buffer[kLogBufSize]; char* buf = buffer; size_t size = sizeof(buffer); // NOTE: this format should match the specification in base/logging.h DoRawLog(&buf, &size, "%c00000000 00:00:00.000000 %s %s:%d] RAW: ", GetLogSeverityName(severity)[0], sbuf.data(), const_basename(const_cast<char*>(file)), line); // Record the position and size of the buffer after the prefix const char* msg_start = buf; const size_t msg_size = size; va_list ap; va_start(ap, format); bool no_chop = VADoRawLog(&buf, &size, format, ap); va_end(ap); if (no_chop) { DoRawLog(&buf, &size, "\n"); } else { DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n"); } // We make a raw syscall to write directly to the stderr file descriptor, // avoiding FILE buffering (to avoid invoking malloc()), and bypassing // libc (to side-step any libc interception). // We write just once to avoid races with other invocations of RawLog. safe_write(fileno(stderr), buffer, strlen(buffer)); if (severity == NGLOG_FATAL) { std::call_once(crashed, [file, line, msg_start, msg_size] { crash_reason.filename = file; crash_reason.line_number = line; memcpy(crash_buf, msg_start, msg_size); // Don't include prefix crash_reason.message = crash_buf; #ifdef HAVE_STACKTRACE crash_reason.depth = GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1); #else crash_reason.depth = 0; #endif SetCrashReason(&crash_reason); }); LogMessage::Fail(); // abort() } }
O3
cpp
nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x19e8, %rsp # imm = 0x19E8 movq %rcx, %r15 movl %edx, %r12d movq %rsi, 0x28(%rsp) movl %edi, 0xc(%rsp) testb %al, %al je 0x1f480 movaps %xmm0, 0x1b0(%rsp) movaps %xmm1, 0x1c0(%rsp) movaps %xmm2, 0x1d0(%rsp) movaps %xmm3, 0x1e0(%rsp) movaps %xmm4, 0x1f0(%rsp) movaps %xmm5, 0x200(%rsp) movaps %xmm6, 0x210(%rsp) movaps %xmm7, 0x220(%rsp) movq %r8, 0x1a0(%rsp) movq %r9, 0x1a8(%rsp) leaq 0x1068b(%rip), %rax # 0x2fb22 cmpb $0x0, (%rax) je 0x1f544 movq 0xfa91(%rip), %rbx # 0x2ef38 addq $0x10, %rbx leaq 0x270(%rsp), %r14 movq %rbx, -0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, -0x30(%r14) movups %xmm0, -0x20(%r14) movups %xmm0, -0x10(%r14) movq %r14, %rdi callq 0x7a00 leaq 0xf720(%rip), %rax # 0x2ebf8 movq %rax, -0x38(%r14) leaq 0x278(%rsp), %r13 leaq 0xe30(%rsp), %rax movq %r13, -0x18(%r13) movq %r13, -0x20(%r13) movq %rax, -0x10(%r13) movq %r13, -0x38(%r13) movq %r13, -0x30(%r13) movq %rax, -0x28(%r13) leaq 0x70(%rsp), %rdi leaq 0x238(%rsp), %rsi callq 0x71c0 movq 0x70(%rsp), %rax movq -0x18(%rax), %rax movq $0x5, 0x80(%rsp,%rax) callq 0x7450 testq %rax, %rax je 0x1f589 leaq 0x70(%rsp), %rdi movq %rax, %rsi callq 0x7350 jmp 0x1f59f leaq 0x105cf(%rip), %rax # 0x2fb1a cmpb $0x0, (%rax) jne 0x1f4a0 leaq 0x105cd(%rip), %rax # 0x2fb28 movl 0xc(%rsp), %ecx cmpl %ecx, (%rax) jle 0x1f4a0 leaq 0x105ae(%rip), %rax # 0x2fb1c cmpb $0x0, (%rax) jne 0x1f4a0 callq 0x21204 testb %al, %al je 0x1f4a0 jmp 0x1f709 leaq 0x4043(%rip), %rsi # 0x235d3 leaq 0x70(%rsp), %rdi movl $0x24, %edx callq 0x75d0 leaq 0xe30(%rsp), %rax movq %rax, 0x18(%rsp) movq $0xbb8, 0x10(%rsp) # imm = 0xBB8 movl 0xc(%rsp), %edi callq 0x9844 movsbl (%rax), %ebp movq 0x260(%rsp), %rax cmpq 0x258(%rsp), %rax je 0x1f5fa movq 0x268(%rsp), %rcx cmpq %rcx, %rax je 0x1f5fa cmpb $0x0, -0x1(%rax) je 0x1f5fa cmpq %rcx, %rax jae 0x1f71b movb $0x0, (%rax) incq 0x260(%rsp) movq 0x28(%rsp), %rdi callq 0x21211 movl %r12d, 0x24(%rsp) movl %r12d, (%rsp) leaq 0x45b9(%rip), %rdx # 0x23bcd leaq 0x18(%rsp), %r14 leaq 0x10(%rsp), %r12 movq %r14, %rdi movq %r12, %rsi movl %ebp, %ecx movq %r13, %r8 movq %rax, %r9 xorl %eax, %eax callq 0x1f793 movq (%r14), %r13 movq (%r12), %rbp leaq 0x180(%rsp), %rax leaq 0x30(%rsp), %rcx movq %rax, 0x10(%rcx) leaq 0x1a20(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, (%rcx) movq %r13, %rdi movq %rbp, %rsi movq %r15, %rdx callq 0x72f0 leaq 0x457f(%rip), %rdx # 0x23bf8 testl %eax, %eax js 0x1f69b movl %eax, %eax movq %rbp, %rcx subq %rax, %rcx jb 0x1f69b movq %rcx, 0x10(%rsp) addq %r13, %rax movq %rax, 0x18(%rsp) leaq 0x34cf(%rip), %rdx # 0x22b6a leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi xorl %eax, %eax callq 0x1f793 movq 0xf8e5(%rip), %rax # 0x2ef98 movq (%rax), %rdi callq 0x7550 movl %eax, %r14d leaq 0xe30(%rsp), %r12 movq %r12, %rdi callq 0x71f0 movl $0x1, %edi movl %r14d, %esi movq %r12, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x7070 cmpl $0x3, 0xc(%rsp) je 0x1f730 leaq 0x78(%rsp), %rdi callq 0x7160 movq %rbx, 0x238(%rsp) leaq 0x270(%rsp), %rdi callq 0x7760 addq $0x19e8, %rsp # imm = 0x19E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x238(%rsp), %rdi movq (%rdi), %rax xorl %esi, %esi callq *0x68(%rax) jmp 0x1f5fa leaq 0x50(%rsp), %rdi movq 0x28(%rsp), %rax movq %rax, (%rdi) movl 0x24(%rsp), %eax movl %eax, 0x8(%rdi) movq %r13, 0x10(%rdi) movq %rbp, 0x18(%rdi) callq 0x1f839 callq 0xaee8 movq %rax, %rdi callq 0x9155 jmp 0x1f769 jmp 0x1f769 jmp 0x1f769 movq %rax, %r14 jmp 0x1f776 movq %rax, %r14 leaq 0x78(%rsp), %rdi callq 0x7160 movq %rbx, 0x238(%rsp) leaq 0x270(%rsp), %rdi callq 0x7760 movq %r14, %rdi callq 0x7930
_ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 19E8h mov r15, rcx mov r12d, edx mov [rsp+1A18h+var_19F0], rsi mov [rsp+1A18h+var_1A0C], edi test al, al jz short loc_1F480 movaps [rsp+1A18h+var_1868], xmm0 movaps [rsp+1A18h+var_1858], xmm1 movaps [rsp+1A18h+var_1848], xmm2 movaps [rsp+1A18h+var_1838], xmm3 movaps [rsp+1A18h+var_1828], xmm4 movaps [rsp+1A18h+var_1818], xmm5 movaps [rsp+1A18h+var_1808], xmm6 movaps [rsp+1A18h+var_17F8], xmm7 loc_1F480: mov [rsp+1A18h+var_1878], r8 mov [rsp+1A18h+var_1870], r9 lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout cmp byte ptr [rax], 0 jz loc_1F544 loc_1F4A0: mov rbx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rbx, 10h lea r14, [rsp+1A18h+var_17A8] mov [r14-38h], rbx xorps xmm0, xmm0 movups xmmword ptr [r14-30h], xmm0 movups xmmword ptr [r14-20h], xmm0 movups xmmword ptr [r14-10h], xmm0 mov rdi, r14; this call __ZNSt6localeC1Ev; std::locale::locale(void) lea rax, off_2EBF8 mov [r14-38h], rax lea r13, [rsp+1A18h+var_17A0] lea rax, [rsp+1A18h+var_BE8] mov [r13-18h], r13 mov [r13-20h], r13 mov [r13-10h], rax mov [r13-38h], r13 mov [r13-30h], r13 mov [r13-28h], rax lea rdi, [rsp+1A18h+var_19A8] lea rsi, [rsp+1A18h+var_17E0] call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *) mov rax, [rsp+1A18h+var_19A8] mov rax, [rax-18h] mov [rsp+rax+1A18h+var_1998], 5 call _pthread_self test rax, rax jz short loc_1F589 lea rdi, [rsp+1A18h+var_19A8]; this mov rsi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) jmp short loc_1F59F loc_1F544: lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr cmp byte ptr [rax], 0 jnz loc_1F4A0 lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold mov ecx, [rsp+1A18h+var_1A0C] cmp [rax], ecx jle loc_1F4A0 lea rax, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr cmp byte ptr [rax], 0 jnz loc_1F4A0 call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) test al, al jz loc_1F4A0 jmp loc_1F709 loc_1F589: lea rsi, aThreadIdOfANon; "thread::id of a non-executing thread" lea rdi, [rsp+1A18h+var_19A8] mov edx, 24h ; '$' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_1F59F: lea rax, [rsp+1A18h+var_BE8] mov [rsp+1A18h+var_1A00], rax mov [rsp+1A18h+var_1A08], 0BB8h mov edi, [rsp+1A18h+var_1A0C] call _ZN5nglog18GetLogSeverityNameENS_11LogSeverityE; nglog::GetLogSeverityName(nglog::LogSeverity) movsx ebp, byte ptr [rax] mov rax, [rsp+1A18h+var_17B8] cmp rax, [rsp+1A18h+var_17C0] jz short loc_1F5FA mov rcx, [rsp+1A18h+var_17B0] cmp rax, rcx jz short loc_1F5FA cmp byte ptr [rax-1], 0 jz short loc_1F5FA cmp rax, rcx jnb loc_1F71B mov byte ptr [rax], 0 inc [rsp+1A18h+var_17B8] loc_1F5FA: mov rdi, [rsp+1A18h+var_19F0]; this call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*) mov [rsp+1A18h+var_19F4], r12d mov [rsp+1A18h+var_1A18], r12d lea rdx, aC0000000000000; "%c00000000 00:00:00.000000 %s %s:%d] RA"... lea r14, [rsp+1A18h+var_1A00] lea r12, [rsp+1A18h+var_1A08] mov rdi, r14; this mov rsi, r12; char ** mov ecx, ebp; char * mov r8, r13 mov r9, rax xor eax, eax call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) mov r13, [r14] mov rbp, [r12] lea rax, [rsp+1A18h+var_1898] lea rcx, [rsp+1A18h+var_19E8] mov [rcx+10h], rax lea rax, [rsp+1A18h+arg_0] mov [rcx+8], rax mov rax, 3000000020h mov [rcx], rax mov rdi, r13 mov rsi, rbp mov rdx, r15 call _vsnprintf lea rdx, aRawLogErrorThe; "RAW_LOG ERROR: The Message was too long"... test eax, eax js short loc_1F69B mov eax, eax mov rcx, rbp sub rcx, rax; char * jb short loc_1F69B mov [rsp+1A18h+var_1A08], rcx add rax, r13 mov [rsp+1A18h+var_1A00], rax lea rdx, asc_22B69+1; unsigned __int64 * loc_1F69B: lea rdi, [rsp+1A18h+var_1A00]; this lea rsi, [rsp+1A18h+var_1A08]; char ** xor eax, eax call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) mov rax, cs:stderr_ptr mov rdi, [rax] call _fileno mov r14d, eax lea r12, [rsp+1A18h+var_BE8] mov rdi, r12 call _strlen mov edi, 1 mov esi, r14d mov rdx, r12 mov rcx, rax xor eax, eax call _syscall cmp [rsp+1A18h+var_1A0C], 3 jz short loc_1F730 lea rdi, [rsp+1A18h+var_19A0]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov [rsp+1A18h+var_17E0], rbx lea rdi, [rsp+1A18h+var_17A8]; this call __ZNSt6localeD1Ev; std::locale::~locale() loc_1F709: add rsp, 19E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1F71B: lea rdi, [rsp+1A18h+var_17E0] mov rax, [rdi] xor esi, esi call qword ptr [rax+68h] jmp loc_1F5FA loc_1F730: lea rdi, [rsp+1A18h+var_19C8]; this mov rax, [rsp+1A18h+var_19F0] mov [rdi], rax mov eax, [rsp+1A18h+var_19F4] mov [rdi+8], eax mov [rdi+10h], r13 mov [rdi+18h], rbp call _ZSt9call_onceIZN5nglog6RawLogENS0_11LogSeverityEPKciS3_zE3$_0JEEvRSt9once_flagOT_DpOT0_; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag &,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&) call _ZN5nglog10LogMessage4FailEv; nglog::LogMessage::Fail(void) mov rdi, rax call __clang_call_terminate jmp short loc_1F769 jmp short loc_1F769 jmp short loc_1F769 mov r14, rax jmp short loc_1F776 loc_1F769: mov r14, rax lea rdi, [rsp+1A18h+var_19A0]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_1F776: mov [rsp+1A18h+var_17E0], rbx lea rdi, [rsp+1A18h+var_17A8]; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, r14 call __Unwind_Resume
void nglog::RawLog( nglog *a1, nglog::tools *a2, int 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) { long long v17; // rax const char *v18; // rsi unsigned int v19; // ebp long long v20; // rax _BYTE *v21; // r13 char *v22; // rbp unsigned int v23; // eax const char *v24; // rcx char *v25; // rdx unsigned int v26; // r14d long long v27; // rax char *v28; // [rsp+10h] [rbp-1A08h] BYREF _BYTE *v29; // [rsp+18h] [rbp-1A00h] BYREF int v30; // [rsp+24h] [rbp-19F4h] nglog::tools *v31; // [rsp+28h] [rbp-19F0h] _QWORD v32[4]; // [rsp+30h] [rbp-19E8h] BYREF nglog::tools *v33; // [rsp+50h] [rbp-19C8h] BYREF int v34; // [rsp+58h] [rbp-19C0h] _BYTE *v35; // [rsp+60h] [rbp-19B8h] char *v36; // [rsp+68h] [rbp-19B0h] long long v37; // [rsp+70h] [rbp-19A8h] BYREF _BYTE v38[264]; // [rsp+78h] [rbp-19A0h] BYREF char v39; // [rsp+180h] [rbp-1898h] BYREF long long v40; // [rsp+1A0h] [rbp-1878h] long long v41; // [rsp+1A8h] [rbp-1870h] __m128 v42; // [rsp+1B0h] [rbp-1868h] __m128 v43; // [rsp+1C0h] [rbp-1858h] __m128 v44; // [rsp+1D0h] [rbp-1848h] __m128 v45; // [rsp+1E0h] [rbp-1838h] __m128 v46; // [rsp+1F0h] [rbp-1828h] __m128 v47; // [rsp+200h] [rbp-1818h] __m128 v48; // [rsp+210h] [rbp-1808h] __m128 v49; // [rsp+220h] [rbp-17F8h] _QWORD v50[4]; // [rsp+238h] [rbp-17E0h] BYREF _BYTE *v51; // [rsp+258h] [rbp-17C0h] _BYTE *v52; // [rsp+260h] [rbp-17B8h] _BYTE *v53; // [rsp+268h] [rbp-17B0h] char v54[8]; // [rsp+270h] [rbp-17A8h] BYREF _BYTE v55[3000]; // [rsp+278h] [rbp-17A0h] BYREF _BYTE v56[3048]; // [rsp+E30h] [rbp-BE8h] BYREF v42 = a7; v43 = a8; v44 = a9; v45 = a10; v46 = a11; v47 = a12; v48 = a13; v49 = a14; v31 = a2; v40 = a5; v41 = a6; if ( fLB::FLAGS_logtostdout || fLB::FLAGS_logtostderr || fLI::FLAGS_stderrthreshold <= (int)a1 || fLB::FLAGS_alsologtostderr || !(unsigned __int8)nglog::IsLoggingInitialized(a1) ) { std::locale::locale((std::locale *)v54); v50[0] = &off_2EBF8; v52 = v55; v51 = v55; v53 = v56; v50[1] = v55; v50[2] = v55; v50[3] = v56; std::ostream::ostream(&v37, v50); *(_QWORD *)&v38[*(_QWORD *)(v37 - 24) + 8] = 5LL; v17 = pthread_self(); if ( v17 ) { v18 = (const char *)v17; std::ostream::_M_insert<unsigned long>(&v37); } else { v18 = "thread::id of a non-executing thread"; std::__ostream_insert<char,std::char_traits<char>>(&v37, "thread::id of a non-executing thread", 36LL); } v29 = v56; v28 = (_BYTE *)&stru_BB8; v19 = *nglog::GetLogSeverityName((int)a1); if ( v52 != v51 && v52 != v53 && *(v52 - 1) ) { if ( v52 >= v53 ) { v18 = 0LL; (*(void ( **)(_QWORD *, _QWORD))(v50[0] + 104LL))(v50, 0LL); } else { *v52++ = 0; } } v20 = nglog::tools::const_basename(v31, v18); v30 = a3; nglog::DoRawLog( (nglog *)&v29, &v28, (unsigned long long *)"%c00000000 00:00:00.000000 %s %s:%d] RAW: ", (const char *)v19, v55, v20, a3); v21 = v29; v22 = v28; v32[2] = &v39; v32[1] = &a15; v32[0] = 0x3000000020LL; v23 = vsnprintf(v29, v28, a4, v32); v25 = "RAW_LOG ERROR: The Message was too long!\n"; if ( (v23 & 0x80000000) == 0 ) { v24 = &v22[-v23]; if ( (unsigned long long)v22 >= v23 ) { v28 = &v22[-v23]; v29 = &v21[v23]; v25 = "\n"; } } nglog::DoRawLog((nglog *)&v29, &v28, (unsigned long long *)v25, v24); v26 = fileno(stderr, &v28); v27 = strlen(v56); syscall(1LL, v26, v56, v27); if ( (_DWORD)a1 == 3 ) { v33 = v31; v34 = v30; v35 = v21; v36 = v22; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(); nglog::LogMessage::Fail((nglog::LogMessage *)&v33); } std::ios_base::~ios_base((std::ios_base *)v38); v50[0] = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((std::locale *)v54); } }
RawLog: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x19e8 MOV R15,RCX MOV R12D,EDX MOV qword ptr [RSP + 0x28],RSI MOV dword ptr [RSP + 0xc],EDI TEST AL,AL JZ 0x0011f480 MOVAPS xmmword ptr [RSP + 0x1b0],XMM0 MOVAPS xmmword ptr [RSP + 0x1c0],XMM1 MOVAPS xmmword ptr [RSP + 0x1d0],XMM2 MOVAPS xmmword ptr [RSP + 0x1e0],XMM3 MOVAPS xmmword ptr [RSP + 0x1f0],XMM4 MOVAPS xmmword ptr [RSP + 0x200],XMM5 MOVAPS xmmword ptr [RSP + 0x210],XMM6 MOVAPS xmmword ptr [RSP + 0x220],XMM7 LAB_0011f480: MOV qword ptr [RSP + 0x1a0],R8 MOV qword ptr [RSP + 0x1a8],R9 LEA RAX,[0x12fb22] CMP byte ptr [RAX],0x0 JZ 0x0011f544 LAB_0011f4a0: MOV RBX,qword ptr [0x0012ef38] ADD RBX,0x10 LEA R14,[RSP + 0x270] MOV qword ptr [R14 + -0x38],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + -0x30],XMM0 MOVUPS xmmword ptr [R14 + -0x20],XMM0 MOVUPS xmmword ptr [R14 + -0x10],XMM0 MOV RDI,R14 CALL 0x00107a00 LEA RAX,[0x12ebf8] MOV qword ptr [R14 + -0x38],RAX LEA R13,[RSP + 0x278] LEA RAX,[RSP + 0xe30] MOV qword ptr [R13 + -0x18],R13 MOV qword ptr [R13 + -0x20],R13 MOV qword ptr [R13 + -0x10],RAX MOV qword ptr [R13 + -0x38],R13 MOV qword ptr [R13 + -0x30],R13 MOV qword ptr [R13 + -0x28],RAX LAB_0011f504: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x238] CALL 0x001071c0 MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x80],0x5 CALL 0x00107450 TEST RAX,RAX JZ 0x0011f589 LAB_0011f535: LEA RDI,[RSP + 0x70] MOV RSI,RAX CALL 0x00107350 LAB_0011f542: JMP 0x0011f59f LAB_0011f544: LEA RAX,[0x12fb1a] CMP byte ptr [RAX],0x0 JNZ 0x0011f4a0 LEA RAX,[0x12fb28] MOV ECX,dword ptr [RSP + 0xc] CMP dword ptr [RAX],ECX JLE 0x0011f4a0 LEA RAX,[0x12fb1c] CMP byte ptr [RAX],0x0 JNZ 0x0011f4a0 CALL 0x00121204 TEST AL,AL JZ 0x0011f4a0 JMP 0x0011f709 LAB_0011f589: LEA RSI,[0x1235d3] LEA RDI,[RSP + 0x70] MOV EDX,0x24 CALL 0x001075d0 LAB_0011f59f: LEA RAX,[RSP + 0xe30] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0xbb8 LAB_0011f5b5: MOV EDI,dword ptr [RSP + 0xc] CALL 0x00109844 MOVSX EBP,byte ptr [RAX] MOV RAX,qword ptr [RSP + 0x260] CMP RAX,qword ptr [RSP + 0x258] JZ 0x0011f5fa MOV RCX,qword ptr [RSP + 0x268] CMP RAX,RCX JZ 0x0011f5fa CMP byte ptr [RAX + -0x1],0x0 JZ 0x0011f5fa CMP RAX,RCX JNC 0x0011f71b MOV byte ptr [RAX],0x0 INC qword ptr [RSP + 0x260] LAB_0011f5fa: MOV RDI,qword ptr [RSP + 0x28] CALL 0x00121211 MOV dword ptr [RSP + 0x24],R12D MOV dword ptr [RSP],R12D LEA RDX,[0x123bcd] LEA R14,[RSP + 0x18] LEA R12,[RSP + 0x10] MOV RDI,R14 MOV RSI,R12 MOV ECX,EBP MOV R8,R13 MOV R9,RAX XOR EAX,EAX CALL 0x0011f793 MOV R13,qword ptr [R14] MOV RBP,qword ptr [R12] LEA RAX,[RSP + 0x180] LEA RCX,[RSP + 0x30] MOV qword ptr [RCX + 0x10],RAX LEA RAX,[RSP + 0x1a20] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000020 MOV qword ptr [RCX],RAX MOV RDI,R13 MOV RSI,RBP MOV RDX,R15 CALL 0x001072f0 LEA RDX,[0x123bf8] TEST EAX,EAX JS 0x0011f69b MOV EAX,EAX MOV RCX,RBP SUB RCX,RAX JC 0x0011f69b MOV qword ptr [RSP + 0x10],RCX ADD RAX,R13 MOV qword ptr [RSP + 0x18],RAX LEA RDX,[0x122b6a] LAB_0011f69b: LEA RDI,[RSP + 0x18] LEA RSI,[RSP + 0x10] XOR EAX,EAX CALL 0x0011f793 MOV RAX,qword ptr [0x0012ef98] MOV RDI,qword ptr [RAX] CALL 0x00107550 MOV R14D,EAX LEA R12,[RSP + 0xe30] MOV RDI,R12 CALL 0x001071f0 MOV EDI,0x1 MOV ESI,R14D MOV RDX,R12 MOV RCX,RAX XOR EAX,EAX CALL 0x00107070 CMP dword ptr [RSP + 0xc],0x3 JZ 0x0011f730 LEA RDI,[RSP + 0x78] CALL 0x00107160 MOV qword ptr [RSP + 0x238],RBX LEA RDI,[RSP + 0x270] CALL 0x00107760 LAB_0011f709: ADD RSP,0x19e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011f71b: LEA RDI,[RSP + 0x238] MOV RAX,qword ptr [RDI] LAB_0011f726: XOR ESI,ESI CALL qword ptr [RAX + 0x68] JMP 0x0011f5fa LAB_0011f730: LEA RDI,[RSP + 0x50] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RDI],RAX MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RDI + 0x8],EAX MOV qword ptr [RDI + 0x10],R13 MOV qword ptr [RDI + 0x18],RBP LAB_0011f74c: CALL 0x0011f839 LAB_0011f751: CALL 0x0010aee8 LAB_0011f756: MOV RDI,RAX CALL 0x00109155
/* nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) */ void nglog::RawLog(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,int4 param_11,char *param_12,int8 param_13, int8 param_14,...) { ulong uVar1; char in_AL; char cVar2; uint uVar3; pthread_t pVar4; char *pcVar5; int8 uVar6; ulong uVar7; size_t sVar8; char *pcVar9; int **ppuVar10; __0 *p_Var11; ulong local_1a08; char *local_1a00; int4 local_19f4; char *local_19f0; int8 local_19e8; int1 *local_19e0; int1 *local_19d8; char *local_19c8; int4 local_19c0; char *local_19b8; ulong local_19b0; long local_19a8; ios_base local_19a0 [8]; int8 auStack_1998 [32]; int1 local_1898 [32]; int8 local_1878; int8 local_1870; int4 local_1868; int8 local_1858; int8 local_1848; int8 local_1838; int8 local_1828; int8 local_1818; int8 local_1808; int8 local_17f8; int **local_17e0; char *local_17d8; char *pcStack_17d0; char *local_17c8; char *pcStack_17c0; char *local_17b8; char *pcStack_17b0; locale local_17a8 [8]; char local_17a0 [3000]; char local_be8 [3000]; if (in_AL != '\0') { local_1868 = param_1; local_1858 = param_2; local_1848 = param_3; local_1838 = param_4; local_1828 = param_5; local_1818 = param_6; local_1808 = param_7; local_17f8 = param_8; } local_19f0 = param_10; local_1878 = param_13; local_1870 = param_14; if ((((fLB::FLAGS_logtostdout != '\0') || (fLB::FLAGS_logtostderr != '\0')) || (fLI::FLAGS_stderrthreshold <= param_9)) || ((fLB::FLAGS_alsologtostderr != '\0' || (cVar2 = IsLoggingInitialized(), cVar2 == '\0')))) { ppuVar10 = (int **)(PTR_vtable_0012ef38 + 0x10); local_17d8 = (char *)0x0; pcStack_17d0 = (char *)0x0; local_17c8 = (char *)0x0; pcStack_17c0 = (char *)0x0; local_17b8 = (char *)0x0; pcStack_17b0 = (char *)0x0; local_17e0 = ppuVar10; std::locale::locale(local_17a8); local_17e0 = &PTR__streambuf_0012ebf8; local_17c8 = local_be8; /* try { // try from 0011f504 to 0011f515 has its CatchHandler @ 0011f764 */ local_17d8 = local_17a0; pcStack_17d0 = local_17a0; pcStack_17c0 = local_17a0; local_17b8 = local_17a0; pcStack_17b0 = local_17c8; std::ostream::ostream((ostream *)&local_19a8,(streambuf *)&local_17e0); *(int8 *)((long)auStack_1998 + *(long *)(local_19a8 + -0x18)) = 5; pVar4 = pthread_self(); if (pVar4 == 0) { /* try { // try from 0011f589 to 0011f59e has its CatchHandler @ 0011f762 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)&local_19a8,"thread::id of a non-executing thread",0x24); } else { /* try { // try from 0011f535 to 0011f541 has its CatchHandler @ 0011f762 */ std::ostream::_M_insert<unsigned_long>((ulong)&local_19a8); } local_1a00 = local_be8; local_1a08 = 3000; /* try { // try from 0011f5b5 to 0011f603 has its CatchHandler @ 0011f769 */ pcVar5 = (char *)GetLogSeverityName(param_9); cVar2 = *pcVar5; if (((local_17b8 != pcStack_17c0) && (local_17b8 != pcStack_17b0)) && (local_17b8[-1] != '\0')) { if (local_17b8 < pcStack_17b0) { *local_17b8 = '\0'; local_17b8 = local_17b8 + 1; } else { /* try { // try from 0011f726 to 0011f72a has its CatchHandler @ 0011f756 */ (*(code *)local_17e0[0xd])(&local_17e0,0); } } uVar6 = tools::const_basename(local_19f0); local_19f4 = param_11; DoRawLog(&local_1a00,&local_1a08,"%c00000000 00:00:00.000000 %s %s:%d] RAW: ", (ulong)(uint)(int)cVar2,local_17a0,uVar6,param_11); pcVar5 = local_1a00; uVar1 = local_1a08; local_19d8 = local_1898; local_19e0 = &stack0x00000008; local_19e8 = 0x3000000020; uVar3 = vsnprintf(local_1a00,local_1a08,param_12,&local_19e8); pcVar9 = "RAW_LOG ERROR: The Message was too long!\n"; if (-1 < (int)uVar3) { uVar7 = (ulong)uVar3; if (uVar7 <= uVar1) { local_1a00 = pcVar5 + uVar7; pcVar9 = "\n"; local_1a08 = uVar1 - uVar7; } } DoRawLog(&local_1a00,&local_1a08,pcVar9); uVar3 = fileno(*(FILE **)PTR_stderr_0012ef98); sVar8 = strlen(local_be8); p_Var11 = (__0 *)(ulong)uVar3; syscall(1,p_Var11,local_be8,sVar8); if (param_9 == 3) { local_19c8 = local_19f0; local_19c0 = local_19f4; local_19b8 = pcVar5; local_19b0 = uVar1; /* try { // try from 0011f74c to 0011f750 has its CatchHandler @ 0011f760 */ std::call_once<nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,___)::__0> ((once_flag *)&local_19c8,p_Var11); /* try { // try from 0011f751 to 0011f755 has its CatchHandler @ 0011f75e */ uVar6 = LogMessage::Fail(); /* catch(type#1 @ 00000000) { ... } // from try @ 0011f726 with catch @ 0011f756 */ /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar6); } std::ios_base::~ios_base(local_19a0); local_17e0 = ppuVar10; std::locale::~locale(local_17a8); } return; }
39,177
js_os_ttySetRaw
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { struct termios tty; int fd; if (JS_ToInt32(ctx, &fd, argv[0])) return JS_EXCEPTION; memset(&tty, 0, sizeof(tty)); tcgetattr(fd, &tty); oldtty = tty; tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP |INLCR|IGNCR|ICRNL|IXON); tty.c_oflag |= OPOST; tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN); tty.c_cflag &= ~(CSIZE|PARENB); tty.c_cflag |= CS8; tty.c_cc[VMIN] = 1; tty.c_cc[VTIME] = 0; tcsetattr(fd, TCSANOW, &tty); atexit(term_exit); return JS_UNDEFINED; }
O1
c
js_os_ttySetRaw: pushq %rbx subq $0x50, %rsp movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0xc(%rsp), %rsi callq 0x2ba0c movl $0x6, %edx testl %eax, %eax jne 0x1ccf8 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rbx movups %xmm0, 0x2c(%rbx) movaps %xmm0, 0x20(%rbx) movaps %xmm0, 0x10(%rbx) movaps %xmm0, (%rbx) movl 0xc(%rsp), %edi movq %rbx, %rsi callq 0xe7d0 movaps (%rbx), %xmm0 movaps 0x10(%rbx), %xmm1 movaps 0x20(%rbx), %xmm2 movups %xmm0, 0xb5eed(%rip) # 0xd2b88 movups %xmm1, 0xb5ef6(%rip) # 0xd2b98 andl $0xfffffa14, (%rbx) # imm = 0xFFFFFA14 movups 0x2c(%rbx), %xmm0 orb $0x1, 0x4(%rbx) movups %xmm2, 0xb5ef1(%rip) # 0xd2ba8 andl $0xffff7fb5, 0xc(%rbx) # imm = 0xFFFF7FB5 movups %xmm0, 0xb5eef(%rip) # 0xd2bb4 movl $0xfffffecf, %eax # imm = 0xFFFFFECF andl 0x8(%rbx), %eax orl $0x30, %eax movl %eax, 0x8(%rbx) movw $0x100, 0x16(%rbx) # imm = 0x100 movl 0xc(%rsp), %edi xorl %esi, %esi movq %rbx, %rdx callq 0xe7e0 leaq 0x1e67(%rip), %rdi # 0x1eb55 callq 0x9ea70 movl $0x3, %edx xorl %eax, %eax addq $0x50, %rsp popq %rbx retq
js_os_ttySetRaw: push rbx sub rsp, 50h mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+58h+var_4C] call JS_ToInt32 mov edx, 6 test eax, eax jnz loc_1CCF8 xorps xmm0, xmm0 lea rbx, [rsp+58h+var_48] movups xmmword ptr [rbx+2Ch], xmm0 movaps xmmword ptr [rbx+20h], xmm0 movaps xmmword ptr [rbx+10h], xmm0 movaps xmmword ptr [rbx], xmm0 mov edi, [rsp+58h+var_4C] mov rsi, rbx call _tcgetattr movaps xmm0, xmmword ptr [rbx] movaps xmm1, xmmword ptr [rbx+10h] movaps xmm2, xmmword ptr [rbx+20h] movups cs:oldtty, xmm0 movups cs:xmmword_D2B98, xmm1 and dword ptr [rbx], 0FFFFFA14h movups xmm0, xmmword ptr [rbx+2Ch] or byte ptr [rbx+4], 1 movups cs:xmmword_D2BA8, xmm2 and dword ptr [rbx+0Ch], 0FFFF7FB5h movups cs:xmmword_D2BA8+0Ch, xmm0 mov eax, 0FFFFFECFh and eax, [rbx+8] or eax, 30h mov [rbx+8], eax mov word ptr [rbx+16h], 100h mov edi, [rsp+58h+var_4C] xor esi, esi mov rdx, rbx call _tcsetattr lea rdi, term_exit call atexit mov edx, 3 loc_1CCF8: xor eax, eax add rsp, 50h pop rbx retn
long long js_os_ttySetRaw(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { unsigned int v6; // [rsp+Ch] [rbp-4Ch] BYREF __int128 v7; // [rsp+10h] [rbp-48h] BYREF __int128 v8; // [rsp+20h] [rbp-38h] _OWORD v9[2]; // [rsp+30h] [rbp-28h] BYREF if ( !(unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) ) { memset(v9, 0, 28); v8 = 0LL; v7 = 0LL; tcgetattr(v6, &v7, 6LL); oldtty = v7; xmmword_D2B98 = v8; LODWORD(v7) = v7 & 0xFFFFFA14; BYTE4(v7) |= 1u; xmmword_D2BA8 = v9[0]; HIDWORD(v7) &= 0xFFFF7FB5; *(__int128 *)((char *)&xmmword_D2BA8 + 12) = *(_OWORD *)((char *)v9 + 12); DWORD2(v7) = DWORD2(v7) & 0xFFFFFECF | 0x30; WORD3(v8) = 256; tcsetattr(v6, 0LL, &v7); atexit(term_exit); } return 0LL; }
js_os_ttySetRaw: PUSH RBX SUB RSP,0x50 MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RSI,[RSP + 0xc] CALL 0x0012ba0c MOV EDX,0x6 TEST EAX,EAX JNZ 0x0011ccf8 XORPS XMM0,XMM0 LEA RBX,[RSP + 0x10] MOVUPS xmmword ptr [RBX + 0x2c],XMM0 MOVAPS xmmword ptr [RBX + 0x20],XMM0 MOVAPS xmmword ptr [RBX + 0x10],XMM0 MOVAPS xmmword ptr [RBX],XMM0 MOV EDI,dword ptr [RSP + 0xc] MOV RSI,RBX CALL 0x0010e7d0 MOVAPS XMM0,xmmword ptr [RBX] MOVAPS XMM1,xmmword ptr [RBX + 0x10] MOVAPS XMM2,xmmword ptr [RBX + 0x20] MOVUPS xmmword ptr [0x001d2b88],XMM0 MOVUPS xmmword ptr [0x001d2b98],XMM1 AND dword ptr [RBX],0xfffffa14 MOVUPS XMM0,xmmword ptr [RBX + 0x2c] OR byte ptr [RBX + 0x4],0x1 MOVUPS xmmword ptr [0x001d2ba8],XMM2 AND dword ptr [RBX + 0xc],0xffff7fb5 MOVUPS xmmword ptr [0x001d2bb4],XMM0 MOV EAX,0xfffffecf AND EAX,dword ptr [RBX + 0x8] OR EAX,0x30 MOV dword ptr [RBX + 0x8],EAX MOV word ptr [RBX + 0x16],0x100 MOV EDI,dword ptr [RSP + 0xc] XOR ESI,ESI MOV RDX,RBX CALL 0x0010e7e0 LEA RDI,[0x11eb55] CALL 0x0019ea70 MOV EDX,0x3 LAB_0011ccf8: XOR EAX,EAX ADD RSP,0x50 POP RBX RET
int1 [16] js_os_ttySetRaw(int8 param_1) { int1 auVar1 [16]; int iVar2; ulong uVar3; int8 *in_R8; int local_4c; termios local_48; iVar2 = JS_ToInt32(param_1,&local_4c,*in_R8,in_R8[1]); uVar3 = 6; if (iVar2 == 0) { local_48.c_cc[0x1f] = '\0'; local_48._49_3_ = 0; local_48.c_ispeed = 0; local_48.c_ospeed = 0; local_48.c_cc[0xf] = '\0'; local_48.c_cc[0x10] = '\0'; local_48.c_cc[0x11] = '\0'; local_48.c_cc[0x12] = '\0'; local_48.c_cc[0x13] = '\0'; local_48.c_cc[0x14] = '\0'; local_48.c_cc[0x15] = '\0'; local_48.c_cc[0x16] = '\0'; local_48.c_cc[0x17] = '\0'; local_48.c_cc[0x18] = '\0'; local_48.c_cc[0x19] = '\0'; local_48.c_cc[0x1a] = '\0'; local_48.c_cc[0x1b] = '\0'; local_48.c_cc[0x1c] = '\0'; local_48.c_cc[0x1d] = '\0'; local_48.c_cc[0x1e] = '\0'; local_48.c_line = '\0'; local_48.c_cc[0] = '\0'; local_48.c_cc[1] = '\0'; local_48.c_cc[2] = '\0'; local_48.c_cc[3] = '\0'; local_48.c_cc[4] = '\0'; local_48.c_cc[5] = '\0'; local_48.c_cc[6] = '\0'; local_48.c_cc[7] = '\0'; local_48.c_cc[8] = '\0'; local_48.c_cc[9] = '\0'; local_48.c_cc[10] = '\0'; local_48.c_cc[0xb] = '\0'; local_48.c_cc[0xc] = '\0'; local_48.c_cc[0xd] = '\0'; local_48.c_cc[0xe] = '\0'; local_48.c_iflag = 0; local_48.c_oflag = 0; local_48.c_cflag = 0; local_48.c_lflag = 0; tcgetattr(local_4c,&local_48); oldtty._0_4_ = local_48.c_iflag; oldtty._4_4_ = local_48.c_oflag; oldtty._8_4_ = local_48.c_cflag; oldtty._12_4_ = local_48.c_lflag; oldtty[0x10] = local_48.c_line; oldtty[0x11] = local_48.c_cc[0]; oldtty[0x12] = local_48.c_cc[1]; oldtty[0x13] = local_48.c_cc[2]; oldtty[0x14] = local_48.c_cc[3]; oldtty[0x15] = local_48.c_cc[4]; oldtty[0x16] = local_48.c_cc[5]; oldtty[0x17] = local_48.c_cc[6]; oldtty[0x18] = local_48.c_cc[7]; oldtty[0x19] = local_48.c_cc[8]; oldtty[0x1a] = local_48.c_cc[9]; oldtty[0x1b] = local_48.c_cc[10]; oldtty[0x1c] = local_48.c_cc[0xb]; oldtty[0x1d] = local_48.c_cc[0xc]; oldtty[0x1e] = local_48.c_cc[0xd]; oldtty[0x1f] = local_48.c_cc[0xe]; local_48._0_8_ = local_48._0_8_ & 0xfffffffffffffa14; local_48._0_8_ = local_48._0_8_ | 0x100000000; oldtty[0x20] = local_48.c_cc[0xf]; oldtty[0x21] = local_48.c_cc[0x10]; oldtty[0x22] = local_48.c_cc[0x11]; oldtty[0x23] = local_48.c_cc[0x12]; oldtty[0x24] = local_48.c_cc[0x13]; oldtty[0x25] = local_48.c_cc[0x14]; oldtty[0x26] = local_48.c_cc[0x15]; oldtty[0x27] = local_48.c_cc[0x16]; oldtty[0x28] = local_48.c_cc[0x17]; oldtty[0x29] = local_48.c_cc[0x18]; oldtty[0x2a] = local_48.c_cc[0x19]; oldtty[0x2b] = local_48.c_cc[0x1a]; oldtty[0x2c] = local_48.c_cc[0x1b]; oldtty[0x2d] = local_48.c_cc[0x1c]; oldtty[0x2e] = local_48.c_cc[0x1d]; oldtty[0x2f] = local_48.c_cc[0x1e]; oldtty._48_4_ = local_48._48_4_; oldtty._52_4_ = local_48.c_ispeed; oldtty._56_4_ = local_48.c_ospeed; local_48._8_8_ = local_48._8_8_ & 0xffff7fb5fffffecf | 0x30; local_48.c_cc._5_2_ = 0x100; tcsetattr(local_4c,0,&local_48); atexit(term_exit); uVar3 = 3; } auVar1._8_8_ = 0; auVar1._0_8_ = uVar3; return auVar1 << 0x40; }
39,178
nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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
friend bool operator==(const_reference lhs, const_reference rhs) noexcept { #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" #endif JSON_IMPLEMENT_OPERATOR( ==, true, false, false) #ifdef __GNUC__ #pragma GCC diagnostic pop #endif }
O0
cpp
nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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&): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi callq 0x80040 movb %al, 0x1f(%rsp) movq 0x20(%rsp), %rdi callq 0x80040 movb %al, 0x1e(%rsp) movb 0x1f(%rsp), %al cmpb 0x1e(%rsp), %al jne 0x7fdff movzbl 0x1f(%rsp), %eax movq %rax, 0x10(%rsp) subq $0x9, %rax ja 0x7fdf5 movq 0x10(%rsp), %rax leaq 0x159e98(%rip), %rcx # 0x1d9b40 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x28(%rsp), %rax movq 0x8(%rax), %rdi movq 0x20(%rsp), %rax movq 0x8(%rax), %rsi callq 0x80050 movb %al, 0xf(%rsp) jmp 0x7fcce movb 0xf(%rsp), %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 movq 0x28(%rsp), %rax movq 0x8(%rax), %rdi movq 0x20(%rsp), %rax movq 0x8(%rax), %rsi callq 0x800e0 movb %al, 0xe(%rsp) jmp 0x7fcfa movb 0xe(%rsp), %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 movb $0x1, 0x37(%rsp) jmp 0x7ffa8 movq 0x28(%rsp), %rax movq 0x8(%rax), %rdi movq 0x20(%rsp), %rax movq 0x8(%rax), %rsi callq 0x80110 andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 movq 0x28(%rsp), %rax movb 0x8(%rax), %al andb $0x1, %al movzbl %al, %eax movq 0x20(%rsp), %rcx movb 0x8(%rcx), %cl andb $0x1, %cl movzbl %cl, %ecx cmpl %ecx, %eax sete %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 movq 0x28(%rsp), %rax movq 0x8(%rax), %rax movq 0x20(%rsp), %rcx cmpq 0x8(%rcx), %rax sete %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 movq 0x28(%rsp), %rax movq 0x8(%rax), %rax movq 0x20(%rsp), %rcx cmpq 0x8(%rcx), %rax sete %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 movq 0x28(%rsp), %rax movsd 0x8(%rax), %xmm0 movq 0x20(%rsp), %rax ucomisd 0x8(%rax), %xmm0 sete %al setnp %cl andb %cl, %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 movq 0x28(%rsp), %rax movq 0x8(%rax), %rdi movq 0x20(%rsp), %rax movq 0x8(%rax), %rsi callq 0x801b0 movb %al, 0xd(%rsp) jmp 0x7fde4 movb 0xd(%rsp), %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 jmp 0x7fdf5 movb $0x0, 0x37(%rsp) jmp 0x7ffa8 cmpb $0x5, 0x1f(%rsp) jne 0x7fe35 cmpb $0x7, 0x1e(%rsp) jne 0x7fe35 movq 0x28(%rsp), %rax cvtsi2sdq 0x8(%rax), %xmm0 movq 0x20(%rsp), %rax ucomisd 0x8(%rax), %xmm0 sete %al setnp %cl andb %cl, %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 cmpb $0x7, 0x1f(%rsp) jne 0x7fe6f cmpb $0x5, 0x1e(%rsp) jne 0x7fe6f movq 0x28(%rsp), %rax movsd 0x8(%rax), %xmm0 movq 0x20(%rsp), %rax cvtsi2sdq 0x8(%rax), %xmm1 ucomisd %xmm1, %xmm0 sete %al setnp %cl andb %cl, %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 cmpb $0x6, 0x1f(%rsp) jne 0x7fec6 cmpb $0x7, 0x1e(%rsp) jne 0x7fec6 movq 0x28(%rsp), %rax movq 0x8(%rax), %xmm0 movaps 0x159c92(%rip), %xmm1 # 0x1d9b20 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movapd 0x159c96(%rip), %xmm1 # 0x1d9b30 subpd %xmm1, %xmm0 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1] addsd %xmm1, %xmm0 movq 0x20(%rsp), %rax ucomisd 0x8(%rax), %xmm0 sete %al setnp %cl andb %cl, %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 cmpb $0x7, 0x1f(%rsp) jne 0x7ff21 cmpb $0x6, 0x1e(%rsp) jne 0x7ff21 movq 0x28(%rsp), %rax movsd 0x8(%rax), %xmm0 movq 0x20(%rsp), %rax movq 0x8(%rax), %xmm1 movaps 0x159c31(%rip), %xmm2 # 0x1d9b20 punpckldq %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] movapd 0x159c35(%rip), %xmm2 # 0x1d9b30 subpd %xmm2, %xmm1 movaps %xmm1, %xmm2 unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1] addsd %xmm2, %xmm1 ucomisd %xmm1, %xmm0 sete %al setnp %cl andb %cl, %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 cmpb $0x6, 0x1f(%rsp) jne 0x7ff4c cmpb $0x5, 0x1e(%rsp) jne 0x7ff4c movq 0x28(%rsp), %rax movq 0x8(%rax), %rax movq 0x20(%rsp), %rcx cmpq 0x8(%rcx), %rax sete %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 cmpb $0x5, 0x1f(%rsp) jne 0x7ff77 cmpb $0x6, 0x1e(%rsp) jne 0x7ff77 movq 0x28(%rsp), %rax movq 0x8(%rax), %rax movq 0x20(%rsp), %rcx cmpq 0x8(%rcx), %rax sete %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x7ffa8 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi xorl %edx, %edx callq 0x80220 testb $0x1, %al jne 0x7ff8e jmp 0x7ff95 movb $0x0, 0x37(%rsp) jmp 0x7ffa8 jmp 0x7ff97 jmp 0x7ff99 jmp 0x7ff9b jmp 0x7ff9d jmp 0x7ff9f jmp 0x7ffa1 jmp 0x7ffa3 movb $0x0, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq movq %rax, %rdi callq 0x5bb40 nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rdi, [rsp+38h+var_10] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4typeEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type(void) mov [rsp+38h+var_19], al mov rdi, [rsp+38h+var_18] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4typeEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type(void) mov [rsp+38h+var_1A], al mov al, [rsp+38h+var_19] cmp al, [rsp+38h+var_1A] jnz loc_7FDFF movzx eax, [rsp+38h+var_19] mov [rsp+38h+var_28], rax sub rax, 9; switch 10 cases ja def_7FCAF; jumptable 000000000007FCAF default case mov rax, [rsp+38h+var_28] lea rcx, jpt_7FCAF movsxd rax, ds:(jpt_7FCAF - 1D9B40h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_7FCB1: mov rax, [rsp+38h+var_10]; jumptable 000000000007FCAF case 2 mov rdi, [rax+8] mov rax, [rsp+38h+var_18] mov rsi, [rax+8] call _ZSteqIN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISE_EEbRKS4_IT_T0_ESK_; std::operator==<nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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<std::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<std::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<std::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<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) mov [rsp+38h+var_29], al jmp short $+2 loc_7FCCE: mov al, [rsp+38h+var_29] and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FCDD: mov rax, [rsp+38h+var_10]; jumptable 000000000007FCAF case 1 mov rdi, [rax+8] mov rax, [rsp+38h+var_18] mov rsi, [rax+8] call _ZSteqINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_blmdSaNS7_14adl_serializerESA_IhSaIhEEvEESt4lessIvESaISt4pairIKS5_SE_EEEbRKS9_IT_T0_T1_T2_ESR_; std::operator==<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(std::map const&<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,std::map const&<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>) mov [rsp+38h+var_2A], al jmp short $+2 loc_7FCFA: mov al, [rsp+38h+var_2A] and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FD09: mov [rsp+38h+var_1], 1; jumptable 000000000007FCAF case 0 jmp loc_7FFA8 loc_7FD13: mov rax, [rsp+38h+var_10]; jumptable 000000000007FCAF case 3 mov rdi, [rax+8] mov rax, [rsp+38h+var_18] mov rsi, [rax+8] call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FD35: mov rax, [rsp+38h+var_10]; jumptable 000000000007FCAF case 4 mov al, [rax+8] and al, 1 movzx eax, al mov rcx, [rsp+38h+var_18] mov cl, [rcx+8] and cl, 1 movzx ecx, cl cmp eax, ecx setz al and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FD60: mov rax, [rsp+38h+var_10]; jumptable 000000000007FCAF case 5 mov rax, [rax+8] mov rcx, [rsp+38h+var_18] cmp rax, [rcx+8] setz al and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FD80: mov rax, [rsp+38h+var_10]; jumptable 000000000007FCAF case 6 mov rax, [rax+8] mov rcx, [rsp+38h+var_18] cmp rax, [rcx+8] setz al and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FDA0: mov rax, [rsp+38h+var_10]; jumptable 000000000007FCAF case 7 movsd xmm0, qword ptr [rax+8] mov rax, [rsp+38h+var_18] ucomisd xmm0, qword ptr [rax+8] setz al setnp cl and al, cl and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FDC7: mov rax, [rsp+38h+var_10]; jumptable 000000000007FCAF case 8 mov rdi, [rax+8] mov rax, [rsp+38h+var_18] mov rsi, [rax+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&) mov [rsp+38h+var_2B], al jmp short $+2 loc_7FDE4: mov al, [rsp+38h+var_2B] and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FDF3: jmp short $+2; jumptable 000000000007FCAF case 9 def_7FCAF: mov [rsp+38h+var_1], 0; jumptable 000000000007FCAF default case jmp loc_7FFA8 loc_7FDFF: cmp [rsp+38h+var_19], 5 jnz short loc_7FE35 cmp [rsp+38h+var_1A], 7 jnz short loc_7FE35 mov rax, [rsp+38h+var_10] cvtsi2sd xmm0, qword ptr [rax+8] mov rax, [rsp+38h+var_18] ucomisd xmm0, qword ptr [rax+8] setz al setnp cl and al, cl and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FE35: cmp [rsp+38h+var_19], 7 jnz short loc_7FE6F cmp [rsp+38h+var_1A], 5 jnz short loc_7FE6F mov rax, [rsp+38h+var_10] movsd xmm0, qword ptr [rax+8] mov rax, [rsp+38h+var_18] cvtsi2sd xmm1, qword ptr [rax+8] ucomisd xmm0, xmm1 setz al setnp cl and al, cl and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FE6F: cmp [rsp+38h+var_19], 6 jnz short loc_7FEC6 cmp [rsp+38h+var_1A], 7 jnz short loc_7FEC6 mov rax, [rsp+38h+var_10] movq xmm0, qword ptr [rax+8] movaps xmm1, cs:xmmword_1D9B20 punpckldq xmm0, xmm1 movapd xmm1, cs:xmmword_1D9B30 subpd xmm0, xmm1 movaps xmm1, xmm0 unpckhpd xmm0, xmm0 addsd xmm0, xmm1 mov rax, [rsp+38h+var_18] ucomisd xmm0, qword ptr [rax+8] setz al setnp cl and al, cl and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FEC6: cmp [rsp+38h+var_19], 7 jnz short loc_7FF21 cmp [rsp+38h+var_1A], 6 jnz short loc_7FF21 mov rax, [rsp+38h+var_10] movsd xmm0, qword ptr [rax+8] mov rax, [rsp+38h+var_18] movq xmm1, qword ptr [rax+8] movaps xmm2, cs:xmmword_1D9B20 punpckldq xmm1, xmm2 movapd xmm2, cs:xmmword_1D9B30 subpd xmm1, xmm2 movaps xmm2, xmm1 unpckhpd xmm1, xmm1 addsd xmm1, xmm2 ucomisd xmm0, xmm1 setz al setnp cl and al, cl and al, 1 mov [rsp+38h+var_1], al jmp loc_7FFA8 loc_7FF21: cmp [rsp+38h+var_19], 6 jnz short loc_7FF4C cmp [rsp+38h+var_1A], 5 jnz short loc_7FF4C mov rax, [rsp+38h+var_10] mov rax, [rax+8] mov rcx, [rsp+38h+var_18] cmp rax, [rcx+8] setz al and al, 1 mov [rsp+38h+var_1], al jmp short loc_7FFA8 loc_7FF4C: cmp [rsp+38h+var_19], 5 jnz short loc_7FF77 cmp [rsp+38h+var_1A], 6 jnz short loc_7FF77 mov rax, [rsp+38h+var_10] mov rax, [rax+8] mov rcx, [rsp+38h+var_18] cmp rax, [rcx+8] setz al and al, 1 mov [rsp+38h+var_1], al jmp short loc_7FFA8 loc_7FF77: mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] xor edx, edx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE18compares_unorderedERKSD_SF_b; nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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<std::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) test al, 1 jnz short loc_7FF8E jmp short loc_7FF95 loc_7FF8E: mov [rsp+38h+var_1], 0 jmp short loc_7FFA8 loc_7FF95: jmp short $+2 loc_7FF97: jmp short $+2 loc_7FF99: jmp short $+2 loc_7FF9B: jmp short $+2 loc_7FF9D: jmp short $+2 loc_7FF9F: jmp short $+2 loc_7FFA1: jmp short $+2 loc_7FFA3: mov [rsp+38h+var_1], 0 loc_7FFA8: mov al, [rsp+38h+var_1] and al, 1 add rsp, 38h retn mov rdi, rax call __clang_call_terminate
char nlohmann::json_abi_v3_11_3::operator==(long long a1, long long a2) { __m128d v2; // xmm1 __m128d v3; // xmm2 char v5; // [rsp+1Eh] [rbp-1Ah] char v6; // [rsp+1Fh] [rbp-19h] char v7; // [rsp+37h] [rbp-1h] v6 = nlohmann::json_abi_v3_11_3::basic_json<std::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(a1); v5 = nlohmann::json_abi_v3_11_3::basic_json<std::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(a2); if ( v6 == v5 ) { switch ( v6 ) { case 0: v7 = 1; break; case 1: v7 = std::operator==<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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 + 8), *(_QWORD *)(a2 + 8)) & 1; break; case 2: v7 = std::operator==<nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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 + 8), *(_QWORD *)(a2 + 8)) & 1; break; case 3: v7 = std::operator==<char>(*(_QWORD *)(a1 + 8), *(_QWORD *)(a2 + 8)) & 1; break; case 4: v7 = (*(_BYTE *)(a1 + 8) & 1) == (*(_BYTE *)(a2 + 8) & 1); break; case 5: v7 = *(_QWORD *)(a1 + 8) == *(_QWORD *)(a2 + 8); break; case 6: v7 = *(_QWORD *)(a1 + 8) == *(_QWORD *)(a2 + 8); break; case 7: v7 = *(double *)(a1 + 8) == *(double *)(a2 + 8); break; case 8: v7 = nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>::operator==( *(_QWORD *)(a1 + 8), *(_QWORD *)(a2 + 8)) & 1; break; default: v7 = 0; break; } } else if ( v6 == 5 && v5 == 7 ) { v7 = (double)(int)*(_QWORD *)(a1 + 8) == *(double *)(a2 + 8); } else if ( v6 == 7 && v5 == 5 ) { v7 = *(double *)(a1 + 8) == (double)(int)*(_QWORD *)(a2 + 8); } else if ( v6 == 6 && v5 == 7 ) { v2 = _mm_sub_pd( (__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i *)(a1 + 8)), (__m128i)xmmword_1D9B20), (__m128d)xmmword_1D9B30); v7 = _mm_unpackhi_pd(v2, v2).m128d_f64[0] + v2.m128d_f64[0] == *(double *)(a2 + 8); } else if ( v6 == 7 && v5 == 6 ) { v3 = _mm_sub_pd( (__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i *)(a2 + 8)), (__m128i)xmmword_1D9B20), (__m128d)xmmword_1D9B30); v7 = *(double *)(a1 + 8) == _mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0]; } else if ( v6 == 6 && v5 == 5 ) { v7 = *(_QWORD *)(a1 + 8) == *(_QWORD *)(a2 + 8); } else if ( v6 == 5 && v5 == 6 ) { v7 = *(_QWORD *)(a1 + 8) == *(_QWORD *)(a2 + 8); } else { v7 = 0; nlohmann::json_abi_v3_11_3::basic_json<std::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); } return v7 & 1; }
operator==: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RDI,qword ptr [RSP + 0x28] CALL 0x00180040 MOV byte ptr [RSP + 0x1f],AL MOV RDI,qword ptr [RSP + 0x20] CALL 0x00180040 MOV byte ptr [RSP + 0x1e],AL MOV AL,byte ptr [RSP + 0x1f] CMP AL,byte ptr [RSP + 0x1e] JNZ 0x0017fdff MOVZX EAX,byte ptr [RSP + 0x1f] MOV qword ptr [RSP + 0x10],RAX SUB RAX,0x9 JA 0x0017fdf5 MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x2d9b40] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_17fcb1: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x8] LAB_0017fcc3: CALL 0x00180050 MOV byte ptr [RSP + 0xf],AL JMP 0x0017fcce LAB_0017fcce: MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 caseD_17fcdd: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001800e0 MOV byte ptr [RSP + 0xe],AL JMP 0x0017fcfa LAB_0017fcfa: MOV AL,byte ptr [RSP + 0xe] AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 caseD_17fd09: MOV byte ptr [RSP + 0x37],0x1 JMP 0x0017ffa8 caseD_17fd13: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00180110 AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 caseD_17fd35: MOV RAX,qword ptr [RSP + 0x28] MOV AL,byte ptr [RAX + 0x8] AND AL,0x1 MOVZX EAX,AL MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0x8] AND CL,0x1 MOVZX ECX,CL CMP EAX,ECX SETZ AL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 caseD_17fd60: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RCX + 0x8] SETZ AL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 caseD_17fd80: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RCX + 0x8] SETZ AL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 caseD_17fda0: MOV RAX,qword ptr [RSP + 0x28] MOVSD XMM0,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x20] UCOMISD XMM0,qword ptr [RAX + 0x8] SETZ AL SETNP CL AND AL,CL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 caseD_17fdc7: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001801b0 MOV byte ptr [RSP + 0xd],AL JMP 0x0017fde4 LAB_0017fde4: MOV AL,byte ptr [RSP + 0xd] AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 caseD_17fdf3: JMP 0x0017fdf5 LAB_0017fdf5: MOV byte ptr [RSP + 0x37],0x0 JMP 0x0017ffa8 LAB_0017fdff: CMP byte ptr [RSP + 0x1f],0x5 JNZ 0x0017fe35 CMP byte ptr [RSP + 0x1e],0x7 JNZ 0x0017fe35 MOV RAX,qword ptr [RSP + 0x28] CVTSI2SD XMM0,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x20] UCOMISD XMM0,qword ptr [RAX + 0x8] SETZ AL SETNP CL AND AL,CL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 LAB_0017fe35: CMP byte ptr [RSP + 0x1f],0x7 JNZ 0x0017fe6f CMP byte ptr [RSP + 0x1e],0x5 JNZ 0x0017fe6f MOV RAX,qword ptr [RSP + 0x28] MOVSD XMM0,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x20] CVTSI2SD XMM1,qword ptr [RAX + 0x8] UCOMISD XMM0,XMM1 SETZ AL SETNP CL AND AL,CL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 LAB_0017fe6f: CMP byte ptr [RSP + 0x1f],0x6 JNZ 0x0017fec6 CMP byte ptr [RSP + 0x1e],0x7 JNZ 0x0017fec6 MOV RAX,qword ptr [RSP + 0x28] MOVQ XMM0,qword ptr [RAX + 0x8] MOVAPS XMM1,xmmword ptr [0x002d9b20] PUNPCKLDQ XMM0,XMM1 MOVAPD XMM1,xmmword ptr [0x002d9b30] SUBPD XMM0,XMM1 MOVAPS XMM1,XMM0 UNPCKHPD XMM0,XMM0 ADDSD XMM0,XMM1 MOV RAX,qword ptr [RSP + 0x20] UCOMISD XMM0,qword ptr [RAX + 0x8] SETZ AL SETNP CL AND AL,CL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 LAB_0017fec6: CMP byte ptr [RSP + 0x1f],0x7 JNZ 0x0017ff21 CMP byte ptr [RSP + 0x1e],0x6 JNZ 0x0017ff21 MOV RAX,qword ptr [RSP + 0x28] MOVSD XMM0,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x20] MOVQ XMM1,qword ptr [RAX + 0x8] MOVAPS XMM2,xmmword ptr [0x002d9b20] PUNPCKLDQ XMM1,XMM2 MOVAPD XMM2,xmmword ptr [0x002d9b30] SUBPD XMM1,XMM2 MOVAPS XMM2,XMM1 UNPCKHPD XMM1,XMM1 ADDSD XMM1,XMM2 UCOMISD XMM0,XMM1 SETZ AL SETNP CL AND AL,CL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 LAB_0017ff21: CMP byte ptr [RSP + 0x1f],0x6 JNZ 0x0017ff4c CMP byte ptr [RSP + 0x1e],0x5 JNZ 0x0017ff4c MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RCX + 0x8] SETZ AL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 LAB_0017ff4c: CMP byte ptr [RSP + 0x1f],0x5 JNZ 0x0017ff77 CMP byte ptr [RSP + 0x1e],0x6 JNZ 0x0017ff77 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RCX + 0x8] SETZ AL AND AL,0x1 MOV byte ptr [RSP + 0x37],AL JMP 0x0017ffa8 LAB_0017ff77: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] XOR EDX,EDX CALL 0x00180220 TEST AL,0x1 JNZ 0x0017ff8e JMP 0x0017ff95 LAB_0017ff8e: MOV byte ptr [RSP + 0x37],0x0 JMP 0x0017ffa8 LAB_0017ff95: JMP 0x0017ff97 LAB_0017ff97: JMP 0x0017ff99 LAB_0017ff99: JMP 0x0017ff9b LAB_0017ff9b: JMP 0x0017ff9d LAB_0017ff9d: JMP 0x0017ff9f LAB_0017ff9f: JMP 0x0017ffa1 LAB_0017ffa1: JMP 0x0017ffa3 LAB_0017ffa3: MOV byte ptr [RSP + 0x37],0x0 LAB_0017ffa8: MOV AL,byte ptr [RSP + 0x37] AND AL,0x1 ADD RSP,0x38 RET
/* 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<std::map, std::vector, std::__cxx11::string, 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<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ bool nlohmann::json_abi_v3_11_3::operator==(basic_json *param_1,basic_json *param_2) { int8 uVar1; byte bVar2; byte bVar3; ulong uVar4; int1 auVar5 [16]; int1 auVar6 [16]; bool local_1; bVar2 = basic_json<std::map,std::vector,std::__cxx11::string,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((basic_json<std::map,std::vector,std::__cxx11::string,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); bVar3 = basic_json<std::map,std::vector,std::__cxx11::string,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((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_2); if (bVar2 != bVar3) { if ((bVar2 == 5) && (bVar3 == 7)) { return (double)*(long *)(param_1 + 8) == *(double *)(param_2 + 8); } if ((bVar2 == 7) && (bVar3 == 5)) { return *(double *)(param_1 + 8) == (double)*(long *)(param_2 + 8); } if ((bVar2 == 6) && (bVar3 == 7)) { uVar1 = *(int8 *)(param_1 + 8); auVar5._8_4_ = (int)((ulong)uVar1 >> 0x20); auVar5._0_8_ = uVar1; auVar5._12_4_ = _UNK_002d9b24; return (auVar5._8_8_ - _UNK_002d9b38) + ((double)CONCAT44(_DAT_002d9b20,(int)uVar1) - _DAT_002d9b30) == *(double *)(param_2 + 8); } if ((bVar2 == 7) && (bVar3 == 6)) { uVar1 = *(int8 *)(param_2 + 8); auVar6._8_4_ = (int)((ulong)uVar1 >> 0x20); auVar6._0_8_ = uVar1; auVar6._12_4_ = _UNK_002d9b24; return *(double *)(param_1 + 8) == (auVar6._8_8_ - _UNK_002d9b38) + ((double)CONCAT44(_DAT_002d9b20,(int)uVar1) - _DAT_002d9b30); } if ((bVar2 == 6) && (bVar3 == 5)) { return *(long *)(param_1 + 8) == *(long *)(param_2 + 8); } if ((bVar2 == 5) && (bVar3 == 6)) { return *(long *)(param_1 + 8) == *(long *)(param_2 + 8); } uVar4 = basic_json<std::map,std::vector,std::__cxx11::string,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); if ((uVar4 & 1) == 0) { return false; } return false; } if ((ulong)bVar2 < 10) { switch((long)&switchD_0017fcaf::switchdataD_002d9b40 + (long)(int)(&switchD_0017fcaf::switchdataD_002d9b40)[bVar2]) { case 0x17fcb1: /* try { // try from 0017fcc3 to 0017fddd has its CatchHandler @ 0017ffb3 */ local_1 = std::operator==(*(vector **)(param_1 + 8),*(vector **)(param_2 + 8)); break; case 0x17fcdd: local_1 = std::operator==(*(map **)(param_1 + 8),*(map **)(param_2 + 8)); break; case 0x17fd09: local_1 = true; break; case 0x17fd13: bVar2 = std::operator==(*(string **)(param_1 + 8),*(string **)(param_2 + 8)); local_1 = (bool)(bVar2 & 1); break; case 0x17fd35: local_1 = ((byte)param_1[8] & 1) == ((byte)param_2[8] & 1); break; case 0x17fd60: local_1 = *(long *)(param_1 + 8) == *(long *)(param_2 + 8); break; case 0x17fd80: local_1 = *(long *)(param_1 + 8) == *(long *)(param_2 + 8); break; case 0x17fda0: local_1 = *(double *)(param_1 + 8) == *(double *)(param_2 + 8); break; case 0x17fdc7: bVar2 = 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)); local_1 = (bool)(bVar2 & 1); break; case 0x17fdf3: goto LAB_0017fdf5; } } else { LAB_0017fdf5: local_1 = false; } return local_1; }
39,179
translog_purge_at_flush
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_purge_at_flush() { uint32 i, min_file; int rc= 0; DBUG_ENTER("translog_purge_at_flush"); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); if (unlikely(translog_status == TRANSLOG_READONLY)) { DBUG_PRINT("info", ("The log is read only => exit")); DBUG_RETURN(0); } if (log_purge_type != TRANSLOG_PURGE_ONDEMAND) { DBUG_PRINT("info", ("It is not \"at_flush\" => exit")); DBUG_RETURN(0); } mysql_mutex_lock(&log_descriptor.purger_lock); if (unlikely(log_descriptor.min_need_file == 0 || log_purge_disabled)) { DBUG_PRINT("info", ("No info about min need file => exit")); mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(0); } min_file= translog_first_file(translog_get_horizon(), 1); DBUG_ASSERT(min_file != 0); /* log is already started */ for(i= min_file; i < log_descriptor.min_need_file && rc == 0; i++) { char path[FN_REFLEN], *file_name; DBUG_PRINT("info", ("purge file %lu\n", (ulong) i)); file_name= translog_filename_by_fileno(i, path); rc= MY_TEST(mysql_file_delete(key_file_translog, file_name, MYF(MY_WME))); } mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(rc); }
O3
c
translog_purge_at_flush: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x268, %rsp # imm = 0x268 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) xorl %ebx, %ebx cmpl $0x2, 0x3b0b4c(%rip) # 0x3ff860 je 0x4ee2a cmpq $0x2, 0x3b0b26(%rip) # 0x3ff848 jne 0x4ee2a cmpq $0x0, 0xbb2c00(%rip) # 0xc01930 jne 0x4ee4d leaq 0xbb2bb3(%rip), %rdi # 0xc018f0 callq 0x29220 cmpl $0x0, 0xbb2b9f(%rip) # 0xc018e8 je 0x4ee57 cmpl $0x0, 0x3b0aea(%rip) # 0x3ff840 jne 0x4ee57 callq 0x4ce58 movq %rax, %rdi movl $0x1, %esi callq 0x4b2e0 cmpl 0xbb2b74(%rip), %eax # 0xc018e8 jae 0x4ee09 movl %eax, %ebx leaq -0x230(%rbp), %r14 leaq 0x339336(%rip), %r13 # 0x3880c0 leaq -0x288(%rbp), %r15 leaq -0x240(%rbp), %r12 movl %ebx, %edi movq %r14, %rsi callq 0x499c1 leaq 0x3b061b(%rip), %rax # 0x3ff3c4 movl (%rax), %esi movq (%r13), %rax movq %r15, %rdi movl $0xe, %edx movq %r14, %rcx movq %r12, %r8 callq *0x148(%rax) movq %rax, -0x240(%rbp) testq %rax, %rax jne 0x4edec movl $0x10, %esi movq %r14, %rdi callq 0x9ee3c incl %ebx cmpl 0xbb2b04(%rip), %ebx # 0xc018e8 jae 0x4ee0d testl %eax, %eax je 0x4ed98 jmp 0x4ee0d movq %rax, %rdi movq %r14, %rsi movq %r12, %rdx leaq -0x234(%rbp), %rcx callq 0x2cc76 movl -0x234(%rbp), %eax jmp 0x4eddc xorl %ebx, %ebx jmp 0x4ee12 testl %eax, %eax setne %bl movq 0xbb2b17(%rip), %rdi # 0xc01930 testq %rdi, %rdi jne 0x4ee60 leaq 0xbb2acb(%rip), %rdi # 0xc018f0 callq 0x291e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4ee72 movl %ebx, %eax addq $0x268, %rsp # imm = 0x268 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2cc59 jmp 0x4ed42 callq 0x2cccd xorl %ebx, %ebx jmp 0x4ee2a leaq 0x339259(%rip), %rax # 0x3880c0 movq (%rax), %rax callq *0x160(%rax) jmp 0x4ee1e callq 0x29270
translog_purge_at_flush: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 268h mov rax, fs:28h mov [rbp+var_30], rax xor ebx, ebx cmp cs:translog_status, 2 jz loc_4EE2A cmp cs:log_purge_type, 2 jnz loc_4EE2A cmp cs:qword_C01930, 0 jnz loc_4EE4D lea rdi, unk_C018F0 call _pthread_mutex_lock loc_4ED42: cmp dword ptr cs:qword_C018E8, 0 jz loc_4EE57 cmp cs:log_purge_disabled, 0 jnz loc_4EE57 call translog_get_horizon mov rdi, rax mov esi, 1 call translog_first_file cmp eax, dword ptr cs:qword_C018E8 jnb loc_4EE09 mov ebx, eax lea r14, [rbp+var_230] lea r13, PSI_server lea r15, [rbp+var_288] lea r12, [rbp+var_240] loc_4ED98: mov edi, ebx mov rsi, r14 call translog_filename_by_fileno lea rax, key_file_translog mov esi, [rax] mov rax, [r13+0] mov rdi, r15 mov edx, 0Eh mov rcx, r14 mov r8, r12 call qword ptr [rax+148h] mov [rbp+var_240], rax test rax, rax jnz short loc_4EDEC mov esi, 10h mov rdi, r14 call my_delete loc_4EDDC: inc ebx cmp ebx, dword ptr cs:qword_C018E8 jnb short loc_4EE0D test eax, eax jz short loc_4ED98 jmp short loc_4EE0D loc_4EDEC: mov rdi, rax mov rsi, r14 mov rdx, r12 lea rcx, [rbp+var_234] call translog_purge_at_flush_cold_2 mov eax, [rbp+var_234] jmp short loc_4EDDC loc_4EE09: xor ebx, ebx jmp short loc_4EE12 loc_4EE0D: test eax, eax setnz bl loc_4EE12: mov rdi, cs:qword_C01930 test rdi, rdi jnz short loc_4EE60 loc_4EE1E: lea rdi, unk_C018F0 call _pthread_mutex_unlock loc_4EE2A: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4EE72 mov eax, ebx add rsp, 268h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4EE4D: call translog_purge_at_flush_cold_1 jmp loc_4ED42 loc_4EE57: call translog_purge_at_flush_cold_3 xor ebx, ebx jmp short loc_4EE2A loc_4EE60: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4EE1E loc_4EE72: call ___stack_chk_fail
long long translog_purge_at_flush() { unsigned int v0; // ebx unsigned long long horizon; // rax unsigned int file; // eax long long v3; // rdx long long v4; // rcx int v5; // r8d int v6; // r9d long long v7; // rax unsigned int v8; // eax _BYTE v10[72]; // [rsp+8h] [rbp-288h] BYREF long long v11; // [rsp+50h] [rbp-240h] BYREF unsigned int v12; // [rsp+5Ch] [rbp-234h] BYREF _BYTE v13[512]; // [rsp+60h] [rbp-230h] BYREF unsigned long long v14; // [rsp+260h] [rbp-30h] v14 = __readfsqword(0x28u); v0 = 0; if ( translog_status != 2 && log_purge_type == 2 ) { if ( qword_C01930 ) translog_purge_at_flush_cold_1(); else pthread_mutex_lock(&unk_C018F0); if ( !(_DWORD)qword_C018E8 || log_purge_disabled ) { translog_purge_at_flush_cold_3(); return 0; } else { horizon = translog_get_horizon(); file = translog_first_file(horizon, 1); if ( file >= (unsigned int)qword_C018E8 ) { v0 = 0; } else { v0 = file; do { translog_filename_by_fileno(v0, (long long)v13, v3, v4, v5, v6); v7 = ((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long *))PSI_server[41])( v10, key_file_translog, 14LL, v13, &v11); v11 = v7; if ( v7 ) { translog_purge_at_flush_cold_2(v7, (long long)v13, &v11, &v12); v8 = v12; } else { v8 = my_delete(v13, 16LL); } ++v0; } while ( v0 < (unsigned int)qword_C018E8 && !v8 ); LOBYTE(v0) = v8 != 0; } if ( qword_C01930 ) PSI_server[44](); pthread_mutex_unlock(&unk_C018F0); } } return v0; }
translog_purge_at_flush: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x268 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX XOR EBX,EBX CMP dword ptr [0x004ff860],0x2 JZ 0x0014ee2a CMP qword ptr [0x004ff848],0x2 JNZ 0x0014ee2a CMP qword ptr [0x00d01930],0x0 JNZ 0x0014ee4d LEA RDI,[0xd018f0] CALL 0x00129220 LAB_0014ed42: CMP dword ptr [0x00d018e8],0x0 JZ 0x0014ee57 CMP dword ptr [0x004ff840],0x0 JNZ 0x0014ee57 CALL 0x0014ce58 MOV RDI,RAX MOV ESI,0x1 CALL 0x0014b2e0 CMP EAX,dword ptr [0x00d018e8] JNC 0x0014ee09 MOV EBX,EAX LEA R14,[RBP + -0x230] LEA R13,[0x4880c0] LEA R15,[RBP + -0x288] LEA R12,[RBP + -0x240] LAB_0014ed98: MOV EDI,EBX MOV RSI,R14 CALL 0x001499c1 LEA RAX,[0x4ff3c4] MOV ESI,dword ptr [RAX] MOV RAX,qword ptr [R13] MOV RDI,R15 MOV EDX,0xe MOV RCX,R14 MOV R8,R12 CALL qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0x240],RAX TEST RAX,RAX JNZ 0x0014edec MOV ESI,0x10 MOV RDI,R14 CALL 0x0019ee3c LAB_0014eddc: INC EBX CMP EBX,dword ptr [0x00d018e8] JNC 0x0014ee0d TEST EAX,EAX JZ 0x0014ed98 JMP 0x0014ee0d LAB_0014edec: MOV RDI,RAX MOV RSI,R14 MOV RDX,R12 LEA RCX,[RBP + -0x234] CALL 0x0012cc76 MOV EAX,dword ptr [RBP + -0x234] JMP 0x0014eddc LAB_0014ee09: XOR EBX,EBX JMP 0x0014ee12 LAB_0014ee0d: TEST EAX,EAX SETNZ BL LAB_0014ee12: MOV RDI,qword ptr [0x00d01930] TEST RDI,RDI JNZ 0x0014ee60 LAB_0014ee1e: LEA RDI,[0xd018f0] CALL 0x001291e0 LAB_0014ee2a: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014ee72 MOV EAX,EBX ADD RSP,0x268 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014ee4d: CALL 0x0012cc59 JMP 0x0014ed42 LAB_0014ee57: CALL 0x0012cccd XOR EBX,EBX JMP 0x0014ee2a LAB_0014ee60: LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014ee1e LAB_0014ee72: CALL 0x00129270
int4 translog_purge_at_flush(void) { uint uVar1; int iVar2; int8 uVar3; int4 uVar4; long in_FS_OFFSET; int1 local_290 [72]; long local_248; int local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = 0; if ((translog_status != 2) && (log_purge_type == 2)) { if (DAT_00d01930 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d018f0); } else { translog_purge_at_flush_cold_1(); } if ((DAT_00d018e8 == 0) || (log_purge_disabled != 0)) { translog_purge_at_flush_cold_3(); uVar4 = 0; } else { uVar3 = translog_get_horizon(); uVar1 = translog_first_file(uVar3,1); if (uVar1 < DAT_00d018e8) { do { translog_filename_by_fileno(uVar1,local_238); local_248 = (**(code **)(PSI_server + 0x148)) (local_290,key_file_translog,0xe,local_238,&local_248); if (local_248 == 0) { iVar2 = my_delete(local_238,0x10); } else { translog_purge_at_flush_cold_2(local_248,local_238,&local_248,&local_23c); iVar2 = local_23c; } uVar1 = uVar1 + 1; } while ((uVar1 < DAT_00d018e8) && (iVar2 == 0)); uVar4 = CONCAT31((int3)(uVar1 >> 8),iVar2 != 0); } else { uVar4 = 0; } if (DAT_00d01930 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d018f0); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
39,180
string_format[abi:cxx11](char const*, ...)
monkey531[P]llama/common/common.cpp
std::string string_format(const char * fmt, ...) { va_list ap; va_list ap2; va_start(ap, fmt); va_copy(ap2, ap); int size = vsnprintf(NULL, 0, fmt, ap); GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT std::vector<char> buf(size + 1); int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2); GGML_ASSERT(size2 == size); va_end(ap2); va_end(ap); return std::string(buf.data(), size); }
O2
cpp
string_format[abi:cxx11](char const*, ...): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x56d5a movaps %xmm0, 0x90(%rsp) movaps %xmm1, 0xa0(%rsp) movaps %xmm2, 0xb0(%rsp) movaps %xmm3, 0xc0(%rsp) movaps %xmm4, 0xd0(%rsp) movaps %xmm5, 0xe0(%rsp) movaps %xmm6, 0xf0(%rsp) movaps %xmm7, 0x100(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 leaq 0x40(%rsp), %rcx movq %rax, (%rcx) leaq 0x140(%rsp), %rax movq %rax, 0x8(%rcx) movq %rsi, 0x10(%rcx) movq %rsi, 0x20(%rsp) movq (%rcx), %rax movq %rax, 0x10(%rsp) movq 0x8(%rcx), %rax movq %rax, 0x18(%rsp) xorl %edi, %edi xorl %esi, %esi movq %r14, %rdx callq 0x24350 cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF jae 0x56e12 movl %eax, %r15d leal 0x1(%r15), %r12d leaq 0x28(%rsp), %r13 leaq 0xf(%rsp), %rdx movq %r13, %rdi movq %r12, %rsi callq 0x5bc0a movq (%r13), %rdi leaq 0x10(%rsp), %rcx movq %r12, %rsi movq %r14, %rdx callq 0x24350 cmpl %r15d, %eax jne 0x56e33 movq 0x28(%rsp), %rsi movl %r15d, %edx leaq 0x10(%rbx), %rax movq %rax, (%rbx) addq %rsi, %rdx movq %rbx, %rdi callq 0x2af10 leaq 0x28(%rsp), %rdi callq 0x425e4 movq %rbx, %rax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x5fb94(%rip), %rdi # 0xb69ad leaq 0x567d5(%rip), %rdx # 0xad5f5 leaq 0x5fbd2(%rip), %rcx # 0xb69f9 movl $0x1b2, %esi # imm = 0x1B2 xorl %eax, %eax callq 0x23fe0 leaq 0x5fb73(%rip), %rdi # 0xb69ad leaq 0x567b4(%rip), %rdx # 0xad5f5 leaq 0x5fbcd(%rip), %rcx # 0xb6a15 movl $0x1b5, %esi # imm = 0x1B5 xorl %eax, %eax callq 0x23fe0 jmp 0x56e56 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x425e4 movq %rbx, %rdi callq 0x240e0
_Z13string_formatB5cxx11PKcz: push r15 push r14 push r13 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi lea rsi, [rsp+138h+var_D8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_56D5A movaps [rsp+138h+var_A8], xmm0 movaps [rsp+138h+var_98], xmm1 movaps [rsp+138h+var_88], xmm2 movaps [rsp+138h+var_78], xmm3 movaps [rsp+138h+var_68], xmm4 movaps [rsp+138h+var_58], xmm5 movaps [rsp+138h+var_48], xmm6 movaps [rsp+138h+var_38], xmm7 loc_56D5A: mov rax, 3000000010h lea rcx, [rsp+138h+var_F8] mov [rcx], rax lea rax, [rsp+138h+arg_0] mov [rcx+8], rax mov [rcx+10h], rsi mov [rsp+138h+var_118], rsi mov rax, [rcx] mov [rsp+138h+var_128], rax mov rax, [rcx+8] mov [rsp+138h+var_120], rax xor edi, edi xor esi, esi mov rdx, r14 call vsnprintf cmp eax, 7FFFFFFFh jnb short loc_56E12 mov r15d, eax lea r12d, [r15+1] lea r13, [rsp+138h+var_110] lea rdx, [rsp+138h+var_129] mov rdi, r13 mov rsi, r12 call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&) mov rdi, [r13+0] lea rcx, [rsp+138h+var_128] mov rsi, r12 mov rdx, r14 call vsnprintf cmp eax, r15d jnz short loc_56E33 mov rsi, [rsp+138h+var_110] mov edx, r15d lea rax, [rbx+10h] mov [rbx], rax add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+138h+var_110] call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base() mov rax, rbx add rsp, 110h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_56E12: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize0SizeIntMa; "size >= 0 && size < INT_MAX" mov esi, 1B2h xor eax, eax call _ggml_abort loc_56E33: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize2Size; "size2 == size" mov esi, 1B5h xor eax, eax call _ggml_abort jmp short $+2 loc_56E56: mov rbx, rax lea rdi, [rsp+138h+var_110] call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base() mov rdi, rbx call __Unwind_Resume
_QWORD * string_format[abi:cxx11]( _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) { unsigned int v15; // eax unsigned int v16; // r15d long long v17; // r12 _BYTE *v18; // rsi long long v20; // rax char v21; // [rsp+Fh] [rbp-129h] BYREF _QWORD v22[3]; // [rsp+10h] [rbp-128h] BYREF _QWORD v23[3]; // [rsp+28h] [rbp-110h] BYREF _QWORD v24[4]; // [rsp+40h] [rbp-F8h] BYREF _BYTE v25[16]; // [rsp+60h] [rbp-D8h] BYREF long long v26; // [rsp+70h] [rbp-C8h] long long v27; // [rsp+78h] [rbp-C0h] long long v28; // [rsp+80h] [rbp-B8h] long long v29; // [rsp+88h] [rbp-B0h] __m128 v30; // [rsp+90h] [rbp-A8h] __m128 v31; // [rsp+A0h] [rbp-98h] __m128 v32; // [rsp+B0h] [rbp-88h] __m128 v33; // [rsp+C0h] [rbp-78h] __m128 v34; // [rsp+D0h] [rbp-68h] __m128 v35; // [rsp+E0h] [rbp-58h] __m128 v36; // [rsp+F0h] [rbp-48h] __m128 v37; // [rsp+100h] [rbp-38h] v30 = a7; v31 = a8; v32 = a9; v33 = a10; v34 = a11; v35 = a12; v36 = a13; v37 = a14; v26 = a3; v27 = a4; v28 = a5; v29 = a6; v24[0] = 0x3000000010LL; v24[1] = &a15; v24[2] = v25; v22[2] = v25; v22[0] = 0x3000000010LL; v22[1] = &a15; v15 = vsnprintf(0LL, 0LL, a2, v24); if ( v15 >= 0x7FFFFFFF ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 434LL, "GGML_ASSERT(%s) failed", "size >= 0 && size < INT_MAX"); LABEL_5: v20 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 437LL, "GGML_ASSERT(%s) failed", "size2 == size"); std::_Vector_base<char>::~_Vector_base((long long)v23); _Unwind_Resume(v20); } v16 = v15; v17 = v15 + 1; std::vector<char>::vector(v23, v17, &v21); if ( (unsigned int)vsnprintf(v23[0], v17, a2, v22) != v16 ) goto LABEL_5; v18 = (_BYTE *)v23[0]; *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, v18, (long long)&v18[v16]); std::_Vector_base<char>::~_Vector_base((long long)v23); return a1; }
string_format[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI LEA RSI,[RSP + 0x60] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x00156d5a MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM1 MOVAPS xmmword ptr [RSP + 0xb0],XMM2 MOVAPS xmmword ptr [RSP + 0xc0],XMM3 MOVAPS xmmword ptr [RSP + 0xd0],XMM4 MOVAPS xmmword ptr [RSP + 0xe0],XMM5 MOVAPS xmmword ptr [RSP + 0xf0],XMM6 MOVAPS xmmword ptr [RSP + 0x100],XMM7 LAB_00156d5a: MOV RAX,0x3000000010 LEA RCX,[RSP + 0x40] MOV qword ptr [RCX],RAX LEA RAX,[RSP + 0x140] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RCX + 0x10],RSI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr [RCX] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0x18],RAX XOR EDI,EDI XOR ESI,ESI MOV RDX,R14 CALL 0x00124350 CMP EAX,0x7fffffff JNC 0x00156e12 MOV R15D,EAX LEA R12D,[R15 + 0x1] LEA R13,[RSP + 0x28] LEA RDX,[RSP + 0xf] MOV RDI,R13 MOV RSI,R12 CALL 0x0015bc0a MOV RDI,qword ptr [R13] LEA RCX,[RSP + 0x10] MOV RSI,R12 MOV RDX,R14 CALL 0x00124350 CMP EAX,R15D JNZ 0x00156e33 MOV RSI,qword ptr [RSP + 0x28] MOV EDX,R15D LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX ADD RDX,RSI LAB_00156dec: MOV RDI,RBX CALL 0x0012af10 LAB_00156df4: LEA RDI,[RSP + 0x28] CALL 0x001425e4 MOV RAX,RBX ADD RSP,0x110 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00156e12: LEA RDI,[0x1b69ad] LEA RDX,[0x1ad5f5] LEA RCX,[0x1b69f9] MOV ESI,0x1b2 XOR EAX,EAX CALL 0x00123fe0 LAB_00156e33: LEA RDI,[0x1b69ad] LEA RDX,[0x1ad5f5] LEA RCX,[0x1b6a15] MOV ESI,0x1b5 XOR EAX,EAX CALL 0x00123fe0
/* string_format[abi:cxx11](char const*, ...) */ char * string_format_abi_cxx11_(char *param_1,...) { char in_AL; uint uVar1; uint uVar2; int8 in_RCX; int8 in_RDX; char *in_RSI; int8 in_R8; int8 in_R9; int8 in_XMM0_Qa; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; allocator local_129; int8 local_128; int1 *local_120; int1 *local_118; char *local_110 [3]; int8 local_f8; int1 *local_f0; int1 *local_e8; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; local_118 = local_d8; if (in_AL != '\0') { local_a8 = in_XMM0_Qa; local_98 = in_XMM1_Qa; local_88 = in_XMM2_Qa; local_78 = in_XMM3_Qa; local_68 = in_XMM4_Qa; local_58 = in_XMM5_Qa; local_48 = in_XMM6_Qa; local_38 = in_XMM7_Qa; } local_f8 = 0x3000000010; local_120 = &stack0x00000008; local_128 = 0x3000000010; local_f0 = local_120; local_e8 = local_118; local_c8 = in_RDX; local_c0 = in_RCX; local_b8 = in_R8; local_b0 = in_R9; uVar1 = vsnprintf((char *)0x0,0,in_RSI,&local_f8); if (uVar1 < 0x7fffffff) { std::vector<char,std::allocator<char>>::vector ((vector<char,std::allocator<char>> *)local_110,(ulong)(uVar1 + 1),&local_129); uVar2 = vsnprintf(local_110[0],(ulong)(uVar1 + 1),in_RSI,&local_128); if (uVar2 == uVar1) { *(char **)param_1 = param_1 + 0x10; /* try { // try from 00156dec to 00156df3 has its CatchHandler @ 00156e54 */ std::__cxx11::string::_M_construct<char_const*>(param_1,local_110[0],local_110[0] + uVar1); std::_Vector_base<char,std::allocator<char>>::~_Vector_base ((_Vector_base<char,std::allocator<char>> *)local_110); return param_1; } /* try { // try from 00156e33 to 00156e53 has its CatchHandler @ 00156e56 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x1b5, "GGML_ASSERT(%s) failed","size2 == size"); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x1b2, "GGML_ASSERT(%s) failed","size >= 0 && size < INT_MAX"); }
39,181
blst_sha256
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
void blst_sha256(unsigned char md[32], const void *msg, size_t len) { SHA256_CTX ctx; sha256_init(&ctx); sha256_update(&ctx, msg, len); sha256_final(md, &ctx); }
O3
c
blst_sha256: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x70, %rsp movq %rdi, %rbx movaps 0x269d0(%rip), %xmm0 # 0x8c8d0 leaq -0x58(%rbp), %rax movups %xmm0, -0x28(%rax) movaps 0x269d1(%rip), %xmm0 # 0x8c8e0 movups %xmm0, -0x18(%rax) movq $0x0, -0x8(%rax) movl $0x5, %ecx movq $0x0, -0x80(%rbp,%rcx,8) incq %rcx cmpq $0xd, %rcx jne 0x65f20 leaq -0x80(%rbp), %r14 movq $0x0, 0x68(%r14) movq %r14, %rdi callq 0x65f5a movq %rbx, %rdi movq %r14, %rsi callq 0x66056 addq $0x70, %rsp popq %rbx popq %r14 popq %rbp retq
blst_sha256: push rbp mov rbp, rsp push r14 push rbx sub rsp, 70h mov rbx, rdi movaps xmm0, cs:xmmword_8C8D0 lea rax, [rbp+var_58] movups xmmword ptr [rax-28h], xmm0 movaps xmm0, cs:xmmword_8C8E0 movups xmmword ptr [rax-18h], xmm0 mov qword ptr [rax-8], 0 mov ecx, 5 loc_65F20: mov [rbp+rcx*8+var_80], 0 inc rcx cmp rcx, 0Dh jnz short loc_65F20 lea r14, [rbp+var_80] mov qword ptr [r14+68h], 0 mov rdi, r14 call sha256_update mov rdi, rbx mov rsi, r14 call sha256_final add rsp, 70h pop rbx pop r14 pop rbp retn
long long blst_sha256(long long a1, long long a2, long long a3) { long long i; // rcx _OWORD v5[2]; // [rsp+0h] [rbp-80h] BYREF long long v6; // [rsp+20h] [rbp-60h] long long v7; // [rsp+68h] [rbp-18h] v5[0] = xmmword_8C8D0; v5[1] = xmmword_8C8E0; v6 = 0LL; for ( i = 5LL; i != 13; ++i ) *((_QWORD *)v5 + i) = 0LL; v7 = 0LL; sha256_update(v5, a2, a3); return sha256_final(a1, v5); }
blst_sha256: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x70 MOV RBX,RDI MOVAPS XMM0,xmmword ptr [0x0018c8d0] LEA RAX,[RBP + -0x58] MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOVAPS XMM0,xmmword ptr [0x0018c8e0] MOVUPS xmmword ptr [RAX + -0x18],XMM0 MOV qword ptr [RAX + -0x8],0x0 MOV ECX,0x5 LAB_00165f20: MOV qword ptr [RBP + RCX*0x8 + -0x80],0x0 INC RCX CMP RCX,0xd JNZ 0x00165f20 LEA R14,[RBP + -0x80] MOV qword ptr [R14 + 0x68],0x0 MOV RDI,R14 CALL 0x00165f5a MOV RDI,RBX MOV RSI,R14 CALL 0x00166056 ADD RSP,0x70 POP RBX POP R14 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void blst_sha256(int8 param_1) { long lVar1; int8 local_88 [2]; int4 local_78; int4 uStack_74; int4 uStack_70; int4 uStack_6c; int8 local_68; int8 local_60 [8]; int8 local_20; local_88[0] = _DAT_0018c8d0; local_88[1] = _UNK_0018c8d8; local_78 = _DAT_0018c8e0; uStack_74 = _UNK_0018c8e4; uStack_70 = _UNK_0018c8e8; uStack_6c = _UNK_0018c8ec; local_68 = 0; lVar1 = 5; do { local_88[lVar1] = 0; lVar1 = lVar1 + 1; } while (lVar1 != 0xd); local_20 = 0; sha256_update(local_88); sha256_final(param_1,local_88); return; }
39,182
my_rw_unlock
eloqsql/mysys/thr_rwlock.c
int my_rw_unlock(my_rw_lock_t *rwp) { DBUG_PRINT("rw_unlock", ("state: %d waiters: %d", rwp->state, rwp->waiters)); pthread_mutex_lock(&rwp->lock); DBUG_ASSERT(rwp->state != 0); if (rwp->state == -1) /* writer releasing */ { my_rw_lock_assert_write_owner(rwp); rwp->state= 0; /* mark as available */ #ifdef SAFE_MUTEX rwp->write_thread= 0; #endif if ( rwp->waiters ) /* writers queued */ pthread_cond_signal( &rwp->writers ); else pthread_cond_broadcast( &rwp->readers ); } else { if ( --rwp->state == 0 && /* no more readers */ rwp->waiters) pthread_cond_signal( &rwp->writers ); } pthread_mutex_unlock( &rwp->lock ); return(0); }
O3
c
my_rw_unlock: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x244a0 movl 0x88(%rbx), %eax cmpl $-0x1, %eax je 0x2d2e4 decl %eax movl %eax, 0x88(%rbx) jne 0x2d30b cmpl $0x0, 0x8c(%rbx) jne 0x2d2f7 jmp 0x2d30b movl $0x0, 0x88(%rbx) cmpl $0x0, 0x8c(%rbx) je 0x2d302 leaq 0x58(%rbx), %rdi callq 0x24040 jmp 0x2d30b leaq 0x28(%rbx), %rdi callq 0x24100 movq %rbx, %rdi callq 0x24200 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
my_rw_unlock: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call _pthread_mutex_lock mov eax, [rbx+88h] cmp eax, 0FFFFFFFFh jz short loc_2D2E4 dec eax mov [rbx+88h], eax jnz short loc_2D30B cmp dword ptr [rbx+8Ch], 0 jnz short loc_2D2F7 jmp short loc_2D30B loc_2D2E4: mov dword ptr [rbx+88h], 0 cmp dword ptr [rbx+8Ch], 0 jz short loc_2D302 loc_2D2F7: lea rdi, [rbx+58h] call _pthread_cond_signal jmp short loc_2D30B loc_2D302: lea rdi, [rbx+28h] call _pthread_cond_broadcast loc_2D30B: mov rdi, rbx call _pthread_mutex_unlock xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long my_rw_unlock(long long a1) { int v1; // eax int v2; // eax pthread_mutex_lock(a1); v1 = *(_DWORD *)(a1 + 136); if ( v1 == -1 ) { *(_DWORD *)(a1 + 136) = 0; if ( !*(_DWORD *)(a1 + 140) ) { pthread_cond_broadcast(a1 + 40); goto LABEL_8; } goto LABEL_6; } v2 = v1 - 1; *(_DWORD *)(a1 + 136) = v2; if ( !v2 && *(_DWORD *)(a1 + 140) ) LABEL_6: pthread_cond_signal(a1 + 88); LABEL_8: pthread_mutex_unlock(a1); return 0LL; }
my_rw_unlock: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x001244a0 MOV EAX,dword ptr [RBX + 0x88] CMP EAX,-0x1 JZ 0x0012d2e4 DEC EAX MOV dword ptr [RBX + 0x88],EAX JNZ 0x0012d30b CMP dword ptr [RBX + 0x8c],0x0 JNZ 0x0012d2f7 JMP 0x0012d30b LAB_0012d2e4: MOV dword ptr [RBX + 0x88],0x0 CMP dword ptr [RBX + 0x8c],0x0 JZ 0x0012d302 LAB_0012d2f7: LEA RDI,[RBX + 0x58] CALL 0x00124040 JMP 0x0012d30b LAB_0012d302: LEA RDI,[RBX + 0x28] CALL 0x00124100 LAB_0012d30b: MOV RDI,RBX CALL 0x00124200 XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 my_rw_unlock(pthread_mutex_t *param_1) { int iVar1; pthread_mutex_lock(param_1); if (*(int *)((long)param_1 + 0x88) == -1) { *(int4 *)((long)param_1 + 0x88) = 0; if (*(int *)((long)param_1 + 0x8c) == 0) { pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1)); goto LAB_0012d30b; } } else { iVar1 = *(int *)((long)param_1 + 0x88) + -1; *(int *)((long)param_1 + 0x88) = iVar1; if ((iVar1 != 0) || (*(int *)((long)param_1 + 0x8c) == 0)) goto LAB_0012d30b; } pthread_cond_signal((pthread_cond_t *)((long)param_1 + 0x58)); LAB_0012d30b: pthread_mutex_unlock(param_1); return 0; }
39,183
my_uca_copy_page
eloqsql/strings/ctype-uca.c
static my_bool my_uca_copy_page(MY_CHARSET_LOADER *loader, const MY_UCA_WEIGHT_LEVEL *src, MY_UCA_WEIGHT_LEVEL *dst, size_t page) { uint chc, size= 256 * dst->lengths[page] * sizeof(uint16); if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size))) return TRUE; DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]); memset(dst->weights[page], 0, size); for (chc=0 ; chc < 256; chc++) { memcpy(dst->weights[page] + chc * dst->lengths[page], src->weights[page] + chc * src->lengths[page], src->lengths[page] * sizeof(uint16)); } return FALSE; }
O0
c
my_uca_copy_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax shll $0x8, %eax cltq shlq %rax movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x80(%rax), %rax movl -0x30(%rbp), %ecx movl %ecx, %edi callq *%rax movq -0x20(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x28(%rbp), %rdx movq %rax, (%rcx,%rdx,8) cmpq $0x0, %rax jne 0x4eb14 movb $0x1, -0x1(%rbp) jmp 0x4ebd0 jmp 0x4eb16 jmp 0x4eb18 movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x30(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x24170 movl $0x0, -0x2c(%rbp) cmpl $0x100, -0x2c(%rbp) # imm = 0x100 jae 0x4ebcc movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x2c(%rbp), %eax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rdi movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rsi movl -0x2c(%rbp), %eax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx shlq %rdx callq 0x241f0 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x4eb3b movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_uca_copy_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] shl eax, 8 cdqe shl rax, 1 mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rax, [rax+80h] mov ecx, [rbp+var_30] mov edi, ecx call rax mov rcx, [rbp+var_20] mov rcx, [rcx+10h] mov rdx, [rbp+var_28] mov [rcx+rdx*8], rax cmp rax, 0 jnz short loc_4EB14 mov [rbp+var_1], 1 jmp loc_4EBD0 loc_4EB14: jmp short $+2 loc_4EB16: jmp short $+2 loc_4EB18: mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_30] mov edx, eax xor esi, esi call _memset mov [rbp+var_2C], 0 loc_4EB3B: cmp [rbp+var_2C], 100h jnb loc_4EBCC mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_20] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rdi, rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rsi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_18] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rsi, rax mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] mov edx, eax shl rdx, 1 call _memcpy mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_4EB3B loc_4EBCC: mov [rbp+var_1], 0 loc_4EBD0: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax unsigned int v6; // [rsp+0h] [rbp-30h] unsigned int i; // [rsp+4h] [rbp-2Ch] v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9; v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6); *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4; if ( !v4 ) return 1; memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6); for ( i = 0; i < 0x100; ++i ) memcpy( 2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4)); return 0; }
my_uca_copy_page: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] SHL EAX,0x8 CDQE SHL RAX,0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x30] MOV EDI,ECX CALL RAX MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x28] MOV qword ptr [RCX + RDX*0x8],RAX CMP RAX,0x0 JNZ 0x0014eb14 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014ebd0 LAB_0014eb14: JMP 0x0014eb16 LAB_0014eb16: JMP 0x0014eb18 LAB_0014eb18: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x30] MOV EDX,EAX XOR ESI,ESI CALL 0x00124170 MOV dword ptr [RBP + -0x2c],0x0 LAB_0014eb3b: CMP dword ptr [RBP + -0x2c],0x100 JNC 0x0014ebcc MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX SHL RDX,0x1 CALL 0x001241f0 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0014eb3b LAB_0014ebcc: MOV byte ptr [RBP + -0x1],0x0 LAB_0014ebd0: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4) { size_t __n; long lVar1; int4 local_34; int1 local_9; __n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1; lVar1 = (**(code **)(param_1 + 0x80))(__n); *(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1; if (lVar1 == 0) { local_9 = 1; } else { memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n); for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) { memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2), (void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2), (ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1); } local_9 = 0; } return local_9; }
39,184
js_async_function_free
bluesky950520[P]quickjs/quickjs.c
static void js_async_function_free(JSRuntime *rt, JSAsyncFunctionData *s) { if (--s->header.ref_count == 0) { js_async_function_free0(rt, s); } }
O1
c
js_async_function_free: decl (%rsi) je 0x51f7c retq pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 cmpl $0x0, 0x38(%rsi) je 0x51f9f leaq 0x40(%rbx), %rsi movq %r14, %rdi callq 0x3a8b6 movl $0x0, 0x38(%rbx) movq 0x18(%rbx), %rsi movq 0x20(%rbx), %rdx movq %r14, %rdi callq 0x1ccb2 movq 0x28(%rbx), %rsi movq 0x30(%rbx), %rdx movq %r14, %rdi callq 0x1ccb2 movq 0x8(%rbx), %rax movq 0x10(%rbx), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rbx) decq 0x28(%r14) movq %rbx, %rdi callq *0x20(%r14) movq 0x10(%r14), %rcx movq 0x30(%r14), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%r14) movq 0x40(%r14), %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx
js_async_function_free: dec dword ptr [rsi] jz short loc_51F7C retn loc_51F7C: push r14 push rbx push rax mov rbx, rsi mov r14, rdi cmp dword ptr [rsi+38h], 0 jz short loc_51F9F lea rsi, [rbx+40h] mov rdi, r14 call async_func_free mov dword ptr [rbx+38h], 0 loc_51F9F: mov rsi, [rbx+18h] mov rdx, [rbx+20h] mov rdi, r14 call JS_FreeValueRT mov rsi, [rbx+28h] mov rdx, [rbx+30h] mov rdi, r14 call JS_FreeValueRT mov rax, [rbx+8] mov rcx, [rbx+10h] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+8], xmm0 dec qword ptr [r14+28h] mov rdi, rbx call qword ptr [r14+20h] mov rcx, [r14+10h] mov rdx, [r14+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [r14+30h], rdx mov rdi, [r14+40h] mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp rcx
long long js_async_function_free(long long a1, long long a2) { long long v3; // rax _QWORD *v4; // rcx long long v5; // rax long long ( *v6)(_QWORD, long long); // rcx long long result; // rax if ( (*(_DWORD *)a2)-- == 1 ) { if ( *(_DWORD *)(a2 + 56) ) { async_func_free(a1, a2 + 64); *(_DWORD *)(a2 + 56) = 0; } JS_FreeValueRT(a1, *(_DWORD **)(a2 + 24), *(_QWORD *)(a2 + 32)); JS_FreeValueRT(a1, *(_DWORD **)(a2 + 40), *(_QWORD *)(a2 + 48)); v3 = *(_QWORD *)(a2 + 8); v4 = *(_QWORD **)(a2 + 16); *(_QWORD *)(v3 + 8) = v4; *v4 = v3; *(_OWORD *)(a2 + 8) = 0LL; --*(_QWORD *)(a1 + 40); v5 = (*(long long ( **)(long long))(a1 + 32))(a2); v6 = *(long long ( **)(_QWORD, long long))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v5 - 8; return v6(*(_QWORD *)(a1 + 64), a2); } return result; }
js_async_function_free: DEC dword ptr [RSI] JZ 0x00151f7c RET LAB_00151f7c: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CMP dword ptr [RSI + 0x38],0x0 JZ 0x00151f9f LEA RSI,[RBX + 0x40] MOV RDI,R14 CALL 0x0013a8b6 MOV dword ptr [RBX + 0x38],0x0 LAB_00151f9f: MOV RSI,qword ptr [RBX + 0x18] MOV RDX,qword ptr [RBX + 0x20] MOV RDI,R14 CALL 0x0011ccb2 MOV RSI,qword ptr [RBX + 0x28] MOV RDX,qword ptr [RBX + 0x30] MOV RDI,R14 CALL 0x0011ccb2 MOV RAX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x8],XMM0 DEC qword ptr [R14 + 0x28] MOV RDI,RBX CALL qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [R14 + 0x30],RDX MOV RDI,qword ptr [R14 + 0x40] MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP RCX
void js_async_function_free(long param_1,int *param_2) { long *plVar1; long lVar2; *param_2 = *param_2 + -1; if (*param_2 != 0) { return; } if (param_2[0xe] != 0) { async_func_free(param_1,param_2 + 0x10); param_2[0xe] = 0; } JS_FreeValueRT(param_1,*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8)); JS_FreeValueRT(param_1,*(int8 *)(param_2 + 10),*(int8 *)(param_2 + 0xc)); lVar2 = *(long *)(param_2 + 2); plVar1 = *(long **)(param_2 + 4); *(long **)(lVar2 + 8) = plVar1; *plVar1 = lVar2; param_2[2] = 0; param_2[3] = 0; param_2[4] = 0; param_2[5] = 0; *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar2 = (**(code **)(param_1 + 0x20))(param_2); lVar2 = (*(long *)(param_1 + 0x30) - lVar2) + -8; *(long *)(param_1 + 0x30) = lVar2; /* WARNING: Could not recover jumptable at 0x00152001. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),param_2,lVar2,*(code **)(param_1 + 0x10)); return; }
39,185
test_if_hard_path
eloqsql/mysys/my_getwd.c
int test_if_hard_path(register const char *dir_name) { if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) return (home_dir != NullS && test_if_hard_path(home_dir)); if (dir_name[0] == FN_LIBCHAR) return (TRUE); #ifdef FN_DEVCHAR return (strchr(dir_name,FN_DEVCHAR) != 0); #else return FALSE; #endif }
O0
c
test_if_hard_path: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0xb9a8c movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x2f, %eax jne 0xb9a8c xorl %eax, %eax leaq 0x3962fa(%rip), %rcx # 0x44fd58 cmpq $0x0, (%rcx) movb %al, -0x11(%rbp) je 0xb9a7f leaq 0x3962ea(%rip), %rax # 0x44fd58 movq (%rax), %rdi callq 0xb9a30 cmpl $0x0, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0xb9aa8 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0xb9aa1 movl $0x1, -0x4(%rbp) jmp 0xb9aa8 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_if_hard_path: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz short loc_B9A8C mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' jnz short loc_B9A8C xor eax, eax lea rcx, home_dir cmp qword ptr [rcx], 0 mov [rbp+var_11], al jz short loc_B9A7F lea rax, home_dir mov rdi, [rax] call test_if_hard_path cmp eax, 0 setnz al mov [rbp+var_11], al loc_B9A7F: mov al, [rbp+var_11] and al, 1 movzx eax, al mov [rbp+var_4], eax jmp short loc_B9AA8 loc_B9A8C: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_B9AA1 mov [rbp+var_4], 1 jmp short loc_B9AA8 loc_B9AA1: mov [rbp+var_4], 0 loc_B9AA8: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
_BOOL8 test_if_hard_path(char *a1) { bool v2; // [rsp+Fh] [rbp-11h] if ( *a1 == 126 && a1[1] == 47 ) { v2 = 0; if ( home_dir ) return (unsigned int)test_if_hard_path(home_dir) != 0; return v2; } else { return *a1 == 47; } }
test_if_hard_path: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x001b9a8c MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f JNZ 0x001b9a8c XOR EAX,EAX LEA RCX,[0x54fd58] CMP qword ptr [RCX],0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x001b9a7f LEA RAX,[0x54fd58] MOV RDI,qword ptr [RAX] CALL 0x001b9a30 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_001b9a7f: MOV AL,byte ptr [RBP + -0x11] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x001b9aa8 LAB_001b9a8c: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001b9aa1 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001b9aa8 LAB_001b9aa1: MOV dword ptr [RBP + -0x4],0x0 LAB_001b9aa8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool test_if_hard_path(char *param_1) { int iVar1; bool local_19; if ((*param_1 == '~') && (param_1[1] == '/')) { local_19 = false; if (home_dir != 0) { iVar1 = test_if_hard_path(home_dir); local_19 = iVar1 != 0; } } else if (*param_1 == '/') { local_19 = true; } else { local_19 = false; } return local_19; }
39,186
test_if_hard_path
eloqsql/mysys/my_getwd.c
int test_if_hard_path(register const char *dir_name) { if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) return (home_dir != NullS && test_if_hard_path(home_dir)); if (dir_name[0] == FN_LIBCHAR) return (TRUE); #ifdef FN_DEVCHAR return (strchr(dir_name,FN_DEVCHAR) != 0); #else return FALSE; #endif }
O3
c
test_if_hard_path: pushq %rbp movq %rsp, %rbp leaq 0x36cf37(%rip), %rax # 0x3f0bc8 movq (%rax), %rax movb (%rdi), %cl cmpb $0x7e, %cl jne 0x83cad cmpb $0x2f, 0x1(%rdi) jne 0x83cad movq %rax, %rdi testq %rax, %rax jne 0x83c94 xorl %eax, %eax jmp 0x83cb5 xorl %eax, %eax cmpb $0x2f, %cl sete %al popq %rbp retq
test_if_hard_path: push rbp mov rbp, rsp lea rax, home_dir mov rax, [rax] loc_83C94: mov cl, [rdi] cmp cl, 7Eh ; '~' jnz short loc_83CAD cmp byte ptr [rdi+1], 2Fh ; '/' jnz short loc_83CAD mov rdi, rax test rax, rax jnz short loc_83C94 xor eax, eax jmp short loc_83CB5 loc_83CAD: xor eax, eax cmp cl, 2Fh ; '/' setz al loc_83CB5: pop rbp retn
_BOOL8 test_if_hard_path(_BYTE *a1) { while ( *a1 == 126 && a1[1] == 47 ) { a1 = (_BYTE *)home_dir; if ( !home_dir ) return 0LL; } return *a1 == 47; }
test_if_hard_path: PUSH RBP MOV RBP,RSP LEA RAX,[0x4f0bc8] MOV RAX,qword ptr [RAX] LAB_00183c94: MOV CL,byte ptr [RDI] CMP CL,0x7e JNZ 0x00183cad CMP byte ptr [RDI + 0x1],0x2f JNZ 0x00183cad MOV RDI,RAX TEST RAX,RAX JNZ 0x00183c94 XOR EAX,EAX JMP 0x00183cb5 LAB_00183cad: XOR EAX,EAX CMP CL,0x2f SETZ AL LAB_00183cb5: POP RBP RET
bool test_if_hard_path(char *param_1) { while ((*param_1 == '~' && (param_1[1] == '/'))) { param_1 = home_dir; if (home_dir == (char *)0x0) { return false; } } return *param_1 == '/'; }
39,187
minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!condition) throw std::runtime_error("IfExpr.condition is null"); if (!then_expr) throw std::runtime_error("IfExpr.then_expr is null"); if (condition->evaluate(context).to_bool()) { return then_expr->evaluate(context); } if (else_expr) { return else_expr->evaluate(context); } return nullptr; }
O3
cpp
minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x79281 cmpq $0x0, 0x30(%r15) je 0x7929f movq %rdx, %r14 movq %rdi, %rbx movq %rsp, %r12 movq %r12, %rdi callq 0x6c432 movq %r12, %rdi callq 0x3d056 movl %eax, %ebp leaq 0x40(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x6c664 movq %r12, %rdi callq 0x293d4 movq -0x8(%r12), %rdi testq %rdi, %rdi je 0x791c0 callq 0x33e7e movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x791cf callq 0x33e7e movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x791de callq 0x33e7e movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x79214 movq 0x6eda1(%rip), %rax # 0xe7f90 cmpb $0x0, (%rax) je 0x791ff movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x79209 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x79214 movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0x7921f movq 0x30(%r15), %rsi jmp 0x79228 movq 0x40(%r15), %rsi testq %rsi, %rsi je 0x79243 movq %rbx, %rdi movq %r14, %rdx callq 0x6c432 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x6c664 movq %r14, %rdi movl $0x1, %esi callq 0x6c664 jmp 0x79233 movl $0x10, %edi callq 0x193b0 movq %rax, %r14 leaq 0x3cf81(%rip), %rsi # 0xb6216 movq %rax, %rdi callq 0x192c0 jmp 0x792bb movl $0x10, %edi callq 0x193b0 movq %rax, %r14 leaq 0x3cf7c(%rip), %rsi # 0xb622f movq %rax, %rdi callq 0x192c0 movq 0x6ed2e(%rip), %rsi # 0xe7ff0 movq 0x6ec9f(%rip), %rdx # 0xe7f68 movq %r14, %rdi callq 0x19da0 jmp 0x792d3 movq %rax, %rbx movq %r14, %rdi callq 0x19570 jmp 0x792eb movq %rax, %rbx movq %rsp, %rdi callq 0x3227e movq %rbx, %rdi callq 0x19e10 nop
_ZNK5minja6IfExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 50h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_79281 cmp qword ptr [r15+30h], 0 jz loc_7929F mov r14, rdx mov rbx, rdi mov r12, rsp mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, r12; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) mov ebp, eax lea r12, [rsp+78h+var_38] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r12-8] test rdi, rdi jz short loc_791C0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_791C0: mov rdi, [rsp+78h+var_50] test rdi, rdi jz short loc_791CF call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_791CF: mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_791DE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_791DE: mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_79214 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_791FF mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_79209 loc_791FF: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_79209: cmp eax, 1 jnz short loc_79214 mov rax, [rdi] call qword ptr [rax+18h] loc_79214: test bpl, bpl jz short loc_7921F mov rsi, [r15+30h] jmp short loc_79228 loc_7921F: mov rsi, [r15+40h] test rsi, rsi jz short loc_79243 loc_79228: mov rdi, rbx mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) loc_79233: mov rax, rbx add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_79243: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 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 rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_79233 loc_79281: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aIfexprConditio; "IfExpr.condition is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_792BB loc_7929F: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aIfexprThenExpr; "IfExpr.then_expr is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_792BB: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short $+2 loc_792D3: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_792EB mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_792EB: mov rdi, rbx call __Unwind_Resume
long long minja::IfExpr::do_evaluate(long long a1, _QWORD *a2) { void (***v3)(void); // rsi char v5; // bp long long v6; // rdi signed __int32 v7; // eax void (***v8)(void); // rsi std::runtime_error *exception; // r14 long long v11; // [rsp+0h] [rbp-78h] BYREF long long v12; // [rsp+8h] [rbp-70h] volatile signed __int32 *v13; // [rsp+18h] [rbp-60h] volatile signed __int32 *v14; // [rsp+28h] [rbp-50h] volatile signed __int32 *v15; // [rsp+38h] [rbp-40h] char v16[56]; // [rsp+40h] [rbp-38h] BYREF v3 = (void (***)(void))a2[4]; if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfExpr.condition is null"); goto LABEL_23; } if ( !a2[6] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfExpr.then_expr is null"); LABEL_23: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)&v11, v3); v5 = minja::Value::to_bool((minja::Value *)&v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v16); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16); if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); v6 = v12; if ( v12 ) { if ( _libc_single_threaded ) { v7 = *(_DWORD *)(v12 + 12); *(_DWORD *)(v12 + 12) = v7 - 1; } else { v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF); } if ( v7 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } if ( v5 ) { v8 = (void (***)(void))a2[6]; } else { v8 = (void (***)(void))a2[8]; if ( !v8 ) { *(_QWORD *)(a1 + 72) = 0LL; *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_BYTE *)(a1 + 64) = 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>::assert_invariant((char *)(a1 + 64)); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); return a1; } } minja::Expression::evaluate(a1, v8); return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x00179281 CMP qword ptr [R15 + 0x30],0x0 JZ 0x0017929f MOV R14,RDX MOV RBX,RDI MOV R12,RSP MOV RDI,R12 CALL 0x0016c432 LAB_00179190: MOV RDI,R12 CALL 0x0013d056 LAB_00179198: MOV EBP,EAX LEA R12,[RSP + 0x40] MOV RDI,R12 XOR ESI,ESI CALL 0x0016c664 MOV RDI,R12 CALL 0x001293d4 MOV RDI,qword ptr [R12 + -0x8] TEST RDI,RDI JZ 0x001791c0 CALL 0x00133e7e LAB_001791c0: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x001791cf CALL 0x00133e7e LAB_001791cf: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x001791de CALL 0x00133e7e LAB_001791de: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00179214 MOV RAX,qword ptr [0x001e7f90] CMP byte ptr [RAX],0x0 JZ 0x001791ff MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00179209 LAB_001791ff: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00179209: CMP EAX,0x1 JNZ 0x00179214 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00179214: TEST BPL,BPL JZ 0x0017921f MOV RSI,qword ptr [R15 + 0x30] JMP 0x00179228 LAB_0017921f: MOV RSI,qword ptr [R15 + 0x40] TEST RSI,RSI JZ 0x00179243 LAB_00179228: MOV RDI,RBX MOV RDX,R14 CALL 0x0016c432 LAB_00179233: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00179243: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0016c664 MOV RDI,R14 MOV ESI,0x1 CALL 0x0016c664 JMP 0x00179233 LAB_00179281: MOV EDI,0x10 CALL 0x001193b0 MOV R14,RAX LAB_0017928e: LEA RSI,[0x1b6216] MOV RDI,RAX CALL 0x001192c0 LAB_0017929d: JMP 0x001792bb LAB_0017929f: MOV EDI,0x10 CALL 0x001193b0 MOV R14,RAX LAB_001792ac: LEA RSI,[0x1b622f] MOV RDI,RAX CALL 0x001192c0 LAB_001792bb: MOV RSI,qword ptr [0x001e7ff0] MOV RDX,qword ptr [0x001e7f68] MOV RDI,R14 CALL 0x00119da0
/* minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ IfExpr * __thiscall minja::IfExpr::do_evaluate(IfExpr *this,shared_ptr *param_1) { int *piVar1; char cVar2; int iVar3; runtime_error *this_00; shared_ptr *psVar4; bool bVar5; Expression aEStack_78 [8]; long *local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; data local_38 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017928e to 0017929c has its CatchHandler @ 001792d3 */ std::runtime_error::runtime_error(this_00,"IfExpr.condition is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(aEStack_78,*(shared_ptr **)(param_1 + 0x20)); /* try { // try from 00179190 to 00179197 has its CatchHandler @ 001792e0 */ cVar2 = minja::Value::to_bool((Value *)aEStack_78); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } if (local_70 != (long *)0x0) { if (*PTR___libc_single_threaded_001e7f90 == '\0') { LOCK(); piVar1 = (int *)((long)local_70 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_70 + 0xc); *(int *)((long)local_70 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_70 + 0x18))(); } } if (cVar2 == '\0') { psVar4 = *(shared_ptr **)(param_1 + 0x40); if (psVar4 == (shared_ptr *)0x0) { bVar5 = (bool)((char)this + '@'); *(int8 *)(this + 0x48) = 0; *(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; this[0x40] = (IfExpr)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar5); 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(bVar5); return this; } } else { psVar4 = *(shared_ptr **)(param_1 + 0x30); } Expression::evaluate((Expression *)this,psVar4); return this; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001792ac to 001792ba has its CatchHandler @ 001792d1 */ std::runtime_error::runtime_error(this_00,"IfExpr.then_expr is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001e7ff0,PTR__runtime_error_001e7f68); }
39,188
CLI::OptionAlreadyAdded::OptionAlreadyAdded(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, CLI::ExitCodes)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp
explicit OptionAlreadyAdded(std::string name) : OptionAlreadyAdded(name + " is already added", ExitCodes::OptionAlreadyAdded) {}
O1
cpp
CLI::OptionAlreadyAdded::OptionAlreadyAdded(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, CLI::ExitCodes): pushq %rbx movq %rdi, %rbx leaq 0x2b667(%rip), %rax # 0x491f0 movq %rax, (%rdi) movq 0x18(%rdi), %rdi leaq 0x28(%rbx), %rax cmpq %rax, %rdi je 0x1dba4 movq (%rax), %rsi incq %rsi callq 0x7430 movq %rbx, %rdi callq 0x7490 movl $0x38, %esi movq %rbx, %rdi popq %rbx jmp 0x7430
_ZN3CLI18OptionAlreadyAddedD0Ev: push rbx mov rbx, rdi lea rax, off_491F0 mov [rdi], rax mov rdi, [rdi+18h]; void * lea rax, [rbx+28h] cmp rdi, rax jz short loc_1DBA4 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1DBA4: mov rdi, rbx; this call __ZNSt13runtime_errorD2Ev; std::runtime_error::~runtime_error() mov esi, 38h ; '8'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void CLI::OptionAlreadyAdded::~OptionAlreadyAdded(CLI::OptionAlreadyAdded *this) { char *v2; // rdi *(_QWORD *)this = off_491F0; v2 = (char *)*((_QWORD *)this + 3); if ( v2 != (char *)this + 40 ) operator delete(v2, *((_QWORD *)this + 5) + 1LL); std::runtime_error::~runtime_error(this); operator delete(this, 0x38uLL); }
~OptionAlreadyAdded: PUSH RBX MOV RBX,RDI LEA RAX,[0x1491f0] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x18] LEA RAX,[RBX + 0x28] CMP RDI,RAX JZ 0x0011dba4 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00107430 LAB_0011dba4: MOV RDI,RBX CALL 0x00107490 MOV ESI,0x38 MOV RDI,RBX POP RBX JMP 0x00107430
/* CLI::OptionAlreadyAdded::~OptionAlreadyAdded() */ void __thiscall CLI::OptionAlreadyAdded::~OptionAlreadyAdded(OptionAlreadyAdded *this) { *(int ***)this = &PTR__Error_001491f0; if (*(OptionAlreadyAdded **)(this + 0x18) != this + 0x28) { operator_delete(*(OptionAlreadyAdded **)(this + 0x18),*(long *)(this + 0x28) + 1); } std::runtime_error::~runtime_error((runtime_error *)this); operator_delete(this,0x38); return; }
39,189
minja::ElifTemplateToken::ElifTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
O2
cpp
minja::ElifTemplateToken::ElifTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&): pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %r14 pushq $0x4 popq %rsi callq 0x619d4 leaq 0x8b4d9(%rip), %rax # 0xfcb78 addq $0x10, %rax movq %rax, (%r14) andq $0x0, 0x38(%r14) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x30(%r14) andq $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5minja17ElifTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE: push r14 push rbx push rax mov rbx, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov r14, rdi push 4 pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja17ElifTemplateTokenE; `vtable for'minja::ElifTemplateToken add rax, 10h mov [r14], rax and qword ptr [r14+38h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r14+30h], xmm0 and qword ptr [rbx], 0 add rsp, 8 pop rbx pop r14 retn
long long * minja::ElifTemplateToken::ElifTemplateToken(long long a1, long long a2, int a3, int a4, __int128 *a5) { long long *result; // rax __int128 v7; // xmm0 minja::TemplateToken::TemplateToken(a1, 4, a2, a3, a4); result = &`vtable for'minja::ElifTemplateToken + 2; *(_QWORD *)a1 = &`vtable for'minja::ElifTemplateToken + 2; *(_QWORD *)(a1 + 56) = 0LL; v7 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v7; *(_QWORD *)a5 = 0LL; return result; }
ElifTemplateToken: PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV R14,RDI PUSH 0x4 POP RSI CALL 0x001619d4 LEA RAX,[0x1fcb78] ADD RAX,0x10 MOV qword ptr [R14],RAX AND qword ptr [R14 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R14 + 0x30],XMM0 AND qword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP R14 RET
/* minja::ElifTemplateToken::ElifTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::ElifTemplateToken::ElifTemplateToken (ElifTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, int8 *param_5) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,4,param_1,param_3,param_4); *(int ***)this = &PTR__ElifTemplateToken_001fcb88; *(int8 *)(this + 0x38) = 0; uVar1 = param_5[1]; param_5[1] = 0; *(int8 *)(this + 0x30) = *param_5; *(int8 *)(this + 0x38) = uVar1; *param_5 = 0; return; }
39,190
minja::ElifTemplateToken::ElifTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
O3
cpp
minja::ElifTemplateToken::ElifTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&): pushq %rbx movq %rdi, %rbx leaq 0x92d1d(%rip), %rax # 0x12ab78 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x97e70 callq 0x6d59a leaq 0x92481(%rip), %rax # 0x12a2f8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x97e8c callq 0x6d59a movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1a8d0
_ZN5minja17ElifTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja17ElifTemplateTokenE; `vtable for'minja::ElifTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_97E70 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_97E70: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_97E8C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_97E8C: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::ElifTemplateToken::~ElifTemplateToken(minja::ElifTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::ElifTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x40uLL); }
~ElifTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x22ab78] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x00197e70 CALL 0x0016d59a LAB_00197e70: LEA RAX,[0x22a2f8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x00197e8c CALL 0x0016d59a LAB_00197e8c: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011a8d0
/* minja::ElifTemplateToken::~ElifTemplateToken() */ void __thiscall minja::ElifTemplateToken::~ElifTemplateToken(ElifTemplateToken *this) { *(int ***)this = &PTR__ElifTemplateToken_0022ab88; 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_0022a308; 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; }
39,191
test_compressed
eloqsql/libmariadb/unittest/libmariadb/basic-t.c
static int test_compressed(MYSQL *unused __attribute__((unused))) { int rc; MYSQL *mysql= mysql_init(NULL); MYSQL_RES *res; my_bool reconnect= 1; mysql_options(mysql, MYSQL_OPT_COMPRESS, (void *)1); FAIL_IF(!my_test_connect(mysql, hostname, username, password, schema, port, socketname, CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS), mysql_error(mysql)); mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); rc= mysql_query(mysql, "SHOW VARIABLES"); check_mysql_rc(rc, mysql); if ((res= mysql_store_result(mysql))) mysql_free_result(res); mysql_close(mysql); return OK; }
O0
c
test_compressed: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) xorl %eax, %eax movl %eax, %edi callq 0x1ea20 movq %rax, -0x20(%rbp) movb $0x1, -0x29(%rbp) movq -0x20(%rbp), %rdi movl $0x1, %esi movl $0x1, %edx callq 0x25a70 movq -0x20(%rbp), %rdi movq 0x4f035(%rip), %rsi # 0x65690 movq 0x4f036(%rip), %rdx # 0x65698 movq 0x4f037(%rip), %rcx # 0x656a0 movq 0x4f038(%rip), %r8 # 0x656a8 movl 0x4f039(%rip), %r9d # 0x656b0 movq 0x4f03a(%rip), %rax # 0x656b8 movq %rax, (%rsp) movq $0x30000, 0x8(%rsp) # imm = 0x30000 callq 0x14530 cmpq $0x0, %rax jne 0x166c8 movq -0x20(%rbp), %rdi callq 0x25cf0 movq %rax, %rsi leaq 0x38a3b(%rip), %rdi # 0x4f0e4 leaq 0x38fce(%rip), %rdx # 0x4f67e movl $0x31b, %ecx # imm = 0x31B movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x1676c jmp 0x166ca movq -0x20(%rbp), %rdi movl $0x14, %esi leaq -0x29(%rbp), %rdx callq 0x25a70 movq -0x20(%rbp), %rdi leaq 0x395e5(%rip), %rsi # 0x4fccc callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x1673e movl -0x14(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x20(%rbp), %rdi callq 0x25cf0 movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x25cc0 movl -0x3c(%rbp), %esi movq -0x38(%rbp), %rdx movl %eax, %ecx leaq 0x38b08(%rip), %rdi # 0x4f229 leaq 0x38f56(%rip), %r8 # 0x4f67e movl $0x31f, %r9d # imm = 0x31F movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x1676c jmp 0x16740 movq -0x20(%rbp), %rdi callq 0x239c0 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0x1675c movq -0x28(%rbp), %rdi callq 0x1b200 movq -0x20(%rbp), %rdi callq 0x21af0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_compressed: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi xor eax, eax mov edi, eax call mysql_init mov [rbp+var_20], rax mov [rbp+var_29], 1 mov rdi, [rbp+var_20] mov esi, 1 mov edx, 1 call mysql_options mov rdi, [rbp+var_20] mov rsi, cs:hostname mov rdx, cs:username mov rcx, cs:password mov r8, cs:schema mov r9d, cs:port mov rax, cs:socketname mov [rsp+50h+var_50], rax mov [rsp+50h+var_48], offset loc_30000 call my_test_connect cmp rax, 0 jnz short loc_166C8 mov rdi, [rbp+var_20] call mysql_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 31Bh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_1676C loc_166C8: jmp short $+2 loc_166CA: mov rdi, [rbp+var_20] mov esi, 14h lea rdx, [rbp+var_29] call mysql_options mov rdi, [rbp+var_20] lea rsi, aShowVariables; "SHOW VARIABLES" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_1673E mov eax, [rbp+var_14] mov [rbp+var_3C], eax mov rdi, [rbp+var_20] call mysql_error mov [rbp+var_38], rax mov rdi, [rbp+var_20] call mysql_errno mov esi, [rbp+var_3C] mov rdx, [rbp+var_38] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 31Fh mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_1676C loc_1673E: jmp short $+2 loc_16740: mov rdi, [rbp+var_20] call mysql_store_result mov [rbp+var_28], rax cmp rax, 0 jz short loc_1675C mov rdi, [rbp+var_28] call mysql_free_result loc_1675C: mov rdi, [rbp+var_20] call mysql_close mov [rbp+var_4], 0 loc_1676C: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long test_compressed(long long a1) { int v1; // eax int v2; // r8d int v3; // r9d int v4; // eax int v6; // [rsp+14h] [rbp-3Ch] int v7; // [rsp+18h] [rbp-38h] char v8; // [rsp+27h] [rbp-29h] BYREF long long v9; // [rsp+28h] [rbp-28h] long long v10; // [rsp+30h] [rbp-20h] int v11; // [rsp+3Ch] [rbp-14h] long long v12; // [rsp+40h] [rbp-10h] v12 = a1; v10 = mysql_init(0LL); v8 = 1; mysql_options(v10, 1LL, 1LL); if ( my_test_connect(v10, hostname, username, password, schema, port, socketname, (long long)&loc_30000) ) { mysql_options(v10, 20LL, &v8); v11 = mysql_query(v10, "SHOW VARIABLES"); if ( v11 ) { v6 = v11; v7 = mysql_error(v10); v4 = mysql_errno(v10); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v6, v7, v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 799); return 1; } else { v9 = mysql_store_result(v10); if ( v9 ) mysql_free_result(v9); mysql_close(v10); return 0; } } else { v1 = mysql_error(v10); diag( (unsigned int)"Error: %s (%s: %d)", v1, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 795, v2, v3); return 1; } }
test_compressed: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI XOR EAX,EAX MOV EDI,EAX CALL 0x0011ea20 MOV qword ptr [RBP + -0x20],RAX MOV byte ptr [RBP + -0x29],0x1 MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x1 MOV EDX,0x1 CALL 0x00125a70 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [0x00165690] MOV RDX,qword ptr [0x00165698] MOV RCX,qword ptr [0x001656a0] MOV R8,qword ptr [0x001656a8] MOV R9D,dword ptr [0x001656b0] MOV RAX,qword ptr [0x001656b8] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],0x30000 CALL 0x00114530 CMP RAX,0x0 JNZ 0x001166c8 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00125cf0 MOV RSI,RAX LEA RDI,[0x14f0e4] LEA RDX,[0x14f67e] MOV ECX,0x31b MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011676c LAB_001166c8: JMP 0x001166ca LAB_001166ca: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x14 LEA RDX,[RBP + -0x29] CALL 0x00125a70 MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[0x14fccc] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x0011673e MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x3c],EAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00125cf0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x3c] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x31f MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011676c LAB_0011673e: JMP 0x00116740 LAB_00116740: MOV RDI,qword ptr [RBP + -0x20] CALL 0x001239c0 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x0011675c MOV RDI,qword ptr [RBP + -0x28] CALL 0x0011b200 LAB_0011675c: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00121af0 MOV dword ptr [RBP + -0x4],0x0 LAB_0011676c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 test_compressed(int8 param_1) { int iVar1; int4 uVar2; long lVar3; int8 uVar4; int1 local_31; long local_30; int8 local_28; int local_1c; int8 local_18; int4 local_c; local_18 = param_1; local_28 = mysql_init(0); local_31 = 1; mysql_options(local_28,1,1); lVar3 = my_test_connect(local_28,hostname,username,password,schema,port,socketname,0x30000); if (lVar3 == 0) { uVar4 = mysql_error(local_28); diag("Error: %s (%s: %d)",uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c",0x31b); local_c = 1; } else { mysql_options(local_28,0x14,&local_31); iVar1 = mysql_query(local_28,"SHOW VARIABLES"); local_1c = iVar1; if (iVar1 == 0) { local_30 = mysql_store_result(local_28); if (local_30 != 0) { mysql_free_result(local_30); } mysql_close(local_28); local_c = 0; } else { uVar4 = mysql_error(local_28); uVar2 = mysql_errno(local_28); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar4,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c",799); local_c = 1; } } return local_c; }
39,192
quantize_row_q8_K
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-quants.c
void quantize_row_q8_K(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k) { #ifdef __wasm_simd128__ assert(k % QK_K == 0); const int64_t nb = k / QK_K; block_q8_K * GGML_RESTRICT yc = y; // Cast to proper type for (int i = 0; i < nb; i++) { const float * x_block = x + i * QK_K; v128_t min_vec = wasm_v128_load(x_block); v128_t max_vec = min_vec; for (int j = 4; j < QK_K; j += 4) { v128_t x_vec = wasm_v128_load(x_block + j); max_vec = wasm_f32x4_pmax(max_vec, x_vec); min_vec = wasm_f32x4_pmin(min_vec, x_vec); } max_vec = wasm_f32x4_pmax(max_vec, wasm_i32x4_shuffle(max_vec, max_vec, 2, 3, 0, 1)); max_vec = wasm_f32x4_pmax(max_vec, wasm_i32x4_shuffle(max_vec, max_vec, 1, 0, 3, 2)); min_vec = wasm_f32x4_pmin(min_vec, wasm_i32x4_shuffle(min_vec, min_vec, 2, 3, 0, 1)); min_vec = wasm_f32x4_pmin(min_vec, wasm_i32x4_shuffle(min_vec, min_vec, 1, 0, 3, 2)); float max = wasm_f32x4_extract_lane(max_vec, 0); float min = wasm_f32x4_extract_lane(min_vec, 0); float amax = -min > max ? min : max; if (amax == 0.0f) { yc[i].d = 0.0f; const v128_t zero = wasm_i8x16_splat(0); for (int j = 0; j < QK_K; j += 16) { wasm_v128_store(yc[i].qs + j, zero); } continue; } const float iscale = -127.0f / amax; const v128_t scale_vec = wasm_f32x4_splat(iscale); // Process 16 elements per iteration for (int j = 0, jb = 0; j < QK_K; j += 16, jb++) { // Load and quantize 16 floats v128_t x0 = wasm_v128_load(x_block + j); v128_t x1 = wasm_v128_load(x_block + j + 4); v128_t x2 = wasm_v128_load(x_block + j + 8); v128_t x3 = wasm_v128_load(x_block + j + 12); v128_t q0 = wasm_f32x4_nearest(wasm_f32x4_mul(x0, scale_vec)); v128_t q1 = wasm_f32x4_nearest(wasm_f32x4_mul(x1, scale_vec)); v128_t q2 = wasm_f32x4_nearest(wasm_f32x4_mul(x2, scale_vec)); v128_t q3 = wasm_f32x4_nearest(wasm_f32x4_mul(x3, scale_vec)); // Convert to i32 with saturation v128_t i0 = wasm_i32x4_trunc_sat_f32x4(q0); v128_t i1 = wasm_i32x4_trunc_sat_f32x4(q1); v128_t i2 = wasm_i32x4_trunc_sat_f32x4(q2); v128_t i3 = wasm_i32x4_trunc_sat_f32x4(q3); // Pack into 16 i8 values v128_t i8 = wasm_i8x16_narrow_i16x8( wasm_i16x8_narrow_i32x4(i0, i1), wasm_i16x8_narrow_i32x4(i2, i3) ); wasm_v128_store(yc[i].qs + j, i8); // Calculate bsums using SIMD v128_t sum16 = wasm_i16x8_add( wasm_i16x8_extend_low_i8x16(i8), wasm_i16x8_extend_high_i8x16(i8) ); v128_t sum32 = wasm_i32x4_add( wasm_i32x4_extend_low_i16x8(sum16), wasm_i32x4_extend_high_i16x8(sum16) ); sum32 = wasm_i32x4_add(sum32, wasm_i32x4_shuffle(sum32, sum32, 2, 3, 0, 1)); sum32 = wasm_i32x4_add(sum32, wasm_i32x4_shuffle(sum32, sum32, 1, 0, 3, 2)); yc[i].bsums[jb] = wasm_i32x4_extract_lane(sum32, 0); } yc[i].d = 1.0f / iscale; } #else quantize_row_q8_K_ref(x, y, k); #endif }
O0
c
quantize_row_q8_K: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq %rdx, (%rsp) movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi movq (%rsp), %rdx callq 0xfa60 addq $0x18, %rsp retq nopw (%rax,%rax)
quantize_row_q8_K: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov [rsp+18h+var_18], rdx mov rdi, [rsp+18h+var_8] mov rsi, [rsp+18h+var_10] mov rdx, [rsp+18h+var_18] call _quantize_row_q8_K_ref add rsp, 18h retn
long long quantize_row_q8_K(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { return quantize_row_q8_K_ref(a1, a2, a3, a4, a5, a6, a3, a2, a1); }
quantize_row_q8_K: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP],RDX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP] CALL 0x0010fa60 ADD RSP,0x18 RET
void quantize_row_q8_K(int8 param_1,int8 param_2,int8 param_3) { quantize_row_q8_K_ref(param_1,param_2,param_3); return; }
39,193
isFrameExtentsEvent
untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_window.c
static Bool isFrameExtentsEvent(Display* display, XEvent* event, XPointer pointer) { _GLFWwindow* window = (_GLFWwindow*) pointer; return event->type == PropertyNotify && event->xproperty.state == PropertyNewValue && event->xproperty.window == window->x11.handle && event->xproperty.atom == _glfw.x11.NET_FRAME_EXTENTS; }
O0
c
isFrameExtentsEvent: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpl $0x1c, (%rcx) movb %al, -0x21(%rbp) jne 0x3232b movq -0x10(%rbp), %rcx xorl %eax, %eax cmpl $0x0, 0x38(%rcx) movb %al, -0x21(%rbp) jne 0x3232b movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx movq -0x20(%rbp), %rdx xorl %eax, %eax cmpq 0x348(%rdx), %rcx movb %al, -0x21(%rbp) jne 0x3232b movq -0x10(%rbp), %rax movq 0x28(%rax), %rax leaq 0xae94a(%rip), %rcx # 0xe0c68 cmpq 0x204a8(%rcx), %rax sete %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al andb $0x1, %al movzbl %al, %eax popq %rbp retq nopw %cs:(%rax,%rax)
isFrameExtentsEvent: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rcx, [rbp+var_10] xor eax, eax cmp dword ptr [rcx], 1Ch mov [rbp+var_21], al jnz short loc_3232B mov rcx, [rbp+var_10] xor eax, eax cmp dword ptr [rcx+38h], 0 mov [rbp+var_21], al jnz short loc_3232B mov rax, [rbp+var_10] mov rcx, [rax+20h] mov rdx, [rbp+var_20] xor eax, eax cmp rcx, [rdx+348h] mov [rbp+var_21], al jnz short loc_3232B mov rax, [rbp+var_10] mov rax, [rax+28h] lea rcx, _glfw cmp rax, qword ptr ds:loc_204A8[rcx] setz al mov [rbp+var_21], al loc_3232B: mov al, [rbp+var_21] and al, 1 movzx eax, al pop rbp retn
_BOOL8 isFrameExtentsEvent(long long a1, long long a2, long long a3) { bool v4; // [rsp+1h] [rbp-21h] v4 = 0; if ( *(_DWORD *)a2 == 28 ) { v4 = 0; if ( !*(_DWORD *)(a2 + 56) ) { v4 = 0; if ( *(_QWORD *)(a2 + 32) == *(_QWORD *)(a3 + 840) ) return *(_QWORD *)(a2 + 40) == *(_QWORD *)((char *)&loc_204A8 + (_QWORD)glfw); } } return v4; }
isFrameExtentsEvent: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP dword ptr [RCX],0x1c MOV byte ptr [RBP + -0x21],AL JNZ 0x0013232b MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP dword ptr [RCX + 0x38],0x0 MOV byte ptr [RBP + -0x21],AL JNZ 0x0013232b MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x348] MOV byte ptr [RBP + -0x21],AL JNZ 0x0013232b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] LEA RCX,[0x1e0c68] CMP RAX,qword ptr [RCX + 0x204a8] SETZ AL MOV byte ptr [RBP + -0x21],AL LAB_0013232b: MOV AL,byte ptr [RBP + -0x21] AND AL,0x1 MOVZX EAX,AL POP RBP RET
bool isFrameExtentsEvent(int8 param_1,int *param_2,long param_3) { bool local_29; local_29 = false; if (((*param_2 == 0x1c) && (local_29 = false, param_2[0xe] == 0)) && (local_29 = false, *(long *)(param_2 + 8) == *(long *)(param_3 + 0x348))) { local_29 = *(long *)(param_2 + 10) == DAT_00201110; } return local_29; }
39,194
main
fabiosvm[P]rak/src/main.c
int main(int argc, const char *argv[]) { signal(SIGINT, shutdown); RakError err = rak_ok(); RakString source; read(&source); RakCompiler comp; compile(&comp, &source, &err); check_error(&err); if (argc > 1 && !strcmp(argv[1], "-c")) { rak_dump_chunk(&comp.chunk); goto end; } RakVM vm; run(&vm, &comp.chunk, &err); check_error(&err); rak_vm_deinit(&vm); end: rak_compiler_deinit(&comp); rak_string_deinit(&source); return EXIT_SUCCESS; }
O1
c
main: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2a78, %rsp # imm = 0x2A78 movq %rsi, %rbx movl %edi, %ebp leaq 0x1f9(%rip), %rsi # 0x76d6 movl $0x2, %edi callq 0x20f0 leaq 0x3f(%rsp), %r14 movl $0x201, %edx # imm = 0x201 movq %r14, %rdi xorl %esi, %esi callq 0x20a0 movb $0x1, %r15b movb %r15b, (%r14) leaq 0x240(%rsp), %r14 movl $0x201, %edx # imm = 0x201 movq %r14, %rdi xorl %esi, %esi callq 0x20a0 movb %r15b, (%r14) leaq 0x8(%rsp), %rdi movl $0x1000, %esi # imm = 0x1000 movq %r14, %rdx callq 0x7f30 cmpb $0x0, (%r14) je 0x76b8 movq 0x7a92(%rip), %r13 # 0xefd0 movq (%r13), %rdi callq 0x20b0 movb %al, 0x7(%rsp) cmpb $-0x1, %al je 0x7593 leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %r15 leaq 0x240(%rsp), %r12 movq %r14, %rdi movl $0x1, %esi movq %r15, %rdx movq %r12, %rcx callq 0x82c9 cmpb $0x0, 0x240(%rsp) je 0x76b8 movq (%r13), %rdi callq 0x20b0 movb %al, 0x7(%rsp) cmpb $-0x1, %al jne 0x7561 leaq 0x32e5(%rip), %rdx # 0xa87f leaq 0x8(%rsp), %rdi leaq 0x240(%rsp), %r14 movl $0x1, %esi movq %r14, %rcx callq 0x82c9 cmpb $0x0, (%r14) je 0x76b8 leaq 0x240(%rsp), %rdi leaq 0x3f(%rsp), %r14 movq %r14, %rsi callq 0x3af0 cmpb $0x0, (%r14) je 0x76cf movq 0x18(%rsp), %rsi leaq 0x240(%rsp), %rdi leaq 0x3f(%rsp), %r14 movq %r14, %rdx callq 0x3b32 cmpb $0x0, (%r14) je 0x76cf cmpl $0x2, %ebp jl 0x761e movq 0x8(%rbx), %rdi leaq 0x326b(%rip), %rsi # 0xa87c callq 0x20e0 testl %eax, %eax je 0x76a9 leaq 0x20(%rsp), %rdi leaq 0x3f(%rsp), %rbx movl $0x400, %esi # imm = 0x400 movq %rbx, %rdx callq 0x8774 cmpb $0x0, (%rbx) je 0x76cf leaq 0x20(%rsp), %rdi leaq 0x3f(%rsp), %rbx movq %rbx, %rsi callq 0x2990 cmpb $0x0, (%rbx) je 0x76cf leaq 0x20(%rsp), %rdi leaq 0x240(%rsp), %rsi leaq 0x3f(%rsp), %rbx movq %rbx, %rdx callq 0x87ed cmpb $0x0, (%rbx) je 0x76cf leaq 0x20(%rsp), %rdi callq 0x87b3 leaq 0x240(%rsp), %rdi callq 0x3b2d leaq 0x8(%rsp), %rdi callq 0x806b xorl %eax, %eax addq $0x2a78, %rsp # imm = 0x2A78 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x240(%rsp), %rdi callq 0x66e8 jmp 0x767e leaq 0x240(%rsp), %rdi callq 0x689d movl $0x1, %edi callq 0x2150 leaq 0x3f(%rsp), %rdi jmp 0x76c0
main: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2A78h mov rbx, rsi mov ebp, edi lea rsi, shutdown mov edi, 2 call _signal lea r14, [rsp+2AA8h+var_2A69] mov edx, 201h mov rdi, r14 xor esi, esi call _memset mov r15b, 1 mov [r14], r15b lea r14, [rsp+2AA8h+var_2868] mov edx, 201h mov rdi, r14 xor esi, esi call _memset mov [r14], r15b lea rdi, [rsp+2AA8h+var_2AA0] mov esi, 1000h mov rdx, r14 call rak_string_init_with_capacity cmp byte ptr [r14], 0 jz loc_76B8 mov r13, cs:stdin_ptr mov rdi, [r13+0] call _fgetc mov [rsp+2AA8h+var_2AA1], al cmp al, 0FFh jz short loc_7593 lea r14, [rsp+2AA8h+var_2AA0] lea r15, [rsp+2AA8h+var_2AA1] lea r12, [rsp+2AA8h+var_2868] loc_7561: mov rdi, r14 mov esi, 1 mov rdx, r15 mov rcx, r12 call rak_string_inplace_append_cstr cmp [rsp+2AA8h+var_2868], 0 jz loc_76B8 mov rdi, [r13+0] call _fgetc mov [rsp+2AA8h+var_2AA1], al cmp al, 0FFh jnz short loc_7561 loc_7593: lea rdx, unk_A87F lea rdi, [rsp+2AA8h+var_2AA0] lea r14, [rsp+2AA8h+var_2868] mov esi, 1 mov rcx, r14 call rak_string_inplace_append_cstr cmp byte ptr [r14], 0 jz loc_76B8 lea rdi, [rsp+2AA8h+var_2868] lea r14, [rsp+2AA8h+var_2A69] mov rsi, r14 call rak_compiler_init cmp byte ptr [r14], 0 jz loc_76CF mov rsi, [rsp+2AA8h+var_2A90] lea rdi, [rsp+2AA8h+var_2868] lea r14, [rsp+2AA8h+var_2A69] mov rdx, r14 call rak_compiler_compile cmp byte ptr [r14], 0 jz loc_76CF cmp ebp, 2 jl short loc_761E mov rdi, [rbx+8] lea rsi, unk_A87C call _strcmp test eax, eax jz loc_76A9 loc_761E: lea rdi, [rsp+2AA8h+var_2A88] lea rbx, [rsp+2AA8h+var_2A69] mov esi, 400h mov rdx, rbx call rak_vm_init cmp byte ptr [rbx], 0 jz loc_76CF lea rdi, [rsp+2AA8h+var_2A88] lea rbx, [rsp+2AA8h+var_2A69] mov rsi, rbx call rak_builtin_load_globals cmp byte ptr [rbx], 0 jz short loc_76CF lea rdi, [rsp+2AA8h+var_2A88] lea rsi, [rsp+2AA8h+var_2868] lea rbx, [rsp+2AA8h+var_2A69] mov rdx, rbx call rak_vm_run cmp byte ptr [rbx], 0 jz short loc_76CF lea rdi, [rsp+2AA8h+var_2A88] call rak_vm_deinit loc_767E: lea rdi, [rsp+2AA8h+var_2868] call rak_compiler_deinit lea rdi, [rsp+2AA8h+var_2AA0] call rak_string_deinit xor eax, eax add rsp, 2A78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_76A9: lea rdi, [rsp+2AA8h+var_2868] call rak_dump_chunk jmp short loc_767E loc_76B8: lea rdi, [rsp+2AA8h+var_2868] loc_76C0: call rak_error_print mov edi, 1 call _exit loc_76CF: lea rdi, [rsp+2AA8h+var_2A69] jmp short loc_76C0
int main(int argc, const char **argv, const char **envp) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d char *v8; // rdi char i; // [rsp+7h] [rbp-2AA1h] BYREF _BYTE v10[16]; // [rsp+8h] [rbp-2AA0h] BYREF long long v11; // [rsp+18h] [rbp-2A90h] _BYTE v12[31]; // [rsp+20h] [rbp-2A88h] BYREF char v13[513]; // [rsp+3Fh] [rbp-2A69h] BYREF _BYTE v14[10344]; // [rsp+240h] [rbp-2868h] BYREF signal(2LL, shutdown, envp); memset(v13, 0LL, sizeof(v13)); v13[0] = 1; memset(v14, 0LL, 513LL); v14[0] = 1; rak_string_init_with_capacity(v10, 4096LL, v14); if ( !v14[0] ) goto LABEL_16; for ( i = fgetc(stdin); i != -1; i = fgetc(stdin) ) { rak_string_inplace_append_cstr(v10, 1LL, &i, v14); if ( !v14[0] ) goto LABEL_16; } rak_string_inplace_append_cstr(v10, 1LL, &unk_A87F, v14); if ( !v14[0] ) { LABEL_16: v8 = v14; goto LABEL_17; } rak_compiler_init((long long)v14, v13); if ( !v13[0] ) goto LABEL_18; rak_compiler_compile((long long)v14, v11, v13); if ( !v13[0] ) goto LABEL_18; if ( argc >= 2 && !(unsigned int)strcmp(argv[1], &unk_A87C) ) { rak_dump_chunk((long long)v14); goto LABEL_14; } rak_vm_init(v12, 1024LL, v13); if ( !v13[0] || (rak_builtin_load_globals((long long)v12, v13, v3, v4, v5, v6), !v13[0]) || (rak_vm_run(v12, v14, v13), !v13[0]) ) { LABEL_18: v8 = v13; LABEL_17: rak_error_print((long long)v8); exit(1LL); } rak_vm_deinit(v12); LABEL_14: rak_compiler_deinit((long long)v14); rak_string_deinit(v10); return 0; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2a78 MOV RBX,RSI MOV EBP,EDI LEA RSI,[0x1076d6] MOV EDI,0x2 CALL 0x001020f0 LEA R14,[RSP + 0x3f] MOV EDX,0x201 MOV RDI,R14 XOR ESI,ESI CALL 0x001020a0 MOV R15B,0x1 MOV byte ptr [R14],R15B LEA R14,[RSP + 0x240] MOV EDX,0x201 MOV RDI,R14 XOR ESI,ESI CALL 0x001020a0 MOV byte ptr [R14],R15B LEA RDI,[RSP + 0x8] MOV ESI,0x1000 MOV RDX,R14 CALL 0x00107f30 CMP byte ptr [R14],0x0 JZ 0x001076b8 MOV R13,qword ptr [0x0010efd0] MOV RDI,qword ptr [R13] CALL 0x001020b0 MOV byte ptr [RSP + 0x7],AL CMP AL,0xff JZ 0x00107593 LEA R14,[RSP + 0x8] LEA R15,[RSP + 0x7] LEA R12,[RSP + 0x240] LAB_00107561: MOV RDI,R14 MOV ESI,0x1 MOV RDX,R15 MOV RCX,R12 CALL 0x001082c9 CMP byte ptr [RSP + 0x240],0x0 JZ 0x001076b8 MOV RDI,qword ptr [R13] CALL 0x001020b0 MOV byte ptr [RSP + 0x7],AL CMP AL,0xff JNZ 0x00107561 LAB_00107593: LEA RDX,[0x10a87f] LEA RDI,[RSP + 0x8] LEA R14,[RSP + 0x240] MOV ESI,0x1 MOV RCX,R14 CALL 0x001082c9 CMP byte ptr [R14],0x0 JZ 0x001076b8 LEA RDI,[RSP + 0x240] LEA R14,[RSP + 0x3f] MOV RSI,R14 CALL 0x00103af0 CMP byte ptr [R14],0x0 JZ 0x001076cf MOV RSI,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x240] LEA R14,[RSP + 0x3f] MOV RDX,R14 CALL 0x00103b32 CMP byte ptr [R14],0x0 JZ 0x001076cf CMP EBP,0x2 JL 0x0010761e MOV RDI,qword ptr [RBX + 0x8] LEA RSI,[0x10a87c] CALL 0x001020e0 TEST EAX,EAX JZ 0x001076a9 LAB_0010761e: LEA RDI,[RSP + 0x20] LEA RBX,[RSP + 0x3f] MOV ESI,0x400 MOV RDX,RBX CALL 0x00108774 CMP byte ptr [RBX],0x0 JZ 0x001076cf LEA RDI,[RSP + 0x20] LEA RBX,[RSP + 0x3f] MOV RSI,RBX CALL 0x00102990 CMP byte ptr [RBX],0x0 JZ 0x001076cf LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x240] LEA RBX,[RSP + 0x3f] MOV RDX,RBX CALL 0x001087ed CMP byte ptr [RBX],0x0 JZ 0x001076cf LEA RDI,[RSP + 0x20] CALL 0x001087b3 LAB_0010767e: LEA RDI,[RSP + 0x240] CALL 0x00103b2d LEA RDI,[RSP + 0x8] CALL 0x0010806b XOR EAX,EAX ADD RSP,0x2a78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001076a9: LEA RDI,[RSP + 0x240] CALL 0x001066e8 JMP 0x0010767e LAB_001076b8: LEA RDI,[RSP + 0x240] LAB_001076c0: CALL 0x0010689d MOV EDI,0x1 CALL 0x00102150 LAB_001076cf: LEA RDI,[RSP + 0x3f] JMP 0x001076c0
int8 main(int param_1,long param_2) { int *puVar1; int iVar2; char *pcVar3; char local_2aa1; int1 local_2aa0 [16]; int8 local_2a90; int1 local_2a88 [31]; char local_2a69 [513]; char local_2868 [10296]; signal(2,shutdown); memset(local_2a69,0,0x201); local_2a69[0] = '\x01'; memset(local_2868,0,0x201); local_2868[0] = '\x01'; rak_string_init_with_capacity(local_2aa0,0x1000,local_2868); puVar1 = PTR_stdin_0010efd0; if (local_2868[0] != '\0') { iVar2 = fgetc(*(FILE **)PTR_stdin_0010efd0); local_2aa1 = (char)iVar2; if (local_2aa1 != -1) { do { rak_string_inplace_append_cstr(local_2aa0,1,&local_2aa1,local_2868); if (local_2868[0] == '\0') goto LAB_001076b8; iVar2 = fgetc(*(FILE **)puVar1); local_2aa1 = (char)iVar2; } while (local_2aa1 != -1); } rak_string_inplace_append_cstr(local_2aa0,1,&DAT_0010a87f,local_2868); if (local_2868[0] != '\0') { rak_compiler_init(local_2868,local_2a69); if (local_2a69[0] != '\0') { rak_compiler_compile(local_2868,local_2a90,local_2a69); if (local_2a69[0] != '\0') { if (1 < param_1) { iVar2 = strcmp(*(char **)(param_2 + 8),"-c"); if (iVar2 == 0) { rak_dump_chunk(local_2868); goto LAB_0010767e; } } rak_vm_init(local_2a88,0x400,local_2a69); if (local_2a69[0] != '\0') { rak_builtin_load_globals(local_2a88,local_2a69); if (local_2a69[0] != '\0') { rak_vm_run(local_2a88,local_2868,local_2a69); if (local_2a69[0] != '\0') { rak_vm_deinit(local_2a88); LAB_0010767e: rak_compiler_deinit(local_2868); rak_string_deinit(local_2aa0); return 0; } } } } } pcVar3 = local_2a69; goto LAB_001076c0; } } LAB_001076b8: pcVar3 = local_2868; LAB_001076c0: rak_error_print(pcVar3); /* WARNING: Subroutine does not return */ exit(1); }
39,195
main
fabiosvm[P]rak/src/main.c
int main(int argc, const char *argv[]) { signal(SIGINT, shutdown); RakError err = rak_ok(); RakString source; read(&source); RakCompiler comp; compile(&comp, &source, &err); check_error(&err); if (argc > 1 && !strcmp(argv[1], "-c")) { rak_dump_chunk(&comp.chunk); goto end; } RakVM vm; run(&vm, &comp.chunk, &err); check_error(&err); rak_vm_deinit(&vm); end: rak_compiler_deinit(&comp); rak_string_deinit(&source); return EXIT_SUCCESS; }
O2
c
main: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2a88, %rsp # imm = 0x2A88 movq %rsi, 0x10(%rsp) movl %edi, %ebp leaq 0x1c3(%rip), %rsi # 0x5efe pushq $0x2 popq %rdi callq 0x20e0 leaq 0x50(%rsp), %r14 movl $0x200, %edx # imm = 0x200 movq %r14, %rdi xorl %esi, %esi callq 0x20a0 movb $0x1, %bl movb %bl, -0x1(%r14) leaq 0x251(%rsp), %r14 movl $0x200, %edx # imm = 0x200 movq %r14, %rdi xorl %esi, %esi callq 0x20a0 movb %bl, -0x1(%r14) leaq 0x18(%rsp), %r14 leaq 0x250(%rsp), %r15 movq %r14, %rdi movl $0x1000, %esi # imm = 0x1000 movq %r15, %rdx callq 0x6643 movq %r15, %rdi callq 0x5f0e movq 0x922c(%rip), %rbx # 0xefd0 pushq $0x1 popq %r12 leaq 0xf(%rsp), %r13 movq (%rbx), %rdi callq 0x20b0 movb %al, 0xf(%rsp) cmpb $-0x1, %al je 0x5dd8 movq %r14, %rdi movl %r12d, %esi movq %r13, %rdx movq %r15, %rcx callq 0x6915 movq %r15, %rdi callq 0x5f0e jmp 0x5dad leaq 0x3af5(%rip), %rdx # 0x98d4 leaq 0x18(%rsp), %r14 pushq $0x1 popq %rsi leaq 0x250(%rsp), %r15 movq %r14, %rdi movq %r15, %rcx callq 0x6915 movq %r15, %rdi callq 0x5f0e leaq 0x250(%rsp), %r15 leaq 0x4f(%rsp), %r12 movq %r15, %rdi movq %r12, %rsi callq 0x3414 movq %r12, %rdi callq 0x5f0e movq 0x10(%r14), %rsi movq %r15, %rdi movq %r12, %rdx callq 0x3450 movq %r12, %rdi callq 0x5f0e movq %r12, %rdi callq 0x5f0e cmpl $0x2, %ebp jl 0x5e64 movq 0x10(%rsp), %rax movq 0x8(%rax), %rax cmpb $0x2d, (%rax) jne 0x5e64 cmpb $0x63, 0x1(%rax) jne 0x5e64 cmpb $0x0, 0x2(%rax) je 0x5eef leaq 0x30(%rsp), %rbx leaq 0x4f(%rsp), %r14 movq %rbx, %rdi movl $0x400, %esi # imm = 0x400 movq %r14, %rdx callq 0x6d38 movq %r14, %rdi callq 0x5f0e movq %rbx, %rdi movq %r14, %rsi callq 0x28f0 movq %r14, %rdi callq 0x5f0e leaq 0x250(%rsp), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x6da6 movq %r14, %rdi callq 0x5f0e movq %r14, %rdi callq 0x5f0e movq %rbx, %rdi callq 0x6d77 leaq 0x250(%rsp), %rdi callq 0x344b leaq 0x18(%rsp), %rdi callq 0x6718 xorl %eax, %eax addq $0x2a88, %rsp # imm = 0x2A88 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x250(%rsp), %rdi callq 0x5324 jmp 0x5ec4
main: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2A88h mov [rsp+2AB8h+var_2AA8], rsi mov ebp, edi lea rsi, shutdown push 2 pop rdi call _signal lea r14, [rsp+2AB8h+var_2A68] mov edx, 200h mov rdi, r14 xor esi, esi call _memset mov bl, 1 mov [r14-1], bl lea r14, [rsp+2AB8h+var_2867] mov edx, 200h mov rdi, r14 xor esi, esi call _memset mov [r14-1], bl lea r14, [rsp+2AB8h+var_2AA0] lea r15, [rsp+2AB8h+var_2868] mov rdi, r14 mov esi, 1000h mov rdx, r15 call rak_string_init_with_capacity mov rdi, r15 call check_error mov rbx, cs:stdin_ptr push 1 pop r12 lea r13, [rsp+2AB8h+var_2AA9] loc_5DAD: mov rdi, [rbx] call _fgetc mov [rsp+2AB8h+var_2AA9], al cmp al, 0FFh jz short loc_5DD8 mov rdi, r14 mov esi, r12d mov rdx, r13 mov rcx, r15 call rak_string_inplace_append_cstr mov rdi, r15 call check_error jmp short loc_5DAD loc_5DD8: lea rdx, unk_98D4 lea r14, [rsp+2AB8h+var_2AA0] push 1 pop rsi lea r15, [rsp+2AB8h+var_2868] mov rdi, r14 mov rcx, r15 call rak_string_inplace_append_cstr mov rdi, r15 call check_error lea r15, [rsp+2AB8h+var_2868] lea r12, [rsp+2AB8h+var_2A69] mov rdi, r15 mov rsi, r12 call rak_compiler_init mov rdi, r12 call check_error mov rsi, [r14+10h] mov rdi, r15 mov rdx, r12 call rak_compiler_compile mov rdi, r12 call check_error mov rdi, r12 call check_error cmp ebp, 2 jl short loc_5E64 mov rax, [rsp+2AB8h+var_2AA8] mov rax, [rax+8] cmp byte ptr [rax], 2Dh ; '-' jnz short loc_5E64 cmp byte ptr [rax+1], 63h ; 'c' jnz short loc_5E64 cmp byte ptr [rax+2], 0 jz loc_5EEF loc_5E64: lea rbx, [rsp+2AB8h+var_2A88] lea r14, [rsp+2AB8h+var_2A69] mov rdi, rbx mov esi, 400h mov rdx, r14 call rak_vm_init mov rdi, r14 call check_error mov rdi, rbx mov rsi, r14 call rak_builtin_load_globals mov rdi, r14 call check_error lea rsi, [rsp+2AB8h+var_2868] mov rdi, rbx mov rdx, r14 call rak_vm_run mov rdi, r14 call check_error mov rdi, r14 call check_error mov rdi, rbx call rak_vm_deinit loc_5EC4: lea rdi, [rsp+2AB8h+var_2868] call rak_compiler_deinit lea rdi, [rsp+2AB8h+var_2AA0] call rak_string_deinit xor eax, eax add rsp, 2A88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5EEF: lea rdi, [rsp+2AB8h+var_2868] call rak_dump_chunk jmp short loc_5EC4
int main(int argc, const char **argv, const char **envp) { const char *v3; // rax char v5; // [rsp+Fh] [rbp-2AA9h] BYREF const char **v6; // [rsp+10h] [rbp-2AA8h] _BYTE v7[16]; // [rsp+18h] [rbp-2AA0h] BYREF long long v8; // [rsp+28h] [rbp-2A90h] _BYTE v9[31]; // [rsp+30h] [rbp-2A88h] BYREF char v10; // [rsp+4Fh] [rbp-2A69h] BYREF _BYTE v11[512]; // [rsp+50h] [rbp-2A68h] BYREF char v12; // [rsp+250h] [rbp-2868h] BYREF _BYTE v13[10343]; // [rsp+251h] [rbp-2867h] BYREF v6 = argv; signal(2LL, shutdown, envp); memset(v11, 0LL, sizeof(v11)); v10 = 1; memset(v13, 0LL, 512LL); v12 = 1; rak_string_init_with_capacity(v7, 4096LL, &v12); check_error(&v12); while ( 1 ) { v5 = fgetc(stdin); if ( v5 == -1 ) break; rak_string_inplace_append_cstr(v7, 1LL, &v5, &v12); check_error(&v12); } rak_string_inplace_append_cstr(v7, 1LL, &unk_98D4, &v12); check_error(&v12); rak_compiler_init((long long)&v12, &v10); check_error(&v10); rak_compiler_compile((long long)&v12, v8, &v10); check_error(&v10); check_error(&v10); if ( argc >= 2 && (v3 = v6[1], *v3 == 45) && v3[1] == 99 && !v3[2] ) { rak_dump_chunk((long long)&v12); } else { rak_vm_init(v9, 1024LL, &v10); check_error(&v10); rak_builtin_load_globals((long long)v9, &v10); check_error(&v10); rak_vm_run(v9, &v12, &v10); check_error(&v10); check_error(&v10); rak_vm_deinit(v9); } rak_compiler_deinit((long long)&v12); rak_string_deinit(v7); return 0; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2a88 MOV qword ptr [RSP + 0x10],RSI MOV EBP,EDI LEA RSI,[0x105efe] PUSH 0x2 POP RDI CALL 0x001020e0 LEA R14,[RSP + 0x50] MOV EDX,0x200 MOV RDI,R14 XOR ESI,ESI CALL 0x001020a0 MOV BL,0x1 MOV byte ptr [R14 + -0x1],BL LEA R14,[RSP + 0x251] MOV EDX,0x200 MOV RDI,R14 XOR ESI,ESI CALL 0x001020a0 MOV byte ptr [R14 + -0x1],BL LEA R14,[RSP + 0x18] LEA R15,[RSP + 0x250] MOV RDI,R14 MOV ESI,0x1000 MOV RDX,R15 CALL 0x00106643 MOV RDI,R15 CALL 0x00105f0e MOV RBX,qword ptr [0x0010efd0] PUSH 0x1 POP R12 LEA R13,[RSP + 0xf] LAB_00105dad: MOV RDI,qword ptr [RBX] CALL 0x001020b0 MOV byte ptr [RSP + 0xf],AL CMP AL,0xff JZ 0x00105dd8 MOV RDI,R14 MOV ESI,R12D MOV RDX,R13 MOV RCX,R15 CALL 0x00106915 MOV RDI,R15 CALL 0x00105f0e JMP 0x00105dad LAB_00105dd8: LEA RDX,[0x1098d4] LEA R14,[RSP + 0x18] PUSH 0x1 POP RSI LEA R15,[RSP + 0x250] MOV RDI,R14 MOV RCX,R15 CALL 0x00106915 MOV RDI,R15 CALL 0x00105f0e LEA R15,[RSP + 0x250] LEA R12,[RSP + 0x4f] MOV RDI,R15 MOV RSI,R12 CALL 0x00103414 MOV RDI,R12 CALL 0x00105f0e MOV RSI,qword ptr [R14 + 0x10] MOV RDI,R15 MOV RDX,R12 CALL 0x00103450 MOV RDI,R12 CALL 0x00105f0e MOV RDI,R12 CALL 0x00105f0e CMP EBP,0x2 JL 0x00105e64 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x8] CMP byte ptr [RAX],0x2d JNZ 0x00105e64 CMP byte ptr [RAX + 0x1],0x63 JNZ 0x00105e64 CMP byte ptr [RAX + 0x2],0x0 JZ 0x00105eef LAB_00105e64: LEA RBX,[RSP + 0x30] LEA R14,[RSP + 0x4f] MOV RDI,RBX MOV ESI,0x400 MOV RDX,R14 CALL 0x00106d38 MOV RDI,R14 CALL 0x00105f0e MOV RDI,RBX MOV RSI,R14 CALL 0x001028f0 MOV RDI,R14 CALL 0x00105f0e LEA RSI,[RSP + 0x250] MOV RDI,RBX MOV RDX,R14 CALL 0x00106da6 MOV RDI,R14 CALL 0x00105f0e MOV RDI,R14 CALL 0x00105f0e MOV RDI,RBX CALL 0x00106d77 LAB_00105ec4: LEA RDI,[RSP + 0x250] CALL 0x0010344b LEA RDI,[RSP + 0x18] CALL 0x00106718 XOR EAX,EAX ADD RSP,0x2a88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00105eef: LEA RDI,[RSP + 0x250] CALL 0x00105324 JMP 0x00105ec4
int8 main(int param_1,long param_2) { char *pcVar1; int *puVar2; int iVar3; char local_2aa9; long local_2aa8; int1 local_2aa0 [16]; int8 local_2a90; int1 local_2a88 [31]; int1 local_2a69; int1 local_2a68 [512]; int1 local_2868; int1 local_2867 [10295]; local_2aa8 = param_2; signal(2,shutdown); memset(local_2a68,0,0x200); local_2a69 = 1; memset(local_2867,0,0x200); local_2868 = 1; rak_string_init_with_capacity(local_2aa0,0x1000,&local_2868); check_error(&local_2868); puVar2 = PTR_stdin_0010efd0; while( true ) { iVar3 = fgetc(*(FILE **)puVar2); local_2aa9 = (char)iVar3; if (local_2aa9 == -1) break; rak_string_inplace_append_cstr(local_2aa0,1,&local_2aa9,&local_2868); check_error(&local_2868); } rak_string_inplace_append_cstr(local_2aa0,1,&DAT_001098d4,&local_2868); check_error(&local_2868); rak_compiler_init(&local_2868,&local_2a69); check_error(&local_2a69); rak_compiler_compile(&local_2868,local_2a90,&local_2a69); check_error(&local_2a69); check_error(&local_2a69); if ((((param_1 < 2) || (pcVar1 = *(char **)(local_2aa8 + 8), *pcVar1 != '-')) || (pcVar1[1] != 'c')) || (pcVar1[2] != '\0')) { rak_vm_init(local_2a88,0x400,&local_2a69); check_error(&local_2a69); rak_builtin_load_globals(local_2a88,&local_2a69); check_error(&local_2a69); rak_vm_run(local_2a88,&local_2868,&local_2a69); check_error(&local_2a69); check_error(&local_2a69); rak_vm_deinit(local_2a88); } else { rak_dump_chunk(&local_2868); } rak_compiler_deinit(&local_2868); rak_string_deinit(local_2aa0); return 0; }
39,196
my_strcasecmp_mb
eloqsql/strings/ctype-mb.c
int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) { register uint32 l; register const uchar *map=cs->to_upper; while (*s && *t) { /* Pointing after the '\0' is safe here. */ if ((l=my_ismbchar(cs, s, s + cs->mbmaxlen))) { while (l--) if (*s++ != *t++) return 1; } else if (my_ci_charlen(cs, (const uchar *) t, (const uchar *) t + cs->mbmaxlen) > 1) return 1; else if (map[(uchar) *s++] != map[(uchar) *t++]) return 1; } /* At least one of '*s' and '*t' is zero here. */ return (*t != *s); }
O3
c
my_strcasecmp_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movb (%rsi), %cl testb %cl, %cl je 0x365eb cmpb $0x0, (%rbx) je 0x365ed movq %rsi, %r15 movq %rdi, %r14 movq 0x50(%rdi), %r12 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x365b0 movl 0x9c(%r14), %edx addq %rbx, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0xc0(%rax) movl %eax, %ecx movl $0x1, %eax cmpl $0x1, %ecx jg 0x365fb movzbl (%r15), %ecx movb (%r12,%rcx), %cl movzbl (%rbx), %edx cmpb (%r12,%rdx), %cl jne 0x365fb incq %r15 incq %rbx jmp 0x365d9 movl %eax, %eax leaq (%r15,%rax), %rcx leaq (%rbx,%rax), %rdx xorl %esi, %esi cmpl %esi, %eax je 0x365d3 movb (%r15,%rsi), %dil leaq 0x1(%rsi), %r8 cmpb (%rbx,%rsi), %dil movq %r8, %rsi je 0x365bc jmp 0x365f6 movq %rcx, %r15 movq %rdx, %rbx movb (%r15), %cl testb %cl, %cl je 0x365eb cmpb $0x0, (%rbx) jne 0x3654c jmp 0x365ed xorl %ecx, %ecx xorl %eax, %eax cmpb %cl, (%rbx) setne %al jmp 0x365fb movl $0x1, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_strcasecmp_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov cl, [rsi] test cl, cl jz loc_365EB cmp byte ptr [rbx], 0 jz loc_365ED mov r15, rsi mov r14, rdi mov r12, [rdi+50h] loc_3654C: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_365B0 mov edx, [r14+9Ch] add rdx, rbx mov rax, [r14+0B8h] mov rdi, r14 mov rsi, rbx call qword ptr [rax+0C0h] mov ecx, eax mov eax, 1 cmp ecx, 1 jg short loc_365FB movzx ecx, byte ptr [r15] mov cl, [r12+rcx] movzx edx, byte ptr [rbx] cmp cl, [r12+rdx] jnz short loc_365FB inc r15 inc rbx jmp short loc_365D9 loc_365B0: mov eax, eax lea rcx, [r15+rax] lea rdx, [rbx+rax] xor esi, esi loc_365BC: cmp eax, esi jz short loc_365D3 mov dil, [r15+rsi] lea r8, [rsi+1] cmp dil, [rbx+rsi] mov rsi, r8 jz short loc_365BC jmp short loc_365F6 loc_365D3: mov r15, rcx mov rbx, rdx loc_365D9: mov cl, [r15] test cl, cl jz short loc_365EB cmp byte ptr [rbx], 0 jnz loc_3654C jmp short loc_365ED loc_365EB: xor ecx, ecx loc_365ED: xor eax, eax cmp [rbx], cl setnz al jmp short loc_365FB loc_365F6: mov eax, 1 loc_365FB: pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 my_strcasecmp_mb(long long a1, unsigned __int8 *a2, _BYTE *a3) { _BYTE *v3; // rbx unsigned __int8 v4; // cl unsigned __int8 *v5; // r15 long long v6; // r12 int v7; // eax int v8; // ecx _BOOL8 result; // rax long long i; // rsi v3 = a3; v4 = *a2; if ( *a2 ) { if ( *a3 ) { v5 = a2; v6 = *(_QWORD *)(a1 + 80); do { v7 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v5, &v5[*(unsigned int *)(a1 + 156)]); if ( v7 >= 2 ) { for ( i = 0LL; v7 != (_DWORD)i; ++i ) { if ( v5[i] != v3[i] ) return 1LL; } v5 += (unsigned int)v7; v3 += (unsigned int)v7; } else { v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v3, &v3[*(unsigned int *)(a1 + 156)]); result = 1LL; if ( v8 > 1 || *(_BYTE *)(v6 + *v5) != *(_BYTE *)(v6 + (unsigned __int8)*v3) ) return result; ++v5; ++v3; } v4 = *v5; if ( !*v5 ) goto LABEL_16; } while ( *v3 ); } } else { LABEL_16: v4 = 0; } return *v3 != v4; }
my_strcasecmp_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV CL,byte ptr [RSI] TEST CL,CL JZ 0x001365eb CMP byte ptr [RBX],0x0 JZ 0x001365ed MOV R15,RSI MOV R14,RDI MOV R12,qword ptr [RDI + 0x50] LAB_0013654c: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x001365b0 MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,RBX MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0xc0] MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x1 JG 0x001365fb MOVZX ECX,byte ptr [R15] MOV CL,byte ptr [R12 + RCX*0x1] MOVZX EDX,byte ptr [RBX] CMP CL,byte ptr [R12 + RDX*0x1] JNZ 0x001365fb INC R15 INC RBX JMP 0x001365d9 LAB_001365b0: MOV EAX,EAX LEA RCX,[R15 + RAX*0x1] LEA RDX,[RBX + RAX*0x1] XOR ESI,ESI LAB_001365bc: CMP EAX,ESI JZ 0x001365d3 MOV DIL,byte ptr [R15 + RSI*0x1] LEA R8,[RSI + 0x1] CMP DIL,byte ptr [RBX + RSI*0x1] MOV RSI,R8 JZ 0x001365bc JMP 0x001365f6 LAB_001365d3: MOV R15,RCX MOV RBX,RDX LAB_001365d9: MOV CL,byte ptr [R15] TEST CL,CL JZ 0x001365eb CMP byte ptr [RBX],0x0 JNZ 0x0013654c JMP 0x001365ed LAB_001365eb: XOR ECX,ECX LAB_001365ed: XOR EAX,EAX CMP byte ptr [RBX],CL SETNZ AL JMP 0x001365fb LAB_001365f6: MOV EAX,0x1 LAB_001365fb: POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool my_strcasecmp_mb(long param_1,byte *param_2,byte *param_3) { byte *pbVar1; byte *pbVar2; long lVar3; uint uVar4; int iVar5; byte bVar6; byte *pbVar7; long lVar8; byte *pbVar9; bVar6 = *param_2; if (bVar6 == 0) { LAB_001365eb: bVar6 = 0; } else if (*param_3 != 0) { lVar3 = *(long *)(param_1 + 0x50); pbVar7 = param_3; do { uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,param_2,param_2 + *(uint *)(param_1 + 0x9c)); if ((int)uVar4 < 2) { iVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar7,pbVar7 + *(uint *)(param_1 + 0x9c)); if (1 < iVar5) { return true; } if (*(char *)(lVar3 + (ulong)*param_2) != *(char *)(lVar3 + (ulong)*pbVar7)) { return true; } pbVar9 = param_2 + 1; param_3 = pbVar7 + 1; } else { pbVar9 = param_2 + uVar4; param_3 = pbVar7 + uVar4; lVar8 = 0; while (uVar4 != (uint)lVar8) { pbVar1 = param_2 + lVar8; pbVar2 = pbVar7 + lVar8; lVar8 = lVar8 + 1; if (*pbVar1 != *pbVar2) { return true; } } } bVar6 = *pbVar9; if (bVar6 == 0) goto LAB_001365eb; pbVar7 = param_3; param_2 = pbVar9; } while (*param_3 != 0); } return *param_3 != bVar6; }
39,197
LefDefParser::lefiIRDrop::Init()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp
void lefiIRDrop::Init() { nameSize_ = 16; value1Size_ = 16; value2Size_ = 16; name_ = (char*) lefMalloc(16); numValues_ = 0; valuesAllocated_ = 2; value1_ = (double*) lefMalloc(sizeof(double) * 2); value2_ = (double*) lefMalloc(sizeof(double) * 2); }
O0
cpp
LefDefParser::lefiIRDrop::Init(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) movl $0x10, (%rax) movl $0x10, 0x4(%rax) movl $0x10, 0x8(%rax) movl $0x10, %edi callq 0x359d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x18(%rax) movl $0x0, 0xc(%rax) movl $0x2, 0x10(%rax) movl $0x10, %edi callq 0x359d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x20(%rax) movl $0x10, %edi callq 0x359d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x28(%rax) addq $0x18, %rsp retq nopl (%rax)
_ZN12LefDefParser10lefiIRDrop4InitEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_10], rax mov dword ptr [rax], 10h mov dword ptr [rax+4], 10h mov dword ptr [rax+8], 10h mov edi, offset word_10; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+18h], rcx mov dword ptr [rax+0Ch], 0 mov dword ptr [rax+10h], 2 mov edi, offset word_10; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+20h], rcx mov edi, offset word_10; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+28h], rcx add rsp, 18h retn
LefDefParser::lefiIRDrop * LefDefParser::lefiIRDrop::Init( LefDefParser::lefiIRDrop *this, unsigned long long a2) { long long v2; // rcx LefDefParser::lefiIRDrop *result; // rax *(_DWORD *)this = 16; *((_DWORD *)this + 1) = 16; *((_DWORD *)this + 2) = 16; *((_QWORD *)this + 3) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2); *((_DWORD *)this + 3) = 0; *((_DWORD *)this + 4) = 2; *((_QWORD *)this + 4) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2); v2 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2); result = this; *((_QWORD *)this + 5) = v2; return result; }
Init: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RAX],0x10 MOV dword ptr [RAX + 0x4],0x10 MOV dword ptr [RAX + 0x8],0x10 MOV EDI,0x10 CALL 0x001359d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RAX + 0xc],0x0 MOV dword ptr [RAX + 0x10],0x2 MOV EDI,0x10 CALL 0x001359d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x20],RCX MOV EDI,0x10 CALL 0x001359d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x28],RCX ADD RSP,0x18 RET
/* LefDefParser::lefiIRDrop::Init() */ void __thiscall LefDefParser::lefiIRDrop::Init(lefiIRDrop *this) { int8 uVar1; *(int4 *)this = 0x10; *(int4 *)(this + 4) = 0x10; *(int4 *)(this + 8) = 0x10; uVar1 = lefMalloc(0x10); *(int8 *)(this + 0x18) = uVar1; *(int4 *)(this + 0xc) = 0; *(int4 *)(this + 0x10) = 2; uVar1 = lefMalloc(0x10); *(int8 *)(this + 0x20) = uVar1; uVar1 = lefMalloc(0x10); *(int8 *)(this + 0x28) = uVar1; return; }
39,198
std::vector<unsigned int, std::allocator<unsigned int>> lsb_bytes_to_words<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>)
msxemulator/build_O3/_deps/picotool-src/bintool/metadata.h
std::vector<uint32_t> lsb_bytes_to_words(InputIterator begin, InputIterator end) { using InputType = typename std::iterator_traits<InputIterator>::value_type; static_assert(sizeof(InputType) == 1, ""); std::vector<uint32_t> rc; size_t size = end - begin; assert(!(size & 3)); if (size) { rc.reserve(size / 4); for(auto it = begin; it < end; ) { uint32_t word = *it++; word |= (*it++) << 8; word |= (*it++) << 16; word |= (*it++) << 24; rc.push_back(word); } } return rc; }
O3
c
std::vector<unsigned int, std::allocator<unsigned int>> lsb_bytes_to_words<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq %rdx, %rsi subq %r15, %rsi je 0x5530c movq %rdx, %r14 shrq $0x2, %rsi movq %rbx, %rdi callq 0x5533c cmpq %r14, %r15 jae 0x5530c leaq 0x4(%rsp), %r12 movl (%r15), %eax movl %eax, 0x4(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x552f8 movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x55303 movq %rbx, %rdi movq %r12, %rdx callq 0x5c524 addq $0x4, %r15 cmpq %r14, %r15 jb 0x552db movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x5531d movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x55334 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0xf470 movq %r14, %rdi callq 0xf7d0
_Z18lsb_bytes_to_wordsIN9__gnu_cxx17__normal_iteratorIPKhSt6vectorIhSaIhEEEEES4_IjSaIjEET_SA_: push r15 push r14 push r12 push rbx push rax mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, rdx sub rsi, r15 jz short loc_5530C mov r14, rdx shr rsi, 2 mov rdi, rbx call _ZNSt6vectorIjSaIjEE7reserveEm; std::vector<uint>::reserve(ulong) cmp r15, r14 jnb short loc_5530C lea r12, [rsp+28h+var_24] loc_552DB: mov eax, [r15] mov [rsp+28h+var_24], eax mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_552F8 mov [rsi], eax add rsi, 4 mov [rbx+8], rsi jmp short loc_55303 loc_552F8: mov rdi, rbx mov rdx, r12 call _ZNSt6vectorIjSaIjEE17_M_realloc_insertIJRKjEEEvN9__gnu_cxx17__normal_iteratorIPjS1_EEDpOT_; std::vector<uint>::_M_realloc_insert<uint const&>(__gnu_cxx::__normal_iterator<uint *,std::vector<uint>>,uint const&) loc_55303: add r15, 4 cmp r15, r14 jb short loc_552DB loc_5530C: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_5531D: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_55334 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_55334: mov rdi, r14 call __Unwind_Resume
long long lsb_bytes_to_words<__gnu_cxx::__normal_iterator<unsigned char const*,std::vector<unsigned char>>>( long long a1, int *a2, unsigned long long a3) { long long v3; // rax int *v4; // r15 unsigned long long v5; // rsi int v7; // eax _DWORD *v8; // rsi int v10[9]; // [rsp+0h] [rbp-24h] BYREF v10[0] = HIDWORD(v3); v4 = a2; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v5 = a3 - (_QWORD)a2; if ( v5 ) { std::vector<unsigned int>::reserve(a1, v5 >> 2); for ( ; (unsigned long long)v4 < a3; ++v4 ) { v7 = *v4; v10[0] = *v4; v8 = *(_DWORD **)(a1 + 8); if ( v8 == *(_DWORD **)(a1 + 16) ) { std::vector<unsigned int>::_M_realloc_insert<unsigned int const&>(a1, v8, v10); } else { *v8 = v7; *(_QWORD *)(a1 + 8) = v8 + 1; } } } return a1; }
lsb_bytes_to_words<__gnu_cxx::__normal_iterator<unsigned_char_const*,std::vector<unsigned_char,std::allocator<unsigned_char>>>>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,RDX SUB RSI,R15 JZ 0x0015530c MOV R14,RDX SHR RSI,0x2 LAB_001552c9: MOV RDI,RBX CALL 0x0015533c CMP R15,R14 JNC 0x0015530c LEA R12,[RSP + 0x4] LAB_001552db: MOV EAX,dword ptr [R15] MOV dword ptr [RSP + 0x4],EAX MOV RSI,qword ptr [RBX + 0x8] CMP RSI,qword ptr [RBX + 0x10] JZ 0x001552f8 MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RBX + 0x8],RSI JMP 0x00155303 LAB_001552f8: MOV RDI,RBX MOV RDX,R12 CALL 0x0015c524 LAB_00155303: ADD R15,0x4 CMP R15,R14 JC 0x001552db LAB_0015530c: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* std::vector<unsigned int, std::allocator<unsigned int> > lsb_bytes_to_words<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > > >(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >) */ vector<unsigned_int,std::allocator<unsigned_int>> * lsb_bytes_to_words<__gnu_cxx::__normal_iterator<unsigned_char_const*,std::vector<unsigned_char,std::allocator<unsigned_char>>>> (vector<unsigned_int,std::allocator<unsigned_int>> *param_1,int4 *param_2, int4 *param_3) { int4 *puVar1; int8 in_RAX; int8 uStack_28; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; if ((long)param_3 - (long)param_2 != 0) { uStack_28 = in_RAX; /* try { // try from 001552c9 to 001552d0 has its CatchHandler @ 0015531b */ std::vector<unsigned_int,std::allocator<unsigned_int>>::reserve (param_1,(ulong)((long)param_3 - (long)param_2) >> 2); if (param_2 < param_3) { do { uStack_28 = CONCAT44(*param_2,(int4)uStack_28); puVar1 = *(int4 **)(param_1 + 8); if (puVar1 == *(int4 **)(param_1 + 0x10)) { /* try { // try from 001552f8 to 00155302 has its CatchHandler @ 0015531d */ std::vector<unsigned_int,std::allocator<unsigned_int>>:: _M_realloc_insert<unsigned_int_const&>(param_1,puVar1,(long)&uStack_28 + 4); } else { *puVar1 = *param_2; *(int4 **)(param_1 + 8) = puVar1 + 1; } param_2 = param_2 + 1; } while (param_2 < param_3); } } return param_1; }
39,199
string_get_tzoffset
bluesky950520[P]quickjs/quickjs.c
static BOOL string_get_tzoffset(const uint8_t *sp, int *pp, int *tzp, BOOL strict) { int tz = 0, sgn, hh, mm, p = *pp; sgn = sp[p++]; if (sgn == '+' || sgn == '-') { int n = p; if (!string_get_digits(sp, &p, &hh, 1, 9)) return FALSE; n = p - n; if (strict && n != 2 && n != 4) return FALSE; while (n > 4) { n -= 2; hh /= 100; } if (n > 2) { mm = hh % 100; hh = hh / 100; } else { mm = 0; if (string_skip_char(sp, &p, ':') /* optional separator */ && !string_get_digits(sp, &p, &mm, 2, 2)) return FALSE; } if (hh > 23 || mm > 59) return FALSE; tz = hh * 60 + mm; if (sgn != '+') tz = -tz; } else if (sgn != 'Z') { return FALSE; } *pp = p; *tzp = tz; return TRUE; }
O1
c
string_get_tzoffset: pushq %rbp pushq %r15 pushq %r14 pushq %rbx movslq (%rsi), %r11 leal 0x1(%r11), %ebx movzbl (%rdi,%r11), %r9d cmpl $0x2b, %r9d je 0x57525 xorl %eax, %eax cmpl $0x5a, %r9d je 0x575df cmpl $0x2d, %r9d jne 0x575f8 movslq %ebx, %r14 leal 0xa(%r11), %r8d addq %rdi, %r14 xorl %eax, %eax xorl %r10d, %r10d movzbl (%r14,%rax), %r15d leal -0x30(%r15), %ebp cmpb $0x9, %bpl ja 0x57559 leal (%r10,%r10,4), %r10d leal (%r15,%r10,2), %r10d addl $-0x30, %r10d incq %rax cmpl $0x9, %eax jne 0x57534 jmp 0x5755e addl %ebx, %eax movl %eax, %r8d xorl %eax, %eax cmpl %ebx, %r8d cmovlel %ebx, %r8d jle 0x575e3 movl %r8d, %r14d subl %ebx, %r14d testl %ecx, %ecx je 0x57581 cmpl $0x2, %r14d je 0x57581 xorl %ebp, %ebp cmpl $0x4, %r14d jne 0x575e5 cmpl $0x5, %r14d jl 0x575b6 movl %r8d, %r14d subl %r11d, %r14d incl %r14d movslq %r10d, %rcx imulq $0x51eb851f, %rcx, %r10 # imm = 0x51EB851F movq %r10, %rcx shrq $0x3f, %rcx sarq $0x25, %r10 addl %ecx, %r10d addl $-0x2, %r14d cmpl $0x6, %r14d jg 0x57590 addl $-0x2, %r14d cmpl $0x3, %r14d jl 0x575ff movslq %r10d, %rcx imulq $0x51eb851f, %rcx, %r10 # imm = 0x51EB851F movq %r10, %rdi shrq $0x3f, %rdi sarq $0x25, %r10 addl %edi, %r10d imull $0x64, %r10d, %edi subl %edi, %ecx jmp 0x5766e xorl %ebp, %ebp jmp 0x575ef xorl %ebp, %ebp xorl %edi, %edi movl %r8d, %ebx testb %dil, %dil je 0x575f8 movl %ebx, (%rsi) movl %ebp, (%rdx) movl $0x1, %eax popq %rbx popq %r14 popq %r15 popq %rbp retq movslq %r8d, %rcx movb (%rdi,%rcx), %r11b xorl %ecx, %ecx cmpb $0x3a, %r11b sete %cl addl %ecx, %r8d xorl %ecx, %ecx cmpb $0x3a, %r11b jne 0x5766e movslq %r8d, %rcx leal 0x2(%rcx), %r11d addq %rcx, %rdi xorl %ebx, %ebx xorl %ecx, %ecx movzbl (%rdi,%rbx), %r14d leal -0x30(%r14), %ebp cmpb $0x9, %bpl ja 0x5764b leal (%rcx,%rcx,4), %ecx leal (%r14,%rcx,2), %ecx addl $-0x30, %ecx incq %rbx cmpl $0x2, %ebx jne 0x57628 jmp 0x57651 addl %r8d, %ebx movl %ebx, %r11d movl %r11d, %ebx subl %r8d, %ebx xorl %ebp, %ebp movl $0x0, %edi cmpl $0x2, %ebx cmovll %ebp, %ecx cmovgel %r11d, %r8d jl 0x575e7 xorl %ebp, %ebp cmpl $0x17, %r10d jg 0x575e5 cmpl $0x3b, %ecx jg 0x575e5 imull $0x3c, %r10d, %edi addl %ecx, %edi movl %edi, %ebp negl %ebp cmpb $0x2b, %r9b cmovel %edi, %ebp movb $0x1, %dil jmp 0x575e7
string_get_tzoffset: push rbp push r15 push r14 push rbx movsxd r11, dword ptr [rsi] lea ebx, [r11+1] movzx r9d, byte ptr [rdi+r11] cmp r9d, 2Bh ; '+' jz short loc_57525 xor eax, eax cmp r9d, 5Ah ; 'Z' jz loc_575DF cmp r9d, 2Dh ; '-' jnz loc_575F8 loc_57525: movsxd r14, ebx lea r8d, [r11+0Ah] add r14, rdi xor eax, eax xor r10d, r10d loc_57534: movzx r15d, byte ptr [r14+rax] lea ebp, [r15-30h] cmp bpl, 9 ja short loc_57559 lea r10d, [r10+r10*4] lea r10d, [r15+r10*2] add r10d, 0FFFFFFD0h inc rax cmp eax, 9 jnz short loc_57534 jmp short loc_5755E loc_57559: add eax, ebx mov r8d, eax loc_5755E: xor eax, eax cmp r8d, ebx cmovle r8d, ebx jle short loc_575E3 mov r14d, r8d sub r14d, ebx test ecx, ecx jz short loc_57581 cmp r14d, 2 jz short loc_57581 xor ebp, ebp cmp r14d, 4 jnz short loc_575E5 loc_57581: cmp r14d, 5 jl short loc_575B6 mov r14d, r8d sub r14d, r11d inc r14d loc_57590: movsxd rcx, r10d imul r10, rcx, 51EB851Fh mov rcx, r10 shr rcx, 3Fh sar r10, 25h add r10d, ecx add r14d, 0FFFFFFFEh cmp r14d, 6 jg short loc_57590 add r14d, 0FFFFFFFEh loc_575B6: cmp r14d, 3 jl short loc_575FF movsxd rcx, r10d imul r10, rcx, 51EB851Fh mov rdi, r10 shr rdi, 3Fh sar r10, 25h add r10d, edi imul edi, r10d, 64h ; 'd' sub ecx, edi jmp loc_5766E loc_575DF: xor ebp, ebp jmp short loc_575EF loc_575E3: xor ebp, ebp loc_575E5: xor edi, edi loc_575E7: mov ebx, r8d test dil, dil jz short loc_575F8 loc_575EF: mov [rsi], ebx mov [rdx], ebp mov eax, 1 loc_575F8: pop rbx pop r14 pop r15 pop rbp retn loc_575FF: movsxd rcx, r8d mov r11b, [rdi+rcx] xor ecx, ecx cmp r11b, 3Ah ; ':' setz cl add r8d, ecx xor ecx, ecx cmp r11b, 3Ah ; ':' jnz short loc_5766E movsxd rcx, r8d lea r11d, [rcx+2] add rdi, rcx xor ebx, ebx xor ecx, ecx loc_57628: movzx r14d, byte ptr [rdi+rbx] lea ebp, [r14-30h] cmp bpl, 9 ja short loc_5764B lea ecx, [rcx+rcx*4] lea ecx, [r14+rcx*2] add ecx, 0FFFFFFD0h inc rbx cmp ebx, 2 jnz short loc_57628 jmp short loc_57651 loc_5764B: add ebx, r8d mov r11d, ebx loc_57651: mov ebx, r11d sub ebx, r8d xor ebp, ebp mov edi, 0 cmp ebx, 2 cmovl ecx, ebp cmovge r8d, r11d jl loc_575E7 loc_5766E: xor ebp, ebp cmp r10d, 17h jg loc_575E5 cmp ecx, 3Bh ; ';' jg loc_575E5 imul edi, r10d, 3Ch ; '<' add edi, ecx mov ebp, edi neg ebp cmp r9b, 2Bh ; '+' cmovz ebp, edi mov dil, 1 jmp loc_575E7
long long string_get_tzoffset(long long a1, int *a2, int *a3, int a4) { long long v4; // r11 int v5; // ebx int v6; // r9d long long result; // rax int v8; // r8d long long v9; // rax int v10; // r10d int v11; // r15d int v12; // r14d int v13; // r14d int v14; // ecx int v15; // ecx int v16; // ebp char v17; // di char v18; // r11 int v19; // r11d long long v20; // rdi long long v21; // rbx int v22; // r14d v4 = *a2; v5 = v4 + 1; v6 = *(unsigned __int8 *)(a1 + v4); if ( v6 == 43 ) goto LABEL_4; result = 0LL; if ( v6 != 90 ) { if ( v6 != 45 ) return result; LABEL_4: v8 = v4 + 10; v9 = 0LL; v10 = 0; while ( 1 ) { v11 = *(unsigned __int8 *)(a1 + v5 + v9); if ( (unsigned __int8)(v11 - 48) > 9u ) break; v10 = v11 + 10 * v10 - 48; if ( (_DWORD)++v9 == 9 ) goto LABEL_9; } v8 = v5 + v9; LABEL_9: result = 0LL; if ( v8 <= v5 ) { v8 = v4 + 1; v16 = 0; LABEL_21: v17 = 0; goto LABEL_22; } v12 = v8 - v5; if ( a4 ) { if ( v12 != 2 ) { v16 = 0; if ( v12 != 4 ) goto LABEL_21; } } if ( v12 >= 5 ) { v13 = v8 - v4 + 1; do { v10 /= 100; v13 -= 2; } while ( v13 > 6 ); v12 = v13 - 2; } if ( v12 < 3 ) { v18 = *(_BYTE *)(a1 + v8); v8 += v18 == 58; v15 = 0; if ( v18 == 58 ) { v19 = v8 + 2; v20 = v8 + a1; v21 = 0LL; v15 = 0; while ( 1 ) { v22 = *(unsigned __int8 *)(v20 + v21); if ( (unsigned __int8)(v22 - 48) > 9u ) break; v15 = v22 + 10 * v15 - 48; if ( (_DWORD)++v21 == 2 ) goto LABEL_31; } v19 = v8 + v21; LABEL_31: v16 = 0; v17 = 0; if ( v19 - v8 < 2 ) goto LABEL_22; v8 = v19; } } else { v14 = v10; v10 /= 100; v15 = v14 - 100 * v10; } v16 = 0; if ( v10 > 23 || v15 > 59 ) goto LABEL_21; v16 = -(v15 + 60 * v10); if ( (_BYTE)v6 == 43 ) v16 = v15 + 60 * v10; v17 = 1; LABEL_22: v5 = v8; if ( !v17 ) return result; goto LABEL_23; } v16 = 0; LABEL_23: *a2 = v5; *a3 = v16; return 1LL; }
string_get_tzoffset: PUSH RBP PUSH R15 PUSH R14 PUSH RBX MOVSXD R11,dword ptr [RSI] LEA EBX,[R11 + 0x1] MOVZX R9D,byte ptr [RDI + R11*0x1] CMP R9D,0x2b JZ 0x00157525 XOR EAX,EAX CMP R9D,0x5a JZ 0x001575df CMP R9D,0x2d JNZ 0x001575f8 LAB_00157525: MOVSXD R14,EBX LEA R8D,[R11 + 0xa] ADD R14,RDI XOR EAX,EAX XOR R10D,R10D LAB_00157534: MOVZX R15D,byte ptr [R14 + RAX*0x1] LEA EBP,[R15 + -0x30] CMP BPL,0x9 JA 0x00157559 LEA R10D,[R10 + R10*0x4] LEA R10D,[R15 + R10*0x2] ADD R10D,-0x30 INC RAX CMP EAX,0x9 JNZ 0x00157534 JMP 0x0015755e LAB_00157559: ADD EAX,EBX MOV R8D,EAX LAB_0015755e: XOR EAX,EAX CMP R8D,EBX CMOVLE R8D,EBX JLE 0x001575e3 MOV R14D,R8D SUB R14D,EBX TEST ECX,ECX JZ 0x00157581 CMP R14D,0x2 JZ 0x00157581 XOR EBP,EBP CMP R14D,0x4 JNZ 0x001575e5 LAB_00157581: CMP R14D,0x5 JL 0x001575b6 MOV R14D,R8D SUB R14D,R11D INC R14D LAB_00157590: MOVSXD RCX,R10D IMUL R10,RCX,0x51eb851f MOV RCX,R10 SHR RCX,0x3f SAR R10,0x25 ADD R10D,ECX ADD R14D,-0x2 CMP R14D,0x6 JG 0x00157590 ADD R14D,-0x2 LAB_001575b6: CMP R14D,0x3 JL 0x001575ff MOVSXD RCX,R10D IMUL R10,RCX,0x51eb851f MOV RDI,R10 SHR RDI,0x3f SAR R10,0x25 ADD R10D,EDI IMUL EDI,R10D,0x64 SUB ECX,EDI JMP 0x0015766e LAB_001575df: XOR EBP,EBP JMP 0x001575ef LAB_001575e3: XOR EBP,EBP LAB_001575e5: XOR EDI,EDI LAB_001575e7: MOV EBX,R8D TEST DIL,DIL JZ 0x001575f8 LAB_001575ef: MOV dword ptr [RSI],EBX MOV dword ptr [RDX],EBP MOV EAX,0x1 LAB_001575f8: POP RBX POP R14 POP R15 POP RBP RET LAB_001575ff: MOVSXD RCX,R8D MOV R11B,byte ptr [RDI + RCX*0x1] XOR ECX,ECX CMP R11B,0x3a SETZ CL ADD R8D,ECX XOR ECX,ECX CMP R11B,0x3a JNZ 0x0015766e MOVSXD RCX,R8D LEA R11D,[RCX + 0x2] ADD RDI,RCX XOR EBX,EBX XOR ECX,ECX LAB_00157628: MOVZX R14D,byte ptr [RDI + RBX*0x1] LEA EBP,[R14 + -0x30] CMP BPL,0x9 JA 0x0015764b LEA ECX,[RCX + RCX*0x4] LEA ECX,[R14 + RCX*0x2] ADD ECX,-0x30 INC RBX CMP EBX,0x2 JNZ 0x00157628 JMP 0x00157651 LAB_0015764b: ADD EBX,R8D MOV R11D,EBX LAB_00157651: MOV EBX,R11D SUB EBX,R8D XOR EBP,EBP MOV EDI,0x0 CMP EBX,0x2 CMOVL ECX,EBP CMOVGE R8D,R11D JL 0x001575e7 LAB_0015766e: XOR EBP,EBP CMP R10D,0x17 JG 0x001575e5 CMP ECX,0x3b JG 0x001575e5 IMUL EDI,R10D,0x3c ADD EDI,ECX MOV EBP,EDI NEG EBP CMP R9B,0x2b CMOVZ EBP,EDI MOV DIL,0x1 JMP 0x001575e7
int8 string_get_tzoffset(long param_1,int *param_2,int *param_3,int param_4) { char cVar1; byte bVar2; bool bVar3; long lVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; iVar9 = *param_2; iVar5 = iVar9 + 1; cVar1 = *(char *)(param_1 + iVar9); if (cVar1 != '+') { if (cVar1 == 'Z') { iVar6 = 0; goto LAB_001575ef; } if (cVar1 != '-') { return 0; } } iVar6 = iVar9 + 10; lVar4 = 0; iVar7 = 0; do { bVar2 = *(byte *)(iVar5 + param_1 + lVar4); if (9 < (byte)(bVar2 - 0x30)) { iVar6 = (int)lVar4 + iVar5; break; } iVar7 = (uint)bVar2 + iVar7 * 10 + -0x30; lVar4 = lVar4 + 1; } while ((int)lVar4 != 9); if ((iVar5 < iVar6) && (((iVar8 = iVar6 - iVar5, param_4 == 0 || (iVar8 == 2)) || (iVar5 = iVar6, iVar8 == 4)))) { if (4 < iVar8) { iVar9 = (iVar6 - iVar9) + 1; do { iVar8 = iVar9; iVar7 = iVar7 / 100; iVar9 = iVar8 + -2; } while (6 < iVar9); iVar8 = iVar8 + -4; } if (iVar8 < 3) { iVar5 = iVar6 + (uint)(*(char *)(param_1 + iVar6) == ':'); iVar8 = 0; iVar9 = iVar5; if (*(char *)(param_1 + iVar6) != ':') goto LAB_0015766e; iVar9 = iVar5 + 2; lVar4 = 0; iVar8 = 0; do { bVar2 = *(byte *)(param_1 + iVar5 + lVar4); if (9 < (byte)(bVar2 - 0x30)) { iVar9 = (int)lVar4 + iVar5; break; } iVar8 = (uint)bVar2 + iVar8 * 10 + -0x30; lVar4 = lVar4 + 1; } while ((int)lVar4 != 2); iVar6 = 0; bVar3 = false; if (1 < iVar9 - iVar5) goto LAB_0015766e; } else { iVar8 = iVar7 % 100; iVar7 = iVar7 / 100; iVar9 = iVar6; LAB_0015766e: iVar5 = iVar9; if ((0x17 < iVar7) || (0x3b < iVar8)) goto LAB_001575e5; iVar8 = iVar7 * 0x3c + iVar8; iVar6 = -iVar8; if (cVar1 == '+') { iVar6 = iVar8; } bVar3 = true; } } else { LAB_001575e5: iVar6 = 0; bVar3 = false; } if (!bVar3) { return 0; } LAB_001575ef: *param_2 = iVar5; *param_3 = iVar6; return 1; }