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
2,800
test_typical(std::vector<float, std::allocator<float>> const&, std::vector<float, std::allocator<float>> const&, float)
monkey531[P]llama/tests/test-sampling.cpp
static void test_typical(const std::vector<float> & probs, const std::vector<float> & probs_expected, float p) { sampler_tester tester(probs, probs_expected); DUMP(&tester.cur_p); tester.apply(llama_sampler_init_typical(p, 1)); DUMP(&tester.cur_p); tester.check(); }
O2
cpp
test_typical(std::vector<float, std::allocator<float>> const&, std::vector<float, std::allocator<float>> const&, float): pushq %rbx subq $0x50, %rsp movq %rsi, %rdx movq %rdi, %rsi movq %rsp, %rbx movq %rbx, %rdi callq 0x50ac leaq 0x1c28(%rip), %rdi # 0x6298 leaq 0x1c2d(%rip), %rsi # 0x62a4 leaq 0x1d5d(%rip), %rcx # 0x63db movl $0x84, %edx xorl %eax, %eax callq 0x2030 movq %rbx, %rdi callq 0x4df9 leaq 0x1ffb(%rip), %rdi # 0x6694 callq 0x2210 movss 0x1a9e(%rip), %xmm0 # 0x6144 pushq $0x1 popq %rdi callq 0x2150 movq %rsp, %rdi movq %rax, %rsi callq 0x5198 leaq 0x1bd8(%rip), %rdi # 0x6298 leaq 0x1bdd(%rip), %rsi # 0x62a4 leaq 0x1d0d(%rip), %rcx # 0x63db movl $0x86, %edx xorl %eax, %eax callq 0x2030 movq %rsp, %rbx movq %rbx, %rdi callq 0x4df9 leaq 0x1fa8(%rip), %rdi # 0x6694 callq 0x2210 movq %rbx, %rdi callq 0x51b0 movq %rsp, %rdi callq 0x523e addq $0x50, %rsp popq %rbx retq movq %rax, %rbx movq %rsp, %rdi callq 0x523e movq %rbx, %rdi callq 0x2270
_ZL12test_typicalRKSt6vectorIfSaIfEES3_f: push rbx sub rsp, 50h mov rdx, rsi mov rsi, rdi mov rbx, rsp mov rdi, rbx call _ZN14sampler_testerC2ERKSt6vectorIfSaIfEES4_; sampler_tester::sampler_tester(std::vector<float> const&,std::vector<float> const&) lea rdi, aSDS; "%s:%d (%s)\n" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aTestTypical; "test_typical" mov edx, 84h xor eax, eax call _printf mov rdi, rbx call _ZL4dumpPK22llama_token_data_array; dump(llama_token_data_array const*) lea rdi, asc_6694; "-" call _puts movss xmm0, cs:dword_6144 push 1 pop rdi call _llama_sampler_init_typical mov rdi, rsp mov rsi, rax call _ZN14sampler_tester5applyEP13llama_sampler; sampler_tester::apply(llama_sampler *) lea rdi, aSDS; "%s:%d (%s)\n" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aTestTypical; "test_typical" mov edx, 86h xor eax, eax call _printf mov rbx, rsp mov rdi, rbx call _ZL4dumpPK22llama_token_data_array; dump(llama_token_data_array const*) lea rdi, asc_6694; "-" call _puts mov rdi, rbx; this call _ZN14sampler_tester5checkEv; sampler_tester::check(void) mov rdi, rsp; this call _ZN14sampler_testerD2Ev; sampler_tester::~sampler_tester() add rsp, 50h pop rbx retn mov rbx, rax mov rdi, rsp; this call _ZN14sampler_testerD2Ev; sampler_tester::~sampler_tester() mov rdi, rbx call __Unwind_Resume
void test_typical(long long a1, long long a2) { long long inited; // rax _BYTE v3[88]; // [rsp+0h] [rbp-58h] BYREF sampler_tester::sampler_tester(v3, a1, a2); printf( "%s:%d (%s)\n", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", 132, "test_typical"); dump(v3); puts("-"); inited = llama_sampler_init_typical(1LL, 0.5); sampler_tester::apply(v3, inited); printf( "%s:%d (%s)\n", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", 134, "test_typical"); dump(v3); puts("-"); sampler_tester::check((sampler_tester *)v3); sampler_tester::~sampler_tester((sampler_tester *)v3); }
test_typical: PUSH RBX SUB RSP,0x50 MOV RDX,RSI MOV RSI,RDI MOV RBX,RSP MOV RDI,RBX CALL 0x001050ac LEA RDI,[0x106298] LEA RSI,[0x1062a4] LEA RCX,[0x1063db] MOV EDX,0x84 XOR EAX,EAX CALL 0x00102030 MOV RDI,RBX CALL 0x00104df9 LEA RDI,[0x106694] CALL 0x00102210 LAB_0010469e: MOVSS XMM0,dword ptr [0x00106144] PUSH 0x1 POP RDI CALL 0x00102150 MOV RDI,RSP MOV RSI,RAX CALL 0x00105198 LEA RDI,[0x106298] LEA RSI,[0x1062a4] LEA RCX,[0x1063db] MOV EDX,0x86 XOR EAX,EAX CALL 0x00102030 MOV RBX,RSP MOV RDI,RBX CALL 0x00104df9 LEA RDI,[0x106694] CALL 0x00102210 MOV RDI,RBX CALL 0x001051b0 LAB_001046f9: MOV RDI,RSP CALL 0x0010523e ADD RSP,0x50 POP RBX RET
/* test_typical(std::vector<float, std::allocator<float> > const&, std::vector<float, std::allocator<float> > const&, float) */ void test_typical(vector *param_1,vector *param_2,float param_3) { llama_sampler *plVar1; sampler_tester asStack_58 [80]; sampler_tester::sampler_tester(asStack_58,param_1,param_2); printf("%s:%d (%s)\n", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp",0x84, "test_typical"); dump((llama_token_data_array *)asStack_58); puts("-"); /* try { // try from 0010469e to 001046f8 has its CatchHandler @ 00104707 */ plVar1 = (llama_sampler *)llama_sampler_init_typical(DAT_00106144,1); sampler_tester::apply(asStack_58,plVar1); printf("%s:%d (%s)\n", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp",0x86, "test_typical"); dump((llama_token_data_array *)asStack_58); puts("-"); sampler_tester::check(asStack_58); sampler_tester::~sampler_tester(asStack_58); return; }
2,801
ma_open
eloqsql/libmariadb/libmariadb/ma_io.c
MA_FILE *ma_open(const char *location, const char *mode, MYSQL *mysql) { int CodePage= -1; FILE *fp= NULL; MA_FILE *ma_file= NULL; if (!location || !location[0]) return NULL; #ifdef HAVE_REMOTEIO if (strstr(location, "://")) goto remote; #endif #ifdef _WIN32 if (mysql && mysql->charset) CodePage= madb_get_windows_cp(mysql->charset->csname); #endif if (CodePage == -1) { if (!(fp= fopen(location, mode))) { return NULL; } } #ifdef _WIN32 /* See CONC-44: we need to support non ascii filenames too, so we convert current character set to wchar_t and try to open the file via _wsopen */ else { wchar_t *w_filename= NULL; wchar_t *w_mode= NULL; int len; DWORD Length; len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), NULL, 0); if (!len) return NULL; if (!(w_filename= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t)))) { my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return NULL; } Length= len; len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), w_filename, (int)Length); if (!len) { /* todo: error handling */ free(w_filename); return NULL; } len= (int)strlen(mode); if (!(w_mode= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t)))) { my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); free(w_filename); return NULL; } Length= len; len= MultiByteToWideChar(CodePage, 0, mode, (int)strlen(mode), w_mode, (int)Length); if (!len) { /* todo: error handling */ free(w_filename); free(w_mode); return NULL; } fp= _wfopen(w_filename, w_mode); free(w_filename); free(w_mode); } #endif if (fp) { ma_file= (MA_FILE *)malloc(sizeof(MA_FILE)); if (!ma_file) { fclose(fp); my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return NULL; } ma_file->type= MA_FILE_LOCAL; ma_file->ptr= (void *)fp; } return ma_file; #ifdef HAVE_REMOTEIO remote: /* check if plugin for remote io is available and try * to open location */ { MYSQL mysql; if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *) mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN))) return rio_plugin->methods->mopen(location, mode); return NULL; } #endif }
O0
c
ma_open: pushq %rbp movq %rsp, %rbp subq $0x540, %rsp # imm = 0x540 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x510(%rbp) movq %rsi, -0x518(%rbp) movq %rdx, -0x520(%rbp) movl $0xffffffff, -0x524(%rbp) # imm = 0xFFFFFFFF movq $0x0, -0x530(%rbp) movq $0x0, -0x538(%rbp) cmpq $0x0, -0x510(%rbp) je 0x5a313 movq -0x510(%rbp), %rax cmpb $0x0, (%rax) jne 0x5a323 movq $0x0, -0x508(%rbp) jmp 0x5a474 movq -0x510(%rbp), %rdi leaq 0x6fcc2(%rip), %rsi # 0xc9ff3 callq 0x36450 cmpq $0x0, %rax je 0x5a341 jmp 0x5a40d cmpl $-0x1, -0x524(%rbp) jne 0x5a37c movq -0x510(%rbp), %rdi movq -0x518(%rbp), %rsi callq 0x36a20 movq %rax, -0x530(%rbp) cmpq $0x0, %rax jne 0x5a37a movq $0x0, -0x508(%rbp) jmp 0x5a474 jmp 0x5a37c cmpq $0x0, -0x530(%rbp) je 0x5a3fd movl $0x10, %edi callq 0x368d0 movq %rax, -0x538(%rbp) cmpq $0x0, -0x538(%rbp) jne 0x5a3de movq -0x530(%rbp), %rdi callq 0x36410 movq -0x520(%rbp), %rdi leaq 0x1d7855(%rip), %rax # 0x231c10 movq (%rax), %rdx movl $0x7d8, %esi # imm = 0x7D8 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x39ea0 movq $0x0, -0x508(%rbp) jmp 0x5a474 movq -0x538(%rbp), %rax movl $0x1, (%rax) movq -0x530(%rbp), %rcx movq -0x538(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x538(%rbp), %rax movq %rax, -0x508(%rbp) jmp 0x5a474 leaq 0x390c7c(%rip), %rax # 0x3eb090 cmpq $0x0, (%rax) jne 0x5a43f leaq -0x500(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0x64, %edx callq 0x5a0e0 leaq 0x390c5a(%rip), %rcx # 0x3eb090 movq %rax, (%rcx) cmpq $0x0, %rax je 0x5a469 leaq 0x390c4a(%rip), %rax # 0x3eb090 movq (%rax), %rax movq 0x58(%rax), %rax movq (%rax), %rax movq -0x510(%rbp), %rdi movq -0x518(%rbp), %rsi callq *%rax movq %rax, -0x508(%rbp) jmp 0x5a474 movq $0x0, -0x508(%rbp) movq -0x508(%rbp), %rax movq %rax, -0x540(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5a4a4 movq -0x540(%rbp), %rax addq $0x540, %rsp # imm = 0x540 popq %rbp retq callq 0x362a0 nopl (%rax)
ma_open: push rbp mov rbp, rsp sub rsp, 540h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_510], rdi mov [rbp+var_518], rsi mov [rbp+var_520], rdx mov [rbp+var_524], 0FFFFFFFFh mov [rbp+var_530], 0 mov [rbp+var_538], 0 cmp [rbp+var_510], 0 jz short loc_5A313 mov rax, [rbp+var_510] cmp byte ptr [rax], 0 jnz short loc_5A323 loc_5A313: mov [rbp+var_508], 0 jmp loc_5A474 loc_5A323: mov rdi, [rbp+var_510] lea rsi, asc_C9FF3; "://" call _strstr cmp rax, 0 jz short loc_5A341 jmp loc_5A40D loc_5A341: cmp [rbp+var_524], 0FFFFFFFFh jnz short loc_5A37C mov rdi, [rbp+var_510] mov rsi, [rbp+var_518] call _fopen64 mov [rbp+var_530], rax cmp rax, 0 jnz short loc_5A37A mov [rbp+var_508], 0 jmp loc_5A474 loc_5A37A: jmp short $+2 loc_5A37C: cmp [rbp+var_530], 0 jz short loc_5A3FD mov edi, 10h call _malloc mov [rbp+var_538], rax cmp [rbp+var_538], 0 jnz short loc_5A3DE mov rdi, [rbp+var_530] call _fclose mov rdi, [rbp+var_520] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D8h xor eax, eax mov ecx, eax mov al, 0 call my_set_error mov [rbp+var_508], 0 jmp loc_5A474 loc_5A3DE: mov rax, [rbp+var_538] mov dword ptr [rax], 1 mov rcx, [rbp+var_530] mov rax, [rbp+var_538] mov [rax+8], rcx loc_5A3FD: mov rax, [rbp+var_538] mov [rbp+var_508], rax jmp short loc_5A474 loc_5A40D: lea rax, rio_plugin cmp qword ptr [rax], 0 jnz short loc_5A43F lea rdi, [rbp+var_500] xor eax, eax mov esi, eax mov edx, 64h ; 'd' call mysql_client_find_plugin lea rcx, rio_plugin mov [rcx], rax cmp rax, 0 jz short loc_5A469 loc_5A43F: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax] mov rdi, [rbp+var_510] mov rsi, [rbp+var_518] call rax mov [rbp+var_508], rax jmp short loc_5A474 loc_5A469: mov [rbp+var_508], 0 loc_5A474: mov rax, [rbp+var_508] mov [rbp+var_540], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5A4A4 mov rax, [rbp+var_540] add rsp, 540h pop rbp retn loc_5A4A4: call ___stack_chk_fail
long long ma_open(_BYTE *a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-538h] long long v5; // [rsp+10h] [rbp-530h] _BYTE v8[1272]; // [rsp+40h] [rbp-500h] BYREF unsigned long long v9; // [rsp+538h] [rbp-8h] v9 = __readfsqword(0x28u); if ( !a1 || !*a1 ) return 0LL; if ( strstr(a1, "://") ) { if ( rio_plugin ) return (**(long long ( ***)(_BYTE *, long long))(rio_plugin + 88LL))(a1, a2); rio_plugin = mysql_client_find_plugin((long long)v8, 0LL, 0x64u); if ( rio_plugin ) return (**(long long ( ***)(_BYTE *, long long))(rio_plugin + 88LL))(a1, a2); else return 0LL; } else { v5 = fopen64(a1, a2); if ( v5 ) { v4 = malloc(16LL); if ( v4 ) { *(_DWORD *)v4 = 1; *(_QWORD *)(v4 + 8) = v5; return v4; } else { fclose(v5); my_set_error(a3, 0x7D8u, (long long)SQLSTATE_UNKNOWN, 0LL); return 0LL; } } else { return 0LL; } } }
ma_open: PUSH RBP MOV RBP,RSP SUB RSP,0x540 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x510],RDI MOV qword ptr [RBP + -0x518],RSI MOV qword ptr [RBP + -0x520],RDX MOV dword ptr [RBP + -0x524],0xffffffff MOV qword ptr [RBP + -0x530],0x0 MOV qword ptr [RBP + -0x538],0x0 CMP qword ptr [RBP + -0x510],0x0 JZ 0x0015a313 MOV RAX,qword ptr [RBP + -0x510] CMP byte ptr [RAX],0x0 JNZ 0x0015a323 LAB_0015a313: MOV qword ptr [RBP + -0x508],0x0 JMP 0x0015a474 LAB_0015a323: MOV RDI,qword ptr [RBP + -0x510] LEA RSI,[0x1c9ff3] CALL 0x00136450 CMP RAX,0x0 JZ 0x0015a341 JMP 0x0015a40d LAB_0015a341: CMP dword ptr [RBP + -0x524],-0x1 JNZ 0x0015a37c MOV RDI,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RBP + -0x518] CALL 0x00136a20 MOV qword ptr [RBP + -0x530],RAX CMP RAX,0x0 JNZ 0x0015a37a MOV qword ptr [RBP + -0x508],0x0 JMP 0x0015a474 LAB_0015a37a: JMP 0x0015a37c LAB_0015a37c: CMP qword ptr [RBP + -0x530],0x0 JZ 0x0015a3fd MOV EDI,0x10 CALL 0x001368d0 MOV qword ptr [RBP + -0x538],RAX CMP qword ptr [RBP + -0x538],0x0 JNZ 0x0015a3de MOV RDI,qword ptr [RBP + -0x530] CALL 0x00136410 MOV RDI,qword ptr [RBP + -0x520] LEA RAX,[0x331c10] MOV RDX,qword ptr [RAX] MOV ESI,0x7d8 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x00139ea0 MOV qword ptr [RBP + -0x508],0x0 JMP 0x0015a474 LAB_0015a3de: MOV RAX,qword ptr [RBP + -0x538] MOV dword ptr [RAX],0x1 MOV RCX,qword ptr [RBP + -0x530] MOV RAX,qword ptr [RBP + -0x538] MOV qword ptr [RAX + 0x8],RCX LAB_0015a3fd: MOV RAX,qword ptr [RBP + -0x538] MOV qword ptr [RBP + -0x508],RAX JMP 0x0015a474 LAB_0015a40d: LEA RAX,[0x4eb090] CMP qword ptr [RAX],0x0 JNZ 0x0015a43f LEA RDI,[RBP + -0x500] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x64 CALL 0x0015a0e0 LEA RCX,[0x4eb090] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x0015a469 LAB_0015a43f: LEA RAX,[0x4eb090] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RBP + -0x518] CALL RAX MOV qword ptr [RBP + -0x508],RAX JMP 0x0015a474 LAB_0015a469: MOV qword ptr [RBP + -0x508],0x0 LAB_0015a474: MOV RAX,qword ptr [RBP + -0x508] MOV qword ptr [RBP + -0x540],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015a4a4 MOV RAX,qword ptr [RBP + -0x540] ADD RSP,0x540 POP RBP RET LAB_0015a4a4: CALL 0x001362a0
int4 * ma_open(char *param_1,char *param_2,int8 param_3) { char *pcVar1; FILE *__stream; long in_FS_OFFSET; int4 *local_540; int4 *local_510; int1 local_508 [1272]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_540 = (int4 *)0x0; if ((param_1 == (char *)0x0) || (*param_1 == '\0')) { local_510 = (int4 *)0x0; } else { pcVar1 = strstr(param_1,"://"); if (pcVar1 == (char *)0x0) { __stream = fopen64(param_1,param_2); if (__stream == (FILE *)0x0) { local_510 = (int4 *)0x0; } else { if (__stream != (FILE *)0x0) { local_540 = (int4 *)malloc(0x10); if (local_540 == (int4 *)0x0) { fclose(__stream); my_set_error(param_3,0x7d8,SQLSTATE_UNKNOWN,0); local_510 = (int4 *)0x0; goto LAB_0015a474; } *local_540 = 1; *(FILE **)(local_540 + 2) = __stream; } local_510 = local_540; } } else if ((rio_plugin == 0) && (rio_plugin = mysql_client_find_plugin(local_508,0,100), rio_plugin == 0)) { local_510 = (int4 *)0x0; } else { local_510 = (int4 *)(*(code *)**(int8 **)(rio_plugin + 0x58))(param_1,param_2); } } LAB_0015a474: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_510; }
2,802
common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool)
llama.cpp/common/common.cpp
std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) { std::string text; text.resize(std::max(text.capacity(), tokens.size())); int32_t n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special); if (n_chars < 0) { text.resize(-n_chars); n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special); GGML_ASSERT(n_chars <= (int32_t)text.size()); // whitespace trimming is performed after per-token detokenization } text.resize(n_chars); // NOTE: the original tokenizer decodes bytes after collecting the pieces. return text; }
O3
cpp
common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x8(%rdx), %rax subq (%rdx), %rax sarq $0x2, %rax cmpq $0x10, %rax movl $0xf, %esi cmovaeq %rax, %rsi xorl %edx, %edx callq 0x21ca0 movq (%r15), %rsi movq 0x8(%r15), %rdx subq %rsi, %rdx shrq $0x2, %rdx movq (%rbx), %rcx movl 0x8(%rbx), %r8d movzbl %bpl, %ebp movl %ebp, (%rsp) movq %r14, %rdi xorl %r9d, %r9d callq 0x223f0 testl %eax, %eax jns 0xfcc6a negl %eax movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx callq 0x21ca0 movq (%r15), %rsi movq 0x8(%r15), %rdx subq %rsi, %rdx shrq $0x2, %rdx movq (%rbx), %rcx movl 0x8(%rbx), %r8d movl %ebp, (%rsp) movq %r14, %rdi xorl %r9d, %r9d callq 0x223f0 cmpl 0x8(%rbx), %eax jg 0xfcc87 movslq %eax, %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x21ca0 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x29823(%rip), %rdi # 0x1264b1 leaq 0x1eda0(%rip), %rdx # 0x11ba35 leaq 0x29e49(%rip), %rcx # 0x126ae5 movl $0x505, %esi # imm = 0x505 xorl %eax, %eax callq 0x21fc0 jmp 0xfccaa movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0xfccc1 movq (%r12), %rsi incq %rsi callq 0x21190 movq %r14, %rdi callq 0x21c20
_Z17common_detokenizeB5cxx11PK11llama_vocabRKSt6vectorIiSaIiEEb: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov ebp, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rax, [rdx+8] sub rax, [rdx] sar rax, 2 cmp rax, 10h mov esi, 0Fh cmovnb rsi, rax xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rsi, [r15] mov rdx, [r15+8] sub rdx, rsi shr rdx, 2 mov rcx, [rbx] mov r8d, [rbx+8] movzx ebp, bpl mov [rsp+38h+var_38], ebp mov rdi, r14 xor r9d, r9d call _llama_detokenize test eax, eax jns short loc_FCC6A neg eax mov rdi, rbx mov rsi, rax xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rsi, [r15] mov rdx, [r15+8] sub rdx, rsi shr rdx, 2 mov rcx, [rbx] mov r8d, [rbx+8] mov [rsp+38h+var_38], ebp mov rdi, r14 xor r9d, r9d call _llama_detokenize cmp eax, [rbx+8] jg short loc_FCC87 loc_FCC6A: movsxd rsi, eax mov rdi, rbx xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rax, rbx add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_FCC87: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNCharsInt32TTe; "n_chars <= (int32_t)text.size()" mov esi, 505h xor eax, eax call _ggml_abort jmp short $+2 loc_FCCAA: mov r14, rax mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_FCCC1 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_FCCC1: mov rdi, r14 call __Unwind_Resume
_QWORD * common_detokenize[abi:cxx11](_QWORD *a1, long long a2, _QWORD *a3, unsigned __int8 a4) { _QWORD *v7; // r12 long long v8; // rsi int v9; // eax long long v11; // rax long long v12; // r14 v7 = a1 + 2; *a1 = a1 + 2; a1[1] = 0LL; *((_BYTE *)a1 + 16) = 0; v8 = 15LL; if ( (unsigned long long)((long long)(a3[1] - *a3) >> 2) >= 0x10 ) v8 = (long long)(a3[1] - *a3) >> 2; std::string::resize(a1, v8, 0LL); v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, a4); if ( v9 < 0 ) { std::string::resize(a1, (unsigned int)-v9, 0LL); v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, a4); if ( v9 > *((_DWORD *)a1 + 2) ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/common.cpp", 1285LL, "GGML_ASSERT(%s) failed", "n_chars <= (int32_t)text.size()"); v12 = v11; if ( (_QWORD *)*a1 != v7 ) operator delete((void *)*a1, *v7 + 1LL); _Unwind_Resume(v12); } } std::string::resize(a1, v9, 0LL); return a1; }
common_detokenize[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EBP,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RDX + 0x8] SUB RAX,qword ptr [RDX] SAR RAX,0x2 CMP RAX,0x10 MOV ESI,0xf CMOVNC RSI,RAX LAB_001fcc01: XOR EDX,EDX CALL 0x00121ca0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RSI SHR RDX,0x2 MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RBX + 0x8] LAB_001fcc1d: MOVZX EBP,BPL MOV dword ptr [RSP],EBP MOV RDI,R14 XOR R9D,R9D CALL 0x001223f0 TEST EAX,EAX JNS 0x001fcc6a NEG EAX MOV RDI,RBX MOV RSI,RAX XOR EDX,EDX CALL 0x00121ca0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RSI SHR RDX,0x2 MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RBX + 0x8] MOV dword ptr [RSP],EBP MOV RDI,R14 XOR R9D,R9D CALL 0x001223f0 CMP EAX,dword ptr [RBX + 0x8] JG 0x001fcc87 LAB_001fcc6a: MOVSXD RSI,EAX MOV RDI,RBX XOR EDX,EDX CALL 0x00121ca0 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001fcc87: LEA RDI,[0x2264b1] LEA RDX,[0x21ba35] LEA RCX,[0x226ae5] MOV ESI,0x505 XOR EAX,EAX CALL 0x00121fc0
/* common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int> > const&, bool) */ llama_vocab * common_detokenize_abi_cxx11_(llama_vocab *param_1,vector *param_2,bool param_3) { int iVar1; ulong uVar2; int1 in_CL; int7 in_register_00000011; long *plVar3; ulong uVar4; plVar3 = (long *)CONCAT71(in_register_00000011,param_3); *(llama_vocab **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (llama_vocab)0x0; uVar2 = plVar3[1] - *plVar3 >> 2; uVar4 = 0xf; if (0xf < uVar2) { uVar4 = uVar2; } /* try { // try from 001fcc01 to 001fcc07 has its CatchHandler @ 001fcca8 */ std::__cxx11::string::resize((ulong)param_1,(char)uVar4); /* try { // try from 001fcc1d to 001fcca7 has its CatchHandler @ 001fccaa */ iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,*(int8 *)param_1, *(int4 *)(param_1 + 8),0,in_CL); if (iVar1 < 0) { std::__cxx11::string::resize((ulong)param_1,-(char)iVar1); iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2, *(int8 *)param_1,*(int4 *)(param_1 + 8),0,in_CL); if (*(int *)(param_1 + 8) < iVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x505, "GGML_ASSERT(%s) failed","n_chars <= (int32_t)text.size()"); } } std::__cxx11::string::resize((ulong)param_1,(char)iVar1); return param_1; }
2,803
el::base::utils::CommandLineArgs::hasParamWithValue(char const*) const
opengl-water/src/easylogging++.cc
bool CommandLineArgs::hasParamWithValue(const char* paramKey) const { return m_paramsWithValue.find(std::string(paramKey)) != m_paramsWithValue.end(); }
O3
cpp
el::base::utils::CommandLineArgs::hasParamWithValue(char const*) const: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx addq $0x18, %rbx leaq -0x38(%rbp), %r14 leaq -0x11(%rbp), %rdx movq %r14, %rdi callq 0x339fc movq %rbx, %rdi movq %r14, %rsi callq 0x38cb0 movq %rax, %rbx leaq -0x28(%rbp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2bf71 movq -0x28(%rbp), %rsi incq %rsi callq 0x23140 testq %rbx, %rbx setne %al addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx leaq -0x28(%rbp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2bf9c movq -0x28(%rbp), %rsi incq %rsi callq 0x23140 movq %rbx, %rdi callq 0x234d0
_ZNK2el4base5utils15CommandLineArgs17hasParamWithValueEPKc: push rbp mov rbp, rsp push r14 push rbx sub rsp, 30h mov rbx, rdi add rbx, 18h lea r14, [rbp+var_38] lea rdx, [rbp+var_11] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov rbx, rax lea rax, [rbp+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2BF71 mov rsi, [rbp+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2BF71: test rbx, rbx setnz al add rsp, 30h pop rbx pop r14 pop rbp retn mov rbx, rax lea rax, [rbp+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2BF9C mov rsi, [rbp+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2BF9C: mov rdi, rbx call __Unwind_Resume
bool el::base::utils::CommandLineArgs::hasParamWithValue( el::base::utils::CommandLineArgs *this, const char *a2) { long long v2; // rbx void *v4[2]; // [rsp+8h] [rbp-38h] BYREF long long v5; // [rsp+18h] [rbp-28h] BYREF _BYTE v6[17]; // [rsp+2Fh] [rbp-11h] BYREF std::string::basic_string<std::allocator<char>>(v4, a2, v6); v2 = std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( (char *)this + 24, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); return v2 != 0; }
hasParamWithValue: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI ADD RBX,0x18 LEA R14,[RBP + -0x38] LEA RDX,[RBP + -0x11] MOV RDI,R14 CALL 0x001339fc LAB_0012bf4a: MOV RDI,RBX MOV RSI,R14 CALL 0x00138cb0 LAB_0012bf55: MOV RBX,RAX LEA RAX,[RBP + -0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012bf71 MOV RSI,qword ptr [RBP + -0x28] INC RSI CALL 0x00123140 LAB_0012bf71: TEST RBX,RBX SETNZ AL ADD RSP,0x30 POP RBX POP R14 POP RBP RET
/* el::base::utils::CommandLineArgs::hasParamWithValue(char const*) const */ bool __thiscall el::base::utils::CommandLineArgs::hasParamWithValue(CommandLineArgs *this,char *param_1) { long lVar1; long *local_40 [2]; long local_30 [2]; allocator local_19; std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_1,&local_19); /* try { // try from 0012bf4a to 0012bf54 has its CatchHandler @ 0012bf80 */ lVar1 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(this + 0x18),(string *)local_40); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return lVar1 != 0; }
2,804
testing::internal::CmpHelperSTRCASEEQ(char const*, char const*, char const*, char const*)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
AssertionResult CmpHelperSTRCASEEQ(const char* lhs_expression, const char* rhs_expression, const char* lhs, const char* rhs) { if (String::CaseInsensitiveCStringEquals(lhs, rhs)) { return AssertionSuccess(); } return EqFailure(lhs_expression, rhs_expression, PrintToString(lhs), PrintToString(rhs), true); }
O1
cpp
testing::internal::CmpHelperSTRCASEEQ(char const*, char const*, char const*, char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rcx, 0x8(%rsp) movq %r8, (%rsp) testq %r8, %r8 sete %al testq %rcx, %rcx je 0x1e74b testq %r8, %r8 je 0x1e75c movq %rcx, %rdi movq %r8, %rsi callq 0x8550 testl %eax, %eax sete %al testb %al, %al je 0x1e75c movb $0x1, (%rbx) movq $0x0, 0x8(%rbx) jmp 0x1e7cc leaq 0x30(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x33c38 leaq 0x10(%rsp), %rdi movq %rsp, %rsi callq 0x33c38 leaq 0x30(%rsp), %rcx leaq 0x10(%rsp), %r8 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x1, %r9d callq 0x1dd98 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1e7b1 movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1e7cc movq 0x40(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1e7fc movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x1e7fc movq %rax, %rbx leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1e817 movq 0x40(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal18CmpHelperSTRCASEEQEPKcS2_S2_S2_: push r15 push r14 push rbx sub rsp, 50h mov r14, rdx mov r15, rsi mov rbx, rdi mov [rsp+68h+var_60], rcx mov [rsp+68h+var_68], r8 test r8, r8 setz al test rcx, rcx jz short loc_1E74B test r8, r8 jz short loc_1E75C mov rdi, rcx mov rsi, r8 call _strcasecmp test eax, eax setz al loc_1E74B: test al, al jz short loc_1E75C mov byte ptr [rbx], 1 mov qword ptr [rbx+8], 0 jmp short loc_1E7CC loc_1E75C: lea rdi, [rsp+68h+var_38] lea rsi, [rsp+68h+var_60] call _ZN7testing13PrintToStringIPKcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<char const*>(char const* const&) lea rdi, [rsp+68h+var_58] mov rsi, rsp call _ZN7testing13PrintToStringIPKcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<char const*>(char const* const&) lea rcx, [rsp+68h+var_38] lea r8, [rsp+68h+var_58] mov rdi, rbx mov rsi, r15 mov rdx, r14 mov r9d, 1 call _ZN7testing8internal9EqFailureEPKcS2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_b; testing::internal::EqFailure(char const*,char const*,std::string const&,std::string const&,bool) lea rax, [rsp+68h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1E7B1 mov rsi, [rsp+68h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1E7B1: lea rax, [rsp+68h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1E7CC mov rsi, [rsp+68h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1E7CC: mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1E7FC mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1E7FC mov rbx, rax loc_1E7FC: lea rax, [rsp+arg_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1E817 mov rsi, [rsp+arg_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1E817: mov rdi, rbx call __Unwind_Resume
CmpHelperSTRCASEEQ: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP],R8 TEST R8,R8 SETZ AL TEST RCX,RCX JZ 0x0011e74b TEST R8,R8 JZ 0x0011e75c MOV RDI,RCX MOV RSI,R8 CALL 0x00108550 TEST EAX,EAX SETZ AL LAB_0011e74b: TEST AL,AL JZ 0x0011e75c MOV byte ptr [RBX],0x1 MOV qword ptr [RBX + 0x8],0x0 JMP 0x0011e7cc LAB_0011e75c: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x8] CALL 0x00133c38 LAB_0011e76b: LEA RDI,[RSP + 0x10] MOV RSI,RSP CALL 0x00133c38 LAB_0011e778: LEA RCX,[RSP + 0x30] LEA R8,[RSP + 0x10] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV R9D,0x1 CALL 0x0011dd98 LAB_0011e796: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011e7b1 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001084e0 LAB_0011e7b1: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011e7cc MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x001084e0 LAB_0011e7cc: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* testing::internal::CmpHelperSTRCASEEQ(char const*, char const*, char const*, char const*) */ internal * __thiscall testing::internal::CmpHelperSTRCASEEQ (internal *this,char *param_1,char *param_2,char *param_3,char *param_4) { int iVar1; bool bVar2; char *local_68; char *local_60; long *local_58 [2]; long local_48 [2]; long *local_38 [2]; long local_28 [2]; bVar2 = param_4 == (char *)0x0; local_68 = param_4; local_60 = param_3; if (param_3 != (char *)0x0) { if (param_4 == (char *)0x0) goto LAB_0011e75c; iVar1 = strcasecmp(param_3,param_4); bVar2 = iVar1 == 0; } if (bVar2) { *this = (internal)0x1; *(int8 *)(this + 8) = 0; return this; } LAB_0011e75c: PrintToString<char_const*>((testing *)local_38,&local_60); /* try { // try from 0011e76b to 0011e777 has its CatchHandler @ 0011e7f9 */ PrintToString<char_const*>((testing *)local_58,&local_68); /* try { // try from 0011e778 to 0011e795 has its CatchHandler @ 0011e7d9 */ EqFailure(this,param_1,param_2,(string *)local_38,(string *)local_58,true); if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return this; }
2,805
binding_system_is_binding_captured
eshkol/src/frontend/binding/lambda/binding_lambda.c
bool binding_system_is_binding_captured(BindingSystem* system, uint64_t binding_id) { assert(system != NULL); // Check if is_captured array exists if (!system->binding_table.is_captured) { return false; } // Find the binding for (size_t i = 0; i < system->binding_table.count; i++) { if (system->binding_table.binding_ids[i] == binding_id) { return system->binding_table.is_captured[i]; } } return false; }
O3
c
binding_system_is_binding_captured: pushq %rbp movq %rsp, %rbp testq %rdi, %rdi je 0xbcf7 movq 0x30(%rdi), %rax testq %rax, %rax je 0xbcee movq 0x48(%rdi), %rcx testq %rcx, %rcx je 0xbcee movq 0x18(%rdi), %rdi xorl %edx, %edx cmpq %rsi, (%rdi,%rdx,8) je 0xbcf2 incq %rdx cmpq %rdx, %rcx jne 0xbce0 xorl %eax, %eax popq %rbp retq movb (%rax,%rdx), %al jmp 0xbcf0 leaq 0x750e(%rip), %rdi # 0x1320c leaq 0x7933(%rip), %rsi # 0x13638 leaq 0x7a0a(%rip), %rcx # 0x13716 movl $0x9b, %edx callq 0x1130
binding_system_is_binding_captured: push rbp mov rbp, rsp test rdi, rdi jz short loc_BCF7 mov rax, [rdi+30h] test rax, rax jz short loc_BCEE mov rcx, [rdi+48h] test rcx, rcx jz short loc_BCEE mov rdi, [rdi+18h] xor edx, edx loc_BCE0: cmp [rdi+rdx*8], rsi jz short loc_BCF2 inc rdx cmp rcx, rdx jnz short loc_BCE0 loc_BCEE: xor eax, eax loc_BCF0: pop rbp retn loc_BCF2: mov al, [rax+rdx] jmp short loc_BCF0 loc_BCF7: lea rdi, aSystemNull; "system != NULL" lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolBindingSys_5; "_Bool binding_system_is_binding_capture"... mov edx, 9Bh call ___assert_fail
char binding_system_is_binding_captured(_QWORD *a1, long long a2) { long long v2; // rax long long v3; // rcx long long v4; // rdi long long v5; // rdx if ( !a1 ) __assert_fail( "system != NULL", "/workspace/llm4binary/github2025/eshkol/src/frontend/binding/lambda/binding_lambda.c", 155LL, "_Bool binding_system_is_binding_captured(BindingSystem *, uint64_t)"); v2 = a1[6]; if ( !v2 ) return 0; v3 = a1[9]; if ( !v3 ) return 0; v4 = a1[3]; v5 = 0LL; while ( *(_QWORD *)(v4 + 8 * v5) != a2 ) { if ( v3 == ++v5 ) return 0; } return *(_BYTE *)(v2 + v5); }
binding_system_is_binding_captured: PUSH RBP MOV RBP,RSP TEST RDI,RDI JZ 0x0010bcf7 MOV RAX,qword ptr [RDI + 0x30] TEST RAX,RAX JZ 0x0010bcee MOV RCX,qword ptr [RDI + 0x48] TEST RCX,RCX JZ 0x0010bcee MOV RDI,qword ptr [RDI + 0x18] XOR EDX,EDX LAB_0010bce0: CMP qword ptr [RDI + RDX*0x8],RSI JZ 0x0010bcf2 INC RDX CMP RCX,RDX JNZ 0x0010bce0 LAB_0010bcee: XOR EAX,EAX LAB_0010bcf0: POP RBP RET LAB_0010bcf2: MOV AL,byte ptr [RAX + RDX*0x1] JMP 0x0010bcf0 LAB_0010bcf7: LEA RDI,[0x11320c] LEA RSI,[0x113638] LEA RCX,[0x113716] MOV EDX,0x9b CALL 0x00101130
int8 binding_system_is_binding_captured(long param_1,long param_2) { long lVar1; long lVar2; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("system != NULL", "/workspace/llm4binary/github2025/eshkol/src/frontend/binding/lambda/binding_lambda.c" ,0x9b,"_Bool binding_system_is_binding_captured(BindingSystem *, uint64_t)"); } lVar1 = *(long *)(param_1 + 0x30); if ((lVar1 != 0) && (*(long *)(param_1 + 0x48) != 0)) { lVar2 = 0; do { if (*(long *)(*(long *)(param_1 + 0x18) + lVar2 * 8) == param_2) { return CONCAT71((int7)((ulong)lVar1 >> 8),*(int1 *)(lVar1 + lVar2)); } lVar2 = lVar2 + 1; } while (*(long *)(param_1 + 0x48) != lVar2); } return 0; }
2,806
safe_realloc
corpus-core[P]colibri-stateless/src/util/bytes.c
void* safe_realloc(void* ptr, size_t new_size) { void* new_ptr = realloc(ptr, new_size); // Note:safe_realloc(NULL, size) is equivalent tosafe_malloc(size) // safe_realloc(ptr, 0) is equivalent tosafe_free(ptr) and may return NULL if (new_size > 0 && new_ptr == NULL) { fprintf(stderr, "Error: Memory allocation failed (realloc) for new size %zu bytes: %s. Exiting.\\n", new_size, strerror(errno)); // Important: The original block ptr is NOT freed by realloc if it fails exit(EXIT_FAILURE); } return new_ptr; }
O0
c
safe_realloc: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x230c0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) jbe 0x9dbe4 cmpq $0x0, -0x18(%rbp) jne 0x9dbe4 movq 0x9b422(%rip), %rax # 0x138fc8 movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) callq 0x23500 movl (%rax), %edi callq 0x233a0 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rdx movq %rax, %rcx leaq 0x49b86(%rip), %rsi # 0xe7759 movb $0x0, %al callq 0x23160 movl $0x1, %edi callq 0x23350 movq -0x18(%rbp), %rax addq $0x30, %rsp popq %rbp retq nop
safe_realloc: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _realloc mov [rbp+var_18], rax cmp [rbp+var_10], 0 jbe short loc_9DBE4 cmp [rbp+var_18], 0 jnz short loc_9DBE4 mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov [rbp+var_20], rax call ___errno_location mov edi, [rax] call _strerror mov rdi, [rbp+var_28] mov rdx, [rbp+var_20] mov rcx, rax lea rsi, aErrorMemoryAll_1; "Error: Memory allocation failed (reallo"... mov al, 0 call _fprintf mov edi, 1 call _exit loc_9DBE4: mov rax, [rbp+var_18] add rsp, 30h pop rbp retn
long long safe_realloc(long long a1, long long a2) { unsigned int *v2; // rax const char *v3; // rax long long v5; // [rsp+8h] [rbp-28h] long long v6; // [rsp+18h] [rbp-18h] v6 = realloc(a1, a2); if ( a2 && !v6 ) { v5 = stderr; v2 = (unsigned int *)__errno_location(); v3 = (const char *)strerror(*v2); fprintf(v5, "Error: Memory allocation failed (realloc) for new size %zu bytes: %s. Exiting.\\n", a2, v3); exit(1LL); } return v6; }
safe_realloc: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001230c0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x10],0x0 JBE 0x0019dbe4 CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0019dbe4 MOV RAX,qword ptr [0x00238fc8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX CALL 0x00123500 MOV EDI,dword ptr [RAX] CALL 0x001233a0 MOV RDI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,RAX LEA RSI,[0x1e7759] MOV AL,0x0 CALL 0x00123160 MOV EDI,0x1 CALL 0x00123350 LAB_0019dbe4: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x30 POP RBP RET
void * safe_realloc(void *param_1,size_t param_2) { FILE *__stream; void *pvVar1; int *piVar2; char *pcVar3; pvVar1 = realloc(param_1,param_2); if ((param_2 != 0) && (pvVar1 == (void *)0x0)) { __stream = *(FILE **)PTR_stderr_00238fc8; piVar2 = __errno_location(); pcVar3 = strerror(*piVar2); fprintf(__stream, "Error: Memory allocation failed (realloc) for new size %zu bytes: %s. Exiting.\\n", param_2,pcVar3); /* WARNING: Subroutine does not return */ exit(1); } return pvVar1; }
2,807
mi_keydef_read
eloqsql/storage/myisam/mi_open.c
uchar *mi_keydef_read(uchar *ptr, MI_KEYDEF *keydef) { keydef->keysegs = (uint) *ptr++; keydef->key_alg = *ptr++; /* Rtree or Btree */ keydef->flag = mi_uint2korr(ptr); ptr +=2; keydef->block_length = mi_uint2korr(ptr); ptr +=2; keydef->keylength = mi_uint2korr(ptr); ptr +=2; keydef->minlength = mi_uint2korr(ptr); ptr +=2; keydef->maxlength = mi_uint2korr(ptr); ptr +=2; keydef->block_size_index= keydef->block_length/MI_MIN_KEY_BLOCK_LENGTH-1; keydef->underflow_block_length=keydef->block_length/3; keydef->version = 0; /* Not saved */ keydef->parser = &ft_default_parser; keydef->ftkey_nr = 0; return ptr; }
O3
c
mi_keydef_read: pushq %rbp movq %rsp, %rbp movzbl (%rdi), %eax movw %ax, 0x8(%rsi) movb 0x1(%rdi), %al movb %al, 0xc(%rsi) movzwl 0x2(%rdi), %eax rolw $0x8, %ax movw %ax, 0xa(%rsi) movzbl 0x5(%rdi), %eax movzbl 0x4(%rdi), %ecx movl %ecx, %edx shll $0x8, %edx orl %eax, %edx movw %dx, 0xe(%rsi) movzwl 0x6(%rdi), %eax rolw $0x8, %ax movw %ax, 0x12(%rsi) movzwl 0x8(%rdi), %eax rolw $0x8, %ax movw %ax, 0x14(%rsi) movzwl 0xa(%rdi), %eax rolw $0x8, %ax movw %ax, 0x16(%rsi) leaq 0xc(%rdi), %rax shrl $0x2, %ecx decl %ecx movw %cx, 0x18(%rsi) imull $0xaaab, %edx, %ecx # imm = 0xAAAB shrl $0x11, %ecx movw %cx, 0x10(%rsi) movq $0x0, 0x1c(%rsi) leaq 0x305ad8(%rip), %rcx # 0x385300 movq %rcx, 0x38(%rsi) popq %rbp retq
mi_keydef_read: push rbp mov rbp, rsp movzx eax, byte ptr [rdi] mov [rsi+8], ax mov al, [rdi+1] mov [rsi+0Ch], al movzx eax, word ptr [rdi+2] rol ax, 8 mov [rsi+0Ah], ax movzx eax, byte ptr [rdi+5] movzx ecx, byte ptr [rdi+4] mov edx, ecx shl edx, 8 or edx, eax mov [rsi+0Eh], dx movzx eax, word ptr [rdi+6] rol ax, 8 mov [rsi+12h], ax movzx eax, word ptr [rdi+8] rol ax, 8 mov [rsi+14h], ax movzx eax, word ptr [rdi+0Ah] rol ax, 8 mov [rsi+16h], ax lea rax, [rdi+0Ch] shr ecx, 2 dec ecx mov [rsi+18h], cx imul ecx, edx, 0AAABh shr ecx, 11h mov [rsi+10h], cx mov qword ptr [rsi+1Ch], 0 lea rcx, ft_default_parser mov [rsi+38h], rcx pop rbp retn
unsigned __int8 * mi_keydef_read(unsigned __int8 *a1, long long a2) { unsigned int v2; // ecx unsigned __int16 v3; // dx unsigned __int8 *result; // rax *(_WORD *)(a2 + 8) = *a1; *(_BYTE *)(a2 + 12) = a1[1]; *(_WORD *)(a2 + 10) = __ROL2__(*((_WORD *)a1 + 1), 8); v2 = a1[4]; v3 = _byteswap_ushort(*((_WORD *)a1 + 2)); *(_WORD *)(a2 + 14) = v3; *(_WORD *)(a2 + 18) = __ROL2__(*((_WORD *)a1 + 3), 8); *(_WORD *)(a2 + 20) = __ROL2__(*((_WORD *)a1 + 4), 8); *(_WORD *)(a2 + 22) = __ROL2__(*((_WORD *)a1 + 5), 8); result = a1 + 12; *(_WORD *)(a2 + 24) = (v2 >> 2) - 1; *(_WORD *)(a2 + 16) = v3 / 3u; *(_QWORD *)(a2 + 28) = 0LL; *(_QWORD *)(a2 + 56) = &ft_default_parser; return result; }
mi_keydef_read: PUSH RBP MOV RBP,RSP MOVZX EAX,byte ptr [RDI] MOV word ptr [RSI + 0x8],AX MOV AL,byte ptr [RDI + 0x1] MOV byte ptr [RSI + 0xc],AL MOVZX EAX,word ptr [RDI + 0x2] ROL AX,0x8 MOV word ptr [RSI + 0xa],AX MOVZX EAX,byte ptr [RDI + 0x5] MOVZX ECX,byte ptr [RDI + 0x4] MOV EDX,ECX SHL EDX,0x8 OR EDX,EAX MOV word ptr [RSI + 0xe],DX MOVZX EAX,word ptr [RDI + 0x6] ROL AX,0x8 MOV word ptr [RSI + 0x12],AX MOVZX EAX,word ptr [RDI + 0x8] ROL AX,0x8 MOV word ptr [RSI + 0x14],AX MOVZX EAX,word ptr [RDI + 0xa] ROL AX,0x8 MOV word ptr [RSI + 0x16],AX LEA RAX,[RDI + 0xc] SHR ECX,0x2 DEC ECX MOV word ptr [RSI + 0x18],CX IMUL ECX,EDX,0xaaab SHR ECX,0x11 MOV word ptr [RSI + 0x10],CX MOV qword ptr [RSI + 0x1c],0x0 LEA RCX,[0x485300] MOV qword ptr [RSI + 0x38],RCX POP RBP RET
byte * mi_keydef_read(byte *param_1,long param_2) { byte bVar1; ushort uVar2; *(ushort *)(param_2 + 8) = (ushort)*param_1; *(byte *)(param_2 + 0xc) = param_1[1]; *(ushort *)(param_2 + 10) = *(ushort *)(param_1 + 2) << 8 | *(ushort *)(param_1 + 2) >> 8; bVar1 = param_1[4]; uVar2 = CONCAT11(bVar1,param_1[5]); *(ushort *)(param_2 + 0xe) = uVar2; *(ushort *)(param_2 + 0x12) = *(ushort *)(param_1 + 6) << 8 | *(ushort *)(param_1 + 6) >> 8; *(ushort *)(param_2 + 0x14) = *(ushort *)(param_1 + 8) << 8 | *(ushort *)(param_1 + 8) >> 8; *(ushort *)(param_2 + 0x16) = *(ushort *)(param_1 + 10) << 8 | *(ushort *)(param_1 + 10) >> 8; *(ushort *)(param_2 + 0x18) = (bVar1 >> 2) - 1; *(ushort *)(param_2 + 0x10) = uVar2 / 3; *(int8 *)(param_2 + 0x1c) = 0; *(int1 **)(param_2 + 0x38) = ft_default_parser; return param_1 + 0xc; }
2,808
stbi__resample_row_h_2(unsigned char*, unsigned char*, unsigned char*, int, int)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { // need to generate two samples horizontally for every one in input int i; stbi_uc *input = in_near; if (w == 1) { // if only one sample, can't do any interpolation out[0] = out[1] = input[0]; return out; } out[0] = input[0]; out[1] = stbi__div4(input[0]*3 + input[1] + 2); for (i=1; i < w-1; ++i) { int n = 3*input[i]+2; out[i*2+0] = stbi__div4(n+input[i-1]); out[i*2+1] = stbi__div4(n+input[i+1]); } out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2); out[i*2+1] = input[w-1]; STBI_NOTUSED(in_far); STBI_NOTUSED(hs); return out; }
O0
c
stbi__resample_row_h_2(unsigned char*, unsigned char*, unsigned char*, int, int): movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movq %rdx, -0x20(%rsp) movl %ecx, -0x24(%rsp) movl %r8d, -0x28(%rsp) movq -0x18(%rsp), %rax movq %rax, -0x38(%rsp) cmpl $0x1, -0x24(%rsp) jne 0xa00ae movq -0x38(%rsp), %rax movb (%rax), %cl movq -0x10(%rsp), %rax movb %cl, 0x1(%rax) movq -0x10(%rsp), %rax movb %cl, (%rax) movq -0x10(%rsp), %rax movq %rax, -0x8(%rsp) jmp 0xa0200 movq -0x38(%rsp), %rax movb (%rax), %cl movq -0x10(%rsp), %rax movb %cl, (%rax) movq -0x38(%rsp), %rax movzbl (%rax), %eax imull $0x3, %eax, %eax movq -0x38(%rsp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax addl $0x2, %eax sarl $0x2, %eax movb %al, %cl movq -0x10(%rsp), %rax movb %cl, 0x1(%rax) movl $0x1, -0x2c(%rsp) movl -0x2c(%rsp), %eax movl -0x24(%rsp), %ecx subl $0x1, %ecx cmpl %ecx, %eax jge 0xa0189 movq -0x38(%rsp), %rax movslq -0x2c(%rsp), %rcx movzbl (%rax,%rcx), %eax imull $0x3, %eax, %eax addl $0x2, %eax movl %eax, -0x3c(%rsp) movl -0x3c(%rsp), %eax movq -0x38(%rsp), %rcx movl -0x2c(%rsp), %edx subl $0x1, %edx movslq %edx, %rdx movzbl (%rcx,%rdx), %ecx addl %ecx, %eax sarl $0x2, %eax movb %al, %dl movq -0x10(%rsp), %rax movl -0x2c(%rsp), %ecx shll %ecx addl $0x0, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movl -0x3c(%rsp), %eax movq -0x38(%rsp), %rcx movl -0x2c(%rsp), %edx addl $0x1, %edx movslq %edx, %rdx movzbl (%rcx,%rdx), %ecx addl %ecx, %eax sarl $0x2, %eax movb %al, %dl movq -0x10(%rsp), %rax movl -0x2c(%rsp), %ecx shll %ecx addl $0x1, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movl -0x2c(%rsp), %eax addl $0x1, %eax movl %eax, -0x2c(%rsp) jmp 0xa00ea movq -0x38(%rsp), %rax movl -0x24(%rsp), %ecx subl $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax imull $0x3, %eax, %eax movq -0x38(%rsp), %rcx movl -0x24(%rsp), %edx subl $0x1, %edx movslq %edx, %rdx movzbl (%rcx,%rdx), %ecx addl %ecx, %eax addl $0x2, %eax sarl $0x2, %eax movb %al, %dl movq -0x10(%rsp), %rax movl -0x2c(%rsp), %ecx shll %ecx addl $0x0, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movq -0x38(%rsp), %rax movl -0x24(%rsp), %ecx subl $0x1, %ecx movslq %ecx, %rcx movb (%rax,%rcx), %dl movq -0x10(%rsp), %rax movl -0x2c(%rsp), %ecx shll %ecx addl $0x1, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movq -0x10(%rsp), %rax movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopw %cs:(%rax,%rax)
_ZL22stbi__resample_row_h_2PhS_S_ii: mov [rsp+var_10], rdi mov [rsp+var_18], rsi mov [rsp+var_20], rdx mov [rsp+var_24], ecx mov [rsp+var_28], r8d mov rax, [rsp+var_18] mov [rsp+var_38], rax cmp [rsp+var_24], 1 jnz short loc_A00AE mov rax, [rsp+var_38] mov cl, [rax] mov rax, [rsp+var_10] mov [rax+1], cl mov rax, [rsp+var_10] mov [rax], cl mov rax, [rsp+var_10] mov [rsp+var_8], rax jmp loc_A0200 loc_A00AE: mov rax, [rsp+var_38] mov cl, [rax] mov rax, [rsp+var_10] mov [rax], cl mov rax, [rsp+var_38] movzx eax, byte ptr [rax] imul eax, 3 mov rcx, [rsp+var_38] movzx ecx, byte ptr [rcx+1] add eax, ecx add eax, 2 sar eax, 2 mov cl, al mov rax, [rsp+var_10] mov [rax+1], cl mov [rsp+var_2C], 1 loc_A00EA: mov eax, [rsp+var_2C] mov ecx, [rsp+var_24] sub ecx, 1 cmp eax, ecx jge loc_A0189 mov rax, [rsp+var_38] movsxd rcx, [rsp+var_2C] movzx eax, byte ptr [rax+rcx] imul eax, 3 add eax, 2 mov [rsp+var_3C], eax mov eax, [rsp+var_3C] mov rcx, [rsp+var_38] mov edx, [rsp+var_2C] sub edx, 1 movsxd rdx, edx movzx ecx, byte ptr [rcx+rdx] add eax, ecx sar eax, 2 mov dl, al mov rax, [rsp+var_10] mov ecx, [rsp+var_2C] shl ecx, 1 add ecx, 0 movsxd rcx, ecx mov [rax+rcx], dl mov eax, [rsp+var_3C] mov rcx, [rsp+var_38] mov edx, [rsp+var_2C] add edx, 1 movsxd rdx, edx movzx ecx, byte ptr [rcx+rdx] add eax, ecx sar eax, 2 mov dl, al mov rax, [rsp+var_10] mov ecx, [rsp+var_2C] shl ecx, 1 add ecx, 1 movsxd rcx, ecx mov [rax+rcx], dl mov eax, [rsp+var_2C] add eax, 1 mov [rsp+var_2C], eax jmp loc_A00EA loc_A0189: mov rax, [rsp+var_38] mov ecx, [rsp+var_24] sub ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] imul eax, 3 mov rcx, [rsp+var_38] mov edx, [rsp+var_24] sub edx, 1 movsxd rdx, edx movzx ecx, byte ptr [rcx+rdx] add eax, ecx add eax, 2 sar eax, 2 mov dl, al mov rax, [rsp+var_10] mov ecx, [rsp+var_2C] shl ecx, 1 add ecx, 0 movsxd rcx, ecx mov [rax+rcx], dl mov rax, [rsp+var_38] mov ecx, [rsp+var_24] sub ecx, 1 movsxd rcx, ecx mov dl, [rax+rcx] mov rax, [rsp+var_10] mov ecx, [rsp+var_2C] shl ecx, 1 add ecx, 1 movsxd rcx, ecx mov [rax+rcx], dl mov rax, [rsp+var_10] mov [rsp+var_8], rax loc_A0200: mov rax, [rsp+var_8] retn
unsigned __int8 * stbi__resample_row_h_2( unsigned __int8 *a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4) { unsigned __int8 v4; // cl int v6; // [rsp+0h] [rbp-3Ch] int i; // [rsp+10h] [rbp-2Ch] if ( a4 == 1 ) { v4 = *a2; a1[1] = *a2; *a1 = v4; return a1; } else { *a1 = *a2; a1[1] = (a2[1] + 3 * *a2 + 2) >> 2; for ( i = 1; i < a4 - 1; ++i ) { v6 = 3 * a2[i] + 2; a1[2 * i] = (a2[i - 1] + v6) >> 2; a1[2 * i + 1] = (a2[i + 1] + v6) >> 2; } a1[2 * i] = (a2[a4 - 1] + 3 * a2[a4 - 2] + 2) >> 2; a1[2 * i + 1] = a2[a4 - 1]; return a1; } }
stbi__resample_row_h_2: MOV qword ptr [RSP + -0x10],RDI MOV qword ptr [RSP + -0x18],RSI MOV qword ptr [RSP + -0x20],RDX MOV dword ptr [RSP + -0x24],ECX MOV dword ptr [RSP + -0x28],R8D MOV RAX,qword ptr [RSP + -0x18] MOV qword ptr [RSP + -0x38],RAX CMP dword ptr [RSP + -0x24],0x1 JNZ 0x001a00ae MOV RAX,qword ptr [RSP + -0x38] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RSP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RSP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x8],RAX JMP 0x001a0200 LAB_001a00ae: MOV RAX,qword ptr [RSP + -0x38] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RSP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RSP + -0x38] MOVZX EAX,byte ptr [RAX] IMUL EAX,EAX,0x3 MOV RCX,qword ptr [RSP + -0x38] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX ADD EAX,0x2 SAR EAX,0x2 MOV CL,AL MOV RAX,qword ptr [RSP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RSP + -0x2c],0x1 LAB_001a00ea: MOV EAX,dword ptr [RSP + -0x2c] MOV ECX,dword ptr [RSP + -0x24] SUB ECX,0x1 CMP EAX,ECX JGE 0x001a0189 MOV RAX,qword ptr [RSP + -0x38] MOVSXD RCX,dword ptr [RSP + -0x2c] MOVZX EAX,byte ptr [RAX + RCX*0x1] IMUL EAX,EAX,0x3 ADD EAX,0x2 MOV dword ptr [RSP + -0x3c],EAX MOV EAX,dword ptr [RSP + -0x3c] MOV RCX,qword ptr [RSP + -0x38] MOV EDX,dword ptr [RSP + -0x2c] SUB EDX,0x1 MOVSXD RDX,EDX MOVZX ECX,byte ptr [RCX + RDX*0x1] ADD EAX,ECX SAR EAX,0x2 MOV DL,AL MOV RAX,qword ptr [RSP + -0x10] MOV ECX,dword ptr [RSP + -0x2c] SHL ECX,0x1 ADD ECX,0x0 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RSP + -0x3c] MOV RCX,qword ptr [RSP + -0x38] MOV EDX,dword ptr [RSP + -0x2c] ADD EDX,0x1 MOVSXD RDX,EDX MOVZX ECX,byte ptr [RCX + RDX*0x1] ADD EAX,ECX SAR EAX,0x2 MOV DL,AL MOV RAX,qword ptr [RSP + -0x10] MOV ECX,dword ptr [RSP + -0x2c] SHL ECX,0x1 ADD ECX,0x1 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RSP + -0x2c] ADD EAX,0x1 MOV dword ptr [RSP + -0x2c],EAX JMP 0x001a00ea LAB_001a0189: MOV RAX,qword ptr [RSP + -0x38] MOV ECX,dword ptr [RSP + -0x24] SUB ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] IMUL EAX,EAX,0x3 MOV RCX,qword ptr [RSP + -0x38] MOV EDX,dword ptr [RSP + -0x24] SUB EDX,0x1 MOVSXD RDX,EDX MOVZX ECX,byte ptr [RCX + RDX*0x1] ADD EAX,ECX ADD EAX,0x2 SAR EAX,0x2 MOV DL,AL MOV RAX,qword ptr [RSP + -0x10] MOV ECX,dword ptr [RSP + -0x2c] SHL ECX,0x1 ADD ECX,0x0 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + -0x38] MOV ECX,dword ptr [RSP + -0x24] SUB ECX,0x1 MOVSXD RCX,ECX MOV DL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + -0x10] MOV ECX,dword ptr [RSP + -0x2c] SHL ECX,0x1 ADD ECX,0x1 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x8],RAX LAB_001a0200: MOV RAX,qword ptr [RSP + -0x8] RET
/* stbi__resample_row_h_2(unsigned char*, unsigned char*, unsigned char*, int, int) */ uchar * stbi__resample_row_h_2(uchar *param_1,uchar *param_2,uchar *param_3,int param_4,int param_5) { uchar uVar1; int iVar2; int local_2c; if (param_4 == 1) { uVar1 = *param_2; param_1[1] = uVar1; *param_1 = uVar1; } else { *param_1 = *param_2; param_1[1] = (uchar)((int)((uint)*param_2 * 3 + (uint)param_2[1] + 2) >> 2); for (local_2c = 1; local_2c < param_4 + -1; local_2c = local_2c + 1) { iVar2 = (uint)param_2[local_2c] * 3 + 2; param_1[local_2c << 1] = (uchar)((int)(iVar2 + (uint)param_2[local_2c + -1]) >> 2); param_1[local_2c * 2 + 1] = (uchar)((int)(iVar2 + (uint)param_2[local_2c + 1]) >> 2); } param_1[local_2c << 1] = (uchar)((int)((uint)param_2[param_4 + -2] * 3 + (uint)param_2[param_4 + -1] + 2) >> 2); param_1[local_2c * 2 + 1] = param_2[param_4 + -1]; } return param_1; }
2,809
stbi_loadf
SDL3Lite/dependencies/stb_image.h
STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) { float *result; FILE *f = stbi__fopen(filename, "rb"); if (!f) return stbi__errpf("can't fopen", "Unable to open file"); result = stbi_loadf_from_file(f,x,y,comp,req_comp); fclose(f); return result; }
O0
c
stbi_loadf: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq -0x10(%rbp), %rdi leaq 0xb831(%rip), %rsi # 0x33fb8 callq 0x27e70 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jne 0x287b4 leaq 0xb81d(%rip), %rdi # 0x33fbb callq 0x27ea0 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx cmovneq %rax, %rax movq %rax, -0x8(%rbp) jmp 0x287e2 movq -0x40(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movl -0x2c(%rbp), %r8d callq 0x287f0 movq %rax, -0x38(%rbp) movq -0x40(%rbp), %rdi callq 0x1a270 movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
stbi_loadf: 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_2C], r8d mov rdi, [rbp+var_10]; char * lea rsi, aRb; "rb" call _ZL11stbi__fopenPKcS0_; stbi__fopen(char const*,char const*) mov [rbp+var_40], rax cmp [rbp+var_40], 0 jnz short loc_287B4 lea rdi, aCanTFopen; "can't fopen" call _ZL9stbi__errPKc; stbi__err(char const*) mov ecx, eax xor eax, eax cmp ecx, 0 cmovnz rax, rax mov [rbp+var_8], rax jmp short loc_287E2 loc_287B4: mov rdi, [rbp+var_40] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r8d, [rbp+var_2C] call stbi_loadf_from_file mov [rbp+var_38], rax mov rdi, [rbp+var_40] call _fclose mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_287E2: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long stbi_loadf(const char *a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v6; // [rsp+0h] [rbp-40h] long long v7; // [rsp+8h] [rbp-38h] v6 = stbi__fopen(a1, "rb"); if ( v6 ) { v7 = stbi_loadf_from_file(v6, a2, a3, a4, a5); fclose(v6); return v7; } else { stbi__err("can't fopen"); return 0LL; } }
stbi_loadf: 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 dword ptr [RBP + -0x2c],R8D MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x133fb8] CALL 0x00127e70 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JNZ 0x001287b4 LEA RDI,[0x133fbb] CALL 0x00127ea0 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 CMOVNZ RAX,RAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001287e2 LAB_001287b4: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R8D,dword ptr [RBP + -0x2c] CALL 0x001287f0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0011a270 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001287e2: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 stbi_loadf(char *param_1,int8 param_2,int8 param_3,int8 param_4,int4 param_5 ) { FILE *__stream; int8 local_10; __stream = (FILE *)stbi__fopen(param_1,"rb"); if (__stream == (FILE *)0x0) { stbi__err("can\'t fopen"); local_10 = 0; } else { local_10 = stbi_loadf_from_file(__stream,param_2,param_3,param_4,param_5); fclose(__stream); } return local_10; }
2,810
stbi_loadf
SDL3Lite/dependencies/stb_image.h
STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) { float *result; FILE *f = stbi__fopen(filename, "rb"); if (!f) return stbi__errpf("can't fopen", "Unable to open file"); result = stbi_loadf_from_file(f,x,y,comp,req_comp); fclose(f); return result; }
O3
c
stbi_loadf: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq %rcx, 0x20(%rsp) movl %r8d, 0x1c(%rsp) movq 0x38(%rsp), %rdi leaq 0xc34f(%rip), %rsi # 0x34fb8 callq 0x28160 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x28c99 leaq 0xc339(%rip), %rdi # 0x34fbb callq 0x28190 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx cmovneq %rax, %rax movq %rax, 0x40(%rsp) jmp 0x28cd0 movq 0x8(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx movl 0x1c(%rsp), %r8d callq 0x28ce0 movq %rax, 0x10(%rsp) movq 0x8(%rsp), %rdi callq 0x1a270 movq 0x10(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nopw (%rax,%rax)
stbi_loadf: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov [rsp+48h+var_28], rcx mov [rsp+48h+var_2C], r8d mov rdi, [rsp+48h+var_10]; char * lea rsi, aRb; "rb" call _ZL11stbi__fopenPKcS0_; stbi__fopen(char const*,char const*) mov [rsp+48h+var_40], rax cmp [rsp+48h+var_40], 0 jnz short loc_28C99 lea rdi, aCanTFopen; "can't fopen" call _ZL9stbi__errPKc; stbi__err(char const*) mov ecx, eax xor eax, eax cmp ecx, 0 cmovnz rax, rax mov [rsp+48h+var_8], rax jmp short loc_28CD0 loc_28C99: mov rdi, [rsp+48h+var_40] mov rsi, [rsp+48h+var_18] mov rdx, [rsp+48h+var_20] mov rcx, [rsp+48h+var_28] mov r8d, [rsp+48h+var_2C] call stbi_loadf_from_file mov [rsp+48h+var_38], rax mov rdi, [rsp+48h+var_40] call _fclose mov rax, [rsp+48h+var_38] mov [rsp+48h+var_8], rax loc_28CD0: mov rax, [rsp+48h+var_8] add rsp, 48h retn
long long stbi_loadf(const char *a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v6; // [rsp+8h] [rbp-40h] long long v7; // [rsp+10h] [rbp-38h] v6 = stbi__fopen(a1, "rb"); if ( v6 ) { v7 = stbi_loadf_from_file(v6, a2, a3, a4, a5); fclose(v6); return v7; } else { stbi__err("can't fopen"); return 0LL; } }
stbi_loadf: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RSP + 0x20],RCX MOV dword ptr [RSP + 0x1c],R8D MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[0x134fb8] CALL 0x00128160 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00128c99 LEA RDI,[0x134fbb] CALL 0x00128190 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 CMOVNZ RAX,RAX MOV qword ptr [RSP + 0x40],RAX JMP 0x00128cd0 LAB_00128c99: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV R8D,dword ptr [RSP + 0x1c] CALL 0x00128ce0 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x0011a270 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RAX LAB_00128cd0: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
int8 stbi_loadf(char *param_1,int8 param_2,int8 param_3,int8 param_4,int4 param_5 ) { FILE *__stream; int8 local_8; __stream = (FILE *)stbi__fopen(param_1,"rb"); if (__stream == (FILE *)0x0) { stbi__err("can\'t fopen"); local_8 = 0; } else { local_8 = stbi_loadf_from_file(__stream,param_2,param_3,param_4,param_5); fclose(__stream); } return local_8; }
2,811
js_date_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_date_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { // Date(y, mon, d, h, m, s, ms) JSValue rv; int i, n; double a, val; if (JS_IsUndefined(new_target)) { /* invoked as function */ argc = 0; } n = argc; if (n == 0) { val = date_now(); } else if (n == 1) { JSValue v, dv; if (JS_VALUE_GET_TAG(argv[0]) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(argv[0]); if (p->class_id == JS_CLASS_DATE && JS_IsNumber(p->u.object_data)) { if (JS_ToFloat64(ctx, &val, p->u.object_data)) return JS_EXCEPTION; val = time_clip(val); goto has_val; } } v = JS_ToPrimitive(ctx, argv[0], HINT_NONE); if (JS_IsString(v)) { dv = js_Date_parse(ctx, JS_UNDEFINED, 1, &v); JS_FreeValue(ctx, v); if (JS_IsException(dv)) return JS_EXCEPTION; if (JS_ToFloat64Free(ctx, &val, dv)) return JS_EXCEPTION; } else { if (JS_ToFloat64Free(ctx, &val, v)) return JS_EXCEPTION; } val = time_clip(val); } else { double fields[] = { 0, 0, 1, 0, 0, 0, 0 }; if (n > 7) n = 7; for(i = 0; i < n; i++) { if (JS_ToFloat64(ctx, &a, argv[i])) return JS_EXCEPTION; if (!isfinite(a)) break; fields[i] = trunc(a); if (i == 0 && fields[0] >= 0 && fields[0] < 100) fields[0] += 1900; } val = (i == n) ? set_date_fields(fields, 1) : NAN; } has_val: rv = js_create_from_ctor(ctx, new_target, JS_CLASS_DATE); if (!JS_IsException(rv)) JS_SetObjectData(ctx, rv, js_float64(val)); if (!JS_IsException(rv) && JS_IsUndefined(new_target)) { /* invoked as a function, return (new Date()).toString(); */ JSValue s; s = get_date_string(ctx, rv, 0, NULL, 0x13); JS_FreeValue(ctx, rv); rv = s; } return rv; }
O0
c
js_date_constructor: subq $0x148, %rsp # imm = 0x148 movq %rsi, 0x128(%rsp) movq %rdx, 0x130(%rsp) movq %rdi, 0x120(%rsp) movl %ecx, 0x11c(%rsp) movq %r8, 0x110(%rsp) movq 0x128(%rsp), %rdi movq 0x130(%rsp), %rsi callq 0x2e260 cmpl $0x0, %eax je 0x551c3 movl $0x0, 0x11c(%rsp) movl 0x11c(%rsp), %eax movl %eax, 0xf8(%rsp) cmpl $0x0, 0xf8(%rsp) jne 0x551f3 callq 0x997b0 cvtsi2sd %rax, %xmm0 movsd %xmm0, 0xe8(%rsp) jmp 0x55628 cmpl $0x1, 0xf8(%rsp) jne 0x55497 movq 0x110(%rsp), %rax movq 0x8(%rax), %rax cmpl $-0x1, %eax jne 0x552b8 movq 0x110(%rsp), %rax movq (%rax), %rax movq %rax, 0xc0(%rsp) movq 0xc0(%rsp), %rax movzwl 0x6(%rax), %eax cmpl $0xa, %eax jne 0x552b6 movq 0xc0(%rsp), %rax movq 0x30(%rax), %rdi movq 0x38(%rax), %rsi callq 0x506d0 cmpl $0x0, %eax je 0x552b6 movq 0x120(%rsp), %rdi movq 0xc0(%rsp), %rax movq 0x30(%rax), %rdx movq 0x38(%rax), %rcx leaq 0xe8(%rsp), %rsi callq 0x38580 cmpl $0x0, %eax je 0x5529a movl $0x0, 0x138(%rsp) movq $0x6, 0x140(%rsp) jmp 0x557a8 movsd 0xe8(%rsp), %xmm0 callq 0x55100 movsd %xmm0, 0xe8(%rsp) jmp 0x5562a jmp 0x552b8 movq 0x120(%rsp), %rdi movq 0x110(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movl $0x2, %ecx callq 0x39580 movq %rax, 0xb0(%rsp) movq %rdx, 0xb8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0xd8(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0xd8(%rsp), %rdi movq 0xe0(%rsp), %rsi callq 0x50710 cmpl $0x0, %eax je 0x55433 movq 0x120(%rsp), %rdi movl $0x0, 0x90(%rsp) movq $0x3, 0x98(%rsp) movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx movl $0x1, %ecx leaq 0xd8(%rsp), %r8 callq 0x997d0 movq %rax, 0xa0(%rsp) movq %rdx, 0xa8(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0x120(%rsp), %rdi movq 0xd8(%rsp), %rsi movq 0xe0(%rsp), %rdx callq 0x23c90 movq 0xc8(%rsp), %rdi movq 0xd0(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x553eb movl $0x0, 0x138(%rsp) movq $0x6, 0x140(%rsp) jmp 0x557a8 movq 0x120(%rsp), %rdi movq 0xc8(%rsp), %rdx movq 0xd0(%rsp), %rcx leaq 0xe8(%rsp), %rsi callq 0x385f0 cmpl $0x0, %eax je 0x55431 movl $0x0, 0x138(%rsp) movq $0x6, 0x140(%rsp) jmp 0x557a8 jmp 0x5547b movq 0x120(%rsp), %rdi movq 0xd8(%rsp), %rdx movq 0xe0(%rsp), %rcx leaq 0xe8(%rsp), %rsi callq 0x385f0 cmpl $0x0, %eax je 0x55479 movl $0x0, 0x138(%rsp) movq $0x6, 0x140(%rsp) jmp 0x557a8 jmp 0x5547b movsd 0xe8(%rsp), %xmm0 callq 0x55100 movsd %xmm0, 0xe8(%rsp) jmp 0x55626 leaq 0x50(%rsp), %rdi xorl %esi, %esi movl $0x38, %edx callq 0xe350 movsd 0xb8380(%rip), %xmm0 # 0x10d830 movsd %xmm0, 0x60(%rsp) cmpl $0x7, 0xf8(%rsp) jle 0x554cb movl $0x7, 0xf8(%rsp) movl $0x0, 0xfc(%rsp) movl 0xfc(%rsp), %eax cmpl 0xf8(%rsp), %eax jge 0x555e0 movq 0x120(%rsp), %rdi movq 0x110(%rsp), %rax movslq 0xfc(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0xf0(%rsp), %rsi callq 0x38580 cmpl $0x0, %eax je 0x5553e movl $0x0, 0x138(%rsp) movq $0x6, 0x140(%rsp) jmp 0x557a8 movsd 0xf0(%rsp), %xmm0 movq %xmm0, %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF andq %rcx, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 subq %rcx, %rax setl %al testb $0x1, %al jne 0x5556f jmp 0x555e0 movsd 0xf0(%rsp), %xmm0 callq 0xe140 movslq 0xfc(%rsp), %rax movsd %xmm0, 0x50(%rsp,%rax,8) cmpl $0x0, 0xfc(%rsp) jne 0x555c8 movsd 0x50(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jb 0x555c8 movsd 0xb82d4(%rip), %xmm0 # 0x10d880 ucomisd 0x50(%rsp), %xmm0 jbe 0x555c8 movsd 0xb82cc(%rip), %xmm0 # 0x10d888 addsd 0x50(%rsp), %xmm0 movsd %xmm0, 0x50(%rsp) jmp 0x555ca movl 0xfc(%rsp), %eax addl $0x1, %eax movl %eax, 0xfc(%rsp) jmp 0x554d6 movl 0xfc(%rsp), %eax cmpl 0xf8(%rsp), %eax jne 0x55607 leaq 0x50(%rsp), %rdi movl $0x1, %esi callq 0x99420 movsd %xmm0, 0x8(%rsp) jmp 0x55617 movsd 0xb8269(%rip), %xmm0 # 0x10d878 movsd %xmm0, 0x8(%rsp) jmp 0x55617 movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0xe8(%rsp) jmp 0x55628 jmp 0x5562a movq 0x120(%rsp), %rdi movq 0x128(%rsp), %rsi movq 0x130(%rsp), %rdx movl $0xa, %ecx callq 0x54e00 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x108(%rsp) movq 0x100(%rsp), %rdi movq 0x108(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax jne 0x556d1 movq 0x120(%rsp), %rax movq %rax, (%rsp) movsd 0xe8(%rsp), %xmm0 callq 0x4d660 movq (%rsp), %rdi movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x100(%rsp), %rsi movq 0x108(%rsp), %rdx movq 0x30(%rsp), %rcx movq 0x38(%rsp), %r8 callq 0x55010 movq 0x100(%rsp), %rdi movq 0x108(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax jne 0x55788 movq 0x128(%rsp), %rdi movq 0x130(%rsp), %rsi callq 0x2e260 cmpl $0x0, %eax je 0x55788 movq 0x120(%rsp), %rdi movq 0x100(%rsp), %rsi movq 0x108(%rsp), %rdx xorl %ecx, %ecx xorl %eax, %eax movl %eax, %r8d movl $0x13, %r9d callq 0x97b30 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x120(%rsp), %rdi movq 0x100(%rsp), %rsi movq 0x108(%rsp), %rdx callq 0x23c90 movq 0x20(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x108(%rsp) movq 0x100(%rsp), %rax movq %rax, 0x138(%rsp) movq 0x108(%rsp), %rax movq %rax, 0x140(%rsp) movq 0x138(%rsp), %rax movq 0x140(%rsp), %rdx addq $0x148, %rsp # imm = 0x148 retq
js_date_constructor: sub rsp, 148h mov [rsp+148h+var_20], rsi mov [rsp+148h+var_18], rdx mov [rsp+148h+var_28], rdi mov [rsp+148h+var_2C], ecx mov [rsp+148h+var_38], r8 mov rdi, [rsp+148h+var_20] mov rsi, [rsp+148h+var_18] call JS_IsUndefined_0 cmp eax, 0 jz short loc_551C3 mov [rsp+148h+var_2C], 0 loc_551C3: mov eax, [rsp+148h+var_2C] mov [rsp+148h+var_50], eax cmp [rsp+148h+var_50], 0 jnz short loc_551F3 call date_now cvtsi2sd xmm0, rax movsd [rsp+148h+var_60], xmm0 jmp loc_55628 loc_551F3: cmp [rsp+148h+var_50], 1 jnz loc_55497 mov rax, [rsp+148h+var_38] mov rax, [rax+8] cmp eax, 0FFFFFFFFh jnz loc_552B8 mov rax, [rsp+148h+var_38] mov rax, [rax] mov [rsp+148h+var_88], rax mov rax, [rsp+148h+var_88] movzx eax, word ptr [rax+6] cmp eax, 0Ah jnz short loc_552B6 mov rax, [rsp+148h+var_88] mov rdi, [rax+30h] mov rsi, [rax+38h] call JS_IsNumber cmp eax, 0 jz short loc_552B6 mov rdi, [rsp+148h+var_28] mov rax, [rsp+148h+var_88] mov rdx, [rax+30h] mov rcx, [rax+38h] lea rsi, [rsp+148h+var_60] call JS_ToFloat64 cmp eax, 0 jz short loc_5529A mov dword ptr [rsp+148h+var_10], 0 mov [rsp+148h+var_8], 6 jmp loc_557A8 loc_5529A: movsd xmm0, [rsp+148h+var_60] call time_clip movsd [rsp+148h+var_60], xmm0 jmp loc_5562A loc_552B6: jmp short $+2 loc_552B8: mov rdi, [rsp+148h+var_28] mov rax, [rsp+148h+var_38] mov rsi, [rax] mov rdx, [rax+8] mov ecx, 2 call JS_ToPrimitive mov [rsp+148h+var_98], rax mov [rsp+148h+var_90], rdx mov rax, [rsp+148h+var_98] mov [rsp+148h+var_70], rax mov rax, [rsp+148h+var_90] mov [rsp+148h+var_68], rax mov rdi, [rsp+148h+var_70] mov rsi, [rsp+148h+var_68] call JS_IsString_0 cmp eax, 0 jz loc_55433 mov rdi, [rsp+148h+var_28] mov dword ptr [rsp+148h+var_B8], 0 mov [rsp+148h+var_B0], 3 mov rsi, [rsp+148h+var_B8] mov rdx, [rsp+148h+var_B0] mov ecx, 1 lea r8, [rsp+148h+var_70] call js_Date_parse mov [rsp+148h+var_A8], rax mov [rsp+148h+var_A0], rdx mov rax, [rsp+148h+var_A8] mov [rsp+148h+var_80], rax mov rax, [rsp+148h+var_A0] mov [rsp+148h+var_78], rax mov rdi, [rsp+148h+var_28] mov rsi, [rsp+148h+var_70] mov rdx, [rsp+148h+var_68] call JS_FreeValue mov rdi, [rsp+148h+var_80] mov rsi, [rsp+148h+var_78] call JS_IsException_1 cmp eax, 0 jz short loc_553EB mov dword ptr [rsp+148h+var_10], 0 mov [rsp+148h+var_8], 6 jmp loc_557A8 loc_553EB: mov rdi, [rsp+148h+var_28] mov rdx, [rsp+148h+var_80] mov rcx, [rsp+148h+var_78] lea rsi, [rsp+148h+var_60] call JS_ToFloat64Free cmp eax, 0 jz short loc_55431 mov dword ptr [rsp+148h+var_10], 0 mov [rsp+148h+var_8], 6 jmp loc_557A8 loc_55431: jmp short loc_5547B loc_55433: mov rdi, [rsp+148h+var_28] mov rdx, [rsp+148h+var_70] mov rcx, [rsp+148h+var_68] lea rsi, [rsp+148h+var_60] call JS_ToFloat64Free cmp eax, 0 jz short loc_55479 mov dword ptr [rsp+148h+var_10], 0 mov [rsp+148h+var_8], 6 jmp loc_557A8 loc_55479: jmp short $+2 loc_5547B: movsd xmm0, [rsp+148h+var_60] call time_clip movsd [rsp+148h+var_60], xmm0 jmp loc_55626 loc_55497: lea rdi, [rsp+148h+var_F8] xor esi, esi mov edx, 38h ; '8' call _memset movsd xmm0, cs:qword_10D830 movsd [rsp+148h+var_E8], xmm0 cmp [rsp+148h+var_50], 7 jle short loc_554CB mov [rsp+148h+var_50], 7 loc_554CB: mov [rsp+148h+var_4C], 0 loc_554D6: mov eax, [rsp+148h+var_4C] cmp eax, [rsp+148h+var_50] jge loc_555E0 mov rdi, [rsp+148h+var_28] mov rax, [rsp+148h+var_38] movsxd rcx, [rsp+148h+var_4C] shl rcx, 4 add rax, rcx mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+148h+var_58] call JS_ToFloat64 cmp eax, 0 jz short loc_5553E mov dword ptr [rsp+148h+var_10], 0 mov [rsp+148h+var_8], 6 jmp loc_557A8 loc_5553E: movsd xmm0, [rsp+148h+var_58] movq rax, xmm0 mov rcx, 7FFFFFFFFFFFFFFFh and rax, rcx mov rcx, 7FF0000000000000h sub rax, rcx setl al test al, 1 jnz short loc_5556F jmp short loc_555E0 loc_5556F: movsd xmm0, [rsp+148h+var_58] call _trunc movsxd rax, [rsp+148h+var_4C] movsd [rsp+rax*8+148h+var_F8], xmm0 cmp [rsp+148h+var_4C], 0 jnz short loc_555C8 movsd xmm0, [rsp+148h+var_F8] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jb short loc_555C8 movsd xmm0, cs:qword_10D880 ucomisd xmm0, [rsp+148h+var_F8] jbe short loc_555C8 movsd xmm0, cs:qword_10D888 addsd xmm0, [rsp+148h+var_F8] movsd [rsp+148h+var_F8], xmm0 loc_555C8: jmp short $+2 loc_555CA: mov eax, [rsp+148h+var_4C] add eax, 1 mov [rsp+148h+var_4C], eax jmp loc_554D6 loc_555E0: mov eax, [rsp+148h+var_4C] cmp eax, [rsp+148h+var_50] jnz short loc_55607 lea rdi, [rsp+148h+var_F8] mov esi, 1 call set_date_fields movsd [rsp+148h+var_140], xmm0 jmp short loc_55617 loc_55607: movsd xmm0, cs:qword_10D878 movsd [rsp+148h+var_140], xmm0 jmp short $+2 loc_55617: movsd xmm0, [rsp+148h+var_140] movsd [rsp+148h+var_60], xmm0 loc_55626: jmp short $+2 loc_55628: jmp short $+2 loc_5562A: mov rdi, [rsp+148h+var_28] mov rsi, [rsp+148h+var_20] mov rdx, [rsp+148h+var_18] mov ecx, 0Ah call js_create_from_ctor mov [rsp+148h+var_108], rax mov [rsp+148h+var_100], rdx mov rax, [rsp+148h+var_108] mov [rsp+148h+var_48], rax mov rax, [rsp+148h+var_100] mov [rsp+148h+var_40], rax mov rdi, [rsp+148h+var_48] mov rsi, [rsp+148h+var_40] call JS_IsException_1 cmp eax, 0 jnz short loc_556D1 mov rax, [rsp+148h+var_28] mov [rsp+148h+var_148], rax movsd xmm0, [rsp+148h+var_60] call js_float64 mov rdi, [rsp+148h+var_148] mov [rsp+148h+var_118], rax mov [rsp+148h+var_110], rdx mov rsi, [rsp+148h+var_48] mov rdx, [rsp+148h+var_40] mov rcx, [rsp+148h+var_118] mov r8, [rsp+148h+var_110] call JS_SetObjectData loc_556D1: mov rdi, [rsp+148h+var_48] mov rsi, [rsp+148h+var_40] call JS_IsException_1 cmp eax, 0 jnz loc_55788 mov rdi, [rsp+148h+var_20] mov rsi, [rsp+148h+var_18] call JS_IsUndefined_0 cmp eax, 0 jz short loc_55788 mov rdi, [rsp+148h+var_28] mov rsi, [rsp+148h+var_48] mov rdx, [rsp+148h+var_40] xor ecx, ecx xor eax, eax mov r8d, eax mov r9d, 13h call get_date_string mov [rsp+148h+var_138], rax mov [rsp+148h+var_130], rdx mov rax, [rsp+148h+var_138] mov [rsp+148h+var_128], rax mov rax, [rsp+148h+var_130] mov [rsp+148h+var_120], rax mov rdi, [rsp+148h+var_28] mov rsi, [rsp+148h+var_48] mov rdx, [rsp+148h+var_40] call JS_FreeValue mov rax, [rsp+148h+var_128] mov [rsp+148h+var_48], rax mov rax, [rsp+148h+var_120] mov [rsp+148h+var_40], rax loc_55788: mov rax, [rsp+148h+var_48] mov [rsp+148h+var_10], rax mov rax, [rsp+148h+var_40] mov [rsp+148h+var_8], rax loc_557A8: mov rax, [rsp+148h+var_10] mov rdx, [rsp+148h+var_8] add rsp, 148h retn
long long js_date_constructor( long long a1, long long a2, long long a3, int a4, long long *a5, double a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rdx long long v14; // rdx double v15; // xmm0_8 long long v16; // rdx __m128 v17; // xmm0 long long v18; // rdx double v19; // xmm4_8 double v20; // xmm5_8 long long v21; // rdx long long v23; // [rsp+0h] [rbp-148h] double v24; // [rsp+8h] [rbp-140h] long long date_string; // [rsp+10h] [rbp-138h] long long v26; // [rsp+28h] [rbp-120h] long long v27; // [rsp+30h] [rbp-118h] double v28[8]; // [rsp+50h] [rbp-F8h] BYREF long long v29; // [rsp+90h] [rbp-B8h] long long v30; // [rsp+98h] [rbp-B0h] long long v31; // [rsp+A0h] [rbp-A8h] long long v32; // [rsp+A8h] [rbp-A0h] long long v33; // [rsp+B0h] [rbp-98h] long long v34; // [rsp+B8h] [rbp-90h] _DWORD *v35; // [rsp+C0h] [rbp-88h] long long v36; // [rsp+C8h] [rbp-80h] long long v37; // [rsp+D0h] [rbp-78h] long long v38; // [rsp+D8h] [rbp-70h] BYREF long long v39; // [rsp+E0h] [rbp-68h] double v40; // [rsp+E8h] [rbp-60h] BYREF double v41; // [rsp+F0h] [rbp-58h] BYREF int v42; // [rsp+F8h] [rbp-50h] int i; // [rsp+FCh] [rbp-4Ch] long long v44; // [rsp+100h] [rbp-48h] long long v45; // [rsp+108h] [rbp-40h] long long *v46; // [rsp+110h] [rbp-38h] int v47; // [rsp+11Ch] [rbp-2Ch] long long v48; // [rsp+120h] [rbp-28h] long long v49; // [rsp+128h] [rbp-20h] long long v50; // [rsp+130h] [rbp-18h] long long v51; // [rsp+138h] [rbp-10h] long long v52; // [rsp+140h] [rbp-8h] v49 = a2; v50 = a3; v48 = a1; v47 = a4; v46 = a5; if ( JS_IsUndefined_0(a2, a3) ) v47 = 0; v42 = v47; if ( v47 ) { if ( v42 == 1 ) { if ( (unsigned int)v46[1] == -1 && (v35 = (_DWORD *)*v46, *((_WORD *)v35 + 3) == 10) && JS_IsNumber(*((_QWORD *)v35 + 6), *((_QWORD *)v35 + 7)) ) { if ( (unsigned int)JS_ToFloat64(v48, (long long)&v40, *((_DWORD **)v35 + 6), *((_QWORD *)v35 + 7)) ) { LODWORD(v51) = 0; v52 = 6LL; return v51; } v40 = time_clip(v40); } else { v33 = JS_ToPrimitive(v48, (_DWORD *)*v46, v46[1], 2u); v34 = v13; v38 = v33; v39 = v13; if ( JS_IsString_0(v33, v13) ) { LODWORD(v29) = 0; v30 = 3LL; v31 = js_Date_parse(v48, v29, 3LL, 1LL, &v38); v32 = v14; v36 = v31; v37 = v14; JS_FreeValue(v48, v38, v39); if ( JS_IsException_1(v31, v37) ) { LODWORD(v51) = 0; v52 = 6LL; return v51; } if ( (unsigned int)JS_ToFloat64Free(v48, &v40, v36, v37) ) { LODWORD(v51) = 0; v52 = 6LL; return v51; } } else if ( (unsigned int)JS_ToFloat64Free(v48, &v40, v38, v39) ) { LODWORD(v51) = 0; v52 = 6LL; return v51; } v40 = time_clip(v40); } } else { memset(v28, 0LL, 56LL); v28[2] = 1.0; if ( v42 > 7 ) v42 = 7; for ( i = 0; i < v42; ++i ) { if ( (unsigned int)JS_ToFloat64(v48, (long long)&v41, (_DWORD *)v46[2 * i], v46[2 * i + 1]) ) { LODWORD(v51) = 0; v52 = 6LL; return v51; } if ( (*(_QWORD *)&v41 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) break; v15 = trunc(v41); v28[i] = v15; if ( !i ) { a7 = 0LL; if ( v28[0] >= 0.0 && v28[0] < 100.0 ) v28[0] = v28[0] + 1900.0; } } if ( i == v42 ) v24 = set_date_fields(v28, 1LL); else v24 = NAN; v40 = v24; } } else { v40 = (double)(int)date_now(); } v44 = js_create_from_ctor(v48, v49, v50, 10); v45 = v16; if ( !JS_IsException_1(v44, v16) ) { v23 = v48; v17 = (__m128)*(unsigned long long *)&v40; v27 = js_float64(v40); JS_SetObjectData(v23, v44, v45, v27, v18, v17, a7, a8, a9, v19, v20, a12, a13); } if ( !JS_IsException_1(v44, v45) && JS_IsUndefined_0(v49, v50) ) { date_string = get_date_string(v48, v44, v45, 0LL, 0LL, 19LL); v26 = v21; JS_FreeValue(v48, v44, v45); v44 = date_string; v45 = v26; } v51 = v44; v52 = v45; return v51; }
js_date_constructor: SUB RSP,0x148 MOV qword ptr [RSP + 0x128],RSI MOV qword ptr [RSP + 0x130],RDX MOV qword ptr [RSP + 0x120],RDI MOV dword ptr [RSP + 0x11c],ECX MOV qword ptr [RSP + 0x110],R8 MOV RDI,qword ptr [RSP + 0x128] MOV RSI,qword ptr [RSP + 0x130] CALL 0x0012e260 CMP EAX,0x0 JZ 0x001551c3 MOV dword ptr [RSP + 0x11c],0x0 LAB_001551c3: MOV EAX,dword ptr [RSP + 0x11c] MOV dword ptr [RSP + 0xf8],EAX CMP dword ptr [RSP + 0xf8],0x0 JNZ 0x001551f3 CALL 0x001997b0 CVTSI2SD XMM0,RAX MOVSD qword ptr [RSP + 0xe8],XMM0 JMP 0x00155628 LAB_001551f3: CMP dword ptr [RSP + 0xf8],0x1 JNZ 0x00155497 MOV RAX,qword ptr [RSP + 0x110] MOV RAX,qword ptr [RAX + 0x8] CMP EAX,-0x1 JNZ 0x001552b8 MOV RAX,qword ptr [RSP + 0x110] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0xc0] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0xa JNZ 0x001552b6 MOV RAX,qword ptr [RSP + 0xc0] MOV RDI,qword ptr [RAX + 0x30] MOV RSI,qword ptr [RAX + 0x38] CALL 0x001506d0 CMP EAX,0x0 JZ 0x001552b6 MOV RDI,qword ptr [RSP + 0x120] MOV RAX,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RAX + 0x38] LEA RSI,[RSP + 0xe8] CALL 0x00138580 CMP EAX,0x0 JZ 0x0015529a MOV dword ptr [RSP + 0x138],0x0 MOV qword ptr [RSP + 0x140],0x6 JMP 0x001557a8 LAB_0015529a: MOVSD XMM0,qword ptr [RSP + 0xe8] CALL 0x00155100 MOVSD qword ptr [RSP + 0xe8],XMM0 JMP 0x0015562a LAB_001552b6: JMP 0x001552b8 LAB_001552b8: MOV RDI,qword ptr [RSP + 0x120] MOV RAX,qword ptr [RSP + 0x110] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV ECX,0x2 CALL 0x00139580 MOV qword ptr [RSP + 0xb0],RAX MOV qword ptr [RSP + 0xb8],RDX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xd8],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0xe0],RAX MOV RDI,qword ptr [RSP + 0xd8] MOV RSI,qword ptr [RSP + 0xe0] CALL 0x00150710 CMP EAX,0x0 JZ 0x00155433 MOV RDI,qword ptr [RSP + 0x120] MOV dword ptr [RSP + 0x90],0x0 MOV qword ptr [RSP + 0x98],0x3 MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] MOV ECX,0x1 LEA R8,[RSP + 0xd8] CALL 0x001997d0 MOV qword ptr [RSP + 0xa0],RAX MOV qword ptr [RSP + 0xa8],RDX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xc8],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0xd0],RAX MOV RDI,qword ptr [RSP + 0x120] MOV RSI,qword ptr [RSP + 0xd8] MOV RDX,qword ptr [RSP + 0xe0] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0xd0] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001553eb MOV dword ptr [RSP + 0x138],0x0 MOV qword ptr [RSP + 0x140],0x6 JMP 0x001557a8 LAB_001553eb: MOV RDI,qword ptr [RSP + 0x120] MOV RDX,qword ptr [RSP + 0xc8] MOV RCX,qword ptr [RSP + 0xd0] LEA RSI,[RSP + 0xe8] CALL 0x001385f0 CMP EAX,0x0 JZ 0x00155431 MOV dword ptr [RSP + 0x138],0x0 MOV qword ptr [RSP + 0x140],0x6 JMP 0x001557a8 LAB_00155431: JMP 0x0015547b LAB_00155433: MOV RDI,qword ptr [RSP + 0x120] MOV RDX,qword ptr [RSP + 0xd8] MOV RCX,qword ptr [RSP + 0xe0] LEA RSI,[RSP + 0xe8] CALL 0x001385f0 CMP EAX,0x0 JZ 0x00155479 MOV dword ptr [RSP + 0x138],0x0 MOV qword ptr [RSP + 0x140],0x6 JMP 0x001557a8 LAB_00155479: JMP 0x0015547b LAB_0015547b: MOVSD XMM0,qword ptr [RSP + 0xe8] CALL 0x00155100 MOVSD qword ptr [RSP + 0xe8],XMM0 JMP 0x00155626 LAB_00155497: LEA RDI,[RSP + 0x50] XOR ESI,ESI MOV EDX,0x38 CALL 0x0010e350 MOVSD XMM0,qword ptr [0x0020d830] MOVSD qword ptr [RSP + 0x60],XMM0 CMP dword ptr [RSP + 0xf8],0x7 JLE 0x001554cb MOV dword ptr [RSP + 0xf8],0x7 LAB_001554cb: MOV dword ptr [RSP + 0xfc],0x0 LAB_001554d6: MOV EAX,dword ptr [RSP + 0xfc] CMP EAX,dword ptr [RSP + 0xf8] JGE 0x001555e0 MOV RDI,qword ptr [RSP + 0x120] MOV RAX,qword ptr [RSP + 0x110] MOVSXD RCX,dword ptr [RSP + 0xfc] SHL RCX,0x4 ADD RAX,RCX MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0xf0] CALL 0x00138580 CMP EAX,0x0 JZ 0x0015553e MOV dword ptr [RSP + 0x138],0x0 MOV qword ptr [RSP + 0x140],0x6 JMP 0x001557a8 LAB_0015553e: MOVSD XMM0,qword ptr [RSP + 0xf0] MOVQ RAX,XMM0 MOV RCX,0x7fffffffffffffff AND RAX,RCX MOV RCX,0x7ff0000000000000 SUB RAX,RCX SETL AL TEST AL,0x1 JNZ 0x0015556f JMP 0x001555e0 LAB_0015556f: MOVSD XMM0,qword ptr [RSP + 0xf0] CALL 0x0010e140 MOVSXD RAX,dword ptr [RSP + 0xfc] MOVSD qword ptr [RSP + RAX*0x8 + 0x50],XMM0 CMP dword ptr [RSP + 0xfc],0x0 JNZ 0x001555c8 MOVSD XMM0,qword ptr [RSP + 0x50] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JC 0x001555c8 MOVSD XMM0,qword ptr [0x0020d880] UCOMISD XMM0,qword ptr [RSP + 0x50] JBE 0x001555c8 MOVSD XMM0,qword ptr [0x0020d888] ADDSD XMM0,qword ptr [RSP + 0x50] MOVSD qword ptr [RSP + 0x50],XMM0 LAB_001555c8: JMP 0x001555ca LAB_001555ca: MOV EAX,dword ptr [RSP + 0xfc] ADD EAX,0x1 MOV dword ptr [RSP + 0xfc],EAX JMP 0x001554d6 LAB_001555e0: MOV EAX,dword ptr [RSP + 0xfc] CMP EAX,dword ptr [RSP + 0xf8] JNZ 0x00155607 LEA RDI,[RSP + 0x50] MOV ESI,0x1 CALL 0x00199420 MOVSD qword ptr [RSP + 0x8],XMM0 JMP 0x00155617 LAB_00155607: MOVSD XMM0,qword ptr [0x0020d878] MOVSD qword ptr [RSP + 0x8],XMM0 JMP 0x00155617 LAB_00155617: MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD qword ptr [RSP + 0xe8],XMM0 LAB_00155626: JMP 0x00155628 LAB_00155628: JMP 0x0015562a LAB_0015562a: MOV RDI,qword ptr [RSP + 0x120] MOV RSI,qword ptr [RSP + 0x128] MOV RDX,qword ptr [RSP + 0x130] MOV ECX,0xa CALL 0x00154e00 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x108],RAX MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x108] CALL 0x00123cc0 CMP EAX,0x0 JNZ 0x001556d1 MOV RAX,qword ptr [RSP + 0x120] MOV qword ptr [RSP],RAX MOVSD XMM0,qword ptr [RSP + 0xe8] CALL 0x0014d660 MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RSI,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0x108] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x38] CALL 0x00155010 LAB_001556d1: MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x108] CALL 0x00123cc0 CMP EAX,0x0 JNZ 0x00155788 MOV RDI,qword ptr [RSP + 0x128] MOV RSI,qword ptr [RSP + 0x130] CALL 0x0012e260 CMP EAX,0x0 JZ 0x00155788 MOV RDI,qword ptr [RSP + 0x120] MOV RSI,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0x108] XOR ECX,ECX XOR EAX,EAX MOV R8D,EAX MOV R9D,0x13 CALL 0x00197b30 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x120] MOV RSI,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0x108] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x108],RAX LAB_00155788: MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x138],RAX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x140],RAX LAB_001557a8: MOV RAX,qword ptr [RSP + 0x138] MOV RDX,qword ptr [RSP + 0x140] ADD RSP,0x148 RET
int1 [16] js_date_constructor(int8 param_1,int8 param_2,int8 param_3,int param_4, long *param_5) { int8 uVar1; int iVar2; long lVar3; double dVar4; int1 auVar5 [16]; double local_140; double local_f8 [8]; int4 local_b8; uint uStack_b4; int8 local_b0; int1 local_a8 [16]; int1 local_98 [16]; long local_88; int1 local_80 [16]; int1 local_70 [16]; double local_60; double local_58; int local_50; int local_4c; int1 local_48 [16]; long *local_38; int local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; iVar2 = JS_IsUndefined(param_2); if (iVar2 != 0) { local_2c = 0; } local_50 = local_2c; if (local_2c == 0) { lVar3 = date_now(); local_60 = (double)lVar3; } else if (local_2c == 1) { if ((((int)local_38[1] == -1) && (local_88 = *local_38, *(short *)(local_88 + 6) == 10)) && (iVar2 = JS_IsNumber(*(int8 *)(local_88 + 0x30),*(int8 *)(local_88 + 0x38)), iVar2 != 0)) { iVar2 = JS_ToFloat64(local_28,&local_60,*(int8 *)(local_88 + 0x30), *(int8 *)(local_88 + 0x38)); if (iVar2 != 0) { local_10 = 0; local_8 = 6; goto LAB_001557a8; } local_60 = (double)time_clip(local_60); } else { local_98 = JS_ToPrimitive(local_28,*local_38,local_38[1],2); local_70 = local_98; iVar2 = JS_IsString(local_98._0_8_,local_98._8_8_); if (iVar2 == 0) { iVar2 = JS_ToFloat64Free(local_28,&local_60,local_70._0_8_,local_70._8_8_); if (iVar2 != 0) { local_10 = 0; local_8 = 6; goto LAB_001557a8; } } else { local_b8 = 0; local_b0 = 3; local_a8 = js_Date_parse(local_28,(ulong)uStack_b4 << 0x20,3,1,local_70); local_80 = local_a8; JS_FreeValue(local_28,local_70._0_8_,local_70._8_8_); iVar2 = JS_IsException(local_80._0_8_,local_80._8_8_); if (iVar2 != 0) { local_10 = 0; local_8 = 6; goto LAB_001557a8; } iVar2 = JS_ToFloat64Free(local_28,&local_60,local_80._0_8_,local_80._8_8_); if (iVar2 != 0) { local_10 = 0; local_8 = 6; goto LAB_001557a8; } } local_60 = (double)time_clip(local_60); } } else { memset(local_f8,0,0x38); local_f8[2] = (double)DAT_0020d830; if (7 < local_50) { local_50 = 7; } for (local_4c = 0; local_4c < local_50; local_4c = local_4c + 1) { iVar2 = JS_ToFloat64(local_28,&local_58,local_38[(long)local_4c * 2], (local_38 + (long)local_4c * 2)[1]); if (iVar2 != 0) { local_10 = 0; local_8 = 6; goto LAB_001557a8; } if (0x7fefffffffffffff < (ulong)ABS(local_58)) break; dVar4 = trunc(local_58); local_f8[local_4c] = dVar4; if (((local_4c == 0) && (0.0 <= local_f8[0])) && (local_f8[0] < DAT_0020d880)) { local_f8[0] = DAT_0020d888 + local_f8[0]; } } if (local_4c == local_50) { local_140 = (double)set_date_fields(local_f8,1); } else { local_140 = DAT_0020d878; } local_60 = local_140; } local_48 = js_create_from_ctor(local_28,local_20,local_18,10); iVar2 = JS_IsException(local_48._0_8_,local_48._8_8_); uVar1 = local_28; if (iVar2 == 0) { auVar5 = js_float64(local_60); JS_SetObjectData(uVar1,local_48._0_8_,local_48._8_8_,auVar5._0_8_,auVar5._8_8_); } iVar2 = JS_IsException(local_48._0_8_,local_48._8_8_); auVar5 = local_48; if (iVar2 == 0) { iVar2 = JS_IsUndefined(local_20,local_18); auVar5 = local_48; if (iVar2 != 0) { auVar5 = get_date_string(local_28,local_48._0_8_,local_48._8_8_,0,0,0x13); JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_); } } local_48._8_8_ = auVar5._8_8_; local_10 = auVar5._0_4_; uStack_c = auVar5._4_4_; local_8 = local_48._8_8_; LAB_001557a8: auVar5._4_4_ = uStack_c; auVar5._0_4_ = local_10; auVar5._8_8_ = local_8; return auVar5; }
2,812
js_date_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_date_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { // Date(y, mon, d, h, m, s, ms) JSValue rv; int i, n; double a, val; if (JS_IsUndefined(new_target)) { /* invoked as function */ argc = 0; } n = argc; if (n == 0) { val = date_now(); } else if (n == 1) { JSValue v, dv; if (JS_VALUE_GET_TAG(argv[0]) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(argv[0]); if (p->class_id == JS_CLASS_DATE && JS_IsNumber(p->u.object_data)) { if (JS_ToFloat64(ctx, &val, p->u.object_data)) return JS_EXCEPTION; val = time_clip(val); goto has_val; } } v = JS_ToPrimitive(ctx, argv[0], HINT_NONE); if (JS_IsString(v)) { dv = js_Date_parse(ctx, JS_UNDEFINED, 1, &v); JS_FreeValue(ctx, v); if (JS_IsException(dv)) return JS_EXCEPTION; if (JS_ToFloat64Free(ctx, &val, dv)) return JS_EXCEPTION; } else { if (JS_ToFloat64Free(ctx, &val, v)) return JS_EXCEPTION; } val = time_clip(val); } else { double fields[] = { 0, 0, 1, 0, 0, 0, 0 }; if (n > 7) n = 7; for(i = 0; i < n; i++) { if (JS_ToFloat64(ctx, &a, argv[i])) return JS_EXCEPTION; if (!isfinite(a)) break; fields[i] = trunc(a); if (i == 0 && fields[0] >= 0 && fields[0] < 100) fields[0] += 1900; } val = (i == n) ? set_date_fields(fields, 1) : NAN; } has_val: rv = js_create_from_ctor(ctx, new_target, JS_CLASS_DATE); if (!JS_IsException(rv)) JS_SetObjectData(ctx, rv, js_float64(val)); if (!JS_IsException(rv) && JS_IsUndefined(new_target)) { /* invoked as a function, return (new Date()).toString(); */ JSValue s; s = get_date_string(ctx, rv, 0, NULL, 0x13); JS_FreeValue(ctx, rv); rv = s; } return rv; }
O1
c
js_date_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %r8, %r12 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movl %r15d, %ebp xorl %eax, %eax cmpq $0x3, %rbp cmovnel %ecx, %eax cmpl $0x1, %eax je 0x36f5f testl %eax, %eax jne 0x36fb4 callq 0x1c70f movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %rdx addq %rax, %rdx cvtsi2sd %rdx, %xmm0 jmp 0x370e4 cmpl $-0x1, 0x8(%r12) jne 0x3713c movq (%r12), %rdx xorl %r13d, %r13d movb $0x1, %al cmpw $0xa, 0x6(%rdx) jne 0x37134 movq 0x38(%rdx), %rcx cmpl $0x7, %ecx je 0x36f90 testl %ecx, %ecx jne 0x37134 movq 0x30(%rdx), %rdx leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x27681 testl %eax, %eax je 0x370ef movl $0x1, %r13d jmp 0x37132 movq %r15, 0x18(%rsp) pxor %xmm0, %xmm0 movdqa %xmm0, 0x40(%rsp) movdqa %xmm0, 0x50(%rsp) movdqa %xmm0, 0x30(%rsp) movq $0x0, 0x60(%rsp) movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000 movq %rcx, 0x40(%rsp) cmpl $0x7, %eax movl $0x7, %ecx cmovll %eax, %ecx testl %eax, %eax jle 0x370ae movq %r14, 0x10(%rsp) movq %rbp, 0x28(%rsp) movl %ecx, 0x24(%rsp) movl %ecx, %r14d addq $0x8, %r12 xorl %r15d, %r15d leaq 0x70(%rsp), %r13 movabsq $0x7fefffffffffffff, %rbp # imm = 0x7FEFFFFFFFFFFFFF movq -0x8(%r12), %rdx movq (%r12), %rcx movq %rbx, %rdi movq %r13, %rsi callq 0x27681 testl %eax, %eax jne 0x37301 movq 0x70(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax cmpq %rbp, %rax jg 0x370b3 callq 0xe140 movq %xmm0, 0x30(%rsp,%r15,8) testq %r15, %r15 jne 0x3708f movsd 0x30(%rsp), %xmm0 ucomisd 0x6788f(%rip), %xmm0 # 0x9e900 jb 0x3708f movsd 0x67875(%rip), %xmm1 # 0x9e8f0 ucomisd %xmm0, %xmm1 jbe 0x3708f addsd 0x6786f(%rip), %xmm0 # 0x9e8f8 movsd %xmm0, 0x30(%rsp) incq %r15 addq $0x10, %r12 cmpq %r15, %r14 jne 0x37021 movl 0x24(%rsp), %ecx movl %ecx, %r15d movq 0x28(%rsp), %rbp movq 0x10(%rsp), %r14 jmp 0x370c1 xorl %r15d, %r15d jmp 0x370c1 movq 0x28(%rsp), %rbp movq 0x10(%rsp), %r14 movl 0x24(%rsp), %ecx cmpl %ecx, %r15d jne 0x370d7 leaq 0x30(%rsp), %rdi movl $0x1, %esi callq 0x56fc5 jmp 0x370df movq 0x67809(%rip), %xmm0 # 0x9e8e8 movq 0x18(%rsp), %r15 movq %xmm0, 0x8(%rsp) jmp 0x3725f movsd 0x8(%rsp), %xmm0 movapd 0x67673(%rip), %xmm1 # 0x9e770 andpd %xmm0, %xmm1 movsd 0x677d7(%rip), %xmm2 # 0x9e8e0 ucomisd %xmm1, %xmm2 jae 0x37119 movsd 0x677d1(%rip), %xmm1 # 0x9e8e8 jmp 0x37126 callq 0xe140 xorpd %xmm1, %xmm1 addsd %xmm0, %xmm1 movsd %xmm1, 0x8(%rsp) movl $0x2, %r13d xorl %eax, %eax testb %al, %al je 0x37255 movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rsi, 0x30(%rsp) cmpl $-0x9, %edx jb 0x37156 movq 0x30(%rsp), %rax incl (%rax) movq %rbx, %rdi movl $0x2, %ecx callq 0x3dfd7 movq %rax, %r12 movq %rdx, %r13 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) cmpl $-0x7, %r13d jne 0x371bd movq %r14, 0x10(%rsp) movq %rbp, %r14 leaq 0x30(%rsp), %r8 movq %rbx, %rdi callq 0x57363 movq %rax, 0x18(%rsp) movq %rdx, %rbp movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1d8c6 movl $0x1, %r13d cmpl $0x6, %ebp jne 0x371d3 movq %r14, %rbp movq 0x10(%rsp), %r14 jmp 0x37255 cmpl $0x2, %r13d ja 0x371e9 xorps %xmm0, %xmm0 cvtsi2sd %r12d, %xmm0 movsd %xmm0, 0x8(%rsp) jmp 0x37215 cmpl $0x2, %ebp ja 0x371fa xorps %xmm0, %xmm0 cvtsi2sdl 0x18(%rsp), %xmm0 movsd %xmm0, 0x8(%rsp) jmp 0x3720d cmpl $0x7, %r13d jne 0x3730d movq %r12, 0x8(%rsp) jmp 0x37215 cmpl $0x7, %ebp jne 0x37333 movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq %r14, %rbp movq 0x10(%rsp), %r14 movsd 0x8(%rsp), %xmm0 movapd 0x6754d(%rip), %xmm1 # 0x9e770 andpd %xmm0, %xmm1 movsd 0x676b1(%rip), %xmm2 # 0x9e8e0 ucomisd %xmm1, %xmm2 jae 0x3723f movsd 0x676ab(%rip), %xmm1 # 0x9e8e8 jmp 0x3724c callq 0xe140 xorpd %xmm1, %xmm1 addsd %xmm0, %xmm1 movsd %xmm1, 0x8(%rsp) xorl %r13d, %r13d testb $0x1, %r13b jne 0x37301 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl $0xa, %ecx callq 0x36d56 movq %rax, %r15 movq %rdx, %r14 movl %r14d, %eax cmpq $0x6, %rax je 0x372dc cmpl $0x6, %eax sete %r12b cmpl $0x3, %ebp setne %bpl movq 0x8(%rsp), %rcx movl $0x7, %r8d movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x36e62 orb %r12b, %bpl jne 0x372dc movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x13, %r9d callq 0x55ec7 movq %rax, %r12 movq %rdx, %r13 movq 0x18(%rbx), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1d8c6 movq %r12, %r15 movq %r13, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx movl %r15d, %eax orq %rcx, %rax movq %r14, %rdx addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x6, %r14d xorl %eax, %eax xorl %ecx, %ecx jmp 0x372ec leaq 0x8(%rsp), %rsi movq %rbx, %rdi movq %r12, %rdx movq %r13, %rcx callq 0x3df2f movl $0x1, %r13d testl %eax, %eax jne 0x37255 jmp 0x37215 leaq 0x8(%rsp), %rsi movq %rbx, %rdi movq 0x18(%rsp), %rdx movq %rbp, %rcx callq 0x3df2f testl %eax, %eax movq %r14, %rbp movq 0x10(%rsp), %r14 jne 0x37255 jmp 0x37215
js_date_constructor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r12, r8 mov r15, rdx mov r14, rsi mov rbx, rdi mov ebp, r15d xor eax, eax cmp rbp, 3 cmovnz eax, ecx cmp eax, 1 jz short loc_36F5F test eax, eax jnz short loc_36FB4 call js__gettimeofday_us mov rcx, 20C49BA5E353F7CFh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 7 add rdx, rax cvtsi2sd xmm0, rdx jmp loc_370E4 loc_36F5F: cmp dword ptr [r12+8], 0FFFFFFFFh jnz loc_3713C mov rdx, [r12] xor r13d, r13d mov al, 1 cmp word ptr [rdx+6], 0Ah jnz loc_37134 mov rcx, [rdx+38h] cmp ecx, 7 jz short loc_36F90 test ecx, ecx jnz loc_37134 loc_36F90: mov rdx, [rdx+30h] lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx call JS_ToFloat64 test eax, eax jz loc_370EF mov r13d, 1 jmp loc_37132 loc_36FB4: mov [rsp+0A8h+var_90], r15 pxor xmm0, xmm0 movdqa [rsp+0A8h+var_68], xmm0 movdqa [rsp+0A8h+var_58], xmm0 movdqa [rsp+0A8h+var_78], xmm0 mov [rsp+0A8h+var_48], 0 mov rcx, 3FF0000000000000h mov qword ptr [rsp+0A8h+var_68], rcx cmp eax, 7 mov ecx, 7 cmovl ecx, eax test eax, eax jle loc_370AE mov [rsp+0A8h+var_98], r14 mov [rsp+0A8h+var_80], rbp mov [rsp+0A8h+var_84], ecx mov r14d, ecx add r12, 8 xor r15d, r15d lea r13, [rsp+0A8h+var_38] mov rbp, 7FEFFFFFFFFFFFFFh loc_37021: mov rdx, [r12-8] mov rcx, [r12] mov rdi, rbx mov rsi, r13 call JS_ToFloat64 test eax, eax jnz loc_37301 movq xmm0, [rsp+0A8h+var_38] movq rax, xmm0 btr rax, 3Fh ; '?' cmp rax, rbp jg short loc_370B3 call _trunc movq qword ptr [rsp+r15*8+0A8h+var_78], xmm0 test r15, r15 jnz short loc_3708F movsd xmm0, qword ptr [rsp+0A8h+var_78] ucomisd xmm0, cs:qword_9E900 jb short loc_3708F movsd xmm1, cs:qword_9E8F0 ucomisd xmm1, xmm0 jbe short loc_3708F addsd xmm0, cs:qword_9E8F8 movsd qword ptr [rsp+0A8h+var_78], xmm0 loc_3708F: inc r15 add r12, 10h cmp r14, r15 jnz short loc_37021 mov ecx, [rsp+0A8h+var_84] mov r15d, ecx mov rbp, [rsp+0A8h+var_80] mov r14, [rsp+0A8h+var_98] jmp short loc_370C1 loc_370AE: xor r15d, r15d jmp short loc_370C1 loc_370B3: mov rbp, [rsp+0A8h+var_80] mov r14, [rsp+0A8h+var_98] mov ecx, [rsp+0A8h+var_84] loc_370C1: cmp r15d, ecx jnz short loc_370D7 lea rdi, [rsp+0A8h+var_78] mov esi, 1 call set_date_fields jmp short loc_370DF loc_370D7: movq xmm0, cs:qword_9E8E8 loc_370DF: mov r15, [rsp+0A8h+var_90] loc_370E4: movq [rsp+0A8h+var_A0], xmm0 jmp loc_3725F loc_370EF: movsd xmm0, [rsp+0A8h+var_A0] movapd xmm1, cs:xmmword_9E770 andpd xmm1, xmm0 movsd xmm2, cs:qword_9E8E0 ucomisd xmm2, xmm1 jnb short loc_37119 movsd xmm1, cs:qword_9E8E8 jmp short loc_37126 loc_37119: call _trunc xorpd xmm1, xmm1 addsd xmm1, xmm0 loc_37126: movsd [rsp+0A8h+var_A0], xmm1 mov r13d, 2 loc_37132: xor eax, eax loc_37134: test al, al jz loc_37255 loc_3713C: mov rsi, [r12] mov rdx, [r12+8] mov qword ptr [rsp+0A8h+var_78], rsi cmp edx, 0FFFFFFF7h jb short loc_37156 mov rax, qword ptr [rsp+0A8h+var_78] inc dword ptr [rax] loc_37156: mov rdi, rbx mov ecx, 2 call JS_ToPrimitiveFree mov r12, rax mov r13, rdx mov qword ptr [rsp+0A8h+var_78], rax mov qword ptr [rsp+0A8h+var_78+8], rdx cmp r13d, 0FFFFFFF9h jnz short loc_371BD mov [rsp+0A8h+var_98], r14 mov r14, rbp lea r8, [rsp+0A8h+var_78] mov rdi, rbx call js_Date_parse mov [rsp+0A8h+var_90], rax mov rbp, rdx mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r13 call JS_FreeValueRT mov r13d, 1 cmp ebp, 6 jnz short loc_371D3 mov rbp, r14 mov r14, [rsp+0A8h+var_98] jmp loc_37255 loc_371BD: cmp r13d, 2 ja short loc_371E9 xorps xmm0, xmm0 cvtsi2sd xmm0, r12d movsd [rsp+0A8h+var_A0], xmm0 jmp short loc_37215 loc_371D3: cmp ebp, 2 ja short loc_371FA xorps xmm0, xmm0 cvtsi2sd xmm0, dword ptr [rsp+0A8h+var_90] movsd [rsp+0A8h+var_A0], xmm0 jmp short loc_3720D loc_371E9: cmp r13d, 7 jnz loc_3730D mov [rsp+0A8h+var_A0], r12 jmp short loc_37215 loc_371FA: cmp ebp, 7 jnz loc_37333 mov rax, [rsp+0A8h+var_90] mov [rsp+0A8h+var_A0], rax loc_3720D: mov rbp, r14 mov r14, [rsp+0A8h+var_98] loc_37215: movsd xmm0, [rsp+0A8h+var_A0] movapd xmm1, cs:xmmword_9E770 andpd xmm1, xmm0 movsd xmm2, cs:qword_9E8E0 ucomisd xmm2, xmm1 jnb short loc_3723F movsd xmm1, cs:qword_9E8E8 jmp short loc_3724C loc_3723F: call _trunc xorpd xmm1, xmm1 addsd xmm1, xmm0 loc_3724C: movsd [rsp+0A8h+var_A0], xmm1 xor r13d, r13d loc_37255: test r13b, 1 jnz loc_37301 loc_3725F: mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, 0Ah call js_create_from_ctor mov r15, rax mov r14, rdx mov eax, r14d cmp rax, 6 jz short loc_372DC cmp eax, 6 setz r12b cmp ebp, 3 setnz bpl mov rcx, [rsp+0A8h+var_A0] mov r8d, 7 mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_SetObjectData or bpl, r12b jnz short loc_372DC mov rdi, rbx mov rsi, r15 mov rdx, r14 mov r9d, 13h call get_date_string mov r12, rax mov r13, rdx mov rdi, [rbx+18h] mov rsi, r15 mov rdx, r14 call JS_FreeValueRT mov r15, r12 mov r14, r13 loc_372DC: mov rcx, 0FFFFFFFF00000000h and rcx, r15 mov eax, r15d loc_372EC: or rax, rcx mov rdx, r14 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_37301: mov r14d, 6 xor eax, eax xor ecx, ecx jmp short loc_372EC loc_3730D: lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx mov rdx, r12 mov rcx, r13 call __JS_ToFloat64Free mov r13d, 1 test eax, eax jnz loc_37255 jmp loc_37215 loc_37333: lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx mov rdx, [rsp+0A8h+var_90] mov rcx, rbp call __JS_ToFloat64Free test eax, eax mov rbp, r14 mov r14, [rsp+0A8h+var_98] jnz loc_37255 jmp loc_37215
unsigned long long js_date_constructor( long long a1, long long a2, _DWORD *a3, int a4, _DWORD *a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v14; // r15 long long v15; // r14 long long v16; // rbx int v17; // ebp int v18; // eax long long v19; // rdx char v20; // r13 char v21; // al long long v22; // rcx long long v23; // rdx unsigned int v24; // ecx long long v25; // r14 _QWORD *v26; // r12 long long v27; // r15 long long v28; // rdx double *v29; // rsi long long v30; // rdx __int128 v31; // rax long long v32; // rcx __int128 v33; // kr00_16 int v34; // r14d unsigned int v35; // edx unsigned int v36; // ebp long long v37; // rdx long long v38; // r9 unsigned long long v39; // r15 double v40; // xmm4_8 double v41; // xmm5_8 long long v42; // r14 bool v43; // r12 long long v44; // rcx long long v45; // r8 long long date_string; // r12 unsigned long long v47; // rcx long long v48; // rax char v50; // [rsp+0h] [rbp-A8h] double v51; // [rsp+8h] [rbp-A0h] BYREF long long v52; // [rsp+10h] [rbp-98h] double v53; // [rsp+18h] [rbp-90h] unsigned int v54; // [rsp+24h] [rbp-84h] long long v55; // [rsp+28h] [rbp-80h] _OWORD v56[3]; // [rsp+30h] [rbp-78h] BYREF long long v57; // [rsp+60h] [rbp-48h] __m128i v58[3]; // [rsp+70h] [rbp-38h] BYREF v14 = (long long)a3; v15 = a2; v16 = a1; v17 = (int)a3; v18 = 0; if ( (unsigned int)a3 != 3LL ) v18 = a4; if ( v18 != 1 ) { if ( !v18 ) { *(double *)a6.m128_u64 = (double)(int)(js__gettimeofday_us() / 1000); LABEL_30: v51 = *(double *)a6.m128_u64; goto LABEL_56; } v53 = *(double *)&a3; a6 = 0LL; v56[2] = 0LL; v56[0] = 0LL; v57 = 0LL; v56[1] = 0x3FF0000000000000uLL; v24 = 7; if ( v18 < 7 ) v24 = v18; if ( v18 <= 0 ) { LODWORD(v27) = 0; LABEL_26: if ( (_DWORD)v27 == v24 ) set_date_fields(v56, 1LL); else a6 = (__m128)_mm_loadl_epi64((const __m128i *)&qword_9E8E8); v14 = *(_QWORD *)&v53; goto LABEL_30; } v52 = a2; v55 = (unsigned int)a3; v54 = v24; v25 = v24; v26 = a5 + 2; v27 = 0LL; while ( !(unsigned int)JS_ToFloat64(a1, (double *)v58[0].m128i_i64, (_DWORD *)*(v26 - 1), *v26) ) { a6 = (__m128)_mm_loadl_epi64(v58); if ( (a6.m128_u64[0] & 0x7FFFFFFFFFFFFFFFLL) > 0x7FEFFFFFFFFFFFFFLL ) { v17 = v55; v15 = v52; v24 = v54; goto LABEL_26; } *(double *)a6.m128_u64 = trunc(a1, v58, v28); *((_QWORD *)v56 + v27) = a6.m128_u64[0]; if ( !v27 ) { a6 = (__m128)*(unsigned long long *)&v56[0]; if ( *(double *)v56 >= 0.0 ) { a7 = (__m128)0x4059000000000000uLL; if ( *(double *)v56 < 100.0 ) { *(double *)a6.m128_u64 = *(double *)v56 + 1900.0; *(double *)v56 = *(double *)v56 + 1900.0; } } } ++v27; v26 += 2; if ( v25 == v27 ) { v24 = v54; LODWORD(v27) = v54; v17 = v55; v15 = v52; goto LABEL_26; } } LABEL_61: v48 = 0LL; v47 = 0LL; return v47 | v48; } if ( a5[2] != -1 ) goto LABEL_37; v19 = *(_QWORD *)a5; v20 = 0; v21 = 1; if ( *(_WORD *)(*(_QWORD *)a5 + 6LL) == 10 ) { v22 = *(_QWORD *)(v19 + 56); if ( (_DWORD)v22 == 7 || !(_DWORD)v22 ) { if ( (unsigned int)JS_ToFloat64(a1, &v51, *(_DWORD **)(v19 + 48), v22) ) { v20 = 1; } else { a6 = (__m128)*(unsigned long long *)&v51; a8 = (__m128)0x433EB208C2DC0000uLL; if ( fabs(v51) <= 8.64e15 ) { *(double *)a6.m128_u64 = trunc(a1, &v51, v23); a7 = 0LL; *(double *)a7.m128_u64 = *(double *)a6.m128_u64 + 0.0; } else { a7 = (__m128)0x7FF8000000000000uLL; } v51 = *(double *)a7.m128_u64; v20 = 2; } v21 = 0; } } if ( v21 ) { LABEL_37: v29 = *(double **)a5; v30 = *((_QWORD *)a5 + 1); *(_QWORD *)&v56[0] = *(_QWORD *)a5; if ( (unsigned int)v30 >= 0xFFFFFFF7 ) ++**(_DWORD **)&v56[0]; *(_QWORD *)&v31 = JS_ToPrimitiveFree(a1, v29, v30, 2LL); v33 = v31; v56[0] = v31; if ( DWORD2(v31) == -7 ) { v52 = v15; v34 = v17; v53 = COERCE_DOUBLE(js_Date_parse(a1, v29, *((_QWORD *)&v31 + 1), v32, v56)); v36 = v35; a1 = *(_QWORD *)(a1 + 24); v29 = (double *)v33; JS_FreeValueRT(a1, (_DWORD *)v33, *((long long *)&v33 + 1)); v20 = 1; if ( v36 == 6 ) { v17 = v34; v15 = v52; goto LABEL_55; } if ( v36 > 2 ) { if ( v36 != 7 ) { v29 = &v51; a1 = v16; LODWORD(v31) = _JS_ToFloat64Free(v16, &v51, *(_QWORD *)&v53); v17 = v34; v15 = v52; if ( (_DWORD)v31 ) goto LABEL_55; goto LABEL_51; } v51 = v53; } else { v51 = (double)SLODWORD(v53); } v17 = v34; v15 = v52; } else if ( DWORD2(v31) > 2 ) { if ( DWORD2(v31) == 7 ) { v51 = *(double *)&v31; } else { v29 = &v51; v20 = 1; if ( (unsigned int)_JS_ToFloat64Free(a1, &v51, v31) ) goto LABEL_55; } } else { v51 = (double)(int)v31; } LABEL_51: a6 = (__m128)*(unsigned long long *)&v51; a8 = (__m128)0x433EB208C2DC0000uLL; if ( fabs(v51) <= 8.64e15 ) { *(double *)a6.m128_u64 = trunc(a1, v29, *((_QWORD *)&v31 + 1)); a7 = 0LL; *(double *)a7.m128_u64 = *(double *)a6.m128_u64 + 0.0; } else { a7 = (__m128)0x7FF8000000000000uLL; } v51 = *(double *)a7.m128_u64; v20 = 0; } LABEL_55: if ( (v20 & 1) != 0 ) goto LABEL_61; LABEL_56: v39 = js_create_from_ctor(v16, v15, v14, 10); v42 = v37; if ( (unsigned int)v37 != 6LL ) { v43 = (_DWORD)v37 == 6; JS_SetObjectData(v16, v39, v37, *(_DWORD **)&v51, 7LL, a6, a7, a8, a9, v40, v41, a12, a13, v38, v50); if ( !v43 && v17 == 3 ) { date_string = get_date_string(v16, v39, v42, v44, v45, 19LL); JS_FreeValueRT(*(_QWORD *)(v16 + 24), (_DWORD *)v39, v42); v39 = date_string; } } v47 = v39 & 0xFFFFFFFF00000000LL; v48 = (unsigned int)v39; return v47 | v48; }
js_date_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R12,R8 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV EBP,R15D XOR EAX,EAX CMP RBP,0x3 CMOVNZ EAX,ECX CMP EAX,0x1 JZ 0x00136f5f TEST EAX,EAX JNZ 0x00136fb4 CALL 0x0011c70f MOV RCX,0x20c49ba5e353f7cf IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x7 ADD RDX,RAX CVTSI2SD XMM0,RDX JMP 0x001370e4 LAB_00136f5f: CMP dword ptr [R12 + 0x8],-0x1 JNZ 0x0013713c MOV RDX,qword ptr [R12] XOR R13D,R13D MOV AL,0x1 CMP word ptr [RDX + 0x6],0xa JNZ 0x00137134 MOV RCX,qword ptr [RDX + 0x38] CMP ECX,0x7 JZ 0x00136f90 TEST ECX,ECX JNZ 0x00137134 LAB_00136f90: MOV RDX,qword ptr [RDX + 0x30] LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00127681 TEST EAX,EAX JZ 0x001370ef MOV R13D,0x1 JMP 0x00137132 LAB_00136fb4: MOV qword ptr [RSP + 0x18],R15 PXOR XMM0,XMM0 MOVDQA xmmword ptr [RSP + 0x40],XMM0 MOVDQA xmmword ptr [RSP + 0x50],XMM0 MOVDQA xmmword ptr [RSP + 0x30],XMM0 MOV qword ptr [RSP + 0x60],0x0 MOV RCX,0x3ff0000000000000 MOV qword ptr [RSP + 0x40],RCX CMP EAX,0x7 MOV ECX,0x7 CMOVL ECX,EAX TEST EAX,EAX JLE 0x001370ae MOV qword ptr [RSP + 0x10],R14 MOV qword ptr [RSP + 0x28],RBP MOV dword ptr [RSP + 0x24],ECX MOV R14D,ECX ADD R12,0x8 XOR R15D,R15D LEA R13,[RSP + 0x70] MOV RBP,0x7fefffffffffffff LAB_00137021: MOV RDX,qword ptr [R12 + -0x8] MOV RCX,qword ptr [R12] MOV RDI,RBX MOV RSI,R13 CALL 0x00127681 TEST EAX,EAX JNZ 0x00137301 MOVQ XMM0,qword ptr [RSP + 0x70] MOVQ RAX,XMM0 BTR RAX,0x3f CMP RAX,RBP JG 0x001370b3 CALL 0x0010e140 MOVQ qword ptr [RSP + R15*0x8 + 0x30],XMM0 TEST R15,R15 JNZ 0x0013708f MOVSD XMM0,qword ptr [RSP + 0x30] UCOMISD XMM0,qword ptr [0x0019e900] JC 0x0013708f MOVSD XMM1,qword ptr [0x0019e8f0] UCOMISD XMM1,XMM0 JBE 0x0013708f ADDSD XMM0,qword ptr [0x0019e8f8] MOVSD qword ptr [RSP + 0x30],XMM0 LAB_0013708f: INC R15 ADD R12,0x10 CMP R14,R15 JNZ 0x00137021 MOV ECX,dword ptr [RSP + 0x24] MOV R15D,ECX MOV RBP,qword ptr [RSP + 0x28] MOV R14,qword ptr [RSP + 0x10] JMP 0x001370c1 LAB_001370ae: XOR R15D,R15D JMP 0x001370c1 LAB_001370b3: MOV RBP,qword ptr [RSP + 0x28] MOV R14,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x24] LAB_001370c1: CMP R15D,ECX JNZ 0x001370d7 LEA RDI,[RSP + 0x30] MOV ESI,0x1 CALL 0x00156fc5 JMP 0x001370df LAB_001370d7: MOVQ XMM0,qword ptr [0x0019e8e8] LAB_001370df: MOV R15,qword ptr [RSP + 0x18] LAB_001370e4: MOVQ qword ptr [RSP + 0x8],XMM0 JMP 0x0013725f LAB_001370ef: MOVSD XMM0,qword ptr [RSP + 0x8] MOVAPD XMM1,xmmword ptr [0x0019e770] ANDPD XMM1,XMM0 MOVSD XMM2,qword ptr [0x0019e8e0] UCOMISD XMM2,XMM1 JNC 0x00137119 MOVSD XMM1,qword ptr [0x0019e8e8] JMP 0x00137126 LAB_00137119: CALL 0x0010e140 XORPD XMM1,XMM1 ADDSD XMM1,XMM0 LAB_00137126: MOVSD qword ptr [RSP + 0x8],XMM1 MOV R13D,0x2 LAB_00137132: XOR EAX,EAX LAB_00137134: TEST AL,AL JZ 0x00137255 LAB_0013713c: MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV qword ptr [RSP + 0x30],RSI CMP EDX,-0x9 JC 0x00137156 MOV RAX,qword ptr [RSP + 0x30] INC dword ptr [RAX] LAB_00137156: MOV RDI,RBX MOV ECX,0x2 CALL 0x0013dfd7 MOV R12,RAX MOV R13,RDX MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX CMP R13D,-0x7 JNZ 0x001371bd MOV qword ptr [RSP + 0x10],R14 MOV R14,RBP LEA R8,[RSP + 0x30] MOV RDI,RBX CALL 0x00157363 MOV qword ptr [RSP + 0x18],RAX MOV RBP,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R13 CALL 0x0011d8c6 MOV R13D,0x1 CMP EBP,0x6 JNZ 0x001371d3 MOV RBP,R14 MOV R14,qword ptr [RSP + 0x10] JMP 0x00137255 LAB_001371bd: CMP R13D,0x2 JA 0x001371e9 XORPS XMM0,XMM0 CVTSI2SD XMM0,R12D MOVSD qword ptr [RSP + 0x8],XMM0 JMP 0x00137215 LAB_001371d3: CMP EBP,0x2 JA 0x001371fa XORPS XMM0,XMM0 CVTSI2SD XMM0,dword ptr [RSP + 0x18] MOVSD qword ptr [RSP + 0x8],XMM0 JMP 0x0013720d LAB_001371e9: CMP R13D,0x7 JNZ 0x0013730d MOV qword ptr [RSP + 0x8],R12 JMP 0x00137215 LAB_001371fa: CMP EBP,0x7 JNZ 0x00137333 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX LAB_0013720d: MOV RBP,R14 MOV R14,qword ptr [RSP + 0x10] LAB_00137215: MOVSD XMM0,qword ptr [RSP + 0x8] MOVAPD XMM1,xmmword ptr [0x0019e770] ANDPD XMM1,XMM0 MOVSD XMM2,qword ptr [0x0019e8e0] UCOMISD XMM2,XMM1 JNC 0x0013723f MOVSD XMM1,qword ptr [0x0019e8e8] JMP 0x0013724c LAB_0013723f: CALL 0x0010e140 XORPD XMM1,XMM1 ADDSD XMM1,XMM0 LAB_0013724c: MOVSD qword ptr [RSP + 0x8],XMM1 XOR R13D,R13D LAB_00137255: TEST R13B,0x1 JNZ 0x00137301 LAB_0013725f: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV ECX,0xa CALL 0x00136d56 MOV R15,RAX MOV R14,RDX MOV EAX,R14D CMP RAX,0x6 JZ 0x001372dc CMP EAX,0x6 SETZ R12B CMP EBP,0x3 SETNZ BPL MOV RCX,qword ptr [RSP + 0x8] MOV R8D,0x7 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00136e62 OR BPL,R12B JNZ 0x001372dc MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV R9D,0x13 CALL 0x00155ec7 MOV R12,RAX MOV R13,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 MOV RDX,R14 CALL 0x0011d8c6 MOV R15,R12 MOV R14,R13 LAB_001372dc: MOV RCX,-0x100000000 AND RCX,R15 MOV EAX,R15D LAB_001372ec: OR RAX,RCX MOV RDX,R14 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00137301: MOV R14D,0x6 XOR EAX,EAX XOR ECX,ECX JMP 0x001372ec LAB_0013730d: LEA RSI,[RSP + 0x8] MOV RDI,RBX MOV RDX,R12 MOV RCX,R13 CALL 0x0013df2f MOV R13D,0x1 TEST EAX,EAX JNZ 0x00137255 JMP 0x00137215 LAB_00137333: LEA RSI,[RSP + 0x8] MOV RDI,RBX MOV RDX,qword ptr [RSP + 0x18] MOV RCX,RBP CALL 0x0013df2f TEST EAX,EAX MOV RBP,R14 MOV R14,qword ptr [RSP + 0x10] JNZ 0x00137255 JMP 0x00137215
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 [16] js_date_constructor(long param_1,int8 param_2,double param_3,ulong param_4,long *param_5) { bool bVar1; int iVar2; int iVar3; long lVar4; ulong uVar5; uint uVar6; bool bVar7; int8 uVar8; ulong uVar9; double dVar10; int1 auVar11 [16]; double local_a0; int8 local_98; double local_90; uint local_84; ulong local_80; int1 local_78 [16]; int1 local_68 [16]; int1 local_58 [16]; int8 local_48; double local_38; iVar3 = SUB84(param_3,0); uVar9 = 0; if (((ulong)param_3 & 0xffffffff) != 3) { uVar9 = param_4 & 0xffffffff; } iVar2 = (int)uVar9; if (iVar2 == 1) { if ((int)param_5[1] == -1) { lVar4 = *param_5; bVar7 = false; bVar1 = true; if ((*(short *)(lVar4 + 6) == 10) && ((iVar2 = (int)*(int8 *)(lVar4 + 0x38), iVar2 == 7 || (iVar2 == 0)))) { iVar2 = JS_ToFloat64(param_1,&local_a0,*(int8 *)(lVar4 + 0x30)); if (iVar2 == 0) { dVar10 = DAT_0019e8e8; if ((double)(_DAT_0019e770 & (ulong)local_a0) <= DAT_0019e8e0) { dVar10 = trunc(local_a0); dVar10 = dVar10 + 0.0; } bVar7 = false; local_a0 = dVar10; } else { bVar7 = true; } bVar1 = false; } if (bVar1) goto LAB_0013713c; } else { LAB_0013713c: local_78._0_8_ = *param_5; lVar4 = param_5[1]; if (0xfffffff6 < (uint)lVar4) { *(int *)local_78._0_8_ = *(int *)local_78._0_8_ + 1; } local_78 = JS_ToPrimitiveFree(param_1,local_78._0_8_,lVar4,2); uVar8 = local_78._8_8_; dVar10 = local_78._0_8_; uVar6 = local_78._8_4_; if (uVar6 == 0xfffffff9) { local_98 = param_2; auVar11 = js_Date_parse(param_1); local_90 = auVar11._0_8_; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),dVar10,uVar8); bVar7 = true; uVar6 = auVar11._8_4_; param_2 = local_98; if (uVar6 == 6) goto LAB_00137255; if (uVar6 < 3) { dVar10 = (double)local_90._0_4_; } else { if (uVar6 != 7) { iVar2 = __JS_ToFloat64Free(param_1,&local_a0,local_90,auVar11._8_8_); param_2 = local_98; goto joined_r0x00137328; } local_a0 = local_90; dVar10 = local_a0; } } else if (uVar6 < 3) { dVar10 = (double)local_78._0_4_; } else if (uVar6 != 7) { iVar2 = __JS_ToFloat64Free(param_1,&local_a0,dVar10,uVar8); joined_r0x00137328: bVar7 = true; dVar10 = local_a0; if (iVar2 != 0) goto LAB_00137255; } local_a0 = dVar10; dVar10 = DAT_0019e8e8; if ((double)(_DAT_0019e770 & (ulong)local_a0) <= DAT_0019e8e0) { dVar10 = trunc(local_a0); dVar10 = dVar10 + 0.0; } bVar7 = false; local_a0 = dVar10; } LAB_00137255: if (bVar7) { LAB_00137301: uVar8 = 6; uVar9 = 0; uVar5 = 0; goto LAB_001372ec; } } else if (iVar2 == 0) { lVar4 = js__gettimeofday_us(); local_a0 = (double)(lVar4 / 1000); } else { local_58 = (int1 [16])0x0; local_78 = (int1 [16])0x0; local_48 = 0; local_68 = ZEXT816(0x3ff0000000000000); uVar5 = 7; if (iVar2 < 7) { uVar5 = uVar9; } local_90 = param_3; if (iVar2 < 1) { uVar9 = 0; } else { local_84 = (uint)uVar5; param_5 = param_5 + 1; uVar9 = 0; local_98 = param_2; local_80 = (ulong)param_3 & 0xffffffff; do { iVar3 = JS_ToFloat64(param_1,&local_38,param_5[-1],*param_5); if (iVar3 != 0) goto LAB_00137301; if (0x7fefffffffffffff < (ulong)ABS(local_38)) { iVar3 = (int)local_80; uVar5 = (ulong)local_84; param_2 = local_98; goto LAB_001370c1; } dVar10 = trunc(local_38); *(double *)(local_78 + uVar9 * 8) = dVar10; if (((uVar9 == 0) && (_DAT_0019e900 <= (double)local_78._0_8_)) && ((double)local_78._0_8_ < DAT_0019e8f0)) { local_78._0_8_ = (double)local_78._0_8_ + _DAT_0019e8f8; } uVar9 = uVar9 + 1; param_5 = param_5 + 2; } while (uVar5 != uVar9); uVar5 = (ulong)local_84; uVar9 = (ulong)local_84; iVar3 = (int)local_80; param_2 = local_98; } LAB_001370c1: param_3 = local_90; local_a0 = DAT_0019e8e8; if ((int)uVar9 == (int)uVar5) { local_a0 = (double)set_date_fields(local_78,1); param_3 = local_90; } } auVar11 = js_create_from_ctor(param_1,param_2,param_3,10); uVar9 = auVar11._8_8_; uVar8 = auVar11._0_8_; if (((uVar9 & 0xffffffff) != 6) && (JS_SetObjectData(param_1,uVar8,uVar9,local_a0,7), iVar3 == 3 && auVar11._8_4_ != 6)) { auVar11 = get_date_string(param_1,uVar8,uVar9); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar8,uVar9); } uVar8 = auVar11._8_8_; uVar5 = auVar11._0_8_ & 0xffffffff00000000; uVar9 = auVar11._0_8_ & 0xffffffff; LAB_001372ec: auVar11._0_8_ = uVar9 | uVar5; auVar11._8_8_ = uVar8; return auVar11; }
2,813
js_date_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_date_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { // Date(y, mon, d, h, m, s, ms) JSValue rv; int i, n; double a, val; if (JS_IsUndefined(new_target)) { /* invoked as function */ argc = 0; } n = argc; if (n == 0) { val = date_now(); } else if (n == 1) { JSValue v, dv; if (JS_VALUE_GET_TAG(argv[0]) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(argv[0]); if (p->class_id == JS_CLASS_DATE && JS_IsNumber(p->u.object_data)) { if (JS_ToFloat64(ctx, &val, p->u.object_data)) return JS_EXCEPTION; val = time_clip(val); goto has_val; } } v = JS_ToPrimitive(ctx, argv[0], HINT_NONE); if (JS_IsString(v)) { dv = js_Date_parse(ctx, JS_UNDEFINED, 1, &v); JS_FreeValue(ctx, v); if (JS_IsException(dv)) return JS_EXCEPTION; if (JS_ToFloat64Free(ctx, &val, dv)) return JS_EXCEPTION; } else { if (JS_ToFloat64Free(ctx, &val, v)) return JS_EXCEPTION; } val = time_clip(val); } else { double fields[] = { 0, 0, 1, 0, 0, 0, 0 }; if (n > 7) n = 7; for(i = 0; i < n; i++) { if (JS_ToFloat64(ctx, &a, argv[i])) return JS_EXCEPTION; if (!isfinite(a)) break; fields[i] = trunc(a); if (i == 0 && fields[0] >= 0 && fields[0] < 100) fields[0] += 1900; } val = (i == n) ? set_date_fields(fields, 1) : NAN; } has_val: rv = js_create_from_ctor(ctx, new_target, JS_CLASS_DATE); if (!JS_IsException(rv)) JS_SetObjectData(ctx, rv, js_float64(val)); if (!JS_IsException(rv) && JS_IsUndefined(new_target)) { /* invoked as a function, return (new Date()).toString(); */ JSValue s; s = get_date_string(ctx, rv, 0, NULL, 0x13); JS_FreeValue(ctx, rv); rv = s; } return rv; }
O2
c
js_date_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r8, %r12 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movl %r15d, %r13d xorl %eax, %eax cmpq $0x3, %r13 cmovnel %ecx, %eax cmpl $0x1, %eax je 0x3062c testl %eax, %eax jne 0x30675 callq 0x4aa03 cvtsi2sd %rax, %xmm0 jmp 0x3081c movq 0x8(%r12), %rdx cmpl $-0x1, %edx movq %r13, 0x10(%rsp) jne 0x30765 movq (%r12), %rsi cmpw $0xa, 0x6(%rsi) jne 0x30769 movq 0x38(%rsi), %rcx cmpl $0x7, %ecx je 0x3065f testl %ecx, %ecx jne 0x30769 movq 0x30(%rsi), %rdx leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x2127f jmp 0x307d7 movq %r14, 0x20(%rsp) movq %r15, 0x28(%rsp) movq %r13, 0x10(%rsp) pxor %xmm0, %xmm0 movdqa %xmm0, 0x40(%rsp) movdqa %xmm0, 0x50(%rsp) movdqa %xmm0, 0x30(%rsp) andq $0x0, 0x60(%rsp) movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000 cmpl $0x7, %eax pushq $0x7 popq %rdx cmovll %eax, %edx movq %rcx, 0x40(%rsp) xorl %r15d, %r15d testl %edx, %edx movl $0x0, %r14d movl %edx, 0x8(%rsp) cmovgl %edx, %r14d addq $0x8, %r12 leaq 0x18(%rsp), %r13 movabsq $0x7fefffffffffffff, %rbp # imm = 0x7FEFFFFFFFFFFFFF cmpq %r15, %r14 je 0x307ef movq -0x8(%r12), %rdx movq (%r12), %rcx movq %rbx, %rdi movq %r13, %rsi callq 0x2127f testl %eax, %eax jne 0x307df movq 0x18(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax cmpq %rbp, %rax jg 0x307ec callq 0xe150 movq %xmm0, 0x30(%rsp,%r15,8) testq %r15, %r15 jne 0x30759 movsd 0x30(%rsp), %xmm0 ucomisd 0x550ed(%rip), %xmm0 # 0x85828 jb 0x30759 movsd 0x550d3(%rip), %xmm1 # 0x85818 ucomisd %xmm0, %xmm1 jbe 0x30759 addsd 0x550cd(%rip), %xmm0 # 0x85820 movsd %xmm0, 0x30(%rsp) incq %r15 addq $0x10, %r12 jmp 0x306de movq (%r12), %rsi pushq $0x2 popq %rcx movq %rbx, %rdi callq 0x21846 movq %rax, %r13 movq %rdx, %r12 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) cmpl $-0x7, %r12d jne 0x307c4 leaq 0x30(%rsp), %r8 movq %rbx, %rdi callq 0x4aa15 movq %rax, 0x8(%rsp) movq %rdx, %rbp movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1801e cmpl $0x6, %ebp je 0x307df leaq 0x18(%rsp), %rsi movq %rbx, %rdi movq 0x8(%rsp), %rdx movq %rbp, %rcx jmp 0x307d2 leaq 0x18(%rsp), %rsi movq %rbx, %rdi movq %r13, %rdx movq %r12, %rcx callq 0x21288 testl %eax, %eax je 0x308b3 pushq $0x6 popq %r14 xorl %eax, %eax xorl %ecx, %ecx jmp 0x3089e movl %r15d, %r14d cmpl 0x8(%rsp), %r14d movq 0x10(%rsp), %r13 movq 0x28(%rsp), %r15 movq 0x20(%rsp), %r14 jne 0x30814 leaq 0x30(%rsp), %rdi pushq $0x1 popq %rsi callq 0x4a7c6 jmp 0x3081c movq 0x54fb4(%rip), %xmm0 # 0x857d0 movq %xmm0, 0x8(%rsp) pushq $0xa popq %rcx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x3045a movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d je 0x3088e movq 0x8(%rsp), %xmm0 movq %xmm0, %rcx pushq $0x7 popq %r8 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x3055c cmpl $0x3, %r13d jne 0x3088e pushq $0x13 popq %r9 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x49a27 movq %rax, %r12 movq %rdx, %r13 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1801e movq %r12, %r15 movq %r13, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx movl %r15d, %eax orq %rcx, %rax movq %r14, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movsd 0x18(%rsp), %xmm0 movapd 0x54e3f(%rip), %xmm1 # 0x85700 andpd %xmm0, %xmm1 movsd 0x54f43(%rip), %xmm2 # 0x85810 ucomisd %xmm1, %xmm2 jae 0x308e3 movsd 0x54ef5(%rip), %xmm0 # 0x857d0 movsd %xmm0, 0x8(%rsp) jmp 0x308f6 callq 0xe150 xorpd %xmm1, %xmm1 addsd %xmm0, %xmm1 movsd %xmm1, 0x8(%rsp) movq 0x10(%rsp), %r13 jmp 0x30822
js_date_constructor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r12, r8 mov r15, rdx mov r14, rsi mov rbx, rdi mov r13d, r15d xor eax, eax cmp r13, 3 cmovnz eax, ecx cmp eax, 1 jz short loc_3062C test eax, eax jnz short loc_30675 call date_now cvtsi2sd xmm0, rax jmp loc_3081C loc_3062C: mov rdx, [r12+8] cmp edx, 0FFFFFFFFh mov [rsp+98h+var_88], r13 jnz loc_30765 mov rsi, [r12] cmp word ptr [rsi+6], 0Ah jnz loc_30769 mov rcx, [rsi+38h] cmp ecx, 7 jz short loc_3065F test ecx, ecx jnz loc_30769 loc_3065F: mov rdx, [rsi+30h] lea rsi, [rsp+98h+var_80] mov rdi, rbx call JS_ToFloat64 jmp loc_307D7 loc_30675: mov [rsp+98h+var_78], r14 mov [rsp+98h+var_70], r15 mov [rsp+98h+var_88], r13 pxor xmm0, xmm0 movdqa [rsp+98h+var_58], xmm0 movdqa [rsp+98h+var_48], xmm0 movdqa [rsp+98h+var_68], xmm0 and [rsp+98h+var_38], 0 mov rcx, 3FF0000000000000h cmp eax, 7 push 7 pop rdx cmovl edx, eax mov qword ptr [rsp+98h+var_58], rcx xor r15d, r15d test edx, edx mov r14d, 0 mov dword ptr [rsp+98h+var_90], edx cmovg r14d, edx add r12, 8 lea r13, [rsp+98h+var_80] mov rbp, 7FEFFFFFFFFFFFFFh loc_306DE: cmp r14, r15 jz loc_307EF mov rdx, [r12-8] mov rcx, [r12] mov rdi, rbx mov rsi, r13 call JS_ToFloat64 test eax, eax jnz loc_307DF movq xmm0, [rsp+98h+var_80] movq rax, xmm0 btr rax, 3Fh ; '?' cmp rax, rbp jg loc_307EC call _trunc movq qword ptr [rsp+r15*8+98h+var_68], xmm0 test r15, r15 jnz short loc_30759 movsd xmm0, qword ptr [rsp+98h+var_68] ucomisd xmm0, cs:qword_85828 jb short loc_30759 movsd xmm1, cs:qword_85818 ucomisd xmm1, xmm0 jbe short loc_30759 addsd xmm0, cs:qword_85820 movsd qword ptr [rsp+98h+var_68], xmm0 loc_30759: inc r15 add r12, 10h jmp loc_306DE loc_30765: mov rsi, [r12] loc_30769: push 2 pop rcx mov rdi, rbx call JS_ToPrimitive mov r13, rax mov r12, rdx mov qword ptr [rsp+98h+var_68], rax mov qword ptr [rsp+98h+var_68+8], rdx cmp r12d, 0FFFFFFF9h jnz short loc_307C4 lea r8, [rsp+98h+var_68] mov rdi, rbx call js_Date_parse mov [rsp+98h+var_90], rax mov rbp, rdx mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_FreeValue cmp ebp, 6 jz short loc_307DF lea rsi, [rsp+98h+var_80] mov rdi, rbx mov rdx, [rsp+98h+var_90] mov rcx, rbp jmp short loc_307D2 loc_307C4: lea rsi, [rsp+98h+var_80] mov rdi, rbx mov rdx, r13 mov rcx, r12 loc_307D2: call JS_ToFloat64Free loc_307D7: test eax, eax jz loc_308B3 loc_307DF: push 6 pop r14 xor eax, eax xor ecx, ecx jmp loc_3089E loc_307EC: mov r14d, r15d loc_307EF: cmp r14d, dword ptr [rsp+98h+var_90] mov r13, [rsp+98h+var_88] mov r15, [rsp+98h+var_70] mov r14, [rsp+98h+var_78] jnz short loc_30814 lea rdi, [rsp+98h+var_68] push 1 pop rsi call set_date_fields jmp short loc_3081C loc_30814: movq xmm0, cs:qword_857D0 loc_3081C: movq [rsp+98h+var_90], xmm0 loc_30822: push 0Ah pop rcx mov rdi, rbx mov rsi, r14 mov rdx, r15 call js_create_from_ctor mov r15, rax mov r14, rdx cmp r14d, 6 jz short loc_3088E movq xmm0, [rsp+98h+var_90] movq rcx, xmm0 push 7 pop r8 mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_SetObjectData cmp r13d, 3 jnz short loc_3088E push 13h pop r9 mov rdi, rbx mov rsi, r15 mov rdx, r14 call get_date_string mov r12, rax mov r13, rdx mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue mov r15, r12 mov r14, r13 loc_3088E: mov rcx, 0FFFFFFFF00000000h and rcx, r15 mov eax, r15d loc_3089E: or rax, rcx mov rdx, r14 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_308B3: movsd xmm0, [rsp+98h+var_80] movapd xmm1, cs:xmmword_85700 andpd xmm1, xmm0 movsd xmm2, cs:qword_85810 ucomisd xmm2, xmm1 jnb short loc_308E3 movsd xmm0, cs:qword_857D0 movsd [rsp+98h+var_90], xmm0 jmp short loc_308F6 loc_308E3: call _trunc xorpd xmm1, xmm1 addsd xmm1, xmm0 movsd [rsp+98h+var_90], xmm1 loc_308F6: mov r13, [rsp+98h+var_88] jmp loc_30822
unsigned long long js_date_constructor( const char *a1, long long a2, long long a3, int a4, long long *a5, double a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // r15 long long v14; // r14 long long v15; // r13 int v16; // eax double v17; // xmm0_8 long long v18; // rdx long long v19; // rsi long long v20; // rcx int v21; // eax long long v22; // rcx long long v23; // rdx long long v24; // r15 long long v25; // r14 long long *v26; // r12 __int128 v27; // rax long long v28; // rcx __int128 v29; // kr00_16 long long v30; // rdx long long v31; // rbp long long v32; // rdx long long v33; // rcx long long v34; // rax unsigned long long v35; // rcx bool v36; // zf unsigned long long v37; // rax long long v38; // rdx long long v39; // r9 double v40; // xmm4_8 double v41; // xmm5_8 long long v42; // r15 long long v43; // r14 __m128 v44; // xmm0 long long v45; // rcx long long v46; // r8 long long date_string; // r12 char v49; // [rsp+0h] [rbp-98h] __m128i v50; // [rsp+8h] [rbp-90h] BYREF double v51; // [rsp+18h] [rbp-80h] BYREF long long v52; // [rsp+20h] [rbp-78h] long long v53; // [rsp+28h] [rbp-70h] __int128 v54; // [rsp+30h] [rbp-68h] BYREF __int128 v55; // [rsp+40h] [rbp-58h] __int128 v56; // [rsp+50h] [rbp-48h] long long v57; // [rsp+60h] [rbp-38h] v13 = a3; v14 = a2; v15 = (unsigned int)a3; v16 = 0; if ( (unsigned int)a3 != 3LL ) v16 = a4; if ( v16 != 1 ) { if ( v16 ) { v52 = a2; v53 = a3; v50.m128i_i64[1] = (unsigned int)a3; v17 = 0.0; v55 = 0LL; v56 = 0LL; v54 = 0LL; v57 = 0LL; v22 = 0x3FF0000000000000LL; v23 = 7LL; if ( v16 < 7 ) v23 = (unsigned int)v16; *(_QWORD *)&v55 = 0x3FF0000000000000LL; v24 = 0LL; v25 = 0LL; v50.m128i_i32[0] = v23; if ( (int)v23 > 0 ) v25 = (unsigned int)v23; v26 = a5 + 1; while ( v25 != v24 ) { if ( (unsigned int)JS_ToFloat64((long long)a1, (long long)&v51, (_DWORD *)*(v26 - 1), *v26) ) goto LABEL_31; v17 = v51; if ( (*(_QWORD *)&v51 & 0x7FFFFFFFFFFFFFFFuLL) > 0x7FEFFFFFFFFFFFFFLL ) { LODWORD(v25) = v24; break; } v17 = trunc(); *((double *)&v54 + v24) = v17; if ( !v24 ) { v17 = *(double *)&v54; if ( *(double *)&v54 >= 0.0 ) { a7 = (__m128)0x4059000000000000uLL; if ( *(double *)&v54 < 100.0 ) { v17 = *(double *)&v54 + 1900.0; *(double *)&v54 = *(double *)&v54 + 1900.0; } } } ++v24; v26 += 2; } v36 = (_DWORD)v25 == v50.m128i_i32[0]; LODWORD(v15) = v50.m128i_i32[2]; v13 = v53; v14 = v52; if ( v36 ) set_date_fields(&v54, 1LL, v23, v22); else v17 = NAN; } else { v17 = (double)(int)date_now(); } *(double *)v50.m128i_i64 = v17; goto LABEL_37; } v18 = a5[1]; v50.m128i_i64[1] = v15; if ( (_DWORD)v18 == -1 ) { v19 = *a5; if ( *(_WORD *)(*a5 + 6) == 10 ) { v20 = *(_QWORD *)(v19 + 56); if ( (_DWORD)v20 == 7 || !(_DWORD)v20 ) { v21 = JS_ToFloat64((long long)a1, (long long)&v51, *(_DWORD **)(v19 + 48), v20); goto LABEL_30; } } } else { v19 = *a5; } *(_QWORD *)&v27 = JS_ToPrimitive((long long)a1, (_DWORD *)v19, v18); v29 = v27; v54 = v27; if ( DWORD2(v27) == -7 ) { v50.m128i_i64[0] = js_Date_parse(a1, v19, *((_QWORD *)&v27 + 1), v28, &v54); v31 = v30; JS_FreeValue((long long)a1, v29, *((long long *)&v29 + 1)); if ( (_DWORD)v31 == 6 ) { LABEL_31: v34 = 0LL; v35 = 0LL; return v35 | v34; } v32 = v50.m128i_i64[0]; v33 = v31; } else { v32 = v27; v33 = *((_QWORD *)&v29 + 1); } v21 = JS_ToFloat64Free(a1, &v51, v32, v33); LABEL_30: if ( v21 ) goto LABEL_31; a7 = (__m128)_mm_and_pd((__m128d)xmmword_85700, (__m128d)*(unsigned long long *)&v51); a8 = (__m128)0x433EB208C2DC0000uLL; if ( *(double *)a7.m128_u64 <= 8.64e15 ) { a7 = 0LL; *(double *)a7.m128_u64 = trunc() + 0.0; v50.m128i_i64[0] = a7.m128_u64[0]; } else { v50.m128i_i64[0] = 0x7FF8000000000000LL; } LODWORD(v15) = v50.m128i_i32[2]; LABEL_37: v37 = js_create_from_ctor((long long)a1, v14, v13, 10); v42 = v37; v43 = v38; if ( (_DWORD)v38 != 6 ) { v44 = (__m128)_mm_loadl_epi64(&v50); JS_SetObjectData((long long)a1, v37, v38, v44.m128_i64[0], 7LL, v44, a7, a8, a9, v40, v41, a12, a13, v39, v49); if ( (_DWORD)v15 == 3 ) { date_string = get_date_string(a1, v42, v43, v45, v46, 19LL); JS_FreeValue((long long)a1, v42, v43); v42 = date_string; } } v35 = v42 & 0xFFFFFFFF00000000LL; v34 = (unsigned int)v42; return v35 | v34; }
js_date_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R12,R8 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R13D,R15D XOR EAX,EAX CMP R13,0x3 CMOVNZ EAX,ECX CMP EAX,0x1 JZ 0x0013062c TEST EAX,EAX JNZ 0x00130675 CALL 0x0014aa03 CVTSI2SD XMM0,RAX JMP 0x0013081c LAB_0013062c: MOV RDX,qword ptr [R12 + 0x8] CMP EDX,-0x1 MOV qword ptr [RSP + 0x10],R13 JNZ 0x00130765 MOV RSI,qword ptr [R12] CMP word ptr [RSI + 0x6],0xa JNZ 0x00130769 MOV RCX,qword ptr [RSI + 0x38] CMP ECX,0x7 JZ 0x0013065f TEST ECX,ECX JNZ 0x00130769 LAB_0013065f: MOV RDX,qword ptr [RSI + 0x30] LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x0012127f JMP 0x001307d7 LAB_00130675: MOV qword ptr [RSP + 0x20],R14 MOV qword ptr [RSP + 0x28],R15 MOV qword ptr [RSP + 0x10],R13 PXOR XMM0,XMM0 MOVDQA xmmword ptr [RSP + 0x40],XMM0 MOVDQA xmmword ptr [RSP + 0x50],XMM0 MOVDQA xmmword ptr [RSP + 0x30],XMM0 AND qword ptr [RSP + 0x60],0x0 MOV RCX,0x3ff0000000000000 CMP EAX,0x7 PUSH 0x7 POP RDX CMOVL EDX,EAX MOV qword ptr [RSP + 0x40],RCX XOR R15D,R15D TEST EDX,EDX MOV R14D,0x0 MOV dword ptr [RSP + 0x8],EDX CMOVG R14D,EDX ADD R12,0x8 LEA R13,[RSP + 0x18] MOV RBP,0x7fefffffffffffff LAB_001306de: CMP R14,R15 JZ 0x001307ef MOV RDX,qword ptr [R12 + -0x8] MOV RCX,qword ptr [R12] MOV RDI,RBX MOV RSI,R13 CALL 0x0012127f TEST EAX,EAX JNZ 0x001307df MOVQ XMM0,qword ptr [RSP + 0x18] MOVQ RAX,XMM0 BTR RAX,0x3f CMP RAX,RBP JG 0x001307ec CALL 0x0010e150 MOVQ qword ptr [RSP + R15*0x8 + 0x30],XMM0 TEST R15,R15 JNZ 0x00130759 MOVSD XMM0,qword ptr [RSP + 0x30] UCOMISD XMM0,qword ptr [0x00185828] JC 0x00130759 MOVSD XMM1,qword ptr [0x00185818] UCOMISD XMM1,XMM0 JBE 0x00130759 ADDSD XMM0,qword ptr [0x00185820] MOVSD qword ptr [RSP + 0x30],XMM0 LAB_00130759: INC R15 ADD R12,0x10 JMP 0x001306de LAB_00130765: MOV RSI,qword ptr [R12] LAB_00130769: PUSH 0x2 POP RCX MOV RDI,RBX CALL 0x00121846 MOV R13,RAX MOV R12,RDX MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX CMP R12D,-0x7 JNZ 0x001307c4 LEA R8,[RSP + 0x30] MOV RDI,RBX CALL 0x0014aa15 MOV qword ptr [RSP + 0x8],RAX MOV RBP,RDX MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x0011801e CMP EBP,0x6 JZ 0x001307df LEA RSI,[RSP + 0x18] MOV RDI,RBX MOV RDX,qword ptr [RSP + 0x8] MOV RCX,RBP JMP 0x001307d2 LAB_001307c4: LEA RSI,[RSP + 0x18] MOV RDI,RBX MOV RDX,R13 MOV RCX,R12 LAB_001307d2: CALL 0x00121288 LAB_001307d7: TEST EAX,EAX JZ 0x001308b3 LAB_001307df: PUSH 0x6 POP R14 XOR EAX,EAX XOR ECX,ECX JMP 0x0013089e LAB_001307ec: MOV R14D,R15D LAB_001307ef: CMP R14D,dword ptr [RSP + 0x8] MOV R13,qword ptr [RSP + 0x10] MOV R15,qword ptr [RSP + 0x28] MOV R14,qword ptr [RSP + 0x20] JNZ 0x00130814 LEA RDI,[RSP + 0x30] PUSH 0x1 POP RSI CALL 0x0014a7c6 JMP 0x0013081c LAB_00130814: MOVQ XMM0,qword ptr [0x001857d0] LAB_0013081c: MOVQ qword ptr [RSP + 0x8],XMM0 LAB_00130822: PUSH 0xa POP RCX MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0013045a MOV R15,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x0013088e MOVQ XMM0,qword ptr [RSP + 0x8] MOVQ RCX,XMM0 PUSH 0x7 POP R8 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0013055c CMP R13D,0x3 JNZ 0x0013088e PUSH 0x13 POP R9 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00149a27 MOV R12,RAX MOV R13,RDX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011801e MOV R15,R12 MOV R14,R13 LAB_0013088e: MOV RCX,-0x100000000 AND RCX,R15 MOV EAX,R15D LAB_0013089e: OR RAX,RCX MOV RDX,R14 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001308b3: MOVSD XMM0,qword ptr [RSP + 0x18] MOVAPD XMM1,xmmword ptr [0x00185700] ANDPD XMM1,XMM0 MOVSD XMM2,qword ptr [0x00185810] UCOMISD XMM2,XMM1 JNC 0x001308e3 MOVSD XMM0,qword ptr [0x001857d0] MOVSD qword ptr [RSP + 0x8],XMM0 JMP 0x001308f6 LAB_001308e3: CALL 0x0010e150 XORPD XMM1,XMM1 ADDSD XMM1,XMM0 MOVSD qword ptr [RSP + 0x8],XMM1 LAB_001308f6: MOV R13,qword ptr [RSP + 0x10] JMP 0x00130822
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 [16] js_date_constructor(int8 param_1,int8 param_2,ulong param_3,uint param_4,long *param_5) { uint uVar1; int iVar2; long lVar3; ulong uVar4; uint uVar5; int8 uVar6; int iVar7; ulong uVar8; int8 uVar9; double dVar10; int1 auVar11 [16]; double local_90; double local_80; int8 local_78; ulong local_70; int1 local_68 [16]; int1 local_58 [16]; int1 local_48 [16]; int8 local_38; uVar1 = 0; if ((param_3 & 0xffffffff) != 3) { uVar1 = param_4; } iVar7 = (int)param_3; if (uVar1 == 1) { if ((int)param_5[1] == -1) { lVar3 = *param_5; if ((*(short *)(lVar3 + 6) != 10) || ((iVar2 = (int)*(int8 *)(lVar3 + 0x38), iVar2 != 7 && (iVar2 != 0)))) goto LAB_00130769; iVar2 = JS_ToFloat64(param_1,&local_80,*(int8 *)(lVar3 + 0x30)); LAB_001307d7: if (iVar2 == 0) { if ((double)(_DAT_00185700 & (ulong)local_80) <= DAT_00185810) { local_90 = trunc(local_80); local_90 = local_90 + 0.0; } else { local_90 = DAT_001857d0; } goto LAB_00130822; } } else { lVar3 = *param_5; LAB_00130769: local_68 = JS_ToPrimitive(param_1,lVar3,param_5[1],2); uVar6 = local_68._8_8_; uVar9 = local_68._0_8_; auVar11 = local_68; if (local_68._8_4_ != -7) { LAB_001307d2: iVar2 = JS_ToFloat64Free(param_1,&local_80,auVar11._0_8_,auVar11._8_8_); goto LAB_001307d7; } auVar11 = js_Date_parse(param_1); JS_FreeValue(param_1,uVar9,uVar6); if (auVar11._8_4_ != 6) goto LAB_001307d2; } LAB_001307df: uVar9 = 6; uVar8 = 0; uVar4 = 0; } else { if (uVar1 == 0) { lVar3 = date_now(); local_90 = (double)lVar3; } else { local_48 = (int1 [16])0x0; local_68 = (int1 [16])0x0; local_38 = 0; uVar5 = 7; if ((int)uVar1 < 7) { uVar5 = uVar1; } local_58 = ZEXT816(0x3ff0000000000000); uVar4 = 0; uVar8 = 0; if (0 < (int)uVar5) { uVar8 = (ulong)uVar5; } param_5 = param_5 + 1; local_78 = param_2; local_70 = param_3; for (; uVar8 != uVar4; uVar4 = uVar4 + 1) { iVar2 = JS_ToFloat64(param_1,&local_80,param_5[-1],*param_5); if (iVar2 != 0) goto LAB_001307df; if (0x7fefffffffffffff < (ulong)ABS(local_80)) { uVar8 = uVar4 & 0xffffffff; break; } dVar10 = trunc(local_80); *(double *)(local_68 + uVar4 * 8) = dVar10; if (((uVar4 == 0) && (_DAT_00185828 <= (double)local_68._0_8_)) && ((double)local_68._0_8_ < DAT_00185818)) { local_68._0_8_ = (double)local_68._0_8_ + _DAT_00185820; } param_5 = param_5 + 2; } param_3 = local_70; param_2 = local_78; local_90 = DAT_001857d0; if ((uint)uVar8 == uVar5) { local_90 = (double)set_date_fields(local_68,1); } } LAB_00130822: auVar11 = js_create_from_ctor(param_1,param_2,param_3,10); uVar6 = auVar11._8_8_; uVar9 = auVar11._0_8_; if ((auVar11._8_4_ != 6) && (JS_SetObjectData(param_1,uVar9,uVar6,local_90,7), iVar7 == 3)) { auVar11 = get_date_string(param_1,uVar9,uVar6); JS_FreeValue(param_1,uVar9,uVar6); } uVar9 = auVar11._8_8_; uVar4 = auVar11._0_8_ & 0xffffffff00000000; uVar8 = auVar11._0_8_ & 0xffffffff; } auVar11._0_8_ = uVar8 | uVar4; auVar11._8_8_ = uVar9; return auVar11; }
2,814
ma_remove_not_visible_states
eloqsql/storage/maria/ma_state.c
MARIA_STATE_HISTORY *_ma_remove_not_visible_states(MARIA_STATE_HISTORY *org_history, my_bool all, my_bool trnman_is_locked) { TrID last_trid; MARIA_STATE_HISTORY *history, **parent, *next; DBUG_ENTER("_ma_remove_not_visible_states"); if (!org_history) DBUG_RETURN(0); /* Not versioned table */ last_trid= org_history->trid; parent= &org_history->next; for (history= org_history->next; history; history= next) { next= history->next; if (!trnman_exists_active_transactions(history->trid, last_trid, trnman_is_locked)) { DBUG_PRINT("info", ("removing history->trid: %lu next: %lu", (ulong) history->trid, (ulong) last_trid)); my_free(history); continue; } *parent= history; parent= &history->next; last_trid= history->trid; } *parent= 0; if (all && parent == &org_history->next) { /* There is only one state left. Delete this if it's visible for all */ if (last_trid < trnman_get_min_trid()) { my_free(org_history); org_history= 0; } } DBUG_RETURN(org_history); }
O3
c
ma_remove_not_visible_states: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testq %rdi, %rdi je 0x384c3 movl %esi, -0x2c(%rbp) movq (%rdi), %r13 movq 0x8(%rdi), %r14 testq %r13, %r13 movq %rdi, -0x38(%rbp) je 0x3848f movsbl %dl, %r12d movq %rdi, %rbx movq (%r13), %r15 movq 0x8(%r13), %rdi movq %r14, %rsi movl %r12d, %edx callq 0x47641 testb %al, %al je 0x3847d movq %r13, (%rbx) movq 0x8(%r13), %r14 movq %r13, %rbx jmp 0x38485 movq %r13, %rdi callq 0x9ffde movq %r15, %r13 testq %r15, %r15 jne 0x3845a jmp 0x38492 movq %rdi, %rbx movq $0x0, (%rbx) cmpb $0x0, -0x2c(%rbp) sete %al movq -0x38(%rbp), %rcx cmpq %rcx, %rbx movq %rcx, %rbx setne %cl orb %al, %cl jne 0x384c5 callq 0x47556 cmpq %rax, %r14 jae 0x384c5 movq %rbx, %rdi callq 0x9ffde xorl %ebx, %ebx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_remove_not_visible_states: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test rdi, rdi jz loc_384C3 mov [rbp+var_2C], esi mov r13, [rdi] mov r14, [rdi+8] test r13, r13 mov [rbp+var_38], rdi jz short loc_3848F movsx r12d, dl mov rbx, rdi loc_3845A: mov r15, [r13+0] mov rdi, [r13+8] mov rsi, r14 mov edx, r12d call trnman_exists_active_transactions test al, al jz short loc_3847D mov [rbx], r13 mov r14, [r13+8] mov rbx, r13 jmp short loc_38485 loc_3847D: mov rdi, r13 call my_free loc_38485: mov r13, r15 test r15, r15 jnz short loc_3845A jmp short loc_38492 loc_3848F: mov rbx, rdi loc_38492: mov qword ptr [rbx], 0 cmp byte ptr [rbp+var_2C], 0 setz al mov rcx, [rbp+var_38] cmp rbx, rcx mov rbx, rcx setnz cl or cl, al jnz short loc_384C5 call trnman_get_min_trid cmp r14, rax jnb short loc_384C5 mov rdi, rbx call my_free loc_384C3: xor ebx, ebx loc_384C5: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * ma_remove_not_visible_states(_QWORD *a1, char a2, char a3) { _QWORD *v3; // r13 unsigned long long v4; // r14 unsigned int v5; // r12d _QWORD *v6; // rbx _QWORD *v7; // r15 bool v8; // zf _QWORD *v9; // rbx _QWORD *v11; // [rsp+8h] [rbp-38h] if ( !a1 ) return 0LL; v3 = (_QWORD *)*a1; v4 = a1[1]; v11 = a1; if ( *a1 ) { v5 = a3; v6 = a1; do { v7 = (_QWORD *)*v3; a1 = (_QWORD *)v3[1]; if ( (unsigned __int8)trnman_exists_active_transactions(a1, v4, v5) ) { *v6 = v3; v4 = v3[1]; v6 = v3; } else { a1 = v3; my_free(v3); } v3 = v7; } while ( v7 ); } else { v6 = a1; } *v6 = 0LL; v8 = v6 == v11; v9 = v11; if ( a2 != 0 && v8 && v4 < trnman_get_min_trid(a1) ) { my_free(v11); return 0LL; } return v9; }
_ma_remove_not_visible_states: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST RDI,RDI JZ 0x001384c3 MOV dword ptr [RBP + -0x2c],ESI MOV R13,qword ptr [RDI] MOV R14,qword ptr [RDI + 0x8] TEST R13,R13 MOV qword ptr [RBP + -0x38],RDI JZ 0x0013848f MOVSX R12D,DL MOV RBX,RDI LAB_0013845a: MOV R15,qword ptr [R13] MOV RDI,qword ptr [R13 + 0x8] MOV RSI,R14 MOV EDX,R12D CALL 0x00147641 TEST AL,AL JZ 0x0013847d MOV qword ptr [RBX],R13 MOV R14,qword ptr [R13 + 0x8] MOV RBX,R13 JMP 0x00138485 LAB_0013847d: MOV RDI,R13 CALL 0x0019ffde LAB_00138485: MOV R13,R15 TEST R15,R15 JNZ 0x0013845a JMP 0x00138492 LAB_0013848f: MOV RBX,RDI LAB_00138492: MOV qword ptr [RBX],0x0 CMP byte ptr [RBP + -0x2c],0x0 SETZ AL MOV RCX,qword ptr [RBP + -0x38] CMP RBX,RCX MOV RBX,RCX SETNZ CL OR CL,AL JNZ 0x001384c5 CALL 0x00147556 CMP R14,RAX JNC 0x001384c5 MOV RDI,RBX CALL 0x0019ffde LAB_001384c3: XOR EBX,EBX LAB_001384c5: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * _ma_remove_not_visible_states(int8 *param_1,char param_2,char param_3) { int8 *puVar1; char cVar2; ulong uVar3; int8 *puVar4; int8 *puVar5; ulong uVar6; if (param_1 != (int8 *)0x0) { uVar6 = param_1[1]; puVar4 = param_1; if ((int8 *)*param_1 != (int8 *)0x0) { puVar5 = (int8 *)*param_1; do { puVar1 = (int8 *)*puVar5; cVar2 = trnman_exists_active_transactions(puVar5[1],uVar6,(int)param_3); if (cVar2 == '\0') { my_free(puVar5); } else { *puVar4 = puVar5; uVar6 = puVar5[1]; puVar4 = puVar5; } puVar5 = puVar1; } while (puVar1 != (int8 *)0x0); } *puVar4 = 0; if (puVar4 != param_1 || param_2 == '\0') { return param_1; } uVar3 = trnman_get_min_trid(); if (uVar3 <= uVar6) { return param_1; } my_free(param_1); } return (int8 *)0x0; }
2,815
my_wildcmp_unicode_impl
eloqsql/strings/ctype-utf8.c
static int my_wildcmp_unicode_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, MY_UNICASE_INFO *weights, int recurse_level) { int result= -1; /* Not found, using wildcards */ my_wc_t s_wc, w_wc; int scan; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (1) { my_bool escaped= 0; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; if (w_wc == (my_wc_t) w_many) { result= 1; /* Found an anchor char */ break; } wildstr+= scan; if (w_wc == (my_wc_t) escape && wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; escaped= 1; } if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; str+= scan; if (!escaped && w_wc == (my_wc_t) w_one) { result= 1; /* Found an anchor char */ } else { if (weights) { my_tosort_unicode(weights, &s_wc, cs->state); my_tosort_unicode(weights, &w_wc, cs->state); } if (s_wc != w_wc) return 1; /* No match */ } if (wildstr == wildend) return (str != str_end); /* Match if both are at end */ } if (w_wc == (my_wc_t) w_many) { /* Found w_many */ /* Remove any '%' and '_' from the wild search string */ for ( ; wildstr != wildend ; ) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; if (w_wc == (my_wc_t) w_many) { wildstr+= scan; continue; } if (w_wc == (my_wc_t) w_one) { wildstr+= scan; if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; str+= scan; continue; } break; /* Not a wild character */ } if (wildstr == wildend) return 0; /* Ok if w_many is last */ if (str == str_end) return -1; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; if (w_wc == (my_wc_t) escape) { if (wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; } } while (1) { /* Skip until the first character from wildstr is found */ while (str != str_end) { if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; if (weights) { my_tosort_unicode(weights, &s_wc, cs->state); my_tosort_unicode(weights, &w_wc, cs->state); } if (s_wc == w_wc) break; str+= scan; } if (str == str_end) return -1; str+= scan; result= my_wildcmp_unicode_impl(cs, str, str_end, wildstr, wildend, escape, w_one, w_many, weights, recurse_level + 1); if (result <= 0) return result; } } } return (str != str_end ? 1 : 0); }
O3
c
my_wildcmp_unicode_impl: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, -0x54(%rbp) movq %r8, %r12 movq %rcx, %r13 movq %rdx, -0x50(%rbp) movq %rsi, -0x38(%rbp) movq %rdi, %r15 movl 0x28(%rbp), %eax movq %rax, -0x60(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) leaq 0x36c41f(%rip), %rax # 0x3da478 movq (%rax), %rax testq %rax, %rax je 0x6e073 movl 0x28(%rbp), %edi callq *%rax movl $0x1, %ebx testl %eax, %eax jne 0x6e403 cmpq %r12, %r13 je 0x6e202 movl 0x18(%rbp), %eax movl 0x10(%rbp), %ecx cltq movq %rax, -0x78(%rbp) movslq -0x54(%rbp), %rax movq %rax, -0x70(%rbp) movslq %ecx, %rax movq %rax, -0x68(%rbp) movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx movq -0x40(%rbp), %r14 callq *%r14 testl %eax, %eax jle 0x6e3fe movq -0x30(%rbp), %rcx cmpq -0x78(%rbp), %rcx je 0x6e214 movl %eax, %eax addq %rax, %r13 cmpq -0x70(%rbp), %rcx jne 0x6e11a cmpq %r12, %r13 jae 0x6e11a movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0x6e3fe movl %eax, %ebx movq %r15, %rdi leaq -0x48(%rbp), %rsi movq %r14, %rax movq -0x38(%rbp), %r14 movq %r14, %rdx movq -0x50(%rbp), %rcx callq *%rax testl %eax, %eax jle 0x6e3fe movl %ebx, %ecx addq %rcx, %r13 movl %eax, %eax addq %rax, %r14 movq %r14, -0x38(%rbp) jmp 0x6e14e movq %r15, %rdi leaq -0x48(%rbp), %rsi movq -0x38(%rbp), %rbx movq %rbx, %rdx movq -0x50(%rbp), %rcx callq *%r14 testl %eax, %eax jle 0x6e3fe movl %eax, %eax addq %rax, %rbx movq %rbx, -0x38(%rbp) movq -0x68(%rbp), %rax cmpq %rax, -0x30(%rbp) je 0x6e1f9 movq -0x48(%rbp), %rax movq 0x20(%rbp), %r8 testq %r8, %r8 je 0x6e1e7 movl 0xc(%r15), %ecx movq (%r8), %rdx movl $0xfffd, %esi # imm = 0xFFFD cmpq %rdx, %rax ja 0x6e19c movq 0x8(%r8), %rsi movq %rax, %rdi shrq $0x8, %rdi movq (%rsi,%rdi,8), %rsi testq %rsi, %rsi je 0x6e1a3 xorl %edi, %edi testw %cx, %cx setns %dil movzbl %al, %eax leaq (%rax,%rax,2), %rax leaq (%rsi,%rax,4), %rax movl 0x4(%rax,%rdi,4), %esi movq %rsi, -0x48(%rbp) movq %rsi, %rax movq -0x30(%rbp), %rsi movl $0xfffd, %edi # imm = 0xFFFD cmpq %rdx, %rsi ja 0x6e1de movq 0x8(%r8), %rdx movq %rsi, %rdi shrq $0x8, %rdi movq (%rdx,%rdi,8), %rdx testq %rdx, %rdx je 0x6e1eb xorl %edi, %edi testw %cx, %cx setns %dil movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx leaq (%rdx,%rcx,4), %rcx movl 0x4(%rcx,%rdi,4), %edi movq %rdi, -0x30(%rbp) movq %rdi, %rsi jmp 0x6e1eb movq -0x30(%rbp), %rsi movl $0x1, %ebx cmpq %rsi, %rax jne 0x6e403 cmpq %r12, %r13 jne 0x6e097 xorl %ebx, %ebx movq -0x50(%rbp), %rax cmpq %rax, -0x38(%rbp) setne %bl jmp 0x6e403 xorl %ebx, %ebx cmpq %r12, %r13 je 0x6e403 movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0x6e3fe movl %eax, %r14d movq -0x30(%rbp), %rax cmpq -0x78(%rbp), %rax jne 0x6e258 movl %r14d, %eax addq %rax, %r13 cmpq %r12, %r13 movq -0x40(%rbp), %r14 jne 0x6e21f jmp 0x6e403 cmpq -0x68(%rbp), %rax jne 0x6e286 movq %r15, %rdi leaq -0x48(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x50(%rbp), %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0x6e3fe movl %r14d, %ecx addq %rcx, %r13 movl %eax, %eax addq %rax, -0x38(%rbp) jmp 0x6e24a movq -0x50(%rbp), %r14 cmpq %r14, -0x38(%rbp) je 0x6e414 leaq -0x30(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0x6e3fe movl %eax, %eax addq %rax, %r13 movq -0x70(%rbp), %rax cmpq %rax, -0x30(%rbp) jne 0x6e2dd cmpq %r12, %r13 jae 0x6e2dd leaq -0x30(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0x6e3fe movl %eax, %eax addq %rax, %r13 movq -0x60(%rbp), %rax incl %eax movq %rax, -0x60(%rbp) movq -0x38(%rbp), %rbx cmpq %r14, %rbx je 0x6e414 movq %r15, %rdi leaq -0x48(%rbp), %rsi movq %rbx, %rdx movq %r14, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0x6e3fe movq -0x48(%rbp), %rcx movq 0x20(%rbp), %rsi testq %rsi, %rsi je 0x6e3b2 movl 0xc(%r15), %edx movq (%rsi), %rsi movl $0xfffd, %edi # imm = 0xFFFD cmpq %rsi, %rcx ja 0x6e360 movq 0x20(%rbp), %rdi movq 0x8(%rdi), %rdi movq %rcx, %r8 shrq $0x8, %r8 movq (%rdi,%r8,8), %rdi testq %rdi, %rdi je 0x6e367 xorl %r8d, %r8d testw %dx, %dx setns %r8b movzbl %cl, %ecx leaq (%rcx,%rcx,2), %rcx leaq (%rdi,%rcx,4), %rcx movl 0x4(%rcx,%r8,4), %edi movq %rdi, -0x48(%rbp) movq %rdi, %rcx movq -0x30(%rbp), %rdi movl $0xfffd, %r8d # imm = 0xFFFD cmpq %rsi, %rdi ja 0x6e3a9 movq 0x20(%rbp), %rsi movq 0x8(%rsi), %rsi movq %rdi, %r8 shrq $0x8, %r8 movq (%rsi,%r8,8), %rsi testq %rsi, %rsi je 0x6e3b6 xorl %r8d, %r8d testw %dx, %dx setns %r8b movzbl %dil, %edx leaq (%rdx,%rdx,2), %rdx leaq (%rsi,%rdx,4), %rdx movl 0x4(%rdx,%r8,4), %r8d movq %r8, -0x30(%rbp) movq %r8, %rdi jmp 0x6e3b6 movq -0x30(%rbp), %rdi movl %eax, %eax addq %rax, %rbx cmpq %rdi, %rcx jne 0x6e2eb movq %r15, %rdi movq %rbx, -0x38(%rbp) movq %rbx, %rsi movq %r14, %rdx movq %r13, %rcx movq %r12, %r8 movl -0x54(%rbp), %r9d pushq -0x60(%rbp) pushq 0x20(%rbp) movl 0x18(%rbp), %eax pushq %rax movl 0x10(%rbp), %eax pushq %rax callq 0x6e016 addq $0x20, %rsp movl %eax, %ebx testl %eax, %eax jg 0x6e2e7 jmp 0x6e403 movl $0x1, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x6e403
my_wildcmp_unicode_impl: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_54], r9d mov r12, r8 mov r13, rcx mov [rbp+var_50], rdx mov [rbp+var_38], rsi mov r15, rdi mov eax, [rbp+arg_18] mov [rbp+var_60], rax mov rax, [rdi+0B8h] mov rax, [rax+28h] mov [rbp+var_40], rax lea rax, my_string_stack_guard mov rax, [rax] test rax, rax jz short loc_6E073 mov edi, [rbp+arg_18] call rax mov ebx, 1 test eax, eax jnz loc_6E403 loc_6E073: cmp r13, r12 jz loc_6E202 mov eax, [rbp+arg_8] mov ecx, [rbp+arg_0] cdqe mov [rbp+var_78], rax movsxd rax, [rbp+var_54] mov [rbp+var_70], rax movsxd rax, ecx mov [rbp+var_68], rax loc_6E097: mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 mov r14, [rbp+var_40] call r14 test eax, eax jle loc_6E3FE mov rcx, [rbp+var_30] cmp rcx, [rbp+var_78] jz loc_6E214 mov eax, eax add r13, rax cmp rcx, [rbp+var_70] jnz short loc_6E11A cmp r13, r12 jnb short loc_6E11A mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_6E3FE mov ebx, eax mov rdi, r15 lea rsi, [rbp+var_48] mov rax, r14 mov r14, [rbp+var_38] mov rdx, r14 mov rcx, [rbp+var_50] call rax test eax, eax jle loc_6E3FE mov ecx, ebx add r13, rcx mov eax, eax add r14, rax mov [rbp+var_38], r14 jmp short loc_6E14E loc_6E11A: mov rdi, r15 lea rsi, [rbp+var_48] mov rbx, [rbp+var_38] mov rdx, rbx mov rcx, [rbp+var_50] call r14 test eax, eax jle loc_6E3FE mov eax, eax add rbx, rax mov [rbp+var_38], rbx mov rax, [rbp+var_68] cmp [rbp+var_30], rax jz loc_6E1F9 loc_6E14E: mov rax, [rbp+var_48] mov r8, [rbp+arg_10] test r8, r8 jz loc_6E1E7 mov ecx, [r15+0Ch] mov rdx, [r8] mov esi, 0FFFDh cmp rax, rdx ja short loc_6E19C mov rsi, [r8+8] mov rdi, rax shr rdi, 8 mov rsi, [rsi+rdi*8] test rsi, rsi jz short loc_6E1A3 xor edi, edi test cx, cx setns dil movzx eax, al lea rax, [rax+rax*2] lea rax, [rsi+rax*4] mov esi, [rax+rdi*4+4] loc_6E19C: mov [rbp+var_48], rsi mov rax, rsi loc_6E1A3: mov rsi, [rbp+var_30] mov edi, 0FFFDh cmp rsi, rdx ja short loc_6E1DE mov rdx, [r8+8] mov rdi, rsi shr rdi, 8 mov rdx, [rdx+rdi*8] test rdx, rdx jz short loc_6E1EB xor edi, edi test cx, cx setns dil movzx ecx, sil lea rcx, [rcx+rcx*2] lea rcx, [rdx+rcx*4] mov edi, [rcx+rdi*4+4] loc_6E1DE: mov [rbp+var_30], rdi mov rsi, rdi jmp short loc_6E1EB loc_6E1E7: mov rsi, [rbp+var_30] loc_6E1EB: mov ebx, 1 cmp rax, rsi jnz loc_6E403 loc_6E1F9: cmp r13, r12 jnz loc_6E097 loc_6E202: xor ebx, ebx mov rax, [rbp+var_50] cmp [rbp+var_38], rax setnz bl jmp loc_6E403 loc_6E214: xor ebx, ebx cmp r13, r12 jz loc_6E403 loc_6E21F: mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_6E3FE mov r14d, eax mov rax, [rbp+var_30] cmp rax, [rbp+var_78] jnz short loc_6E258 mov eax, r14d add r13, rax loc_6E24A: cmp r13, r12 mov r14, [rbp+var_40] jnz short loc_6E21F jmp loc_6E403 loc_6E258: cmp rax, [rbp+var_68] jnz short loc_6E286 mov rdi, r15 lea rsi, [rbp+var_48] mov rdx, [rbp+var_38] mov rcx, [rbp+var_50] call [rbp+var_40] test eax, eax jle loc_6E3FE mov ecx, r14d add r13, rcx mov eax, eax add [rbp+var_38], rax jmp short loc_6E24A loc_6E286: mov r14, [rbp+var_50] cmp [rbp+var_38], r14 jz loc_6E414 lea rsi, [rbp+var_30] mov rdi, r15 mov rdx, r13 mov rcx, r12 call [rbp+var_40] test eax, eax jle loc_6E3FE mov eax, eax add r13, rax mov rax, [rbp+var_70] cmp [rbp+var_30], rax jnz short loc_6E2DD cmp r13, r12 jnb short loc_6E2DD lea rsi, [rbp+var_30] mov rdi, r15 mov rdx, r13 mov rcx, r12 call [rbp+var_40] test eax, eax jle loc_6E3FE mov eax, eax add r13, rax loc_6E2DD: mov rax, [rbp+var_60] inc eax mov [rbp+var_60], rax loc_6E2E7: mov rbx, [rbp+var_38] loc_6E2EB: cmp rbx, r14 jz loc_6E414 mov rdi, r15 lea rsi, [rbp+var_48] mov rdx, rbx mov rcx, r14 call [rbp+var_40] test eax, eax jle loc_6E3FE mov rcx, [rbp+var_48] mov rsi, [rbp+arg_10] test rsi, rsi jz loc_6E3B2 mov edx, [r15+0Ch] mov rsi, [rsi] mov edi, 0FFFDh cmp rcx, rsi ja short loc_6E360 mov rdi, [rbp+arg_10] mov rdi, [rdi+8] mov r8, rcx shr r8, 8 mov rdi, [rdi+r8*8] test rdi, rdi jz short loc_6E367 xor r8d, r8d test dx, dx setns r8b movzx ecx, cl lea rcx, [rcx+rcx*2] lea rcx, [rdi+rcx*4] mov edi, [rcx+r8*4+4] loc_6E360: mov [rbp+var_48], rdi mov rcx, rdi loc_6E367: mov rdi, [rbp+var_30] mov r8d, 0FFFDh cmp rdi, rsi ja short loc_6E3A9 mov rsi, [rbp+arg_10] mov rsi, [rsi+8] mov r8, rdi shr r8, 8 mov rsi, [rsi+r8*8] test rsi, rsi jz short loc_6E3B6 xor r8d, r8d test dx, dx setns r8b movzx edx, dil lea rdx, [rdx+rdx*2] lea rdx, [rsi+rdx*4] mov r8d, [rdx+r8*4+4] loc_6E3A9: mov [rbp+var_30], r8 mov rdi, r8 jmp short loc_6E3B6 loc_6E3B2: mov rdi, [rbp+var_30] loc_6E3B6: mov eax, eax add rbx, rax cmp rcx, rdi jnz loc_6E2EB mov rdi, r15 mov [rbp+var_38], rbx mov rsi, rbx mov rdx, r14 mov rcx, r13 mov r8, r12 mov r9d, [rbp+var_54] push [rbp+var_60] push [rbp+arg_10] mov eax, [rbp+arg_8] push rax mov eax, [rbp+arg_0] push rax call my_wildcmp_unicode_impl add rsp, 20h mov ebx, eax test eax, eax jg loc_6E2E7 jmp short loc_6E403 loc_6E3FE: mov ebx, 1 loc_6E403: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6E414: mov ebx, 0FFFFFFFFh jmp short loc_6E403
long long my_wildcmp_unicode_impl( long long a1, long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5, int a6, int a7, int a8, unsigned long long *a9, unsigned int a10) { unsigned int v13; // ebx long long ( *v14)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // r14 int v15; // eax int v16; // eax unsigned int v17; // ebx long long ( *v18)(long long, unsigned long long *, long long, long long); // rax long long v19; // r14 int v20; // eax long long v21; // rbx int v22; // eax long long v23; // rax int v24; // ecx unsigned long long v25; // rdx long long v26; // rsi long long v27; // rsi long long v28; // rsi long long v29; // rdi long long v30; // rdx int v31; // eax unsigned int v32; // r14d int v33; // eax int v34; // eax unsigned long long v35; // r13 int v36; // eax unsigned long long v37; // rbx int v38; // eax long long v39; // rcx int v40; // edx unsigned long long v41; // rsi long long v42; // rdi long long v43; // rdi long long v44; // rdi long long v45; // r8 long long v46; // rsi unsigned long long v50; // [rsp+38h] [rbp-48h] BYREF long long ( *v51)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // [rsp+40h] [rbp-40h] long long v52; // [rsp+48h] [rbp-38h] unsigned __int8 v53[48]; // [rsp+50h] [rbp-30h] BYREF v52 = a2; v51 = *(long long ( **)(long long, unsigned __int8 *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); if ( my_string_stack_guard ) { v13 = 1; if ( (unsigned int)my_string_stack_guard(a10) ) return v13; } if ( a4 == a5 ) return v52 != a3; while ( 1 ) { v14 = v51; v15 = v51(a1, v53, a4, a5); if ( v15 <= 0 ) return 1; if ( *(_QWORD *)v53 == a8 ) break; a4 += (unsigned int)v15; if ( *(_QWORD *)v53 == a6 && a4 < a5 ) { v16 = v14(a1, v53, a4, a5); if ( v16 <= 0 ) return 1; v17 = v16; v18 = (long long ( *)(long long, unsigned long long *, long long, long long))v14; v19 = v52; v20 = v18(a1, &v50, v52, a3); if ( v20 <= 0 ) return 1; a4 += v17; v52 = (unsigned int)v20 + v19; LABEL_13: v23 = v50; if ( a9 ) { v24 = *(_DWORD *)(a1 + 12); v25 = *a9; v26 = 65533LL; if ( v50 > *a9 ) goto LABEL_17; v27 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8)); if ( v27 ) { v26 = *(unsigned int *)(v27 + 12LL * (unsigned __int8)v50 + 4LL * ((v24 & 0x8000u) == 0) + 4); LABEL_17: v50 = v26; v23 = v26; } v28 = *(_QWORD *)v53; v29 = 65533LL; if ( *(_QWORD *)v53 > v25 ) { LABEL_21: *(_QWORD *)v53 = v29; v28 = v29; } else { v30 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8)); if ( v30 ) { v29 = *(unsigned int *)(v30 + 12LL * v53[0] + 4LL * ((v24 & 0x8000u) == 0) + 4); goto LABEL_21; } } } else { v28 = *(_QWORD *)v53; } v13 = 1; if ( v23 != v28 ) return v13; goto LABEL_24; } v21 = v52; v22 = v14(a1, (unsigned __int8 *)&v50, v52, a3); if ( v22 <= 0 ) return 1; v52 = (unsigned int)v22 + v21; if ( *(_QWORD *)v53 != a7 ) goto LABEL_13; LABEL_24: if ( a4 == a5 ) return v52 != a3; } v13 = 0; if ( a4 == a5 ) return v13; while ( 2 ) { v31 = v14(a1, v53, a4, a5); if ( v31 <= 0 ) return 1; v32 = v31; if ( *(_QWORD *)v53 == a8 ) { a4 += (unsigned int)v31; LABEL_30: v14 = v51; if ( a4 == a5 ) return v13; continue; } break; } if ( *(_QWORD *)v53 == a7 ) { v33 = v51(a1, (unsigned __int8 *)&v50, v52, a3); if ( v33 <= 0 ) return 1; a4 += v32; v52 += (unsigned int)v33; goto LABEL_30; } if ( v52 == a3 ) return (unsigned int)-1; v34 = v51(a1, v53, a4, a5); if ( v34 <= 0 ) return 1; v35 = (unsigned int)v34 + a4; if ( *(_QWORD *)v53 != a6 || v35 >= a5 ) { LABEL_41: v37 = v52; while ( 1 ) { if ( v37 == a3 ) return (unsigned int)-1; v38 = v51(a1, (unsigned __int8 *)&v50, v37, a3); if ( v38 <= 0 ) return 1; v39 = v50; if ( !a9 ) { v44 = *(_QWORD *)v53; goto LABEL_54; } v40 = *(_DWORD *)(a1 + 12); v41 = *a9; v42 = 65533LL; if ( v50 <= *a9 ) { v43 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8)); if ( !v43 ) goto LABEL_49; v42 = *(unsigned int *)(v43 + 12LL * (unsigned __int8)v50 + 4LL * ((v40 & 0x8000u) == 0) + 4); } v50 = v42; v39 = v42; LABEL_49: v44 = *(_QWORD *)v53; v45 = 65533LL; if ( *(_QWORD *)v53 > v41 ) goto LABEL_52; v46 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8)); if ( v46 ) { v45 = *(unsigned int *)(v46 + 12LL * v53[0] + 4LL * ((v40 & 0x8000u) == 0) + 4); LABEL_52: *(_QWORD *)v53 = v45; v44 = v45; } LABEL_54: v37 += (unsigned int)v38; if ( v39 == v44 ) { v52 = v37; v13 = my_wildcmp_unicode_impl(a1, v37, a3, v35, a5, a6, a7, a8, (long long)a9, a10 + 1); if ( (int)v13 > 0 ) goto LABEL_41; return v13; } } } v36 = v51(a1, v53, v35, a5); if ( v36 > 0 ) { LODWORD(v35) = v36 + v35; goto LABEL_41; } return 1; }
my_wildcmp_unicode_impl: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RBP + -0x54],R9D MOV R12,R8 MOV R13,RCX MOV qword ptr [RBP + -0x50],RDX MOV qword ptr [RBP + -0x38],RSI MOV R15,RDI MOV EAX,dword ptr [RBP + 0x28] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX LEA RAX,[0x4da478] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0016e073 MOV EDI,dword ptr [RBP + 0x28] CALL RAX MOV EBX,0x1 TEST EAX,EAX JNZ 0x0016e403 LAB_0016e073: CMP R13,R12 JZ 0x0016e202 MOV EAX,dword ptr [RBP + 0x18] MOV ECX,dword ptr [RBP + 0x10] CDQE MOV qword ptr [RBP + -0x78],RAX MOVSXD RAX,dword ptr [RBP + -0x54] MOV qword ptr [RBP + -0x70],RAX MOVSXD RAX,ECX MOV qword ptr [RBP + -0x68],RAX LAB_0016e097: MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 MOV R14,qword ptr [RBP + -0x40] CALL R14 TEST EAX,EAX JLE 0x0016e3fe MOV RCX,qword ptr [RBP + -0x30] CMP RCX,qword ptr [RBP + -0x78] JZ 0x0016e214 MOV EAX,EAX ADD R13,RAX CMP RCX,qword ptr [RBP + -0x70] JNZ 0x0016e11a CMP R13,R12 JNC 0x0016e11a MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x0016e3fe MOV EBX,EAX MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RAX,R14 MOV R14,qword ptr [RBP + -0x38] MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x50] CALL RAX TEST EAX,EAX JLE 0x0016e3fe MOV ECX,EBX ADD R13,RCX MOV EAX,EAX ADD R14,RAX MOV qword ptr [RBP + -0x38],R14 JMP 0x0016e14e LAB_0016e11a: MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RBX,qword ptr [RBP + -0x38] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x50] CALL R14 TEST EAX,EAX JLE 0x0016e3fe MOV EAX,EAX ADD RBX,RAX MOV qword ptr [RBP + -0x38],RBX MOV RAX,qword ptr [RBP + -0x68] CMP qword ptr [RBP + -0x30],RAX JZ 0x0016e1f9 LAB_0016e14e: MOV RAX,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + 0x20] TEST R8,R8 JZ 0x0016e1e7 MOV ECX,dword ptr [R15 + 0xc] MOV RDX,qword ptr [R8] MOV ESI,0xfffd CMP RAX,RDX JA 0x0016e19c MOV RSI,qword ptr [R8 + 0x8] MOV RDI,RAX SHR RDI,0x8 MOV RSI,qword ptr [RSI + RDI*0x8] TEST RSI,RSI JZ 0x0016e1a3 XOR EDI,EDI TEST CX,CX SETNS DIL MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] LEA RAX,[RSI + RAX*0x4] MOV ESI,dword ptr [RAX + RDI*0x4 + 0x4] LAB_0016e19c: MOV qword ptr [RBP + -0x48],RSI MOV RAX,RSI LAB_0016e1a3: MOV RSI,qword ptr [RBP + -0x30] MOV EDI,0xfffd CMP RSI,RDX JA 0x0016e1de MOV RDX,qword ptr [R8 + 0x8] MOV RDI,RSI SHR RDI,0x8 MOV RDX,qword ptr [RDX + RDI*0x8] TEST RDX,RDX JZ 0x0016e1eb XOR EDI,EDI TEST CX,CX SETNS DIL MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] LEA RCX,[RDX + RCX*0x4] MOV EDI,dword ptr [RCX + RDI*0x4 + 0x4] LAB_0016e1de: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RDI JMP 0x0016e1eb LAB_0016e1e7: MOV RSI,qword ptr [RBP + -0x30] LAB_0016e1eb: MOV EBX,0x1 CMP RAX,RSI JNZ 0x0016e403 LAB_0016e1f9: CMP R13,R12 JNZ 0x0016e097 LAB_0016e202: XOR EBX,EBX MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RBP + -0x38],RAX SETNZ BL JMP 0x0016e403 LAB_0016e214: XOR EBX,EBX CMP R13,R12 JZ 0x0016e403 LAB_0016e21f: MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x0016e3fe MOV R14D,EAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x78] JNZ 0x0016e258 MOV EAX,R14D ADD R13,RAX LAB_0016e24a: CMP R13,R12 MOV R14,qword ptr [RBP + -0x40] JNZ 0x0016e21f JMP 0x0016e403 LAB_0016e258: CMP RAX,qword ptr [RBP + -0x68] JNZ 0x0016e286 MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x0016e3fe MOV ECX,R14D ADD R13,RCX MOV EAX,EAX ADD qword ptr [RBP + -0x38],RAX JMP 0x0016e24a LAB_0016e286: MOV R14,qword ptr [RBP + -0x50] CMP qword ptr [RBP + -0x38],R14 JZ 0x0016e414 LEA RSI,[RBP + -0x30] MOV RDI,R15 MOV RDX,R13 MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x0016e3fe MOV EAX,EAX ADD R13,RAX MOV RAX,qword ptr [RBP + -0x70] CMP qword ptr [RBP + -0x30],RAX JNZ 0x0016e2dd CMP R13,R12 JNC 0x0016e2dd LEA RSI,[RBP + -0x30] MOV RDI,R15 MOV RDX,R13 MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x0016e3fe MOV EAX,EAX ADD R13,RAX LAB_0016e2dd: MOV RAX,qword ptr [RBP + -0x60] INC EAX MOV qword ptr [RBP + -0x60],RAX LAB_0016e2e7: MOV RBX,qword ptr [RBP + -0x38] LAB_0016e2eb: CMP RBX,R14 JZ 0x0016e414 MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RDX,RBX MOV RCX,R14 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x0016e3fe MOV RCX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + 0x20] TEST RSI,RSI JZ 0x0016e3b2 MOV EDX,dword ptr [R15 + 0xc] MOV RSI,qword ptr [RSI] MOV EDI,0xfffd CMP RCX,RSI JA 0x0016e360 MOV RDI,qword ptr [RBP + 0x20] MOV RDI,qword ptr [RDI + 0x8] MOV R8,RCX SHR R8,0x8 MOV RDI,qword ptr [RDI + R8*0x8] TEST RDI,RDI JZ 0x0016e367 XOR R8D,R8D TEST DX,DX SETNS R8B MOVZX ECX,CL LEA RCX,[RCX + RCX*0x2] LEA RCX,[RDI + RCX*0x4] MOV EDI,dword ptr [RCX + R8*0x4 + 0x4] LAB_0016e360: MOV qword ptr [RBP + -0x48],RDI MOV RCX,RDI LAB_0016e367: MOV RDI,qword ptr [RBP + -0x30] MOV R8D,0xfffd CMP RDI,RSI JA 0x0016e3a9 MOV RSI,qword ptr [RBP + 0x20] MOV RSI,qword ptr [RSI + 0x8] MOV R8,RDI SHR R8,0x8 MOV RSI,qword ptr [RSI + R8*0x8] TEST RSI,RSI JZ 0x0016e3b6 XOR R8D,R8D TEST DX,DX SETNS R8B MOVZX EDX,DIL LEA RDX,[RDX + RDX*0x2] LEA RDX,[RSI + RDX*0x4] MOV R8D,dword ptr [RDX + R8*0x4 + 0x4] LAB_0016e3a9: MOV qword ptr [RBP + -0x30],R8 MOV RDI,R8 JMP 0x0016e3b6 LAB_0016e3b2: MOV RDI,qword ptr [RBP + -0x30] LAB_0016e3b6: MOV EAX,EAX ADD RBX,RAX CMP RCX,RDI JNZ 0x0016e2eb MOV RDI,R15 MOV qword ptr [RBP + -0x38],RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R13 MOV R8,R12 MOV R9D,dword ptr [RBP + -0x54] PUSH qword ptr [RBP + -0x60] PUSH qword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] PUSH RAX MOV EAX,dword ptr [RBP + 0x10] PUSH RAX CALL 0x0016e016 ADD RSP,0x20 MOV EBX,EAX TEST EAX,EAX JG 0x0016e2e7 JMP 0x0016e403 LAB_0016e3fe: MOV EBX,0x1 LAB_0016e403: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016e414: MOV EBX,0xffffffff JMP 0x0016e403
uint my_wildcmp_unicode_impl (long param_1,long param_2,long param_3,ulong param_4,ulong param_5,int param_6, int param_7,int param_8,ulong *param_9,int param_10) { long lVar1; code *pcVar2; ulong uVar3; int iVar4; uint uVar5; uint uVar6; short sVar7; long lVar8; ulong local_50; code *local_48; long local_40; ulong local_38; local_48 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); local_40 = param_2; if ((my_string_stack_guard != (code *)0x0) && (iVar4 = (*my_string_stack_guard)(param_10), iVar4 != 0)) { return 1; } if (param_4 != param_5) { do { pcVar2 = local_48; uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); lVar8 = local_40; if ((int)uVar5 < 1) { return 1; } if (local_38 == (long)param_8) { do { if (param_4 == param_5) { return 0; } uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5); if ((int)uVar5 < 1) { return 1; } if (local_38 != (long)param_8) { if (local_38 != (long)param_7) { if (local_40 == param_3) { return 0xffffffff; } uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); if (0 < (int)uVar5) { param_4 = param_4 + uVar5; if ((local_38 == (long)param_6) && (param_4 < param_5)) { uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); if ((int)uVar5 < 1) { return 1; } param_4 = param_4 + uVar5; } lVar8 = local_40; while( true ) { if (lVar8 == param_3) { return 0xffffffff; } uVar5 = (*local_48)(param_1,&local_50,lVar8,param_3); if ((int)uVar5 < 1) break; uVar3 = local_38; if (param_9 != (ulong *)0x0) { sVar7 = (short)*(int4 *)(param_1 + 0xc); uVar3 = 0xfffd; if ((local_50 <= *param_9) && (lVar1 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50, lVar1 != 0)) { uVar3 = (ulong)*(uint *)(lVar1 + (local_50 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } local_50 = uVar3; uVar3 = 0xfffd; if ((local_38 <= *param_9) && (lVar1 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38, lVar1 != 0)) { uVar3 = (ulong)*(uint *)(lVar1 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } } local_38 = uVar3; lVar8 = lVar8 + (ulong)uVar5; if ((local_50 == local_38) && (local_40 = lVar8, uVar5 = my_wildcmp_unicode_impl (param_1,lVar8,param_3,param_4,param_5,param_6,param_7, param_8,param_9,param_10 + 1), lVar8 = local_40, (int)uVar5 < 1)) { return uVar5; } } return 1; } return 1; } uVar6 = (*local_48)(param_1,&local_50,local_40,param_3); if ((int)uVar6 < 1) { return 1; } local_40 = local_40 + (ulong)uVar6; } param_4 = param_4 + uVar5; pcVar2 = local_48; } while( true ); } param_4 = param_4 + uVar5; if ((local_38 == (long)param_6) && (param_4 < param_5)) { uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5); lVar8 = local_40; if ((int)uVar5 < 1) { return 1; } uVar6 = (*pcVar2)(param_1,&local_50,local_40,param_3); if ((int)uVar6 < 1) { return 1; } param_4 = param_4 + uVar5; local_40 = lVar8 + (ulong)uVar6; LAB_0016e14e: uVar3 = local_38; if (param_9 != (ulong *)0x0) { sVar7 = (short)*(int4 *)(param_1 + 0xc); uVar3 = 0xfffd; if ((local_50 <= *param_9) && (lVar8 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50, lVar8 != 0)) { uVar3 = (ulong)*(uint *)(lVar8 + (local_50 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } local_50 = uVar3; uVar3 = 0xfffd; if ((local_38 <= *param_9) && (lVar8 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38, lVar8 != 0)) { uVar3 = (ulong)*(uint *)(lVar8 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } } local_38 = uVar3; if (local_50 != local_38) { return 1; } } else { uVar5 = (*pcVar2)(param_1,&local_50,local_40,param_3); if ((int)uVar5 < 1) { return 1; } local_40 = lVar8 + (ulong)uVar5; if (local_38 != (long)param_7) goto LAB_0016e14e; } } while (param_4 != param_5); } return (uint)(local_40 != param_3); }
2,816
mysql_refresh_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_refresh_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_refresh, (parms->mysql, parms->refresh_options), parms->mysql, int, r_int) }
O0
c
mysql_refresh_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x8(%rax), %esi callq 0x3ad30 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_refresh_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov esi, [rax+8] call mysql_refresh mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_refresh_start_internal(long long a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); v2[2] = mysql_refresh(*(_QWORD *)a1, *(_DWORD *)(a1 + 8)); result = v2; *v2 = 0; return result; }
mysql_refresh_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x8] CALL 0x0013ad30 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_refresh_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_refresh(*param_1,(int)param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
2,817
httplib::default_socket_options(int)
hkr04[P]cpp-mcp/common/httplib.h
inline void default_socket_options(socket_t sock) { detail::set_socket_opt(sock, SOL_SOCKET, #ifdef SO_REUSEPORT SO_REUSEPORT, #else SO_REUSEADDR, #endif 1); }
O2
c
httplib::default_socket_options(int): pushq $0xf popq %rdx pushq $0x1 popq %rcx movl %ecx, %esi jmp 0x24dcb
_ZN7httplib22default_socket_optionsEi: push 0Fh pop rdx; int push 1 pop rcx; int mov esi, ecx; int jmp _ZN7httplib6detail14set_socket_optEiiii; httplib::detail::set_socket_opt(int,int,int,int)
long long httplib::default_socket_options( httplib *this, int a2, long long a3, long long a4, int a5, unsigned int a6) { return httplib::detail::set_socket_opt(this, 1, 15, 1, a5, a6); }
default_socket_options: PUSH 0xf POP RDX PUSH 0x1 POP RCX MOV ESI,ECX JMP 0x00124dcb
/* httplib::default_socket_options(int) */ void httplib::default_socket_options(int param_1) { detail::set_socket_opt(param_1,1,0xf,1); return; }
2,818
httplib::default_socket_options(int)
hkr04[P]cpp-mcp/common/httplib.h
inline void default_socket_options(socket_t sock) { detail::set_socket_opt(sock, SOL_SOCKET, #ifdef SO_REUSEPORT SO_REUSEPORT, #else SO_REUSEADDR, #endif 1); }
O3
c
httplib::default_socket_options(int): pushq %rax leaq 0x4(%rsp), %rcx movl $0x1, (%rcx) movl $0x1, %esi movl $0xf, %edx movl $0x4, %r8d callq 0xaa70 popq %rax retq
_ZN7httplib22default_socket_optionsEi: push rax lea rcx, [rsp+8+var_4] mov dword ptr [rcx], 1 mov esi, 1 mov edx, 0Fh mov r8d, 4 call _setsockopt pop rax retn
long long httplib::default_socket_options(httplib *this) { unsigned int v1; // eax long long v3; // [rsp-4h] [rbp-8h] BYREF v3 = v1 | 0x100000000LL; setsockopt(this, 1LL, 15LL, (char *)&v3 + 4, 4LL); return v3; }
default_socket_options: PUSH RAX LEA RCX,[RSP + 0x4] MOV dword ptr [RCX],0x1 MOV ESI,0x1 MOV EDX,0xf MOV R8D,0x4 CALL 0x0010aa70 POP RAX RET
/* httplib::default_socket_options(int) */ int8 httplib::default_socket_options(int param_1) { int4 in_EAX; int8 uStack_8; uStack_8 = CONCAT44(1,in_EAX); setsockopt(param_1,1,0xf,(void *)((long)&uStack_8 + 4),4); return uStack_8; }
2,819
my_hash_free
eloqsql/mysys/hash.c
void my_hash_free(HASH *hash) { DBUG_ENTER("my_hash_free"); DBUG_PRINT("enter",("hash:%p elements: %ld", hash, hash->records)); my_hash_free_elements(hash); hash->free= 0; delete_dynamic(&hash->array); hash->blength= 0; DBUG_VOID_RETURN; }
O0
c
my_hash_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0xad06e movq -0x8(%rbp), %rdi callq 0xad0b0 movq -0x8(%rbp), %rax movq $0x0, 0x60(%rax) movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0xa7a10 movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0xad09e addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_AD06E: mov rdi, [rbp+var_8] call my_hash_free_elements mov rax, [rbp+var_8] mov qword ptr [rax+60h], 0 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call delete_dynamic mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 jmp short $+2 loc_AD09E: add rsp, 10h pop rbp retn
long long my_hash_free(long long a1) { long long result; // rax my_hash_free_elements(a1); *(_QWORD *)(a1 + 96) = 0LL; delete_dynamic(a1 + 40); result = a1; *(_QWORD *)(a1 + 16) = 0LL; return result; }
my_hash_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001ad06e LAB_001ad06e: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001ad0b0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x001a7a10 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 JMP 0x001ad09e LAB_001ad09e: ADD RSP,0x10 POP RBP RET
void my_hash_free(long param_1) { my_hash_free_elements(param_1); *(int8 *)(param_1 + 0x60) = 0; delete_dynamic(param_1 + 0x28); *(int8 *)(param_1 + 0x10) = 0; return; }
2,820
coro::ring_buffer<unsigned long, 2ul>::consume_operation::await_ready()
AlayaLite/build_O3/_deps/libcoro-src/include/coro/ring_buffer.hpp
auto await_ready() noexcept -> bool { std::unique_lock lk{m_rb.m_mutex}; return m_rb.try_consume_locked(lk, this); }
O3
cpp
coro::ring_buffer<unsigned long, 2ul>::consume_operation::await_ready(): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq (%rdi), %rax movq %rsp, %rdi movq %rax, (%rdi) movb $0x0, 0x8(%rdi) callq 0x2e99c movq %rsp, %rsi movb $0x1, 0x8(%rsi) movq (%rbx), %rdi movq %rbx, %rdx callq 0x2f148 movl %eax, %ebx movq %rsp, %rdi callq 0x2e986 movl %ebx, %eax addq $0x10, %rsp popq %rbx retq movq %rax, %rdi callq 0x1f2c3
_ZN4coro11ring_bufferImLm2EE17consume_operation11await_readyEv: push rbx sub rsp, 10h mov rbx, rdi mov rax, [rdi] mov rdi, rsp mov [rdi], rax mov byte ptr [rdi+8], 0 call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void) mov rsi, rsp mov byte ptr [rsi+8], 1 mov rdi, [rbx] mov rdx, rbx call _ZN4coro11ring_bufferImLm2EE18try_consume_lockedERSt11unique_lockISt5mutexEPNS1_17consume_operationE; coro::ring_buffer<ulong,2ul>::try_consume_locked(std::unique_lock<std::mutex> &,coro::ring_buffer<ulong,2ul>::consume_operation *) mov ebx, eax mov rdi, rsp call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() mov eax, ebx add rsp, 10h pop rbx retn mov rdi, rax call __clang_call_terminate
long long coro::ring_buffer<unsigned long,2ul>::consume_operation::await_ready(_QWORD *a1) { unsigned int v1; // ebx long long v3; // [rsp+0h] [rbp-18h] BYREF char v4; // [rsp+8h] [rbp-10h] v3 = *a1; v4 = 0; std::unique_lock<std::mutex>::lock(&v3); v4 = 1; v1 = coro::ring_buffer<unsigned long,2ul>::try_consume_locked(*a1, &v3, a1); std::unique_lock<std::mutex>::~unique_lock((long long)&v3); return v1; }
await_ready: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV RDI,RSP MOV qword ptr [RDI],RAX MOV byte ptr [RDI + 0x8],0x0 LAB_0012f117: CALL 0x0012e99c MOV RSI,RSP MOV byte ptr [RSI + 0x8],0x1 MOV RDI,qword ptr [RBX] MOV RDX,RBX CALL 0x0012f148 MOV EBX,EAX MOV RDI,RSP CALL 0x0012e986 MOV EAX,EBX ADD RSP,0x10 POP RBX RET
/* coro::ring_buffer<unsigned long, 2ul>::consume_operation::await_ready() */ int4 __thiscall coro::ring_buffer<unsigned_long,2ul>::consume_operation::await_ready(consume_operation *this) { int4 uVar1; int8 local_18; int1 local_10; local_18 = *(int8 *)this; local_10 = 0; /* try { // try from 0012f117 to 0012f12d has its CatchHandler @ 0012f140 */ std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_18); local_10 = 1; uVar1 = try_consume_locked(*(ring_buffer<unsigned_long,2ul> **)this,(unique_lock *)&local_18,this) ; std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_18); return uVar1; }
2,821
maria_extra_keyflag
eloqsql/storage/maria/ma_extra.c
static void maria_extra_keyflag(MARIA_HA *info, enum ha_extra_function function) { uint idx; for (idx= 0; idx< info->s->base.keys; idx++) { switch (function) { case HA_EXTRA_CHANGE_KEY_TO_UNIQUE: info->s->keyinfo[idx].flag|= HA_NOSAME; break; case HA_EXTRA_CHANGE_KEY_TO_DUP: info->s->keyinfo[idx].flag&= ~(HA_NOSAME); break; default: break; } } }
O0
c
maria_extra_keyflag: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl $0x0, -0x10(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rcx movq (%rcx), %rcx cmpl 0x3e8(%rcx), %eax jae 0x3431d movl -0xc(%rbp), %eax movl %eax, -0x14(%rbp) subl $0x1e, %eax je 0x342af jmp 0x342a5 movl -0x14(%rbp), %eax subl $0x1f, %eax je 0x342dd jmp 0x3430b movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x10(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movzwl 0xa2(%rax), %ecx orl $0x1, %ecx movw %cx, 0xa2(%rax) jmp 0x3430d movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x10(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movzwl 0xa2(%rax), %ecx andl $-0x2, %ecx movw %cx, 0xa2(%rax) jmp 0x3430d jmp 0x3430d jmp 0x3430f movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x34282 popq %rbp retq nop
maria_extra_keyflag: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], 0 loc_34282: mov eax, [rbp+var_10] mov rcx, [rbp+var_8] mov rcx, [rcx] cmp eax, [rcx+3E8h] jnb loc_3431D mov eax, [rbp+var_C] mov [rbp+var_14], eax sub eax, 1Eh jz short loc_342AF jmp short $+2 loc_342A5: mov eax, [rbp+var_14] sub eax, 1Fh jz short loc_342DD jmp short loc_3430B loc_342AF: mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_10] imul rcx, 118h add rax, rcx movzx ecx, word ptr [rax+0A2h] or ecx, 1 mov [rax+0A2h], cx jmp short loc_3430D loc_342DD: mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_10] imul rcx, 118h add rax, rcx movzx ecx, word ptr [rax+0A2h] and ecx, 0FFFFFFFEh mov [rax+0A2h], cx jmp short loc_3430D loc_3430B: jmp short $+2 loc_3430D: jmp short $+2 loc_3430F: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp loc_34282 loc_3431D: pop rbp retn
long long maria_extra_keyflag(long long a1, int a2) { long long result; // rax long long v3; // rax long long v4; // rax unsigned int i; // [rsp+4h] [rbp-10h] for ( i = 0; ; ++i ) { result = i; if ( i >= *(_DWORD *)(*(_QWORD *)a1 + 1000LL) ) break; if ( a2 == 30 ) { v3 = 280LL * i + *(_QWORD *)(*(_QWORD *)a1 + 1392LL); *(_WORD *)(v3 + 162) |= 1u; } else if ( a2 == 31 ) { v4 = 280LL * i + *(_QWORD *)(*(_QWORD *)a1 + 1392LL); *(_WORD *)(v4 + 162) &= ~1u; } } return result; }
maria_extra_keyflag: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],0x0 LAB_00134282: MOV EAX,dword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x3e8] JNC 0x0013431d MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x14],EAX SUB EAX,0x1e JZ 0x001342af JMP 0x001342a5 LAB_001342a5: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1f JZ 0x001342dd JMP 0x0013430b LAB_001342af: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x10] IMUL RCX,RCX,0x118 ADD RAX,RCX MOVZX ECX,word ptr [RAX + 0xa2] OR ECX,0x1 MOV word ptr [RAX + 0xa2],CX JMP 0x0013430d LAB_001342dd: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x10] IMUL RCX,RCX,0x118 ADD RAX,RCX MOVZX ECX,word ptr [RAX + 0xa2] AND ECX,0xfffffffe MOV word ptr [RAX + 0xa2],CX JMP 0x0013430d LAB_0013430b: JMP 0x0013430d LAB_0013430d: JMP 0x0013430f LAB_0013430f: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x00134282 LAB_0013431d: POP RBP RET
void maria_extra_keyflag(long *param_1,int param_2) { long lVar1; int4 local_18; for (local_18 = 0; local_18 < *(uint *)(*param_1 + 1000); local_18 = local_18 + 1) { if (param_2 == 0x1e) { lVar1 = *(long *)(*param_1 + 0x570) + (ulong)local_18 * 0x118; *(ushort *)(lVar1 + 0xa2) = *(ushort *)(lVar1 + 0xa2) | 1; } else if (param_2 == 0x1f) { lVar1 = *(long *)(*param_1 + 0x570) + (ulong)local_18 * 0x118; *(ushort *)(lVar1 + 0xa2) = *(ushort *)(lVar1 + 0xa2) & 0xfffe; } } return; }
2,822
ggml_easy::ctx::~ctx()
ngxson[P]ggml-easy/ggml-easy.h
~ctx() { ggml_backend_buffer_free(buf); }
O1
c
ggml_easy::ctx::~ctx(): pushq %rbx movq %rdi, %rbx movq 0xb0(%rdi), %rdi callq 0x46c0 movq 0xd8(%rbx), %rdi testq %rdi, %rdi je 0x8a69 movq 0xe8(%rbx), %rsi subq %rdi, %rsi callq 0x4460 leaq 0xc0(%rbx), %rdi callq 0x8c88 leaq 0xb8(%rbx), %rdi callq 0x8cb8 movq 0x88(%rbx), %rdi testq %rdi, %rdi je 0x8a9c movq 0x98(%rbx), %rsi subq %rdi, %rsi callq 0x4460 movq 0x70(%rbx), %rdi testq %rdi, %rdi je 0x8ab4 movq 0x80(%rbx), %rsi subq %rdi, %rsi callq 0x4460 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x8ac9 movq 0x60(%rbx), %rsi subq %rdi, %rsi callq 0x4460 addq $0x8, %rbx movq %rbx, %rdi popq %rbx jmp 0x91ca movq %rax, %rdi callq 0x8ade
_ZN9ggml_easy3ctxD2Ev: push rbx mov rbx, rdi mov rdi, [rdi+0B0h] call _ggml_backend_buffer_free mov rdi, [rbx+0D8h]; void * test rdi, rdi jz short loc_8A69 mov rsi, [rbx+0E8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8A69: lea rdi, [rbx+0C0h] call _ZNSt6vectorIN9ggml_easy3ctx11loaded_ggufESaIS2_EED2Ev; std::vector<ggml_easy::ctx::loaded_gguf>::~vector() lea rdi, [rbx+0B8h] call _ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterED2Ev; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr() mov rdi, [rbx+88h]; void * test rdi, rdi jz short loc_8A9C mov rsi, [rbx+98h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8A9C: mov rdi, [rbx+70h]; void * test rdi, rdi jz short loc_8AB4 mov rsi, [rbx+80h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8AB4: mov rdi, [rbx+50h]; void * test rdi, rdi jz short loc_8AC9 mov rsi, [rbx+60h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8AC9: add rbx, 8 mov rdi, rbx pop rbx jmp _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ggml_tensor *>,std::allocator<std::pair<std::string const,ggml_tensor *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, rax call $+5
void ggml_easy::ctx::~ctx(ggml_easy::ctx *this) { void *v2; // rdi void *v3; // rdi void *v4; // rdi void *v5; // rdi ggml_backend_buffer_free(*((_QWORD *)this + 22)); v2 = (void *)*((_QWORD *)this + 27); if ( v2 ) operator delete(v2, *((_QWORD *)this + 29) - (_QWORD)v2); std::vector<ggml_easy::ctx::loaded_gguf>::~vector((char *)this + 192); std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr((char *)this + 184); v3 = (void *)*((_QWORD *)this + 17); if ( v3 ) operator delete(v3, *((_QWORD *)this + 19) - (_QWORD)v3); v4 = (void *)*((_QWORD *)this + 14); if ( v4 ) operator delete(v4, *((_QWORD *)this + 16) - (_QWORD)v4); v5 = (void *)*((_QWORD *)this + 10); if ( v5 ) operator delete(v5, *((_QWORD *)this + 12) - (_QWORD)v5); std::_Hashtable<std::string,std::pair<std::string const,ggml_tensor *>,std::allocator<std::pair<std::string const,ggml_tensor *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable((char *)this + 8); }
~ctx: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0xb0] LAB_00108a49: CALL 0x001046c0 MOV RDI,qword ptr [RBX + 0xd8] TEST RDI,RDI JZ 0x00108a69 MOV RSI,qword ptr [RBX + 0xe8] SUB RSI,RDI CALL 0x00104460 LAB_00108a69: LEA RDI,[RBX + 0xc0] CALL 0x00108c88 LEA RDI,[RBX + 0xb8] CALL 0x00108cb8 MOV RDI,qword ptr [RBX + 0x88] TEST RDI,RDI JZ 0x00108a9c MOV RSI,qword ptr [RBX + 0x98] SUB RSI,RDI CALL 0x00104460 LAB_00108a9c: MOV RDI,qword ptr [RBX + 0x70] TEST RDI,RDI JZ 0x00108ab4 MOV RSI,qword ptr [RBX + 0x80] SUB RSI,RDI CALL 0x00104460 LAB_00108ab4: MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x00108ac9 MOV RSI,qword ptr [RBX + 0x60] SUB RSI,RDI CALL 0x00104460 LAB_00108ac9: ADD RBX,0x8 MOV RDI,RBX POP RBX JMP 0x001091ca
/* ggml_easy::ctx::~ctx() */ void __thiscall ggml_easy::ctx::~ctx(ctx *this) { void *pvVar1; /* try { // try from 00108a49 to 00108a4d has its CatchHandler @ 00108ad6 */ ggml_backend_buffer_free(*(int8 *)(this + 0xb0)); pvVar1 = *(void **)(this + 0xd8); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0xe8) - (long)pvVar1); } std::vector<ggml_easy::ctx::loaded_gguf,std::allocator<ggml_easy::ctx::loaded_gguf>>::~vector ((vector<ggml_easy::ctx::loaded_gguf,std::allocator<ggml_easy::ctx::loaded_gguf>> *) (this + 0xc0)); std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr ((unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0xb8)); pvVar1 = *(void **)(this + 0x88); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x98) - (long)pvVar1); } pvVar1 = *(void **)(this + 0x70); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x80) - (long)pvVar1); } pvVar1 = *(void **)(this + 0x50); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x60) - (long)pvVar1); } std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(this + 8)); return; }
2,823
my_like_range_simple
eloqsql/strings/ctype-simple.c
my_bool my_like_range_simple(CHARSET_INFO *cs, const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str,char *max_str, size_t *min_length, size_t *max_length) { const char *end= ptr + ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; size_t charlen= res_length / cs->mbmaxlen; for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--) { if (*ptr == escape && ptr+1 != end) { ptr++; /* Skip escape */ *min_str++= *max_str++ = *ptr; continue; } if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++= (char) cs->max_sort_char; continue; } if (*ptr == w_many) /* '%' in SQL */ { /* Calculate length of keys */ *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? (size_t) (min_str - min_org) : res_length; *max_length= res_length; do { *min_str++= 0; *max_str++= (char) cs->max_sort_char; } while (min_str != min_end); return 0; } *min_str++= *max_str++ = *ptr; } *min_length= *max_length = (size_t) (min_str - min_org); while (min_str != min_end) *min_str++= *max_str++ = ' '; /* Because if key compression */ return 0; }
O0
c
my_like_range_simple: pushq %rbp movq %rsp, %rbp movl %r8d, -0x60(%rbp) movl %ecx, %eax movl -0x60(%rbp), %ecx movl %eax, -0x5c(%rbp) movq %rdx, %rax movl -0x5c(%rbp), %edx movq %rax, -0x58(%rbp) movq %rsi, %rax movq -0x58(%rbp), %rsi movq %rax, -0x50(%rbp) movq %rdi, %r8 movq -0x50(%rbp), %rdi movb %r9b, %al movq 0x30(%rbp), %r9 movq 0x28(%rbp), %r9 movq 0x20(%rbp), %r9 movq 0x18(%rbp), %r9 movq 0x10(%rbp), %r9 movq %r8, -0x10(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movb %dl, -0x21(%rbp) movb %cl, -0x22(%rbp) movb %al, -0x23(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq 0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq 0x18(%rbp), %rax addq 0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq 0x10(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x9c(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x61(%rbp) je 0x46cc8 movq 0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x61(%rbp) je 0x46cc8 cmpq $0x0, -0x48(%rbp) seta %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al testb $0x1, %al jne 0x46cd4 jmp 0x46e49 movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x21(%rbp), %ecx cmpl %ecx, %eax jne 0x46d2a movq -0x18(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x46d2a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) jmp 0x46e2c movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x22(%rbp), %ecx cmpl %ecx, %eax jne 0x46d6e movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movb %al, %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) jmp 0x46e2c movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x23(%rbp), %ecx cmpl %ecx, %eax jne 0x46e04 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax andl $0x20010, %eax # imm = 0x20010 cmpl $0x0, %eax je 0x46da3 movq 0x18(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax movq %rax, -0x70(%rbp) jmp 0x46dab movq 0x10(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movb %al, %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jne 0x46dc1 movb $0x0, -0x1(%rbp) jmp 0x46e96 movq -0x18(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x48(%rbp), %rax addq $-0x1, %rax movq %rax, -0x48(%rbp) jmp 0x46c9f movq 0x18(%rbp), %rcx movq -0x38(%rbp), %rax subq %rax, %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax cmpq -0x40(%rbp), %rax je 0x46e92 movq 0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x20(%rbp) movb $0x20, (%rax) movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x20, (%rax) jmp 0x46e62 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax,%rax)
my_like_range_simple: push rbp mov rbp, rsp mov [rbp+var_60], r8d mov eax, ecx mov ecx, [rbp+var_60] mov [rbp+var_5C], eax mov rax, rdx mov edx, [rbp+var_5C] mov [rbp+var_58], rax mov rax, rsi mov rsi, [rbp+var_58] mov [rbp+var_50], rax mov r8, rdi mov rdi, [rbp+var_50] mov al, r9b mov r9, [rbp+arg_20] mov r9, [rbp+arg_18] mov r9, [rbp+arg_10] mov r9, [rbp+arg_8] mov r9, [rbp+arg_0] mov [rbp+var_10], r8 mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_21], dl mov [rbp+var_22], cl mov [rbp+var_23], al mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+arg_8] mov [rbp+var_38], rax mov rax, [rbp+arg_8] add rax, [rbp+arg_0] mov [rbp+var_40], rax mov rax, [rbp+arg_0] mov rcx, [rbp+var_10] mov ecx, [rcx+9Ch] xor edx, edx div rcx mov [rbp+var_48], rax loc_46C9F: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_61], al jz short loc_46CC8 mov rcx, [rbp+arg_8] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_61], al jz short loc_46CC8 cmp [rbp+var_48], 0 setnbe al mov [rbp+var_61], al loc_46CC8: mov al, [rbp+var_61] test al, 1 jnz short loc_46CD4 jmp loc_46E49 loc_46CD4: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_21] cmp eax, ecx jnz short loc_46D2A mov rax, [rbp+var_18] add rax, 1 cmp rax, [rbp+var_30] jz short loc_46D2A mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_18] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl jmp loc_46E2C loc_46D2A: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_22] cmp eax, ecx jnz short loc_46D6E mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov cl, al mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl jmp loc_46E2C loc_46D6E: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_23] cmp eax, ecx jnz loc_46E04 mov rax, [rbp+var_10] mov eax, [rax+0Ch] and eax, 20010h cmp eax, 0 jz short loc_46DA3 mov rax, [rbp+arg_8] mov rcx, [rbp+var_38] sub rax, rcx mov [rbp+var_70], rax jmp short loc_46DAB loc_46DA3: mov rax, [rbp+arg_0] mov [rbp+var_70], rax loc_46DAB: mov rcx, [rbp+var_70] mov rax, [rbp+arg_18] mov [rax], rcx mov rcx, [rbp+arg_0] mov rax, [rbp+arg_20] mov [rax], rcx loc_46DC1: mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov cl, al mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] cmp rax, [rbp+var_40] jnz short loc_46DC1 mov [rbp+var_1], 0 jmp loc_46E96 loc_46E04: mov rax, [rbp+var_18] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl loc_46E2C: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_48] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_48], rax jmp loc_46C9F loc_46E49: mov rcx, [rbp+arg_8] mov rax, [rbp+var_38] sub rcx, rax mov rax, [rbp+arg_20] mov [rax], rcx mov rax, [rbp+arg_18] mov [rax], rcx loc_46E62: mov rax, [rbp+arg_8] cmp rax, [rbp+var_40] jz short loc_46E92 mov rax, [rbp+arg_10] mov rcx, rax add rcx, 1 mov [rbp+arg_10], rcx mov byte ptr [rax], 20h ; ' ' mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 20h ; ' ' jmp short loc_46E62 loc_46E92: mov [rbp+var_1], 0 loc_46E96: mov al, [rbp+var_1] pop rbp retn
char my_like_range_simple( long long a1, _BYTE *a2, long long a3, char a4, char a5, char a6, unsigned long long a7, _BYTE *a8, _BYTE *a9, unsigned long long *a10, _QWORD *a11) { char v11; // cl _BYTE *v12; // rax _BYTE *v13; // rax _BYTE *v14; // rax _BYTE *v15; // rax _BYTE *v16; // rax _BYTE *v17; // rax char v18; // cl _BYTE *v19; // rax _BYTE *v20; // rax _BYTE *v21; // rax _BYTE *v22; // rax unsigned long long v24; // [rsp+0h] [rbp-70h] bool v25; // [rsp+Fh] [rbp-61h] unsigned long long i; // [rsp+28h] [rbp-48h] _BYTE *v27; // [rsp+30h] [rbp-40h] long long v28; // [rsp+38h] [rbp-38h] _BYTE *v29; // [rsp+40h] [rbp-30h] _BYTE *v31; // [rsp+58h] [rbp-18h] v31 = a2; v29 = &a2[a3]; v28 = (long long)a8; v27 = &a8[a7]; for ( i = a7 / *(unsigned int *)(a1 + 156); ; --i ) { v25 = 0; if ( v31 != v29 ) { v25 = 0; if ( a8 != v27 ) v25 = i != 0; } if ( !v25 ) { *a11 = &a8[-v28]; *a10 = (unsigned long long)&a8[-v28]; while ( a8 != v27 ) { v21 = a9++; *v21 = 32; v22 = a8++; *v22 = 32; } return 0; } if ( (char)*v31 == a4 && v31 + 1 != v29 ) { v11 = *++v31; v12 = a9++; *v12 = *v31; v13 = a8++; *v13 = v11; goto LABEL_19; } if ( (char)*v31 == a5 ) { v14 = a8++; *v14 = 0; v15 = a9++; *v15 = *(_QWORD *)(a1 + 168); goto LABEL_19; } if ( (char)*v31 == a6 ) break; v18 = *v31; v19 = a9++; *v19 = *v31; v20 = a8++; *v20 = v18; LABEL_19: ++v31; } if ( (*(_DWORD *)(a1 + 12) & 0x20010) != 0 ) v24 = (unsigned long long)&a8[-v28]; else v24 = a7; *a10 = v24; *a11 = a7; do { v16 = a8++; *v16 = 0; v17 = a9++; *v17 = *(_QWORD *)(a1 + 168); } while ( a8 != v27 ); return 0; }
my_like_range_simple: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x60],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x5c] MOV qword ptr [RBP + -0x58],RAX MOV RAX,RSI MOV RSI,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV R8,RDI MOV RDI,qword ptr [RBP + -0x50] MOV AL,R9B MOV R9,qword ptr [RBP + 0x30] MOV R9,qword ptr [RBP + 0x28] MOV R9,qword ptr [RBP + 0x20] MOV R9,qword ptr [RBP + 0x18] MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],R8 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV byte ptr [RBP + -0x21],DL MOV byte ptr [RBP + -0x22],CL MOV byte ptr [RBP + -0x23],AL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x18] ADD RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x9c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x48],RAX LAB_00146c9f: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x61],AL JZ 0x00146cc8 MOV RCX,qword ptr [RBP + 0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x61],AL JZ 0x00146cc8 CMP qword ptr [RBP + -0x48],0x0 SETA AL MOV byte ptr [RBP + -0x61],AL LAB_00146cc8: MOV AL,byte ptr [RBP + -0x61] TEST AL,0x1 JNZ 0x00146cd4 JMP 0x00146e49 LAB_00146cd4: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x21] CMP EAX,ECX JNZ 0x00146d2a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00146d2a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL JMP 0x00146e2c LAB_00146d2a: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x22] CMP EAX,ECX JNZ 0x00146d6e MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL JMP 0x00146e2c LAB_00146d6e: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x23] CMP EAX,ECX JNZ 0x00146e04 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x20010 CMP EAX,0x0 JZ 0x00146da3 MOV RAX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX JMP 0x00146dab LAB_00146da3: MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x70],RAX LAB_00146dab: MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX LAB_00146dc1: MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x40] JNZ 0x00146dc1 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00146e96 LAB_00146e04: MOV RAX,qword ptr [RBP + -0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL LAB_00146e2c: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,-0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x00146c9f LAB_00146e49: MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x38] SUB RCX,RAX MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX LAB_00146e62: MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x40] JZ 0x00146e92 MOV RAX,qword ptr [RBP + 0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x20],RCX MOV byte ptr [RAX],0x20 MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x20 JMP 0x00146e62 LAB_00146e92: MOV byte ptr [RBP + -0x1],0x0 LAB_00146e96: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int8 my_like_range_simple (long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6, ulong param_7,char *param_8,char *param_9,ulong *param_10,ulong *param_11) { char cVar1; char *pcVar2; char *pcVar3; ulong uVar4; bool bVar5; ulong local_78; ulong local_50; char *local_20; pcVar3 = param_8; pcVar2 = param_8 + param_7; local_50 = param_7 / *(uint *)(param_1 + 0x9c); local_20 = param_2; while( true ) { bVar5 = false; if ((local_20 != param_2 + param_3) && (bVar5 = false, param_8 != pcVar2)) { bVar5 = local_50 != 0; } if (!bVar5) break; if ((*local_20 == param_4) && (local_20 + 1 != param_2 + param_3)) { local_20 = local_20 + 1; cVar1 = *local_20; *param_9 = cVar1; *param_8 = cVar1; } else if (*local_20 == param_5) { *param_8 = '\0'; *param_9 = (char)*(int8 *)(param_1 + 0xa8); } else { if (*local_20 == param_6) { if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) { local_78 = param_7; } else { local_78 = (long)param_8 - (long)pcVar3; } *param_10 = local_78; *param_11 = param_7; do { pcVar3 = param_8 + 1; *param_8 = '\0'; *param_9 = (char)*(int8 *)(param_1 + 0xa8); param_8 = pcVar3; param_9 = param_9 + 1; } while (pcVar3 != pcVar2); return 0; } cVar1 = *local_20; *param_9 = cVar1; *param_8 = cVar1; } param_9 = param_9 + 1; param_8 = param_8 + 1; local_20 = local_20 + 1; local_50 = local_50 - 1; } uVar4 = (long)param_8 - (long)pcVar3; *param_11 = uVar4; *param_10 = uVar4; while (param_8 != pcVar2) { *param_9 = ' '; *param_8 = ' '; param_8 = param_8 + 1; param_9 = param_9 + 1; } return 0; }
2,824
my_like_range_simple
eloqsql/strings/ctype-simple.c
my_bool my_like_range_simple(CHARSET_INFO *cs, const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str,char *max_str, size_t *min_length, size_t *max_length) { const char *end= ptr + ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; size_t charlen= res_length / cs->mbmaxlen; for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--) { if (*ptr == escape && ptr+1 != end) { ptr++; /* Skip escape */ *min_str++= *max_str++ = *ptr; continue; } if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++= (char) cs->max_sort_char; continue; } if (*ptr == w_many) /* '%' in SQL */ { /* Calculate length of keys */ *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? (size_t) (min_str - min_org) : res_length; *max_length= res_length; do { *min_str++= 0; *max_str++= (char) cs->max_sort_char; } while (min_str != min_end); return 0; } *min_str++= *max_str++ = *ptr; } *min_length= *max_length = (size_t) (min_str - min_org); while (min_str != min_end) *min_str++= *max_str++ = ' '; /* Because if key compression */ return 0; }
O3
c
my_like_range_simple: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r10 movq 0x30(%rbp), %rdx movq 0x28(%rbp), %r12 movq 0x20(%rbp), %rbx movq 0x18(%rbp), %r14 movq 0x10(%rbp), %r11 testq %r10, %r10 je 0x39af1 addq %rsi, %r10 movl 0x9c(%rdi), %r15d xorl %r13d, %r13d movq %r11, %rax xorl %edx, %edx divq %r15 addq $-0x1, %rax setb %dl cmpq %r13, %r11 je 0x39ae4 testb %dl, %dl je 0x39ae4 movb (%rsi), %r15b cmpb %cl, %r15b jne 0x39ab0 leaq 0x1(%rsi), %rdx cmpq %r10, %rdx je 0x39ab0 movb (%rdx), %sil movb %sil, (%rbx,%r13) movb %sil, (%r14,%r13) jmp 0x39ad6 cmpb %r8b, %r15b jne 0x39ac6 movb $0x0, (%r14,%r13) movb 0xa8(%rdi), %dl movb %dl, (%rbx,%r13) jmp 0x39ad3 cmpb %r9b, %r15b je 0x39b27 movb %r15b, (%rbx,%r13) movb %r15b, (%r14,%r13) movq %rsi, %rdx incq %rdx incq %r13 movq %rdx, %rsi cmpq %r10, %rdx jne 0x39a82 leaq (%r14,%r13), %rax addq %r13, %rbx movq 0x30(%rbp), %rdx jmp 0x39af4 movq %r14, %rax addq %r14, %r11 movq %rax, %rcx subq %r14, %rcx movq %rcx, (%rdx) movq %rcx, (%r12) cmpq %r11, %rax je 0x39b1a movb $0x20, %cl movb %cl, (%rbx) incq %rbx movb %cl, (%rax) incq %rax cmpq %r11, %rax jne 0x39b0b xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl $0x20010, 0xc(%rdi) # imm = 0x20010 movq %r13, %rax cmoveq %r11, %rax movq %rax, (%r12) movq 0x30(%rbp), %rax movq %r11, (%rax) movb $0x0, (%r14,%r13) movb 0xa8(%rdi), %al movb %al, (%rbx,%r13) incq %r13 cmpq %r13, %r11 jne 0x39b40 jmp 0x39b1a
my_like_range_simple: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r10, rdx mov rdx, [rbp+arg_20] mov r12, [rbp+arg_18] mov rbx, [rbp+arg_10] mov r14, [rbp+arg_8] mov r11, [rbp+arg_0] test r10, r10 jz loc_39AF1 add r10, rsi mov r15d, [rdi+9Ch] xor r13d, r13d mov rax, r11 xor edx, edx div r15 loc_39A82: add rax, 0FFFFFFFFFFFFFFFFh setb dl cmp r11, r13 jz short loc_39AE4 test dl, dl jz short loc_39AE4 mov r15b, [rsi] cmp r15b, cl jnz short loc_39AB0 lea rdx, [rsi+1] cmp rdx, r10 jz short loc_39AB0 mov sil, [rdx] mov [rbx+r13], sil mov [r14+r13], sil jmp short loc_39AD6 loc_39AB0: cmp r15b, r8b jnz short loc_39AC6 mov byte ptr [r14+r13], 0 mov dl, [rdi+0A8h] mov [rbx+r13], dl jmp short loc_39AD3 loc_39AC6: cmp r15b, r9b jz short loc_39B27 mov [rbx+r13], r15b mov [r14+r13], r15b loc_39AD3: mov rdx, rsi loc_39AD6: inc rdx inc r13 mov rsi, rdx cmp rdx, r10 jnz short loc_39A82 loc_39AE4: lea rax, [r14+r13] add rbx, r13 mov rdx, [rbp+arg_20] jmp short loc_39AF4 loc_39AF1: mov rax, r14 loc_39AF4: add r11, r14 mov rcx, rax sub rcx, r14 mov [rdx], rcx mov [r12], rcx cmp rax, r11 jz short loc_39B1A mov cl, 20h ; ' ' loc_39B0B: mov [rbx], cl inc rbx mov [rax], cl inc rax cmp rax, r11 jnz short loc_39B0B loc_39B1A: xor eax, eax pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_39B27: test dword ptr [rdi+0Ch], 20010h mov rax, r13 cmovz rax, r11 mov [r12], rax mov rax, [rbp+arg_20] mov [rax], r11 loc_39B40: mov byte ptr [r14+r13], 0 mov al, [rdi+0A8h] mov [rbx+r13], al inc r13 cmp r11, r13 jnz short loc_39B40 jmp short loc_39B1A
long long my_like_range_simple( long long a1, char *a2, long long a3, char a4, char a5, char a6, unsigned long long a7, long long a8, _BYTE *a9, unsigned long long *a10, _QWORD *a11) { _QWORD *v12; // rdx _BYTE *v13; // rbx char *v14; // r10 unsigned long long v15; // r13 unsigned long long v16; // rax bool v17; // cf char v18; // r15 char *v19; // rdx char v20; // si _BYTE *v21; // rax unsigned long long v23; // rax v12 = a11; v13 = a9; if ( a3 ) { v14 = &a2[a3]; v15 = 0LL; v16 = a7 / *(unsigned int *)(a1 + 156); while ( 1 ) { v17 = v16-- != 0; if ( a7 == v15 || !v17 ) { LABEL_14: v21 = (_BYTE *)(a8 + v15); v13 = &a9[v15]; v12 = a11; goto LABEL_16; } v18 = *a2; if ( *a2 != a4 || (v19 = a2 + 1, a2 + 1 == v14) ) { if ( v18 == a5 ) { *(_BYTE *)(a8 + v15) = 0; a9[v15] = *(_BYTE *)(a1 + 168); } else { if ( v18 == a6 ) { v23 = v15; if ( (*(_DWORD *)(a1 + 12) & 0x20010) == 0 ) v23 = a7; *a10 = v23; *a11 = a7; do { *(_BYTE *)(a8 + v15) = 0; a9[v15++] = *(_BYTE *)(a1 + 168); } while ( a7 != v15 ); return 0LL; } a9[v15] = v18; *(_BYTE *)(a8 + v15) = v18; } v19 = a2; } else { v20 = *v19; a9[v15] = *v19; *(_BYTE *)(a8 + v15) = v20; } ++v15; a2 = v19 + 1; if ( v19 + 1 == v14 ) goto LABEL_14; } } v21 = (_BYTE *)a8; LABEL_16: *v12 = &v21[-a8]; for ( *a10 = (unsigned long long)&v21[-a8]; v21 != (_BYTE *)(a8 + a7); ++v21 ) { *v13++ = 32; *v21 = 32; } return 0LL; }
my_like_range_simple: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R10,RDX MOV RDX,qword ptr [RBP + 0x30] MOV R12,qword ptr [RBP + 0x28] MOV RBX,qword ptr [RBP + 0x20] MOV R14,qword ptr [RBP + 0x18] MOV R11,qword ptr [RBP + 0x10] TEST R10,R10 JZ 0x00139af1 ADD R10,RSI MOV R15D,dword ptr [RDI + 0x9c] XOR R13D,R13D MOV RAX,R11 XOR EDX,EDX DIV R15 LAB_00139a82: ADD RAX,-0x1 SETC DL CMP R11,R13 JZ 0x00139ae4 TEST DL,DL JZ 0x00139ae4 MOV R15B,byte ptr [RSI] CMP R15B,CL JNZ 0x00139ab0 LEA RDX,[RSI + 0x1] CMP RDX,R10 JZ 0x00139ab0 MOV SIL,byte ptr [RDX] MOV byte ptr [RBX + R13*0x1],SIL MOV byte ptr [R14 + R13*0x1],SIL JMP 0x00139ad6 LAB_00139ab0: CMP R15B,R8B JNZ 0x00139ac6 MOV byte ptr [R14 + R13*0x1],0x0 MOV DL,byte ptr [RDI + 0xa8] MOV byte ptr [RBX + R13*0x1],DL JMP 0x00139ad3 LAB_00139ac6: CMP R15B,R9B JZ 0x00139b27 MOV byte ptr [RBX + R13*0x1],R15B MOV byte ptr [R14 + R13*0x1],R15B LAB_00139ad3: MOV RDX,RSI LAB_00139ad6: INC RDX INC R13 MOV RSI,RDX CMP RDX,R10 JNZ 0x00139a82 LAB_00139ae4: LEA RAX,[R14 + R13*0x1] ADD RBX,R13 MOV RDX,qword ptr [RBP + 0x30] JMP 0x00139af4 LAB_00139af1: MOV RAX,R14 LAB_00139af4: ADD R11,R14 MOV RCX,RAX SUB RCX,R14 MOV qword ptr [RDX],RCX MOV qword ptr [R12],RCX CMP RAX,R11 JZ 0x00139b1a MOV CL,0x20 LAB_00139b0b: MOV byte ptr [RBX],CL INC RBX MOV byte ptr [RAX],CL INC RAX CMP RAX,R11 JNZ 0x00139b0b LAB_00139b1a: XOR EAX,EAX POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00139b27: TEST dword ptr [RDI + 0xc],0x20010 MOV RAX,R13 CMOVZ RAX,R11 MOV qword ptr [R12],RAX MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],R11 LAB_00139b40: MOV byte ptr [R14 + R13*0x1],0x0 MOV AL,byte ptr [RDI + 0xa8] MOV byte ptr [RBX + R13*0x1],AL INC R13 CMP R11,R13 JNZ 0x00139b40 JMP 0x00139b1a
int8 my_like_range_simple (long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6, ulong param_7,int1 *param_8,int1 *param_9,ulong *param_10,ulong *param_11) { char *pcVar1; char cVar2; ulong uVar3; int1 *puVar4; char *pcVar5; ulong uVar6; bool bVar7; puVar4 = param_8; if (param_3 != 0) { pcVar5 = param_2 + param_3; uVar6 = 0; uVar3 = param_7 / *(uint *)(param_1 + 0x9c); do { bVar7 = uVar3 == 0; uVar3 = uVar3 - 1; if ((param_7 == uVar6) || (bVar7)) break; cVar2 = *param_2; if ((cVar2 == param_4) && (pcVar1 = param_2 + 1, pcVar1 != pcVar5)) { cVar2 = *pcVar1; param_9[uVar6] = cVar2; param_8[uVar6] = cVar2; param_2 = pcVar1; } else if (cVar2 == param_5) { param_8[uVar6] = 0; param_9[uVar6] = *(int1 *)(param_1 + 0xa8); } else { if (cVar2 == param_6) { uVar3 = uVar6; if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) { uVar3 = param_7; } *param_10 = uVar3; *param_11 = param_7; do { param_8[uVar6] = 0; param_9[uVar6] = *(int1 *)(param_1 + 0xa8); uVar6 = uVar6 + 1; } while (param_7 != uVar6); return 0; } param_9[uVar6] = cVar2; param_8[uVar6] = cVar2; } param_2 = param_2 + 1; uVar6 = uVar6 + 1; } while (param_2 != pcVar5); param_9 = param_9 + uVar6; puVar4 = param_8 + uVar6; } *param_11 = (long)puVar4 - (long)param_8; *param_10 = (long)puVar4 - (long)param_8; for (; puVar4 != param_8 + param_7; puVar4 = puVar4 + 1) { *param_9 = 0x20; param_9 = param_9 + 1; *puVar4 = 0x20; } return 0; }
2,825
minja::Parser::parseExpression(bool)
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) { auto left = parseLogicalOr(); if (it == end) return left; if (!allow_if_expr) return left; static std::regex if_tok(R"(if\b)"); if (consumeToken(if_tok).empty()) { return left; } auto location = get_location(); auto [condition, else_expr] = parseIfExpression(); return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr)); }
O2
cpp
minja::Parser::parseExpression(bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rdi callq 0x39e4e movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x2f2dd testb %bpl, %bpl je 0x2f2dd movb 0xb3b33(%rip), %al # 0xe2d78 testb %al, %al je 0x2f307 leaq 0xb3b04(%rip), %rdx # 0xe2d58 leaq 0x18(%rsp), %rdi pushq $0x1 popq %rcx movq %r14, %rsi callq 0x2f3f2 leaq 0x18(%rsp), %rdi movq 0x8(%rdi), %r15 callq 0x20d78 testq %r15, %r15 je 0x2f2dd leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x2efae leaq 0x18(%rsp), %rdi movq %r14, %rsi callq 0x3a04e leaq 0x28(%rsp), %r8 leaq 0x50(%rsp), %rdi leaq 0x38(%rsp), %rsi leaq 0x18(%rsp), %rdx movq %rsp, %rcx callq 0x3a23c leaq 0x58(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x2eeb2 leaq 0x18(%rsp), %rdi callq 0x3a264 leaq 0x40(%rsp), %rdi callq 0x2eeb2 jmp 0x2f2ef movaps (%rsp), %xmm0 andq $0x0, 0x8(%rsp) movups %xmm0, (%rbx) andq $0x0, (%rsp) leaq 0x8(%rsp), %rdi callq 0x2eeb2 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0xb3a6a(%rip), %rdi # 0xe2d78 callq 0x20bf0 testl %eax, %eax je 0x2f24d leaq 0xb3a36(%rip), %rdi # 0xe2d58 leaq 0x69f9e(%rip), %rsi # 0x992c7 pushq $0x10 popq %rdx callq 0x2ef2e leaq -0x3a4(%rip), %rdi # 0x2ef94 leaq 0xb3a19(%rip), %rsi # 0xe2d58 leaq 0xb3382(%rip), %rdx # 0xe26c8 callq 0x205f0 leaq 0xb3a26(%rip), %rdi # 0xe2d78 callq 0x20480 jmp 0x2f24d movq %rax, %rbx leaq 0xb3a12(%rip), %rdi # 0xe2d78 callq 0x20470 jmp 0x2f390 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x3a264 jmp 0x2f37f movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x2eeb2 jmp 0x2f390 jmp 0x2f38d movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x2eeb2 movq %rbx, %rdi callq 0x20b90
_ZN5minja6Parser15parseExpressionEb: push rbp push r15 push r14 push rbx sub rsp, 68h mov ebp, edx mov r14, rsi mov rbx, rdi mov rdi, rsp; this call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void) mov rax, [r14+20h] cmp rax, [r14+18h] jz loc_2F2DD test bpl, bpl jz loc_2F2DD mov al, cs:_ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok test al, al jz loc_2F307 loc_2F24D: lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok lea rdi, [rsp+88h+var_70] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rdi, [rsp+88h+var_70]; void * mov r15, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r15, r15 jz short loc_2F2DD lea rdi, [rsp+88h+var_50]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rdi, [rsp+88h+var_70]; this mov rsi, r14 call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void) lea r8, [rsp+88h+var_60] lea rdi, [rsp+88h+var_38] lea rsi, [rsp+88h+var_50] lea rdx, [rsp+88h+var_70] mov rcx, rsp call _ZSt11make_sharedIN5minja6IfExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_S6_EES4_IT_EDpOT0_; std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression> &&) lea rdi, [rsp+88h+var_30] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_70] call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair() lea rdi, [rsp+88h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_2F2EF loc_2F2DD: movaps xmm0, [rsp+88h+var_88] and qword ptr [rsp+88h+var_88+8], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rsp+88h+var_88], 0 loc_2F2EF: lea rdi, [rsp+88h+var_88+8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_2F307: lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_2F24D lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok lea rsi, aIfB; "if\\b" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_2F24D mov rbx, rax lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_2F390 mov rbx, rax lea rdi, [rsp+arg_10] call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair() jmp short loc_2F37F mov rbx, rax loc_2F37F: lea rdi, [rsp+arg_38] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_2F390 jmp short $+2 loc_2F38D: mov rbx, rax loc_2F390: lea rdi, [rsp+arg_0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseExpression(minja::Parser *this, _QWORD *a2, char a3) { int v4; // r8d int v5; // r9d long long v6; // r15 __int128 v7; // xmm0 __int128 v8; // xmm0 __int128 v10; // [rsp+0h] [rbp-88h] BYREF _BYTE v11[8]; // [rsp+18h] [rbp-70h] BYREF long long v12; // [rsp+20h] [rbp-68h] _BYTE v13[16]; // [rsp+28h] [rbp-60h] BYREF _BYTE v14[8]; // [rsp+38h] [rbp-50h] BYREF long long v15; // [rsp+40h] [rbp-48h] BYREF _OWORD v16[3]; // [rsp+50h] [rbp-38h] BYREF minja::Parser::parseLogicalOr((minja::Parser *)&v10); if ( a2[4] == a2[3] || !a3 ) goto LABEL_6; if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], "if\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]); } minja::Parser::consumeToken( (unsigned int)v11, (_DWORD)a2, (unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], 1, v4, v5, v10, SBYTE8(v10)); v6 = v12; std::string::~string(v11); if ( v6 ) { minja::Parser::get_location((minja::Parser *)v14, a2); minja::Parser::parseIfExpression((minja::Parser *)v11); std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>( v16, v14, v11, &v10, v13); v7 = v16[0]; *((_QWORD *)&v16[0] + 1) = 0LL; *(_OWORD *)this = v7; *(_QWORD *)&v16[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v16 + 1); std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair(v11); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15); } else { LABEL_6: v8 = v10; *((_QWORD *)&v10 + 1) = 0LL; *(_OWORD *)this = v8; *(_QWORD *)&v10 = 0LL; } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1); return this; }
2,826
minja::Parser::parseExpression(bool)
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) { auto left = parseLogicalOr(); if (it == end) return left; if (!allow_if_expr) return left; static std::regex if_tok(R"(if\b)"); if (consumeToken(if_tok).empty()) { return left; } auto location = get_location(); auto [condition, else_expr] = parseIfExpression(); return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr)); }
O3
cpp
minja::Parser::parseExpression(bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rdi callq 0x3c238 movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x2fbfb testb %bpl, %bpl je 0x2fbfb movb 0xc11b9(%rip), %al # 0xf0d48 testb %al, %al je 0x2fcc5 leaq 0xc118a(%rip), %rdx # 0xf0d28 leaq 0x30(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x2fd6a leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %r15 cmpq %rax, %rdi je 0x2fbcf movq 0x40(%rsp), %rsi incq %rsi callq 0x186a0 testq %r15, %r15 je 0x2fbfb movq (%r14), %rax movq %rax, 0x18(%rsp) movq 0x8(%r14), %rax movq %rax, 0x20(%rsp) testq %rax, %rax je 0x2fc16 movq 0xc03af(%rip), %rcx # 0xeffa0 cmpb $0x0, (%rcx) je 0x2fc12 incl 0x8(%rax) jmp 0x2fc16 movaps (%rsp), %xmm0 movups %xmm0, (%rbx) movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x28(%rsp) leaq 0x30(%rsp), %rdi movq %r14, %rsi callq 0x3c4c0 movl $0x60, %edi callq 0x18690 movq %rax, %r14 leaq 0x40(%rsp), %r8 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0xbee31(%rip), %rax # 0xeea88 movq %rax, (%r14) movq %r14, %r15 addq $0x10, %r15 leaq 0x18(%rsp), %rsi leaq 0x30(%rsp), %r12 movq %rsp, %rcx movq %r15, %rdi movq %r12, %rdx callq 0x5919a movq %r15, (%rbx) movq %r14, 0x8(%rbx) movq 0x18(%r12), %rdi testq %rdi, %rdi je 0x2fc8f callq 0x2f80e movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x2fc9e callq 0x2f80e movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x2fcad callq 0x2f80e movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x2fc02 callq 0x2f80e jmp 0x2fc02 leaq 0xc107c(%rip), %rdi # 0xf0d48 callq 0x18be0 testl %eax, %eax je 0x2fb97 leaq 0xc1048(%rip), %rdi # 0xf0d28 leaq 0x86458(%rip), %rsi # 0xb613f movl $0x10, %edx callq 0x2f87e leaq -0x412(%rip), %rdi # 0x2f8e6 leaq 0xc1029(%rip), %rsi # 0xf0d28 leaq 0xc0992(%rip), %rdx # 0xf0698 callq 0x185d0 leaq 0xc1036(%rip), %rdi # 0xf0d48 callq 0x18450 jmp 0x2fb97 movq %rax, %rbx leaq 0xc1022(%rip), %rdi # 0xf0d48 callq 0x18440 jmp 0x2fd53 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x3c68a jmp 0x2fd3f movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x2fd53 callq 0x2f80e jmp 0x2fd53 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x2fd62 callq 0x2f80e movq %rbx, %rdi callq 0x18b90
_ZN5minja6Parser15parseExpressionEb: push rbp push r15 push r14 push r12 push rbx sub rsp, 50h mov ebp, edx mov r14, rsi mov rbx, rdi mov rdi, rsp; this call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void) mov rax, [r14+20h] cmp rax, [r14+18h] jz short loc_2FBFB test bpl, bpl jz short loc_2FBFB mov al, cs:_ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok test al, al jz loc_2FCC5 loc_2FB97: lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok lea rdi, [rsp+78h+var_48] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rax, [rsp+78h+var_38] mov rdi, [rax-10h]; void * mov r15, [rax-8] cmp rdi, rax jz short loc_2FBCF mov rsi, [rsp+78h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2FBCF: test r15, r15 jz short loc_2FBFB mov rax, [r14] mov [rsp+78h+var_60], rax mov rax, [r14+8] mov [rsp+78h+var_58], rax test rax, rax jz short loc_2FC16 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_2FC12 inc dword ptr [rax+8] jmp short loc_2FC16 loc_2FBFB: movaps xmm0, [rsp+78h+var_78] movups xmmword ptr [rbx], xmm0 loc_2FC02: mov rax, rbx add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_2FC12: lock inc dword ptr [rax+8] loc_2FC16: mov rax, [r14+20h] sub rax, [r14+10h] mov [rsp+78h+var_50], rax lea rdi, [rsp+78h+var_48]; this mov rsi, r14 call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void) mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax lea r8, [rsp+78h+var_38] mov rax, 100000001h mov [r14+8], rax lea rax, off_EEA88 mov [r14], rax mov r15, r14 add r15, 10h lea rsi, [rsp+78h+var_60] lea r12, [rsp+78h+var_48] mov rcx, rsp mov rdi, r15 mov rdx, r12 call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &) mov [rbx], r15 mov [rbx+8], r14 mov rdi, [r12+18h] test rdi, rdi jz short loc_2FC8F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2FC8F: mov rdi, [rsp+78h+var_40] test rdi, rdi jz short loc_2FC9E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2FC9E: mov rdi, [rsp+78h+var_58] test rdi, rdi jz short loc_2FCAD call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2FCAD: mov rdi, qword ptr [rsp+78h+var_78+8] test rdi, rdi jz loc_2FC02 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_2FC02 loc_2FCC5: lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_2FB97 lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok lea rsi, aIfB; "if\\b" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_2FB97 mov rbx, rax lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_2FD53 mov rbx, rax lea rdi, [rsp+arg_28] call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair() jmp short loc_2FD3F mov rbx, rax loc_2FD3F: mov rdi, [rsp+arg_18] test rdi, rdi jz short loc_2FD53 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_2FD53 mov rbx, rax loc_2FD53: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_2FD62 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2FD62: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3) { int v4; // r8d int v5; // r9d volatile signed __int32 *v6; // r15 volatile signed __int32 *v7; // rax _QWORD *v9; // r14 __int128 v10; // [rsp+0h] [rbp-78h] BYREF long long v11; // [rsp+18h] [rbp-60h] BYREF volatile signed __int32 *v12; // [rsp+20h] [rbp-58h] long long v13; // [rsp+28h] [rbp-50h] long long *v14; // [rsp+30h] [rbp-48h] BYREF volatile signed __int32 *v15; // [rsp+38h] [rbp-40h] long long v16; // [rsp+40h] [rbp-38h] BYREF volatile signed __int32 *v17; // [rsp+48h] [rbp-30h] minja::Parser::parseLogicalOr((minja::Parser *)&v10); if ( a2[4] == a2[3] || !a3 ) goto LABEL_10; if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], "if\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]); } minja::Parser::consumeToken( (unsigned int)&v14, (_DWORD)a2, (unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], 1, v4, v5, v10, *((long long *)&v10 + 1)); v6 = v15; if ( v14 != &v16 ) operator delete(v14, v16 + 1); if ( v6 ) { v11 = *a2; v7 = (volatile signed __int32 *)a2[1]; v12 = v7; if ( v7 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v7 + 2); else _InterlockedIncrement(v7 + 2); } v13 = a2[4] - a2[2]; minja::Parser::parseIfExpression((minja::Parser *)&v14); v9 = (_QWORD *)operator new(0x60uLL); v9[1] = 0x100000001LL; *v9 = off_EEA88; minja::IfExpr::IfExpr(v9 + 2, &v11, &v14, &v10, &v16); *(_QWORD *)this = v9 + 2; *((_QWORD *)this + 1) = v9; if ( v17 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( v12 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12); if ( *((_QWORD *)&v10 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1)); } else { LABEL_10: *(_OWORD *)this = v10; } return this; }
parseExpression: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x0013c238 MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x0012fbfb TEST BPL,BPL JZ 0x0012fbfb MOV AL,byte ptr [0x001f0d48] TEST AL,AL JZ 0x0012fcc5 LAB_0012fb97: LEA RDX,[0x1f0d28] LEA RDI,[RSP + 0x30] MOV RSI,R14 MOV ECX,0x1 CALL 0x0012fd6a LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] MOV R15,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x0012fbcf MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x001186a0 LAB_0012fbcf: TEST R15,R15 JZ 0x0012fbfb MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX JZ 0x0012fc16 MOV RCX,qword ptr [0x001effa0] CMP byte ptr [RCX],0x0 JZ 0x0012fc12 INC dword ptr [RAX + 0x8] JMP 0x0012fc16 LAB_0012fbfb: MOVAPS XMM0,xmmword ptr [RSP] MOVUPS xmmword ptr [RBX],XMM0 LAB_0012fc02: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0012fc12: INC.LOCK dword ptr [RAX + 0x8] LAB_0012fc16: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x28],RAX LAB_0012fc23: LEA RDI,[RSP + 0x30] MOV RSI,R14 CALL 0x0013c4c0 LAB_0012fc30: MOV EDI,0x60 CALL 0x00118690 MOV R14,RAX LEA R8,[RSP + 0x40] MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x1eea88] MOV qword ptr [R14],RAX MOV R15,R14 ADD R15,0x10 LEA RSI,[RSP + 0x18] LEA R12,[RSP + 0x30] MOV RCX,RSP MOV RDI,R15 MOV RDX,R12 CALL 0x0015919a MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],R14 MOV RDI,qword ptr [R12 + 0x18] TEST RDI,RDI JZ 0x0012fc8f CALL 0x0012f80e LAB_0012fc8f: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0012fc9e CALL 0x0012f80e LAB_0012fc9e: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0012fcad CALL 0x0012f80e LAB_0012fcad: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0012fc02 CALL 0x0012f80e JMP 0x0012fc02 LAB_0012fcc5: LEA RDI,[0x1f0d48] CALL 0x00118be0 TEST EAX,EAX JZ 0x0012fb97 LAB_0012fcd9: LEA RDI,[0x1f0d28] LEA RSI,[0x1b613f] MOV EDX,0x10 CALL 0x0012f87e LAB_0012fcf1: LEA RDI,[0x12f8e6] LEA RSI,[0x1f0d28] LEA RDX,[0x1f0698] CALL 0x001185d0 LEA RDI,[0x1f0d48] CALL 0x00118450 JMP 0x0012fb97
/* minja::Parser::parseExpression(bool) */ int8 * minja::Parser::parseExpression(bool param_1) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int iVar2; int8 *puVar3; char in_DL; int8 *in_RSI; int7 in_register_00000039; int8 *puVar4; int8 local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_70; int8 local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; long local_50; long *local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30; puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1); parseLogicalOr(); if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) { if ((parseExpression(bool)::if_tok_abi_cxx11_ == '\0') && (iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_), iVar2 != 0)) { /* try { // try from 0012fcd9 to 0012fcf0 has its CatchHandler @ 0012fd1c */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001b613f,0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_); } /* try { // try from 0012fb97 to 0012fbaf has its CatchHandler @ 0012fd50 */ consumeToken(&local_48); p_Var1 = local_40; if (local_48 != &local_38) { operator_delete(local_48,local_38 + 1); } if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { local_60 = *in_RSI; local_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); *(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1; UNLOCK(); } else { *(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1; } } local_50 = in_RSI[4] - in_RSI[2]; /* try { // try from 0012fc23 to 0012fc2f has its CatchHandler @ 0012fd3c */ parseIfExpression(); /* try { // try from 0012fc30 to 0012fc39 has its CatchHandler @ 0012fd2d */ puVar3 = (int8 *)operator_new(0x60); puVar3[1] = 0x100000001; *puVar3 = &PTR___Sp_counted_ptr_inplace_001eea88; IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_60,(shared_ptr *)&local_48, (shared_ptr *)&local_78,(shared_ptr *)&local_38); *puVar4 = (IfExpr *)(puVar3 + 2); puVar4[1] = puVar3; if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30); } 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_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (p_Stack_70 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { return puVar4; } std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_70); return puVar4; } } *puVar4 = local_78; puVar4[1] = p_Stack_70; return puVar4; }
2,827
change_key_cache_param
eloqsql/mysys/mf_keycache.c
void change_key_cache_param(KEY_CACHE *keycache, uint division_limit, uint age_threshold) { if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); keycache->interface_funcs->change_param(keycache->keycache_cb, division_limit, age_threshold); pthread_mutex_unlock(&keycache->op_lock); } }
O0
c
change_key_cache_param: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0xe4422 movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x2a220 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0xc(%rbp), %esi movl -0x10(%rbp), %edx callq *%rax movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x2a1f0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
change_key_cache_param: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rax, [rbp+var_8] cmp byte ptr [rax+48h], 0 jz short loc_E4422 mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_lock mov rax, [rbp+var_8] mov rax, [rax+10h] mov rax, [rax+10h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov esi, [rbp+var_C] mov edx, [rbp+var_10] call rax mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_unlock loc_E4422: add rsp, 10h pop rbp retn
long long change_key_cache_param(long long a1, unsigned int a2, unsigned int a3) { long long result; // rax result = a1; if ( *(_BYTE *)(a1 + 72) ) { pthread_mutex_lock(a1 + 88); (*(void ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 16LL))(*(_QWORD *)(a1 + 8), a2, a3); return pthread_mutex_unlock(a1 + 88); } return result; }
change_key_cache_param: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x48],0x0 JZ 0x001e4422 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x10] CALL RAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x0012a1f0 LAB_001e4422: ADD RSP,0x10 POP RBP RET
void change_key_cache_param(long param_1,int4 param_2,int4 param_3) { if (*(char *)(param_1 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58)); (**(code **)(*(long *)(param_1 + 0x10) + 0x10))(*(int8 *)(param_1 + 8),param_2,param_3); pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58)); } return; }
2,828
my_wildcmp_8bit_impl
eloqsql/strings/ctype-simple.c
static int my_wildcmp_8bit_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, int recurse_level) { int result= -1; /* Not found, using wildcards */ if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (*wildstr != w_many && *wildstr != w_one) { if (*wildstr == escape && wildstr+1 != wildend) wildstr++; if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) return(1); /* No match */ if (wildstr == wildend) return(str != str_end); /* Match if both are at end */ result=1; /* Found an anchor char */ } if (*wildstr == w_one) { do { if (str == str_end) /* Skip one char if possible */ return(result); INC_PTR(cs,str,str_end); } while (++wildstr < wildend && *wildstr == w_one); if (wildstr == wildend) break; } if (*wildstr == w_many) { /* Found w_many */ uchar cmp; wildstr++; /* Remove any '%' and '_' from the wild search string */ for (; wildstr != wildend ; wildstr++) { if (*wildstr == w_many) continue; if (*wildstr == w_one) { if (str == str_end) return(-1); INC_PTR(cs,str,str_end); continue; } break; /* Not a wild character */ } if (wildstr == wildend) return(0); /* Ok if w_many is last */ if (str == str_end) return(-1); if ((cmp= *wildstr) == escape && wildstr+1 != wildend) cmp= *++wildstr; INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ cmp=likeconv(cs,cmp); do { /* Find the next character in the subject string equal to 'cmp', then check recursively my_wildcmp_8bit_impl() for the pattern remainder. */ while (str != str_end && (uchar) likeconv(cs,*str) != cmp) str++; if (str++ == str_end) return(-1); /* 'cmp' was not found in the subject string */ { int tmp=my_wildcmp_8bit_impl(cs,str,str_end, wildstr,wildend,escape,w_one, w_many, recurse_level+1); if (tmp <= 0) return(tmp); } /* The recursion call did not match. But it returned 1, which means the pattern remainder has some non-special characters. Continue, there is a chance that we'll find another 'cmp' at a different position in the subject string. */ } while (str != str_end); return(-1); } } return(str != str_end ? 1 : 0); }
O0
c
my_wildcmp_8bit_impl: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x20(%rbp), %eax movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF leaq 0x351f91(%rip), %rax # 0x3a6e78 cmpq $0x0, (%rax) je 0x54f0d leaq 0x351f84(%rip), %rax # 0x3a6e78 movq (%rax), %rax movl 0x20(%rbp), %edi callq *%rax cmpl $0x0, %eax je 0x54f0d movl $0x1, -0x4(%rbp) jmp 0x5523a jmp 0x54f0f movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x55222 jmp 0x54f1f movq -0x28(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl 0x18(%rbp), %ecx movb %al, -0x41(%rbp) je 0x54f40 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x54f4c jmp 0x54ff6 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl -0x34(%rbp), %eax jne 0x54f72 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x54f72 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x54fbc movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x10(%rbp), %rcx movq 0x58(%rcx), %rcx movq -0x18(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x18(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x54fc8 movl $0x1, -0x4(%rbp) jmp 0x5523a movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x54fea movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x5523a movl $0x1, -0x38(%rbp) jmp 0x54f1f movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x55064 jmp 0x55004 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x55019 movl -0x38(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x5523a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x5504c movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax sete %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x55004 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x55062 jmp 0x55222 jmp 0x55064 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x5521d movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x550d8 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x55098 jmp 0x550ca movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x550c8 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x550ba movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5523a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x550ca jmp 0x550d8 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x55080 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x550ee movl $0x0, -0x4(%rbp) jmp 0x5523a movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x55104 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5523a movq -0x28(%rbp), %rax movb (%rax), %al movb %al, -0x39(%rbp) movzbl %al, %eax cmpl -0x34(%rbp), %eax jne 0x55138 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x55138 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb 0x1(%rax), %al movb %al, -0x39(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movzbl -0x39(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x39(%rbp) jmp 0x55158 movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x43(%rbp) je 0x55186 movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movzbl -0x39(%rbp), %ecx cmpl %ecx, %eax setne %al movb %al, -0x43(%rbp) movb -0x43(%rbp), %al testb $0x1, %al jne 0x5518f jmp 0x5519d movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x55158 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) cmpq -0x20(%rbp), %rax jne 0x551bb movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5523a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d movl 0x10(%rbp), %r11d movl 0x18(%rbp), %r10d movl 0x20(%rbp), %eax addl $0x1, %eax movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movl %eax, 0x10(%rsp) callq 0x54eb0 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jg 0x55204 movl -0x40(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x5523a jmp 0x55206 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x55156 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5523a jmp 0x54f0f movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rsi xorl %eax, %eax movl $0x1, %ecx cmpq %rsi, %rdx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_wildcmp_8bit_impl: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_10] mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov [rbp+var_38], 0FFFFFFFFh lea rax, my_string_stack_guard cmp qword ptr [rax], 0 jz short loc_54F0D lea rax, my_string_stack_guard mov rax, [rax] mov edi, [rbp+arg_10] call rax cmp eax, 0 jz short loc_54F0D mov [rbp+var_4], 1 jmp loc_5523A loc_54F0D: jmp short $+2 loc_54F0F: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz loc_55222 jmp short $+2 loc_54F1F: mov rax, [rbp+var_28] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, [rbp+arg_8] mov [rbp+var_41], al jz short loc_54F40 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setnz al mov [rbp+var_41], al loc_54F40: mov al, [rbp+var_41] test al, 1 jnz short loc_54F4C jmp loc_54FF6 loc_54F4C: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+var_34] jnz short loc_54F72 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_54F72 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_54F72: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz short loc_54FBC mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_10] mov rcx, [rcx+58h] mov rdx, [rbp+var_18] mov rsi, rdx add rsi, 1 mov [rbp+var_18], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_54FC8 loc_54FBC: mov [rbp+var_4], 1 jmp loc_5523A loc_54FC8: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_54FEA mov rax, [rbp+var_18] cmp rax, [rbp+var_20] setnz al and al, 1 movzx eax, al mov [rbp+var_4], eax jmp loc_5523A loc_54FEA: mov [rbp+var_38], 1 jmp loc_54F1F loc_54FF6: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_55064 jmp short $+2 loc_55004: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_55019 mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp loc_5523A loc_55019: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rcx, [rbp+var_28] add rcx, 1 mov [rbp+var_28], rcx xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_42], al jnb short loc_5504C mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setz al mov [rbp+var_42], al loc_5504C: mov al, [rbp+var_42] test al, 1 jnz short loc_55004 mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_55062 jmp loc_55222 loc_55062: jmp short $+2 loc_55064: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz loc_5521D mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_55080: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz short loc_550D8 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz short loc_55098 jmp short loc_550CA loc_55098: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_550C8 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_550BA mov [rbp+var_4], 0FFFFFFFFh jmp loc_5523A loc_550BA: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_550CA loc_550C8: jmp short loc_550D8 loc_550CA: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_55080 loc_550D8: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_550EE mov [rbp+var_4], 0 jmp loc_5523A loc_550EE: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_55104 mov [rbp+var_4], 0FFFFFFFFh jmp loc_5523A loc_55104: mov rax, [rbp+var_28] mov al, [rax] mov [rbp+var_39], al movzx eax, al cmp eax, [rbp+var_34] jnz short loc_55138 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_55138 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov al, [rax+1] mov [rbp+var_39], al loc_55138: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+58h] movzx ecx, [rbp+var_39] mov al, [rax+rcx] mov [rbp+var_39], al loc_55156: jmp short $+2 loc_55158: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_43], al jz short loc_55186 mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_39] cmp eax, ecx setnz al mov [rbp+var_43], al loc_55186: mov al, [rbp+var_43] test al, 1 jnz short loc_5518F jmp short loc_5519D loc_5518F: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_55158 loc_5519D: mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx cmp rax, [rbp+var_20] jnz short loc_551BB mov [rbp+var_4], 0FFFFFFFFh jmp short loc_5523A loc_551BB: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] mov r11d, [rbp+arg_0] mov r10d, [rbp+arg_8] mov eax, [rbp+arg_10] add eax, 1 mov [rsp+60h+var_60], r11d mov [rsp+60h+var_58], r10d mov [rsp+60h+var_50], eax call my_wildcmp_8bit_impl mov [rbp+var_40], eax cmp [rbp+var_40], 0 jg short loc_55204 mov eax, [rbp+var_40] mov [rbp+var_4], eax jmp short loc_5523A loc_55204: jmp short $+2 loc_55206: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz loc_55156 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_5523A loc_5521D: jmp loc_54F0F loc_55222: mov rdx, [rbp+var_18] mov rsi, [rbp+var_20] xor eax, eax mov ecx, 1 cmp rdx, rsi cmovnz eax, ecx mov [rbp+var_4], eax loc_5523A: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long my_wildcmp_8bit_impl( long long a1, unsigned __int8 *a2, unsigned __int8 *a3, char *a4, char *a5, int a6, int a7, int a8, unsigned int a9) { char *v9; // rcx unsigned __int8 *v10; // rdx char *v11; // rax unsigned __int8 *v12; // rax bool v14; // [rsp+1Dh] [rbp-43h] bool v15; // [rsp+1Eh] [rbp-42h] bool v16; // [rsp+1Fh] [rbp-41h] int v17; // [rsp+20h] [rbp-40h] unsigned __int8 v18; // [rsp+27h] [rbp-39h] unsigned __int8 v19; // [rsp+27h] [rbp-39h] unsigned int v20; // [rsp+28h] [rbp-38h] char *i; // [rsp+38h] [rbp-28h] int v25; // [rsp+38h] [rbp-28h] v20 = -1; if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) ) { return 1; } else { do { if ( a4 != a5 ) { while ( 1 ) { v16 = 0; if ( *a4 != a8 ) v16 = *a4 != a7; if ( !v16 ) break; if ( *a4 == a6 && a4 + 1 != a5 ) ++a4; if ( a2 == a3 ) return 1; v9 = a4++; v10 = a2++; if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*v9) != *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v10) ) return 1; if ( a4 == a5 ) return a2 != a3; v20 = 1; } if ( *a4 != a7 ) continue; do { if ( a2 == a3 ) return v20; ++a2; ++a4; v15 = 0; if ( a4 < a5 ) v15 = *a4 == a7; } while ( v15 ); if ( a4 != a5 ) continue; } return a2 != a3; } while ( *a4 != a8 ); for ( i = a4 + 1; i != a5; ++i ) { if ( *i != a8 ) { if ( *i != a7 ) break; if ( a2 == a3 ) return (unsigned int)-1; ++a2; } } if ( i == a5 ) { return 0; } else if ( a2 == a3 ) { return (unsigned int)-1; } else { v18 = *i; if ( (unsigned __int8)*i == a6 && i + 1 != a5 ) { v11 = i; LODWORD(i) = (_DWORD)i + 1; v18 = v11[1]; } v25 = (_DWORD)i + 1; v19 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v18); do { while ( 1 ) { v14 = 0; if ( a2 != a3 ) v14 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *a2) != v19; if ( !v14 ) break; ++a2; } v12 = a2++; if ( v12 == a3 ) return (unsigned int)-1; v17 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)a3, v25, (_DWORD)a5, a6, a7, a8, a9 + 1); if ( v17 <= 0 ) return (unsigned int)v17; } while ( a2 != a3 ); return (unsigned int)-1; } } }
my_wildcmp_8bit_impl: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV dword ptr [RBP + -0x38],0xffffffff LEA RAX,[0x4a6e78] CMP qword ptr [RAX],0x0 JZ 0x00154f0d LEA RAX,[0x4a6e78] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + 0x20] CALL RAX CMP EAX,0x0 JZ 0x00154f0d MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015523a LAB_00154f0d: JMP 0x00154f0f LAB_00154f0f: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x00155222 JMP 0x00154f1f LAB_00154f1f: MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,dword ptr [RBP + 0x18] MOV byte ptr [RBP + -0x41],AL JZ 0x00154f40 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_00154f40: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x00154f4c JMP 0x00154ff6 LAB_00154f4c: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + -0x34] JNZ 0x00154f72 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00154f72 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00154f72: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x00154fbc MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x58] MOV RDX,qword ptr [RBP + -0x18] MOV RSI,RDX ADD RSI,0x1 MOV qword ptr [RBP + -0x18],RSI MOVZX EDX,byte ptr [RDX] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x00154fc8 LAB_00154fbc: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015523a LAB_00154fc8: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00154fea MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x0015523a LAB_00154fea: MOV dword ptr [RBP + -0x38],0x1 JMP 0x00154f1f LAB_00154ff6: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x00155064 JMP 0x00155004 LAB_00155004: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00155019 MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015523a LAB_00155019: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x42],AL JNC 0x0015504c MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETZ AL MOV byte ptr [RBP + -0x42],AL LAB_0015504c: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x00155004 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00155062 JMP 0x00155222 LAB_00155062: JMP 0x00155064 LAB_00155064: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x0015521d MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00155080: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x001550d8 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x00155098 JMP 0x001550ca LAB_00155098: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x001550c8 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001550ba MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0015523a LAB_001550ba: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001550ca LAB_001550c8: JMP 0x001550d8 LAB_001550ca: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00155080 LAB_001550d8: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001550ee MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015523a LAB_001550ee: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00155104 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0015523a LAB_00155104: MOV RAX,qword ptr [RBP + -0x28] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x39],AL MOVZX EAX,AL CMP EAX,dword ptr [RBP + -0x34] JNZ 0x00155138 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00155138 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0x39],AL LAB_00155138: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOVZX ECX,byte ptr [RBP + -0x39] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x39],AL LAB_00155156: JMP 0x00155158 LAB_00155158: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x43],AL JZ 0x00155186 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,byte ptr [RBP + -0x39] CMP EAX,ECX SETNZ AL MOV byte ptr [RBP + -0x43],AL LAB_00155186: MOV AL,byte ptr [RBP + -0x43] TEST AL,0x1 JNZ 0x0015518f JMP 0x0015519d LAB_0015518f: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00155158 LAB_0015519d: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001551bb MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0015523a LAB_001551bb: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x34] MOV R11D,dword ptr [RBP + 0x10] MOV R10D,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D MOV dword ptr [RSP + 0x10],EAX CALL 0x00154eb0 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JG 0x00155204 MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015523a LAB_00155204: JMP 0x00155206 LAB_00155206: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00155156 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0015523a LAB_0015521d: JMP 0x00154f0f LAB_00155222: MOV RDX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ECX,0x1 CMP RDX,RSI CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_0015523a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
uint my_wildcmp_8bit_impl (long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,uint param_6, int param_7,int param_8,int param_9) { char cVar1; int iVar2; uint uVar3; byte *pbVar4; bool bVar5; byte local_41; uint local_40; byte *local_30; byte *local_20; uint local_c; local_40 = 0xffffffff; local_30 = param_4; local_20 = param_2; if ((my_string_stack_guard == (code *)0x0) || (iVar2 = (*my_string_stack_guard)(param_9), iVar2 == 0)) { do { if (local_30 == param_5) { LAB_00155222: return (uint)(local_20 != param_3); } while( true ) { bVar5 = false; if ((char)*local_30 != param_8) { bVar5 = (char)*local_30 != param_7; } if (!bVar5) break; if (((int)(char)*local_30 == param_6) && (local_30 + 1 != param_5)) { local_30 = local_30 + 1; } if (local_20 == param_3) { return 1; } if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_30) != *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20)) { return 1; } if (local_30 + 1 == param_5) { return (uint)(local_20 + 1 != param_3); } local_40 = 1; local_30 = local_30 + 1; local_20 = local_20 + 1; } if ((char)*local_30 == param_7) { do { if (local_20 == param_3) { return local_40; } local_20 = local_20 + 1; local_30 = local_30 + 1; bVar5 = false; if (local_30 < param_5) { bVar5 = (char)*local_30 == param_7; } } while (bVar5); if (local_30 == param_5) goto LAB_00155222; } } while ((char)*local_30 != param_8); while (pbVar4 = local_30, local_30 = pbVar4 + 1, local_30 != param_5) { if ((char)*local_30 != param_8) { if ((char)*local_30 != param_7) break; if (local_20 == param_3) { return 0xffffffff; } local_20 = local_20 + 1; } } if (local_30 == param_5) { local_c = 0; } else if (local_20 == param_3) { local_c = 0xffffffff; } else { local_41 = *local_30; if ((local_41 == param_6) && (pbVar4 + 2 != param_5)) { local_30 = pbVar4 + 2; local_41 = pbVar4[2]; } cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)local_41); do { while( true ) { bVar5 = false; if (local_20 != param_3) { bVar5 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20) != cVar1; } if (!bVar5) break; local_20 = local_20 + 1; } pbVar4 = local_20 + 1; if (local_20 == param_3) { return 0xffffffff; } uVar3 = my_wildcmp_8bit_impl (param_1,pbVar4,param_3,local_30 + 1,param_5,param_6,param_7,param_8, param_9 + 1); if ((int)uVar3 < 1) { return uVar3; } local_20 = pbVar4; } while (pbVar4 != param_3); local_c = 0xffffffff; } } else { local_c = 1; } return local_c; }
2,829
wt_thd_cond_timedwait
eloqsql/mysys/waiting_threads.c
int wt_thd_cond_timedwait(WT_THD *thd, mysql_mutex_t *mutex) { int ret= WT_TIMEOUT; struct timespec timeout; my_hrtime_t before, after, starttime; WT_RESOURCE *rc= thd->waiting_for; ulonglong end_wait_time; DBUG_ENTER("wt_thd_cond_timedwait"); DBUG_PRINT("wt", ("enter: thd=%s, rc=%p", thd->name, rc)); #ifndef DBUG_OFF if (rc->cond_mutex) DBUG_ASSERT(rc->cond_mutex == mutex); else rc->cond_mutex= mutex; mysql_mutex_assert_owner(mutex); #endif before= starttime= my_hrtime(); rc_wrlock(rc); if (rc->owners.elements == 0) ret= WT_OK; rc_unlock(rc); end_wait_time= starttime.val *1000 + (*thd->timeout_short)*1000000ULL; set_timespec_time_nsec(timeout, end_wait_time); if (ret == WT_TIMEOUT && !thd->killed) ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout); if (ret == WT_TIMEOUT && !thd->killed) { int r= deadlock(thd, thd, 0, *thd->deadlock_search_depth_long); if (r == WT_FREE_TO_GO) ret= WT_OK; else if (r != WT_OK) ret= WT_DEADLOCK; else if (*thd->timeout_long > *thd->timeout_short) { end_wait_time= starttime.val *1000 + (*thd->timeout_long)*1000000ULL; set_timespec_time_nsec(timeout, end_wait_time); if (!thd->killed) ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout); } } after= my_hrtime(); if (stop_waiting(thd) == WT_DEADLOCK) /* if we're killed */ ret= WT_DEADLOCK; increment_wait_stats(after.val-before.val, ret); if (ret == WT_OK) increment_success_stats(); DBUG_RETURN(ret); }
O3
c
wt_thd_cond_timedwait: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, -0x40(%rbp) movq %rdi, %r14 movq 0x28(%rdi), %r15 callq 0x9f9bc movq %rax, %r13 leaq 0x18(%r15), %r12 movq %r12, %rdi callq 0xa5879 movl 0xe8(%r15), %ebx movq %r12, %rdi callq 0xa591a movq 0x38(%r14), %rax imulq $0xf4240, (%rax), %rcx # imm = 0xF4240 movq %r13, -0x48(%rbp) imulq $0x3e8, %r13, %r13 # imm = 0x3E8 addq %r13, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00 subq %rax, %rcx movq %rdx, -0x38(%rbp) movq %rcx, -0x30(%rbp) testl %ebx, %ebx je 0xa83ea cmpb $0x0, 0x60(%r14) je 0xa83f2 movl $0x6e, %r12d jmp 0xa84bc xorl %r12d, %r12d jmp 0xa84bc leaq 0xa8(%r15), %rdi cmpq $0x0, 0xd8(%r15) jne 0xa8540 leaq -0x38(%rbp), %rdx movq %rdi, %r15 movq -0x40(%rbp), %rbx movq %rbx, %rsi callq 0x29660 movl %eax, %r12d cmpl $0x6e, %eax jne 0xa84bc cmpb $0x0, 0x60(%r14) jne 0xa83df movq 0x50(%r14), %rax movl (%rax), %ecx xorl %r12d, %r12d movq %r14, %rdi movq %r14, %rsi xorl %edx, %edx callq 0xa81ca cmpl $-0x3, %eax je 0xa84bc testl %eax, %eax jne 0xa84b6 movq 0x38(%r14), %rcx movq 0x48(%r14), %rax movq (%rax), %rax cmpq (%rcx), %rax jbe 0xa83df imulq $0xf4240, %rax, %rcx # imm = 0xF4240 addq %r13, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx movq %rdx, -0x38(%rbp) imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00 subq %rax, %rcx movq %rcx, -0x30(%rbp) cmpb $0x0, 0x60(%r14) movl $0x6e, %r12d jne 0xa84bc leaq -0x38(%rbp), %rdx movq %r15, %rdi movq %rbx, %rsi movl $0x437, %ecx # imm = 0x437 callq 0xa8565 movl %eax, %r12d jmp 0xa84bc movl $0xffffffff, %r12d # imm = 0xFFFFFFFF callq 0x9f9bc movq %rax, %r15 movq %r14, %rdi callq 0xa8302 cmpl $-0x1, %eax cmovel %eax, %r12d leaq 0xb62206(%rip), %rcx # 0xc0a6e0 cmpl $0x6e, %r12d jne 0xa84e6 addq $0x60, %rcx jmp 0xa852c subq -0x48(%rbp), %r15 movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD movq %r15, %rax mulq %rdx shrq $0x3, %rdx xorl %eax, %eax leaq 0xb62359(%rip), %rsi # 0xc0a860 cmpq (%rsi,%rax,8), %rdx jbe 0xa851b incq %rax cmpq $0x18, %rax jne 0xa8507 movl $0x18, %eax movl %eax, %eax incl (%rcx,%rax,4) testl %r12d, %r12d jne 0xa852e leaq 0xb6232c(%rip), %rcx # 0xc0a858 incl (%rcx) movl %r12d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x35a29(%rip), %rcx # 0xddf70 leaq -0x38(%rbp), %rdx movq %rdi, %r15 movq -0x40(%rbp), %rbx movq %rbx, %rsi movl $0x42a, %r8d # imm = 0x42A callq 0x2ef00 jmp 0xa841a
wt_thd_cond_timedwait: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rbp+var_40], rsi mov r14, rdi mov r15, [rdi+28h] call my_hrtime mov r13, rax lea r12, [r15+18h] mov rdi, r12 call my_rw_wrlock mov ebx, [r15+0E8h] mov rdi, r12 call my_rw_unlock mov rax, [r14+38h] imul rcx, [rax], 0F4240h mov [rbp+var_48], r13 imul r13, 3E8h add rcx, r13 mov rax, rcx shr rax, 9 mov rdx, 44B82FA09B5A53h mul rdx shr rdx, 0Bh imul rax, rdx, 3B9ACA00h sub rcx, rax mov [rbp+var_38], rdx mov [rbp+var_30], rcx test ebx, ebx jz short loc_A83EA cmp byte ptr [r14+60h], 0 jz short loc_A83F2 loc_A83DF: mov r12d, 6Eh ; 'n' jmp loc_A84BC loc_A83EA: xor r12d, r12d jmp loc_A84BC loc_A83F2: lea rdi, [r15+0A8h] cmp qword ptr [r15+0D8h], 0 jnz loc_A8540 lea rdx, [rbp+var_38] mov r15, rdi mov rbx, [rbp+var_40] mov rsi, rbx call _pthread_cond_timedwait loc_A841A: mov r12d, eax cmp eax, 6Eh ; 'n' jnz loc_A84BC cmp byte ptr [r14+60h], 0 jnz short loc_A83DF mov rax, [r14+50h] mov ecx, [rax] xor r12d, r12d mov rdi, r14 mov rsi, r14 xor edx, edx call deadlock cmp eax, 0FFFFFFFDh jz short loc_A84BC test eax, eax jnz short loc_A84B6 mov rcx, [r14+38h] mov rax, [r14+48h] mov rax, [rax] cmp rax, [rcx] jbe short loc_A83DF imul rcx, rax, 0F4240h add rcx, r13 mov rax, rcx shr rax, 9 mov rdx, 44B82FA09B5A53h mul rdx shr rdx, 0Bh mov [rbp+var_38], rdx imul rax, rdx, 3B9ACA00h sub rcx, rax mov [rbp+var_30], rcx cmp byte ptr [r14+60h], 0 mov r12d, 6Eh ; 'n' jnz short loc_A84BC lea rdx, [rbp+var_38] mov rdi, r15 mov rsi, rbx mov ecx, 437h call inline_mysql_cond_timedwait mov r12d, eax jmp short loc_A84BC loc_A84B6: mov r12d, 0FFFFFFFFh loc_A84BC: call my_hrtime mov r15, rax mov rdi, r14 call stop_waiting cmp eax, 0FFFFFFFFh cmovz r12d, eax lea rcx, wt_wait_stats cmp r12d, 6Eh ; 'n' jnz short loc_A84E6 add rcx, 60h ; '`' jmp short loc_A852C loc_A84E6: sub r15, [rbp+var_48] mov rdx, 0CCCCCCCCCCCCCCCDh mov rax, r15 mul rdx shr rdx, 3 xor eax, eax lea rsi, wt_wait_table loc_A8507: cmp rdx, [rsi+rax*8] jbe short loc_A851B inc rax cmp rax, 18h jnz short loc_A8507 mov eax, 18h loc_A851B: mov eax, eax inc dword ptr [rcx+rax*4] test r12d, r12d jnz short loc_A852E lea rcx, wt_success_stats loc_A852C: inc dword ptr [rcx] loc_A852E: mov eax, r12d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A8540: lea rcx, aWorkspaceLlm4b_43; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, [rbp+var_38] mov r15, rdi mov rbx, [rbp+var_40] mov rsi, rbx mov r8d, 42Ah call psi_cond_timedwait jmp loc_A841A
long long wt_thd_cond_timedwait(long long a1, long long a2) { long long v3; // r15 unsigned long long v4; // r13 int v5; // ebx long long v6; // r13 unsigned long long v7; // rcx unsigned int v8; // r12d long long v9; // rdi long long v10; // r15 long long v11; // rbx unsigned int v12; // eax int v13; // eax unsigned long long v14; // rax unsigned long long v15; // r15 _DWORD *v16; // rcx long long v17; // rax unsigned long long v19; // [rsp+8h] [rbp-48h] unsigned long long v20; // [rsp+18h] [rbp-38h] BYREF unsigned long long v21; // [rsp+20h] [rbp-30h] v3 = *(_QWORD *)(a1 + 40); v4 = my_hrtime(); my_rw_wrlock(v3 + 24); v5 = *(_DWORD *)(v3 + 232); my_rw_unlock(v3 + 24); v19 = v4; v6 = 1000 * v4; v7 = v6 + 1000000LL * **(_QWORD **)(a1 + 56); v20 = v7 / 0x3B9ACA00; v21 = v7 % 0x3B9ACA00; if ( !v5 ) { v8 = 0; goto LABEL_15; } if ( *(_BYTE *)(a1 + 96) ) goto LABEL_3; v9 = v3 + 168; if ( *(_QWORD *)(v3 + 216) ) { v10 = v3 + 168; v11 = a2; v12 = psi_cond_timedwait( v9, a2, (long long)&v20, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c", 0x42Au); } else { v10 = v3 + 168; v11 = a2; v12 = pthread_cond_timedwait(v9, a2, &v20); } v8 = v12; if ( v12 != 110 ) goto LABEL_15; if ( *(_BYTE *)(a1 + 96) ) goto LABEL_3; v8 = 0; v13 = deadlock(a1, a1, 0, **(_DWORD **)(a1 + 80)); if ( v13 == -3 ) goto LABEL_15; if ( v13 ) { v8 = -1; goto LABEL_15; } v14 = **(_QWORD **)(a1 + 72); if ( v14 <= **(_QWORD **)(a1 + 56) ) { LABEL_3: v8 = 110; goto LABEL_15; } v20 = (v6 + 1000000 * v14) / 0x3B9ACA00; v21 = (v6 + 1000000 * v14) % 0x3B9ACA00; v8 = 110; if ( !*(_BYTE *)(a1 + 96) ) v8 = inline_mysql_cond_timedwait(v10, v11, &v20, 1079LL); LABEL_15: v15 = my_hrtime(); if ( (unsigned int)stop_waiting(a1) == -1 ) v8 = -1; if ( v8 == 110 ) { v16 = &wt_wait_stats[24]; LABEL_25: ++*v16; return v8; } v17 = 0LL; while ( (v15 - v19) / 0xA > wt_wait_table[v17] ) { if ( ++v17 == 24 ) { LODWORD(v17) = 24; break; } } ++wt_wait_stats[(unsigned int)v17]; if ( !v8 ) { v16 = &wt_success_stats; goto LABEL_25; } return v8; }
wt_thd_cond_timedwait: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x40],RSI MOV R14,RDI MOV R15,qword ptr [RDI + 0x28] CALL 0x0019f9bc MOV R13,RAX LEA R12,[R15 + 0x18] MOV RDI,R12 CALL 0x001a5879 MOV EBX,dword ptr [R15 + 0xe8] MOV RDI,R12 CALL 0x001a591a MOV RAX,qword ptr [R14 + 0x38] IMUL RCX,qword ptr [RAX],0xf4240 MOV qword ptr [RBP + -0x48],R13 IMUL R13,R13,0x3e8 ADD RCX,R13 MOV RAX,RCX SHR RAX,0x9 MOV RDX,0x44b82fa09b5a53 MUL RDX SHR RDX,0xb IMUL RAX,RDX,0x3b9aca00 SUB RCX,RAX MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x30],RCX TEST EBX,EBX JZ 0x001a83ea CMP byte ptr [R14 + 0x60],0x0 JZ 0x001a83f2 LAB_001a83df: MOV R12D,0x6e JMP 0x001a84bc LAB_001a83ea: XOR R12D,R12D JMP 0x001a84bc LAB_001a83f2: LEA RDI,[R15 + 0xa8] CMP qword ptr [R15 + 0xd8],0x0 JNZ 0x001a8540 LEA RDX,[RBP + -0x38] MOV R15,RDI MOV RBX,qword ptr [RBP + -0x40] MOV RSI,RBX CALL 0x00129660 LAB_001a841a: MOV R12D,EAX CMP EAX,0x6e JNZ 0x001a84bc CMP byte ptr [R14 + 0x60],0x0 JNZ 0x001a83df MOV RAX,qword ptr [R14 + 0x50] MOV ECX,dword ptr [RAX] XOR R12D,R12D MOV RDI,R14 MOV RSI,R14 XOR EDX,EDX CALL 0x001a81ca CMP EAX,-0x3 JZ 0x001a84bc TEST EAX,EAX JNZ 0x001a84b6 MOV RCX,qword ptr [R14 + 0x38] MOV RAX,qword ptr [R14 + 0x48] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RCX] JBE 0x001a83df IMUL RCX,RAX,0xf4240 ADD RCX,R13 MOV RAX,RCX SHR RAX,0x9 MOV RDX,0x44b82fa09b5a53 MUL RDX SHR RDX,0xb MOV qword ptr [RBP + -0x38],RDX IMUL RAX,RDX,0x3b9aca00 SUB RCX,RAX MOV qword ptr [RBP + -0x30],RCX CMP byte ptr [R14 + 0x60],0x0 MOV R12D,0x6e JNZ 0x001a84bc LEA RDX,[RBP + -0x38] MOV RDI,R15 MOV RSI,RBX MOV ECX,0x437 CALL 0x001a8565 MOV R12D,EAX JMP 0x001a84bc LAB_001a84b6: MOV R12D,0xffffffff LAB_001a84bc: CALL 0x0019f9bc MOV R15,RAX MOV RDI,R14 CALL 0x001a8302 CMP EAX,-0x1 CMOVZ R12D,EAX LEA RCX,[0xd0a6e0] CMP R12D,0x6e JNZ 0x001a84e6 ADD RCX,0x60 JMP 0x001a852c LAB_001a84e6: SUB R15,qword ptr [RBP + -0x48] MOV RDX,-0x3333333333333333 MOV RAX,R15 MUL RDX SHR RDX,0x3 XOR EAX,EAX LEA RSI,[0xd0a860] LAB_001a8507: CMP RDX,qword ptr [RSI + RAX*0x8] JBE 0x001a851b INC RAX CMP RAX,0x18 JNZ 0x001a8507 MOV EAX,0x18 LAB_001a851b: MOV EAX,EAX INC dword ptr [RCX + RAX*0x4] TEST R12D,R12D JNZ 0x001a852e LEA RCX,[0xd0a858] LAB_001a852c: INC dword ptr [RCX] LAB_001a852e: MOV EAX,R12D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a8540: LEA RCX,[0x1ddf70] LEA RDX,[RBP + -0x38] MOV R15,RDI MOV RBX,qword ptr [RBP + -0x40] MOV RSI,RBX MOV R8D,0x42a CALL 0x0012ef00 JMP 0x001a841a
int wt_thd_cond_timedwait(long param_1,pthread_mutex_t *param_2) { pthread_cond_t *__cond; int iVar1; int iVar2; long lVar3; long lVar4; ulong uVar5; int *piVar6; timespec local_40; lVar4 = *(long *)(param_1 + 0x28); lVar3 = my_hrtime(); my_rw_wrlock(lVar4 + 0x18); iVar1 = *(int *)(lVar4 + 0xe8); my_rw_unlock(lVar4 + 0x18); local_40.tv_nsec = **(long **)(param_1 + 0x38) * 1000000 + lVar3 * 1000; local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000; local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000; if (iVar1 == 0) { iVar1 = 0; goto LAB_001a84bc; } if (*(char *)(param_1 + 0x60) == '\0') { __cond = (pthread_cond_t *)(lVar4 + 0xa8); if (*(long *)(lVar4 + 0xd8) == 0) { iVar1 = pthread_cond_timedwait(__cond,param_2,&local_40); } else { iVar1 = psi_cond_timedwait(__cond,param_2,&local_40, "/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c", 0x42a); } if (iVar1 != 0x6e) goto LAB_001a84bc; if (*(char *)(param_1 + 0x60) == '\0') { iVar1 = 0; iVar2 = deadlock(param_1,param_1,0,**(int4 **)(param_1 + 0x50)); if (iVar2 == -3) goto LAB_001a84bc; if (iVar2 != 0) { iVar1 = -1; goto LAB_001a84bc; } if (**(ulong **)(param_1 + 0x38) < **(ulong **)(param_1 + 0x48)) { local_40.tv_nsec = **(ulong **)(param_1 + 0x48) * 1000000 + lVar3 * 1000; local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000; local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000; iVar1 = 0x6e; if (*(char *)(param_1 + 0x60) == '\0') { iVar1 = inline_mysql_cond_timedwait(__cond,param_2,&local_40,0x437); } goto LAB_001a84bc; } } } iVar1 = 0x6e; LAB_001a84bc: lVar4 = my_hrtime(); iVar2 = stop_waiting(param_1); if (iVar2 == -1) { iVar1 = -1; } if (iVar1 == 0x6e) { piVar6 = (int *)&DAT_00d0a740; } else { uVar5 = 0; do { if ((ulong)(lVar4 - lVar3) / 10 <= (ulong)(&wt_wait_table)[uVar5]) goto LAB_001a851b; uVar5 = uVar5 + 1; } while (uVar5 != 0x18); uVar5 = 0x18; LAB_001a851b: (&wt_wait_stats)[uVar5 & 0xffffffff] = (&wt_wait_stats)[uVar5 & 0xffffffff] + 1; if (iVar1 != 0) { return iVar1; } piVar6 = &wt_success_stats; } *piVar6 = *piVar6 + 1; return iVar1; }
2,830
aimrt::runtime::core::logger::ConsoleLoggerBackend::Initialize(YAML::Node)
aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/console_logger_backend.cc
void ConsoleLoggerBackend::Initialize(YAML::Node options_node) { if (options_node && !options_node.IsNull()) options_ = options_node.as<Options>(); #if defined(_WIN32) if (options_.print_color) set_console_window(); #endif log_executor_ = get_executor_func_(options_.log_executor_name); AIMRT_ASSERT(log_executor_, "Invalid log executor name: {}", options_.log_executor_name); AIMRT_ASSERT(log_executor_.ThreadSafe(), "Log executor {} must be thread safe.", options_.log_executor_name); if (!options_.pattern.empty()) { pattern_ = options_.pattern; } formatter_.SetPattern(pattern_); options_node = options_; run_flag_.store(true); }
O3
cpp
aimrt::runtime::core::logger::ConsoleLoggerBackend::Initialize(YAML::Node): pushq %r15 pushq %r14 pushq %rbx subq $0x80, %rsp movq %rsi, %r14 movq %rdi, %rbx cmpb $0x1, (%rsi) jne 0x6abdf movq 0x38(%r14), %rax testq %rax, %rax je 0x6abcf movq (%rax), %rax movq (%rax), %rax cmpb $0x1, (%rax) jne 0x6abdf movq %r14, %rdi callq 0x23af8 testb %al, %al je 0x6ac80 movq 0x30(%rbx), %rax movq 0x38(%rbx), %rcx movq %rcx, 0x8(%rsp) movq %rax, 0x10(%rsp) cmpq $0x0, 0x80(%rbx) je 0x6ae6d leaq 0x70(%rbx), %rdi leaq 0x8(%rsp), %rsi callq *0x88(%rbx) movq %rax, 0x90(%rbx) testq %rax, %rax je 0x6ad2b leaq 0x90(%rbx), %rdi callq 0x5e438 testb %al, %al je 0x6ad8c cmpq $0x0, 0x58(%rbx) je 0x6ac49 leaq 0x50(%rbx), %rsi leaq 0x130(%rbx), %rdi callq 0x1f200 leaq 0x8(%rbx), %r15 leaq 0x110(%rbx), %rdi leaq 0x130(%rbx), %rsi callq 0x5e51a movq %r14, %rdi movq %r15, %rsi callq 0x6bfe0 movb $0x1, %al xchgb %al, 0x98(%rbx) addq $0x80, %rsp popq %rbx popq %r14 popq %r15 retq cmpb $0x0, (%r14) je 0x6ae72 leaq 0x70(%rsp), %rsi movq %r14, (%rsi) leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x6b436 movb (%r15), %al movb %al, 0x8(%rbx) leaq 0x10(%rbx), %rdi leaq 0x10(%rsp), %rsi callq 0x1e6d0 leaq 0x30(%rbx), %rdi leaq 0x30(%rsp), %rsi callq 0x1e6d0 leaq 0x50(%rbx), %rdi leaq 0x50(%rsp), %r15 movq %r15, %rsi callq 0x1e6d0 movq (%r15), %rdi leaq 0x60(%rsp), %rax cmpq %rax, %rdi je 0x6acec movq 0x60(%rsp), %rsi incq %rsi callq 0x1f250 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6ad07 movq 0x40(%rsp), %rsi incq %rsi callq 0x1f250 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6abdf movq 0x20(%rsp), %rsi incq %rsi callq 0x1f250 jmp 0x6abdf movl $0x28, %edi callq 0x1e7e0 movq %rax, %r14 movups 0x30(%rbx), %xmm0 leaq 0x70(%rsp), %r8 movaps %xmm0, (%r8) leaq 0x1c918(%rip), %rsi # 0x87664 leaq 0x8(%rsp), %rdi movl $0x1d, %edx movl $0xd, %ecx callq 0x25059 leaq 0x436e9(%rip), %rax # 0xae450 movq %rax, (%r14) movq %r14, %rax addq $0x18, %rax movq %rax, 0x8(%r14) leaq 0x18(%rsp), %r15 movq -0x10(%r15), %rcx cmpq %r15, %rcx jne 0x6aded movups (%r15), %xmm0 movups %xmm0, (%rax) jmp 0x6adfa movl $0x28, %edi callq 0x1e7e0 movq %rax, %r14 movups 0x30(%rbx), %xmm0 leaq 0x70(%rsp), %r8 movaps %xmm0, (%r8) leaq 0x1c8d5(%rip), %rsi # 0x87682 leaq 0x8(%rsp), %rdi movl $0x24, %edx movl $0xd, %ecx callq 0x25059 leaq 0x43688(%rip), %rax # 0xae450 movq %rax, (%r14) movq %r14, %rax addq $0x18, %rax movq %rax, 0x8(%r14) leaq 0x18(%rsp), %r15 movq -0x10(%r15), %rcx cmpq %r15, %rcx jne 0x6ae2e movups (%r15), %xmm0 movups %xmm0, (%rax) jmp 0x6ae3b movq %rcx, 0x8(%r14) movq 0x18(%rsp), %rax movq %rax, 0x18(%r14) movq 0x10(%rsp), %rax movq %rax, 0x10(%r14) movq %r15, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) leaq 0x43563(%rip), %rsi # 0xae380 leaq -0x470f0(%rip), %rdx # 0x23d34 movq %r14, %rdi callq 0x1fec0 jmp 0x6ae6d movq %rcx, 0x8(%r14) movq 0x18(%rsp), %rax movq %rax, 0x18(%r14) movq 0x10(%rsp), %rax movq %rax, 0x10(%r14) movq %r15, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) leaq 0x43522(%rip), %rsi # 0xae380 leaq -0x47131(%rip), %rdx # 0x23d34 movq %r14, %rdi callq 0x1fec0 callq 0x1e580 movl $0x40, %edi callq 0x1e7e0 movq %rax, %r15 addq $0x8, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x24096 leaq 0x44943(%rip), %rsi # 0xaf7d8 leaq 0x158e8(%rip), %rdx # 0x80784 movq %r15, %rdi callq 0x1fec0 movq %rax, %rbx movq %r15, %rdi jmp 0x6aed2 jmp 0x6aeb0 jmp 0x6aecc movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x6aed7 movq 0x18(%rsp), %rsi incq %rsi callq 0x1f250 jmp 0x6aed7 movq %rax, %rbx movq %r14, %rdi callq 0x1ebc0 movq %rbx, %rdi callq 0x1ffd0 nop
_ZN5aimrt7runtime4core6logger20ConsoleLoggerBackend10InitializeEN4YAML4NodeE: push r15 push r14 push rbx sub rsp, 80h mov r14, rsi mov rbx, rdi cmp byte ptr [rsi], 1 jnz short loc_6ABDF mov rax, [r14+38h] test rax, rax jz short loc_6ABCF mov rax, [rax] mov rax, [rax] cmp byte ptr [rax], 1 jnz short loc_6ABDF loc_6ABCF: mov rdi, r14; this call _ZNK4YAML4Node6IsNullEv; YAML::Node::IsNull(void) test al, al jz loc_6AC80 loc_6ABDF: mov rax, [rbx+30h] mov rcx, [rbx+38h] mov [rsp+98h+var_90], rcx; int mov [rsp+98h+var_88], rax; unsigned __int64 cmp qword ptr [rbx+80h], 0 jz loc_6AE6D lea rdi, [rbx+70h] lea rsi, [rsp+98h+var_90] call qword ptr [rbx+88h] mov [rbx+90h], rax test rax, rax jz loc_6AD2B lea rdi, [rbx+90h]; this call _ZNK5aimrt8executor11ExecutorRef10ThreadSafeEv; aimrt::executor::ExecutorRef::ThreadSafe(void) test al, al jz loc_6AD8C cmp qword ptr [rbx+58h], 0 jz short loc_6AC49 lea rsi, [rbx+50h] lea rdi, [rbx+130h] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_6AC49: lea r15, [rbx+8] lea rdi, [rbx+110h] lea rsi, [rbx+130h] call _ZN5aimrt7runtime4core6logger12LogFormatter10SetPatternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; aimrt::runtime::core::logger::LogFormatter::SetPattern(std::string const&) mov rdi, r14; this mov rsi, r15 call _ZN4YAML4Node6AssignIN5aimrt7runtime4core6logger20ConsoleLoggerBackend7OptionsEEEvRKT_; YAML::Node::Assign<aimrt::runtime::core::logger::ConsoleLoggerBackend::Options>(aimrt::runtime::core::logger::ConsoleLoggerBackend::Options const&) mov al, 1 xchg al, [rbx+98h] add rsp, 80h pop rbx pop r14 pop r15 retn loc_6AC80: cmp byte ptr [r14], 0 jz loc_6AE72 lea rsi, [rsp+98h+var_28] mov [rsi], r14 lea r15, [rsp+98h+var_90] mov rdi, r15 call _ZNK4YAML5as_ifIN5aimrt7runtime4core6logger20ConsoleLoggerBackend7OptionsEvEclEv; YAML::as_if<aimrt::runtime::core::logger::ConsoleLoggerBackend::Options,void>::operator()(void) mov al, [r15] mov [rbx+8], al lea rdi, [rbx+10h] lea rsi, [rsp+98h+var_88] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbx+30h] lea rsi, [rsp+98h+var_68] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbx+50h] lea r15, [rsp+98h+var_48] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * lea rax, [rsp+98h+var_38] cmp rdi, rax jz short loc_6ACEC mov rsi, [rsp+98h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6ACEC: lea rax, [rsp+98h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6AD07 mov rsi, [rsp+98h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6AD07: lea rax, [rsp+98h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz loc_6ABDF mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_6ABDF loc_6AD2B: mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov r14, rax movups xmm0, xmmword ptr [rbx+30h] lea r8, [rsp+98h+var_28]; int movaps xmmword ptr [r8], xmm0 lea rsi, aInvalidLogExec; "Invalid log executor name: {}" lea rdi, [rsp+98h+var_90]; int mov edx, 1Dh; int mov ecx, 0Dh; int call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) lea rax, off_AE450 mov [r14], rax mov rax, r14 add rax, 18h mov [r14+8], rax lea r15, [rsp+98h+var_80] mov rcx, [r15-10h] cmp rcx, r15 jnz short loc_6ADED movups xmm0, xmmword ptr [r15] movups xmmword ptr [rax], xmm0 jmp short loc_6ADFA loc_6AD8C: mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov r14, rax movups xmm0, xmmword ptr [rbx+30h] lea r8, [rsp+98h+var_28]; int movaps xmmword ptr [r8], xmm0 lea rsi, aLogExecutorMus; "Log executor {} must be thread safe." lea rdi, [rsp+98h+var_90]; int mov edx, 24h ; '$'; int mov ecx, 0Dh; int call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) lea rax, off_AE450 mov [r14], rax mov rax, r14 add rax, 18h mov [r14+8], rax lea r15, [rsp+98h+var_80] mov rcx, [r15-10h] cmp rcx, r15 jnz short loc_6AE2E movups xmm0, xmmword ptr [r15] movups xmmword ptr [rax], xmm0 jmp short loc_6AE3B loc_6ADED: mov [r14+8], rcx mov rax, [rsp+98h+var_80] mov [r14+18h], rax loc_6ADFA: mov rax, [rsp+98h+var_88] mov [r14+10h], rax mov [rsp+98h+var_90], r15 mov [rsp+98h+var_88], 0 mov byte ptr [rsp+98h+var_80], 0 lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_6AE6D loc_6AE2E: mov [r14+8], rcx mov rax, [rsp+98h+var_80] mov [r14+18h], rax loc_6AE3B: mov rax, [rsp+98h+var_88] mov [r14+10h], rax mov [rsp+98h+var_90], r15 mov [rsp+98h+var_88], 0 mov byte ptr [rsp+98h+var_80], 0 lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_6AE6D: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_6AE72: mov edi, 40h ; '@'; thrown_size call ___cxa_allocate_exception mov r15, rax add r14, 8 mov rdi, rax mov rsi, r14 call _ZN4YAML11InvalidNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::InvalidNode::InvalidNode(std::string const&) lea rsi, _ZTIN4YAML11InvalidNodeE; lptinfo lea rdx, _ZN4YAML9ExceptionD2Ev; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov rbx, rax mov rdi, r15 jmp short loc_6AED2 jmp short loc_6AEB0 jmp short loc_6AECC loc_6AEB0: mov rbx, rax mov rdi, [rsp+98h+var_90]; void * cmp rdi, r15 jz short loc_6AED7 mov rsi, [rsp+98h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6AED7 loc_6AECC: mov rbx, rax mov rdi, r14; void * loc_6AED2: call ___cxa_free_exception loc_6AED7: mov rdi, rbx call __Unwind_Resume
char aimrt::runtime::core::logger::ConsoleLoggerBackend::Initialize(long long a1, YAML::Node *a2) { _BYTE ***v2; // rax unsigned long long v3; // rax long long v4; // rax char result; // al char *v6; // r14 char *v7; // r14 void *exception; // r15 int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d void *v13; // [rsp+8h] [rbp-90h] BYREF unsigned long long v14; // [rsp+10h] [rbp-88h] BYREF __int128 v15; // [rsp+18h] [rbp-80h] BYREF long long *v16; // [rsp+30h] [rbp-68h] BYREF long long v17; // [rsp+40h] [rbp-58h] BYREF long long *v18; // [rsp+50h] [rbp-48h] BYREF long long v19; // [rsp+60h] [rbp-38h] BYREF __int128 v20; // [rsp+70h] [rbp-28h] if ( *(_BYTE *)a2 == 1 ) { v2 = (_BYTE ***)*((_QWORD *)a2 + 7); if ( (!v2 || ***v2 == 1) && !YAML::Node::IsNull(a2) ) { if ( !*(_BYTE *)a2 ) { exception = __cxa_allocate_exception(0x40uLL); YAML::InvalidNode::InvalidNode((_DWORD)exception, (_DWORD)a2 + 8, v9, v10, v11, v12); __cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::InvalidNode, YAML::Exception::~Exception); } *(_QWORD *)&v20 = a2; YAML::as_if<aimrt::runtime::core::logger::ConsoleLoggerBackend::Options,void>::operator()(&v13); *(_BYTE *)(a1 + 8) = (_BYTE)v13; std::string::operator=((_QWORD *)(a1 + 16), (long long)&v14); std::string::operator=((_QWORD *)(a1 + 48), (long long)&v16); std::string::operator=((_QWORD *)(a1 + 80), (long long)&v18); if ( v18 != &v19 ) operator delete(v18, v19 + 1); if ( v16 != &v17 ) operator delete(v16, v17 + 1); if ( (__int128 *)v14 != (__int128 *)((char *)&v15 + 8) ) operator delete((void *)v14, *((_QWORD *)&v15 + 1) + 1LL); } } v3 = *(_QWORD *)(a1 + 48); v13 = *(void **)(a1 + 56); v14 = v3; if ( !*(_QWORD *)(a1 + 128) ) std::__throw_bad_function_call(); v4 = (*(long long ( **)(long long, void **))(a1 + 136))(a1 + 112, &v13); *(_QWORD *)(a1 + 144) = v4; if ( !v4 ) { v6 = (char *)__cxa_allocate_exception(0x28uLL); v20 = *(_OWORD *)(a1 + 48); fmt::v10::vformat[abi:cxx11](&v13); *(_QWORD *)v6 = off_AE450; *((_QWORD *)v6 + 1) = v6 + 24; if ( v13 == &v15 ) { *(_OWORD *)(v6 + 24) = v15; } else { *((_QWORD *)v6 + 1) = v13; *((_QWORD *)v6 + 3) = v15; } *((_QWORD *)v6 + 2) = v14; v13 = &v15; v14 = 0LL; LOBYTE(v15) = 0; __cxa_throw( v6, (struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException, (void (*)(void *))aimrt::common::util::AimRTException::~AimRTException); } if ( !(unsigned __int8)aimrt::executor::ExecutorRef::ThreadSafe((aimrt::executor::ExecutorRef *)(a1 + 144)) ) { v7 = (char *)__cxa_allocate_exception(0x28uLL); v20 = *(_OWORD *)(a1 + 48); fmt::v10::vformat[abi:cxx11](&v13); *(_QWORD *)v7 = off_AE450; *((_QWORD *)v7 + 1) = v7 + 24; if ( v13 == &v15 ) { *(_OWORD *)(v7 + 24) = v15; } else { *((_QWORD *)v7 + 1) = v13; *((_QWORD *)v7 + 3) = v15; } *((_QWORD *)v7 + 2) = v14; v13 = &v15; v14 = 0LL; LOBYTE(v15) = 0; __cxa_throw( v7, (struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException, (void (*)(void *))aimrt::common::util::AimRTException::~AimRTException); } if ( *(_QWORD *)(a1 + 88) ) std::string::_M_assign(a1 + 304, a1 + 80); aimrt::runtime::core::logger::LogFormatter::SetPattern((_QWORD *)(a1 + 272), (long long *)(a1 + 304)); YAML::Node::Assign<aimrt::runtime::core::logger::ConsoleLoggerBackend::Options>(a2); result = *(_BYTE *)(a1 + 152); *(_BYTE *)(a1 + 152) = 1; return result; }
Initialize: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x80 MOV R14,RSI MOV RBX,RDI CMP byte ptr [RSI],0x1 JNZ 0x0016abdf MOV RAX,qword ptr [R14 + 0x38] TEST RAX,RAX JZ 0x0016abcf MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX],0x1 JNZ 0x0016abdf LAB_0016abcf: MOV RDI,R14 CALL 0x00123af8 TEST AL,AL JZ 0x0016ac80 LAB_0016abdf: MOV RAX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RBX + 0x38] MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RBX + 0x80],0x0 JZ 0x0016ae6d LEA RDI,[RBX + 0x70] LEA RSI,[RSP + 0x8] CALL qword ptr [RBX + 0x88] MOV qword ptr [RBX + 0x90],RAX TEST RAX,RAX JZ 0x0016ad2b LEA RDI,[RBX + 0x90] CALL 0x0015e438 TEST AL,AL JZ 0x0016ad8c CMP qword ptr [RBX + 0x58],0x0 JZ 0x0016ac49 LEA RSI,[RBX + 0x50] LEA RDI,[RBX + 0x130] CALL 0x0011f200 LAB_0016ac49: LEA R15,[RBX + 0x8] LEA RDI,[RBX + 0x110] LEA RSI,[RBX + 0x130] CALL 0x0015e51a MOV RDI,R14 MOV RSI,R15 CALL 0x0016bfe0 MOV AL,0x1 XCHG byte ptr [RBX + 0x98],AL ADD RSP,0x80 POP RBX POP R14 POP R15 RET LAB_0016ac80: CMP byte ptr [R14],0x0 JZ 0x0016ae72 LEA RSI,[RSP + 0x70] MOV qword ptr [RSI],R14 LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0016b436 MOV AL,byte ptr [R15] MOV byte ptr [RBX + 0x8],AL LEA RDI,[RBX + 0x10] LEA RSI,[RSP + 0x10] CALL 0x0011e6d0 LEA RDI,[RBX + 0x30] LEA RSI,[RSP + 0x30] CALL 0x0011e6d0 LEA RDI,[RBX + 0x50] LEA R15,[RSP + 0x50] MOV RSI,R15 CALL 0x0011e6d0 MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0x60] CMP RDI,RAX JZ 0x0016acec MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x0011f250 LAB_0016acec: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016ad07 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x0011f250 LAB_0016ad07: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016abdf MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011f250 JMP 0x0016abdf LAB_0016ad2b: MOV EDI,0x28 CALL 0x0011e7e0 MOV R14,RAX MOVUPS XMM0,xmmword ptr [RBX + 0x30] LEA R8,[RSP + 0x70] MOVAPS xmmword ptr [R8],XMM0 LAB_0016ad45: LEA RSI,[0x187664] LEA RDI,[RSP + 0x8] MOV EDX,0x1d MOV ECX,0xd CALL 0x00125059 LAB_0016ad60: LEA RAX,[0x1ae450] MOV qword ptr [R14],RAX MOV RAX,R14 ADD RAX,0x18 MOV qword ptr [R14 + 0x8],RAX LEA R15,[RSP + 0x18] MOV RCX,qword ptr [R15 + -0x10] CMP RCX,R15 JNZ 0x0016aded MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RAX],XMM0 JMP 0x0016adfa LAB_0016ad8c: MOV EDI,0x28 CALL 0x0011e7e0 MOV R14,RAX MOVUPS XMM0,xmmword ptr [RBX + 0x30] LEA R8,[RSP + 0x70] MOVAPS xmmword ptr [R8],XMM0 LAB_0016ada6: LEA RSI,[0x187682] LEA RDI,[RSP + 0x8] MOV EDX,0x24 MOV ECX,0xd CALL 0x00125059 LEA RAX,[0x1ae450] MOV qword ptr [R14],RAX MOV RAX,R14 ADD RAX,0x18 MOV qword ptr [R14 + 0x8],RAX LEA R15,[RSP + 0x18] MOV RCX,qword ptr [R15 + -0x10] CMP RCX,R15 JNZ 0x0016ae2e MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RAX],XMM0 JMP 0x0016ae3b LAB_0016aded: MOV qword ptr [R14 + 0x8],RCX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [R14 + 0x18],RAX LAB_0016adfa: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 LAB_0016ae16: LEA RSI,[0x1ae380] LEA RDX,[0x123d34] MOV RDI,R14 CALL 0x0011fec0 LAB_0016ae2e: MOV qword ptr [R14 + 0x8],RCX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [R14 + 0x18],RAX LAB_0016ae3b: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 LAB_0016ae57: LEA RSI,[0x1ae380] LEA RDX,[0x123d34] MOV RDI,R14 CALL 0x0011fec0 LAB_0016ae6d: CALL 0x0011e580 LAB_0016ae72: MOV EDI,0x40 CALL 0x0011e7e0 MOV R15,RAX ADD R14,0x8 LAB_0016ae83: MOV RDI,RAX MOV RSI,R14 CALL 0x00124096 LAB_0016ae8e: LEA RSI,[0x1af7d8] LEA RDX,[0x180784] MOV RDI,R15 CALL 0x0011fec0
/* aimrt::runtime::core::logger::ConsoleLoggerBackend::Initialize(YAML::Node) */ ConsoleLoggerBackend __thiscall aimrt::runtime::core::logger::ConsoleLoggerBackend::Initialize (ConsoleLoggerBackend *this,Node *param_2) { ConsoleLoggerBackend CVar1; char cVar2; long lVar3; int8 *puVar4; InvalidNode *this_00; uint *local_90; int4 *local_88; uint local_80; int4 uStack_7c; int4 uStack_78; int4 uStack_74; long *local_68 [2]; long local_58 [2]; long *local_48 [2]; long local_38 [2]; Node *local_28; int4 uStack_20; int4 uStack_1c; if ((*param_2 == (Node)0x1) && ((*(int8 **)(param_2 + 0x38) == (int8 *)0x0 || (**(char **)**(int8 **)(param_2 + 0x38) == '\x01')))) { cVar2 = YAML::Node::IsNull(param_2); if (cVar2 == '\0') { if (*param_2 == (Node)0x0) { this_00 = (InvalidNode *)__cxa_allocate_exception(0x40); /* try { // try from 0016ae83 to 0016ae8d has its CatchHandler @ 0016aea4 */ YAML::InvalidNode::InvalidNode(this_00,(string *)(param_2 + 8)); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,&YAML::InvalidNode::typeinfo,YAML::BadInsert::~BadInsert); } local_28 = param_2; YAML::as_if<aimrt::runtime::core::logger::ConsoleLoggerBackend::Options,void>::operator() ((as_if<aimrt::runtime::core::logger::ConsoleLoggerBackend::Options,void> *) &local_90); this[8] = local_90._0_1_; std::__cxx11::string::operator=((string *)(this + 0x10),(string *)&local_88); std::__cxx11::string::operator=((string *)(this + 0x30),(string *)local_68); std::__cxx11::string::operator=((string *)(this + 0x50),(string *)local_48); if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } if (local_68[0] != local_58) { operator_delete(local_68[0],local_58[0] + 1); } if (local_88 != &uStack_78) { operator_delete(local_88,CONCAT44(uStack_74,uStack_78) + 1); } } } local_88 = *(int4 **)(this + 0x30); local_90 = *(uint **)(this + 0x38); if (*(long *)(this + 0x80) == 0) { /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); } lVar3 = (**(code **)(this + 0x88))(this + 0x70,&local_90); *(long *)(this + 0x90) = lVar3; if (lVar3 == 0) { puVar4 = (int8 *)__cxa_allocate_exception(0x28); local_28 = *(Node **)(this + 0x30); uStack_20 = *(int4 *)(this + 0x38); uStack_1c = *(int4 *)(this + 0x3c); /* try { // try from 0016ad45 to 0016ad5f has its CatchHandler @ 0016aecc */ fmt::v10::vformat_abi_cxx11_(&local_90,"Invalid log executor name: {}",0x1d,0xd); *puVar4 = &PTR__AimRTException_001ae450; puVar4[1] = puVar4 + 3; if (local_90 == &local_80) { *(uint *)(puVar4 + 3) = local_80; *(int4 *)((long)puVar4 + 0x1c) = uStack_7c; *(int4 *)(puVar4 + 4) = uStack_78; *(int4 *)((long)puVar4 + 0x24) = uStack_74; } else { puVar4[1] = local_90; puVar4[3] = CONCAT44(uStack_7c,local_80); } puVar4[2] = local_88; local_88 = (int4 *)0x0; local_80 = local_80 & 0xffffff00; local_90 = &local_80; /* try { // try from 0016ae16 to 0016ae2b has its CatchHandler @ 0016aeb0 */ /* WARNING: Subroutine does not return */ __cxa_throw(puVar4,&common::util::AimRTException::typeinfo, common::util::AimRTException::~AimRTException); } cVar2 = executor::ExecutorRef::ThreadSafe((ExecutorRef *)(this + 0x90)); if (cVar2 != '\0') { if (*(long *)(this + 0x58) != 0) { std::__cxx11::string::_M_assign((string *)(this + 0x130),(string *)(this + 0x50)); } LogFormatter::SetPattern((LogFormatter *)(this + 0x110),(string *)(this + 0x130)); YAML::Node::Assign<aimrt::runtime::core::logger::ConsoleLoggerBackend::Options> (param_2,(Options *)(this + 8)); LOCK(); CVar1 = this[0x98]; this[0x98] = (ConsoleLoggerBackend)0x1; UNLOCK(); return CVar1; } puVar4 = (int8 *)__cxa_allocate_exception(0x28); local_28 = *(Node **)(this + 0x30); uStack_20 = *(int4 *)(this + 0x38); uStack_1c = *(int4 *)(this + 0x3c); /* try { // try from 0016ada6 to 0016adc0 has its CatchHandler @ 0016aeae */ fmt::v10::vformat_abi_cxx11_(&local_90,"Log executor {} must be thread safe.",0x24,0xd); *puVar4 = &PTR__AimRTException_001ae450; puVar4[1] = puVar4 + 3; if (local_90 == &local_80) { *(uint *)(puVar4 + 3) = local_80; *(int4 *)((long)puVar4 + 0x1c) = uStack_7c; *(int4 *)(puVar4 + 4) = uStack_78; *(int4 *)((long)puVar4 + 0x24) = uStack_74; } else { puVar4[1] = local_90; puVar4[3] = CONCAT44(uStack_7c,local_80); } puVar4[2] = local_88; local_88 = (int4 *)0x0; local_80 = local_80 & 0xffffff00; local_90 = &local_80; /* try { // try from 0016ae57 to 0016ae6c has its CatchHandler @ 0016aeac */ /* WARNING: Subroutine does not return */ __cxa_throw(puVar4,&common::util::AimRTException::typeinfo, common::util::AimRTException::~AimRTException); }
2,831
ma_memmap_file
eloqsql/storage/maria/ma_packrec.c
my_bool _ma_memmap_file(MARIA_HA *info) { MARIA_SHARE *share= info->s; DBUG_ENTER("maria_memmap_file"); if (!info->s->file_map) { if (mysql_file_seek(info->dfile.file, 0L, MY_SEEK_END, MYF(0)) < share->state.state.data_file_length+MEMMAP_EXTRA_MARGIN) { DBUG_PRINT("warning",("File isn't extended for memmap")); DBUG_RETURN(0); } if (_ma_dynmap_file(info, share->state.state.data_file_length)) DBUG_RETURN(0); } info->opt_flag|= MEMMAP_USED; info->read_record= share->read_record= _ma_read_mempack_record; share->scan= _ma_read_rnd_mempack_record; DBUG_RETURN(1); }
O0
c
ma_memmap_file: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x5f0(%rax) jne 0x47a6d movq -0x10(%rbp), %rax movl 0x480(%rax), %edx leaq 0x10bde9(%rip), %rdi # 0x153802 movl $0x610, %esi # imm = 0x610 xorl %eax, %eax movl %eax, %r9d movl $0x2, %r8d movq %r9, %rcx callq 0x47830 movq -0x18(%rbp), %rcx movq 0x40(%rcx), %rcx addq $0x7, %rcx cmpq %rcx, %rax jae 0x47a4e jmp 0x47a44 jmp 0x47a46 jmp 0x47a48 movb $0x0, -0x1(%rbp) jmp 0x47aba movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x40(%rax), %rsi callq 0x4a480 cmpb $0x0, %al je 0x47a6b jmp 0x47a65 movb $0x0, -0x1(%rbp) jmp 0x47aba jmp 0x47a6d movq -0x10(%rbp), %rax movl 0x61c(%rax), %ecx orl $0x20, %ecx movl %ecx, 0x61c(%rax) movq -0x18(%rbp), %rax leaq 0x45(%rip), %rcx # 0x47ad0 movq %rcx, 0x648(%rax) movq -0x10(%rbp), %rax leaq 0x33(%rip), %rcx # 0x47ad0 movq %rcx, 0x3d8(%rax) movq -0x18(%rbp), %rax leaq 0x121(%rip), %rcx # 0x47bd0 movq %rcx, 0x658(%rax) movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_memmap_file: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax] cmp qword ptr [rax+5F0h], 0 jnz short loc_47A6D mov rax, [rbp+var_10] mov edx, [rax+480h] lea rdi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 610h xor eax, eax mov r9d, eax mov r8d, 2 mov rcx, r9 call inline_mysql_file_seek mov rcx, [rbp+var_18] mov rcx, [rcx+40h] add rcx, 7 cmp rax, rcx jnb short loc_47A4E jmp short $+2 loc_47A44: jmp short $+2 loc_47A46: jmp short $+2 loc_47A48: mov [rbp+var_1], 0 jmp short loc_47ABA loc_47A4E: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+40h] call _ma_dynmap_file cmp al, 0 jz short loc_47A6B jmp short $+2 loc_47A65: mov [rbp+var_1], 0 jmp short loc_47ABA loc_47A6B: jmp short $+2 loc_47A6D: mov rax, [rbp+var_10] mov ecx, [rax+61Ch] or ecx, 20h mov [rax+61Ch], ecx mov rax, [rbp+var_18] lea rcx, _ma_read_mempack_record mov [rax+648h], rcx mov rax, [rbp+var_10] lea rcx, _ma_read_mempack_record mov [rax+3D8h], rcx mov rax, [rbp+var_18] lea rcx, _ma_read_rnd_mempack_record mov [rax+658h], rcx mov [rbp+var_1], 1 loc_47ABA: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_memmap_file(long long a1) { _QWORD *v2; // [rsp+8h] [rbp-18h] v2 = *(_QWORD **)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 1520LL) ) goto LABEL_6; if ( inline_mysql_file_seek( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 0x610u, *(_DWORD *)(a1 + 1152), 0LL, 2u, 0LL) >= (unsigned long long)(v2[8] + 7LL) ) { if ( (unsigned __int8)ma_dynmap_file(a1, v2[8]) ) return 0; LABEL_6: *(_DWORD *)(a1 + 1564) |= 0x20u; v2[201] = ma_read_mempack_record; *(_QWORD *)(a1 + 984) = ma_read_mempack_record; v2[203] = ma_read_rnd_mempack_record; return 1; } return 0; }
_ma_memmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x5f0],0x0 JNZ 0x00147a6d MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x480] LEA RDI,[0x253802] MOV ESI,0x610 XOR EAX,EAX MOV R9D,EAX MOV R8D,0x2 MOV RCX,R9 CALL 0x00147830 MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x40] ADD RCX,0x7 CMP RAX,RCX JNC 0x00147a4e JMP 0x00147a44 LAB_00147a44: JMP 0x00147a46 LAB_00147a46: JMP 0x00147a48 LAB_00147a48: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00147aba LAB_00147a4e: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x40] CALL 0x0014a480 CMP AL,0x0 JZ 0x00147a6b JMP 0x00147a65 LAB_00147a65: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00147aba LAB_00147a6b: JMP 0x00147a6d LAB_00147a6d: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x61c] OR ECX,0x20 MOV dword ptr [RAX + 0x61c],ECX MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x147ad0] MOV qword ptr [RAX + 0x648],RCX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x147ad0] MOV qword ptr [RAX + 0x3d8],RCX MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x147bd0] MOV qword ptr [RAX + 0x658],RCX MOV byte ptr [RBP + -0x1],0x1 LAB_00147aba: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 _ma_memmap_file(long *param_1) { long lVar1; char cVar2; ulong uVar3; lVar1 = *param_1; if (*(long *)(*param_1 + 0x5f0) == 0) { uVar3 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",0x610, (int)param_1[0x90],0,2); if (uVar3 < *(long *)(lVar1 + 0x40) + 7U) { return 0; } cVar2 = _ma_dynmap_file(param_1,*(int8 *)(lVar1 + 0x40)); if (cVar2 != '\0') { return 0; } } *(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) | 0x20; *(code **)(lVar1 + 0x648) = _ma_read_mempack_record; param_1[0x7b] = (long)_ma_read_mempack_record; *(code **)(lVar1 + 0x658) = _ma_read_rnd_mempack_record; return 1; }
2,832
get_charsets_dir
eloqsql/mysys/charset.c
char *get_charsets_dir(char *buf) { const char *sharedir= SHAREDIR; char *res; DBUG_ENTER("get_charsets_dir"); if (charsets_dir != NULL) strmake(buf, charsets_dir, FN_REFLEN-1); else { if (test_if_hard_path(sharedir) || is_prefix(sharedir, DEFAULT_CHARSET_HOME)) strxmov(buf, sharedir, "/", CHARSET_DIR, NullS); else strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR, NullS); } res= convert_dirname(buf,buf,NullS); DBUG_PRINT("info",("charsets dir: '%s'", buf)); DBUG_RETURN(res); }
O3
c
get_charsets_dir: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xb74235(%rip), %rax # 0xc0d160 movq (%rax), %rsi testq %rsi, %rsi je 0x98f42 movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi callq 0xe1f70 jmp 0x98f8b leaq 0x4eb48(%rip), %rdi # 0xe7a91 callq 0xa8bde testl %eax, %eax jne 0x98f69 leaq 0x4eb38(%rip), %rdi # 0xe7a91 leaq 0x4eb4a(%rip), %rsi # 0xe7aaa callq 0xe0634 testl %eax, %eax je 0x98f9e leaq 0x4eb21(%rip), %rsi # 0xe7a91 leaq 0x50ca4(%rip), %rdx # 0xe9c1b leaq 0x4eb3f(%rip), %rcx # 0xe7abd movq %rbx, %rdi xorl %r8d, %r8d xorl %eax, %eax callq 0xe1fc8 movq %rbx, %rdi movq %rbx, %rsi xorl %edx, %edx addq $0x8, %rsp popq %rbx popq %rbp jmp 0x9c00b movq $0x0, (%rsp) leaq 0x4eafd(%rip), %rsi # 0xe7aaa leaq 0x4eadd(%rip), %rcx # 0xe7a91 leaq 0x50c60(%rip), %rdx # 0xe9c1b leaq 0x4eafb(%rip), %r9 # 0xe7abd movq %rbx, %rdi movq %rdx, %r8 xorl %eax, %eax callq 0xe1fc8 jmp 0x98f8b
get_charsets_dir: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi lea rax, charsets_dir mov rsi, [rax] test rsi, rsi jz short loc_98F42 mov edx, 1FFh mov rdi, rbx call strmake jmp short loc_98F8B loc_98F42: lea rdi, aHomeMonoInstal; "/home/mono/install/share" call test_if_hard_path test eax, eax jnz short loc_98F69 lea rdi, aHomeMonoInstal; "/home/mono/install/share" lea rsi, aHomeMonoInstal_0; "/home/mono/install" call is_prefix test eax, eax jz short loc_98F9E loc_98F69: lea rsi, aHomeMonoInstal; "/home/mono/install/share" lea rdx, unk_E9C1B lea rcx, aCharsets; "charsets/" mov rdi, rbx xor r8d, r8d xor eax, eax call strxmov loc_98F8B: mov rdi, rbx mov rsi, rbx xor edx, edx add rsp, 8 pop rbx pop rbp jmp convert_dirname loc_98F9E: mov [rsp+10h+var_10], 0 lea rsi, aHomeMonoInstal_0; "/home/mono/install" lea rcx, aHomeMonoInstal; "/home/mono/install/share" lea rdx, unk_E9C1B lea r9, aCharsets; "charsets/" mov rdi, rbx mov r8, rdx xor eax, eax call strxmov jmp short loc_98F8B
long long get_charsets_dir(long long a1) { int v1; // r9d if ( charsets_dir ) { strmake(a1, charsets_dir, 511LL); } else if ( (unsigned int)test_if_hard_path("/home/mono/install/share") || (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") ) { strxmov(a1, (unsigned int)"/home/mono/install/share", (unsigned int)&unk_E9C1B, (unsigned int)"charsets/", 0, v1); } else { strxmov( a1, (unsigned int)"/home/mono/install", (unsigned int)&unk_E9C1B, (unsigned int)"/home/mono/install/share", (unsigned int)&unk_E9C1B, (unsigned int)"charsets/"); } return convert_dirname(a1, a1, 0LL); }
get_charsets_dir: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0xd0d160] MOV RSI,qword ptr [RAX] TEST RSI,RSI JZ 0x00198f42 MOV EDX,0x1ff MOV RDI,RBX CALL 0x001e1f70 JMP 0x00198f8b LAB_00198f42: LEA RDI,[0x1e7a91] CALL 0x001a8bde TEST EAX,EAX JNZ 0x00198f69 LEA RDI,[0x1e7a91] LEA RSI,[0x1e7aaa] CALL 0x001e0634 TEST EAX,EAX JZ 0x00198f9e LAB_00198f69: LEA RSI,[0x1e7a91] LEA RDX,[0x1e9c1b] LEA RCX,[0x1e7abd] MOV RDI,RBX XOR R8D,R8D XOR EAX,EAX CALL 0x001e1fc8 LAB_00198f8b: MOV RDI,RBX MOV RSI,RBX XOR EDX,EDX ADD RSP,0x8 POP RBX POP RBP JMP 0x0019c00b LAB_00198f9e: MOV qword ptr [RSP],0x0 LEA RSI,[0x1e7aaa] LEA RCX,[0x1e7a91] LEA RDX,[0x1e9c1b] LEA R9,[0x1e7abd] MOV RDI,RBX MOV R8,RDX XOR EAX,EAX CALL 0x001e1fc8 JMP 0x00198f8b
void get_charsets_dir(int8 param_1) { int iVar1; if (charsets_dir == 0) { iVar1 = test_if_hard_path("/home/mono/install/share"); if (iVar1 == 0) { iVar1 = is_prefix("/home/mono/install/share","/home/mono/install"); if (iVar1 == 0) { strxmov(param_1,"/home/mono/install",&DAT_001e9c1b,"/home/mono/install/share",&DAT_001e9c1b, "charsets/",0); goto LAB_00198f8b; } } strxmov(param_1,"/home/mono/install/share",&DAT_001e9c1b,"charsets/",0); } else { strmake(param_1,charsets_dir,0x1ff); } LAB_00198f8b: convert_dirname(param_1,param_1,0); return; }
2,833
ft_nlq_find_relevance
eloqsql/storage/myisam/ft_nlq_search.c
float ft_nlq_find_relevance(FT_INFO *handler, uchar *record __attribute__((unused)), uint length __attribute__((unused))) { int a,b,c; FT_DOC *docs=handler->doc; my_off_t docid=handler->info->lastpos; if (docid == HA_POS_ERROR) return -5.0; /* Assuming docs[] is sorted by dpos... */ for (a=0, b=handler->ndocs, c=(a+b)/2; b-a>1; c=(a+b)/2) { if (docs[c].dpos > docid) b=c; else a=c; } /* bounds check to avoid accessing unallocated handler->doc */ if (a < handler->ndocs && docs[a].dpos == docid) return (float) docs[a].weight; else return 0.0; }
O0
c
ft_nlq_find_relevance: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax addq $0x18, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x170(%rax), %rax movq %rax, -0x38(%rbp) cmpq $-0x1, -0x38(%rbp) jne 0xcbcf7 movss 0xb8327(%rip), %xmm0 # 0x184014 movss %xmm0, -0x4(%rbp) jmp 0xcbdaa movl $0x0, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x24(%rbp) movl -0x20(%rbp), %eax addl -0x24(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, -0x28(%rbp) movl -0x24(%rbp), %eax subl -0x20(%rbp), %eax cmpl $0x1, %eax jle 0xcbd5f movq -0x30(%rbp), %rax movslq -0x28(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax cmpq -0x38(%rbp), %rax jbe 0xcbd44 movl -0x28(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0xcbd4a movl -0x28(%rbp), %eax movl %eax, -0x20(%rbp) jmp 0xcbd4c movl -0x20(%rbp), %eax addl -0x24(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, -0x28(%rbp) jmp 0xcbd19 movl -0x20(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x10(%rcx), %eax jge 0xcbda2 movq -0x30(%rbp), %rax movslq -0x20(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax cmpq -0x38(%rbp), %rax jne 0xcbda2 movq -0x30(%rbp), %rax movslq -0x20(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movsd 0x8(%rax), %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, -0x4(%rbp) jmp 0xcbdaa xorps %xmm0, %xmm0 movss %xmm0, -0x4(%rbp) movss -0x4(%rbp), %xmm0 popq %rbp retq nopw %cs:(%rax,%rax)
ft_nlq_find_relevance: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] add rax, 18h mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+170h] mov [rbp+var_38], rax cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jnz short loc_CBCF7 movss xmm0, cs:dword_184014 movss [rbp+var_4], xmm0 jmp loc_CBDAA loc_CBCF7: mov [rbp+var_20], 0 mov rax, [rbp+var_10] mov eax, [rax+10h] mov [rbp+var_24], eax mov eax, [rbp+var_20] add eax, [rbp+var_24] mov ecx, 2 cdq idiv ecx mov [rbp+var_28], eax loc_CBD19: mov eax, [rbp+var_24] sub eax, [rbp+var_20] cmp eax, 1 jle short loc_CBD5F mov rax, [rbp+var_30] movsxd rcx, [rbp+var_28] shl rcx, 4 add rax, rcx mov rax, [rax] cmp rax, [rbp+var_38] jbe short loc_CBD44 mov eax, [rbp+var_28] mov [rbp+var_24], eax jmp short loc_CBD4A loc_CBD44: mov eax, [rbp+var_28] mov [rbp+var_20], eax loc_CBD4A: jmp short $+2 loc_CBD4C: mov eax, [rbp+var_20] add eax, [rbp+var_24] mov ecx, 2 cdq idiv ecx mov [rbp+var_28], eax jmp short loc_CBD19 loc_CBD5F: mov eax, [rbp+var_20] mov rcx, [rbp+var_10] cmp eax, [rcx+10h] jge short loc_CBDA2 mov rax, [rbp+var_30] movsxd rcx, [rbp+var_20] shl rcx, 4 add rax, rcx mov rax, [rax] cmp rax, [rbp+var_38] jnz short loc_CBDA2 mov rax, [rbp+var_30] movsxd rcx, [rbp+var_20] shl rcx, 4 add rax, rcx movsd xmm0, qword ptr [rax+8] cvtsd2ss xmm0, xmm0 movss [rbp+var_4], xmm0 jmp short loc_CBDAA loc_CBDA2: xorps xmm0, xmm0 movss [rbp+var_4], xmm0 loc_CBDAA: movss xmm0, [rbp+var_4] pop rbp retn
float ft_nlq_find_relevance(long long a1) { unsigned long long v3; // [rsp+0h] [rbp-38h] long long v4; // [rsp+8h] [rbp-30h] int v5; // [rsp+10h] [rbp-28h] int v6; // [rsp+14h] [rbp-24h] int v7; // [rsp+18h] [rbp-20h] v4 = a1 + 24; v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 368LL); if ( v3 == -1LL ) return -5.0; v7 = 0; v6 = *(_DWORD *)(a1 + 16); v5 = v6 / 2; while ( v6 - v7 > 1 ) { if ( *(_QWORD *)(16LL * v5 + v4) <= v3 ) v7 = v5; else v6 = v5; v5 = (v6 + v7) / 2; } if ( v7 >= *(_DWORD *)(a1 + 16) || *(_QWORD *)(16LL * v7 + v4) != v3 ) return 0.0; return *(double *)(16LL * v7 + v4 + 8); }
ft_nlq_find_relevance: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x18 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x170] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],-0x1 JNZ 0x001cbcf7 MOVSS XMM0,dword ptr [0x00284014] MOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x001cbdaa LAB_001cbcf7: MOV dword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x20] ADD EAX,dword ptr [RBP + -0x24] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RBP + -0x28],EAX LAB_001cbd19: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,dword ptr [RBP + -0x20] CMP EAX,0x1 JLE 0x001cbd5f MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,dword ptr [RBP + -0x28] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x38] JBE 0x001cbd44 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],EAX JMP 0x001cbd4a LAB_001cbd44: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x20],EAX LAB_001cbd4a: JMP 0x001cbd4c LAB_001cbd4c: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,dword ptr [RBP + -0x24] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RBP + -0x28],EAX JMP 0x001cbd19 LAB_001cbd5f: MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x10] JGE 0x001cbda2 MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,dword ptr [RBP + -0x20] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x38] JNZ 0x001cbda2 MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,dword ptr [RBP + -0x20] SHL RCX,0x4 ADD RAX,RCX MOVSD XMM0,qword ptr [RAX + 0x8] CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x001cbdaa LAB_001cbda2: XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x4],XMM0 LAB_001cbdaa: MOVSS XMM0,dword ptr [RBP + -0x4] POP RBP RET
float ft_nlq_find_relevance(long param_1) { ulong uVar1; long lVar2; int4 local_30; int4 local_2c; int4 local_28; int4 local_c; lVar2 = param_1 + 0x18; uVar1 = *(ulong *)(*(long *)(param_1 + 8) + 0x170); if (uVar1 == 0xffffffffffffffff) { local_c = DAT_00284014; } else { local_28 = 0; local_2c = *(int *)(param_1 + 0x10); local_30 = local_2c; while (local_30 = local_30 / 2, 1 < local_2c - local_28) { if (uVar1 < *(ulong *)(lVar2 + (long)local_30 * 0x10)) { local_2c = local_30; } else { local_28 = local_30; } local_30 = local_28 + local_2c; } if ((local_28 < *(int *)(param_1 + 0x10)) && (*(ulong *)(lVar2 + (long)local_28 * 0x10) == uVar1)) { local_c = (float)*(double *)(lVar2 + (long)local_28 * 0x10 + 8); } else { local_c = 0.0; } } return local_c; }
2,834
lunasvg::SVGUseElement::SVGUseElement(lunasvg::Document*)
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
SVGUseElement::SVGUseElement(Document* document) : SVGGraphicsElement(document, ElementID::Use) , SVGURIReference(this) , m_x(PropertyID::X, LengthDirection::Horizontal, LengthNegativeMode::Allow, 0.f, LengthUnits::None) , m_y(PropertyID::Y, LengthDirection::Vertical, LengthNegativeMode::Allow, 0.f, LengthUnits::None) , m_width(PropertyID::Width, LengthDirection::Horizontal, LengthNegativeMode::Forbid, 100.f, LengthUnits::Percent) , m_height(PropertyID::Height, LengthDirection::Vertical, LengthNegativeMode::Forbid, 100.f, LengthUnits::Percent) { addProperty(m_x); addProperty(m_y); addProperty(m_width); addProperty(m_height); }
O0
cpp
lunasvg::SVGUseElement::SVGUseElement(lunasvg::Document*): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) movq -0x10(%rbp), %rsi movl $0x18, %edx callq 0x1a4a0 movq -0x28(%rbp), %rsi leaq 0xa67b7(%rip), %rax # 0xc1ab8 movq %rax, (%rsi) movq %rsi, %rdi addq $0x98, %rdi callq 0x1a300 jmp 0x1b315 movq -0x28(%rbp), %rdi leaq 0xa6798(%rip), %rax # 0xc1ab8 movq %rax, (%rdi) addq $0xc8, %rdi movq %rdi, -0x30(%rbp) movl $0x4b, %esi xorps %xmm0, %xmm0 xorl %r8d, %r8d movl %r8d, %edx movl %r8d, %ecx callq 0x20d00 jmp 0x1b346 movq -0x28(%rbp), %rdi addq $0xe0, %rdi movq %rdi, -0x38(%rbp) movl $0x4e, %esi movl $0x1, %edx xorps %xmm0, %xmm0 xorl %r8d, %r8d movl %r8d, %ecx callq 0x20d00 jmp 0x1b36f movq -0x28(%rbp), %rdi addq $0xf8, %rdi movq %rdi, -0x40(%rbp) movl $0x4a, %esi xorl %edx, %edx movss 0x71043(%rip), %xmm0 # 0x8c3d0 movl $0x1, %r8d movl %r8d, %ecx callq 0x20d00 jmp 0x1b39d movq -0x28(%rbp), %rdi addq $0x110, %rdi # imm = 0x110 movq %rdi, -0x48(%rbp) movl $0x1b, %esi movss 0x71017(%rip), %xmm0 # 0x8c3d0 movl $0x1, %r8d movl %r8d, %edx movl %r8d, %ecx callq 0x20d00 jmp 0x1b3cc movq -0x28(%rbp), %rdi movq %rdi, %rsi addq $0xc8, %rsi callq 0x19a70 jmp 0x1b3e1 movq -0x28(%rbp), %rdi movq %rdi, %rsi addq $0xe0, %rsi callq 0x19a70 jmp 0x1b3f6 movq -0x28(%rbp), %rdi movq %rdi, %rsi addq $0xf8, %rsi callq 0x19a70 jmp 0x1b40b movq -0x28(%rbp), %rdi movq %rdi, %rsi addq $0x110, %rsi # imm = 0x110 callq 0x19a70 jmp 0x1b420 addq $0x50, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0x1b4ac movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0x1b49c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0x1b493 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0x1b48a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0x1b481 movq -0x48(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) callq 0xfb10 movq -0x40(%rbp), %rdi callq 0xfb10 movq -0x38(%rbp), %rdi callq 0xfb10 movq -0x30(%rbp), %rdi callq 0xfb10 movq -0x28(%rbp), %rdi addq $0x98, %rdi callq 0x21270 movq -0x28(%rbp), %rdi callq 0xfb60 movq -0x18(%rbp), %rdi callq 0xb6c0 nop
_ZN7lunasvg13SVGUseElementC2EPNS_8DocumentE: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov [rbp+var_28], rdi mov rsi, [rbp+var_10] mov edx, 18h call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID) mov rsi, [rbp+var_28]; lunasvg::SVGElement * lea rax, off_C1AB8 mov [rsi], rax mov rdi, rsi add rdi, 98h; this call _ZN7lunasvg15SVGURIReferenceC2EPNS_10SVGElementE; lunasvg::SVGURIReference::SVGURIReference(lunasvg::SVGElement *) jmp short $+2 loc_1B315: mov rdi, [rbp+var_28] lea rax, off_C1AB8 mov [rdi], rax add rdi, 0C8h mov [rbp+var_30], rdi mov esi, 4Bh ; 'K' xorps xmm0, xmm0 xor r8d, r8d mov edx, r8d mov ecx, r8d call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits) jmp short $+2 loc_1B346: mov rdi, [rbp+var_28] add rdi, 0E0h mov [rbp+var_38], rdi mov esi, 4Eh ; 'N' mov edx, 1 xorps xmm0, xmm0 xor r8d, r8d mov ecx, r8d call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits) jmp short $+2 loc_1B36F: mov rdi, [rbp+var_28] add rdi, 0F8h mov [rbp+var_40], rdi mov esi, 4Ah ; 'J' xor edx, edx movss xmm0, cs:dword_8C3D0 mov r8d, 1 mov ecx, r8d call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits) jmp short $+2 loc_1B39D: mov rdi, [rbp+var_28] add rdi, 110h mov [rbp+var_48], rdi mov esi, 1Bh movss xmm0, cs:dword_8C3D0 mov r8d, 1 mov edx, r8d mov ecx, r8d call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits) jmp short $+2 loc_1B3CC: mov rdi, [rbp+var_28]; this mov rsi, rdi add rsi, 0C8h; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) jmp short $+2 loc_1B3E1: mov rdi, [rbp+var_28]; this mov rsi, rdi add rsi, 0E0h; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) jmp short $+2 loc_1B3F6: mov rdi, [rbp+var_28]; this mov rsi, rdi add rsi, 0F8h; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) jmp short $+2 loc_1B40B: mov rdi, [rbp+var_28]; this mov rsi, rdi add rsi, 110h; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) jmp short $+2 loc_1B420: add rsp, 50h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_1B4AC mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_1B49C mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_1B493 mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_1B48A mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_1B481 mov rdi, [rbp+var_48]; this mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength() loc_1B481: mov rdi, [rbp+var_40]; this call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength() loc_1B48A: mov rdi, [rbp+var_38]; this call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength() loc_1B493: mov rdi, [rbp+var_30]; this call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength() loc_1B49C: mov rdi, [rbp+var_28] add rdi, 98h; this call _ZN7lunasvg15SVGURIReferenceD2Ev; lunasvg::SVGURIReference::~SVGURIReference() loc_1B4AC: mov rdi, [rbp+var_28]; this call _ZN7lunasvg18SVGGraphicsElementD2Ev; lunasvg::SVGGraphicsElement::~SVGGraphicsElement() mov rdi, [rbp+var_18] call __Unwind_Resume
long long lunasvg::SVGUseElement::SVGUseElement(lunasvg::SVGUseElement *this, lunasvg::Document *a2) { lunasvg::SVGGraphicsElement::SVGGraphicsElement((long long)this, a2, 24); *(_QWORD *)this = off_C1AB8; lunasvg::SVGURIReference::SVGURIReference((lunasvg::SVGUseElement *)((char *)this + 152), this); *(_QWORD *)this = off_C1AB8; lunasvg::SVGLength::SVGLength((char *)this + 200, 75LL, 0LL, 0LL, 0.0); lunasvg::SVGLength::SVGLength((char *)this + 224, 78LL, 1LL, 0LL, 0.0); lunasvg::SVGLength::SVGLength((char *)this + 248, 74LL, 0LL, 1LL, COERCE_DOUBLE(1120403456LL)); lunasvg::SVGLength::SVGLength((char *)this + 272, 27LL, 1LL, 1LL, COERCE_DOUBLE(1120403456LL)); lunasvg::SVGElement::addProperty(this, (lunasvg::SVGUseElement *)((char *)this + 200)); lunasvg::SVGElement::addProperty(this, (lunasvg::SVGUseElement *)((char *)this + 224)); lunasvg::SVGElement::addProperty(this, (lunasvg::SVGUseElement *)((char *)this + 248)); return lunasvg::SVGElement::addProperty(this, (lunasvg::SVGUseElement *)((char *)this + 272)); }
SVGUseElement: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RDI MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x18 CALL 0x0011a4a0 MOV RSI,qword ptr [RBP + -0x28] LEA RAX,[0x1c1ab8] MOV qword ptr [RSI],RAX MOV RDI,RSI ADD RDI,0x98 LAB_0011b30e: CALL 0x0011a300 JMP 0x0011b315 LAB_0011b315: MOV RDI,qword ptr [RBP + -0x28] LEA RAX,[0x1c1ab8] MOV qword ptr [RDI],RAX ADD RDI,0xc8 MOV qword ptr [RBP + -0x30],RDI LAB_0011b32e: MOV ESI,0x4b XORPS XMM0,XMM0 XOR R8D,R8D MOV EDX,R8D MOV ECX,R8D CALL 0x00120d00 JMP 0x0011b346 LAB_0011b346: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xe0 MOV qword ptr [RBP + -0x38],RDI LAB_0011b355: MOV ESI,0x4e MOV EDX,0x1 XORPS XMM0,XMM0 XOR R8D,R8D MOV ECX,R8D CALL 0x00120d00 JMP 0x0011b36f LAB_0011b36f: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xf8 MOV qword ptr [RBP + -0x40],RDI LAB_0011b37e: MOV ESI,0x4a XOR EDX,EDX MOVSS XMM0,dword ptr [0x0018c3d0] MOV R8D,0x1 MOV ECX,R8D CALL 0x00120d00 JMP 0x0011b39d LAB_0011b39d: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x110 MOV qword ptr [RBP + -0x48],RDI LAB_0011b3ac: MOV ESI,0x1b MOVSS XMM0,dword ptr [0x0018c3d0] MOV R8D,0x1 MOV EDX,R8D MOV ECX,R8D CALL 0x00120d00 JMP 0x0011b3cc LAB_0011b3cc: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RDI ADD RSI,0xc8 LAB_0011b3da: CALL 0x00119a70 JMP 0x0011b3e1 LAB_0011b3e1: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RDI ADD RSI,0xe0 CALL 0x00119a70 JMP 0x0011b3f6 LAB_0011b3f6: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RDI ADD RSI,0xf8 CALL 0x00119a70 JMP 0x0011b40b LAB_0011b40b: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RDI ADD RSI,0x110 CALL 0x00119a70 LAB_0011b41e: JMP 0x0011b420 LAB_0011b420: ADD RSP,0x50 POP RBP RET
2,835
mi_ck_write_tree
eloqsql/storage/myisam/mi_write.c
int _mi_ck_write_tree(register MI_INFO *info, uint keynr, uchar *key, uint key_length) { int error; DBUG_ENTER("_mi_ck_write_tree"); error= tree_insert(&info->bulk_insert[keynr], key, key_length + info->s->rec_reflength, info->bulk_insert[keynr].custom_arg) ? 0 : HA_ERR_OUT_OF_MEM ; DBUG_RETURN(error); }
O0
c
mi_ck_write_tree: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x8(%rbp), %rax movq 0x80(%rax), %rdi movl -0xc(%rbp), %eax imulq $0x298, %rax, %rax # imm = 0x298 addq %rax, %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movq -0x8(%rbp), %rax movq (%rax), %rax addl 0x338(%rax), %edx movq -0x8(%rbp), %rax movq 0x80(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x298, %rcx, %rcx # imm = 0x298 addq %rcx, %rax movq 0x230(%rax), %rcx callq 0xfa730 movq %rax, %rdx movl $0x80, %eax xorl %ecx, %ecx cmpq $0x0, %rdx cmovnel %ecx, %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_mi_ck_write_tree: push rbp mov rbp, rsp sub rsp, 30h 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 rdi, [rax+80h] mov eax, [rbp+var_C] imul rax, 298h add rdi, rax mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov rax, [rbp+var_8] mov rax, [rax] add edx, [rax+338h] mov rax, [rbp+var_8] mov rax, [rax+80h] mov ecx, [rbp+var_C] imul rcx, 298h add rax, rcx mov rcx, [rax+230h] call tree_insert mov rdx, rax mov eax, 80h xor ecx, ecx cmp rdx, 0 cmovnz eax, ecx mov [rbp+var_20], eax mov eax, [rbp+var_20] mov [rbp+var_24], eax mov eax, [rbp+var_24] add rsp, 30h pop rbp retn
long long mi_ck_write_tree(_QWORD *a1, unsigned int a2, long long a3, int a4) { long long v4; // rdx long long result; // rax v4 = tree_insert( 664LL * a2 + a1[16], a3, (unsigned int)(*(_DWORD *)(*a1 + 824LL) + a4), *(_QWORD *)(664LL * a2 + a1[16] + 560)); LODWORD(result) = 128; if ( v4 ) LODWORD(result) = 0; return (unsigned int)result; }
_mi_ck_write_tree: PUSH RBP MOV RBP,RSP SUB RSP,0x30 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 RDI,qword ptr [RAX + 0x80] MOV EAX,dword ptr [RBP + -0xc] IMUL RAX,RAX,0x298 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] ADD EDX,dword ptr [RAX + 0x338] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x298 ADD RAX,RCX MOV RCX,qword ptr [RAX + 0x230] CALL 0x001fa730 MOV RDX,RAX MOV EAX,0x80 XOR ECX,ECX CMP RDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x30 POP RBP RET
int4 _mi_ck_write_tree(long *param_1,uint param_2,int8 param_3,int param_4) { int4 uVar1; long lVar2; lVar2 = tree_insert(param_1[0x10] + (ulong)param_2 * 0x298,param_3, param_4 + *(int *)(*param_1 + 0x338)); uVar1 = 0x80; if (lVar2 != 0) { uVar1 = 0; } return uVar1; }
2,836
mi_ck_write_tree
eloqsql/storage/myisam/mi_write.c
int _mi_ck_write_tree(register MI_INFO *info, uint keynr, uchar *key, uint key_length) { int error; DBUG_ENTER("_mi_ck_write_tree"); error= tree_insert(&info->bulk_insert[keynr], key, key_length + info->s->rec_reflength, info->bulk_insert[keynr].custom_arg) ? 0 : HA_ERR_OUT_OF_MEM ; DBUG_RETURN(error); }
O3
c
mi_ck_write_tree: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x80(%rdi), %r8 movl %esi, %esi imulq $0x298, %rsi, %rsi # imm = 0x298 leaq (%r8,%rsi), %rdi addl 0x338(%rax), %ecx movq 0x230(%r8,%rsi), %rax movq %rdx, %rsi movl %ecx, %edx movq %rax, %rcx callq 0xa47f2 xorl %ecx, %ecx testq %rax, %rax sete %cl shll $0x7, %ecx movl %ecx, %eax popq %rbp retq
_mi_ck_write_tree: push rbp mov rbp, rsp mov rax, [rdi] mov r8, [rdi+80h] mov esi, esi imul rsi, 298h lea rdi, [r8+rsi] add ecx, [rax+338h] mov rax, [r8+rsi+230h] mov rsi, rdx mov edx, ecx mov rcx, rax call tree_insert xor ecx, ecx test rax, rax setz cl shl ecx, 7 mov eax, ecx pop rbp retn
long long mi_ck_write_tree(long long *a1, unsigned int a2, long long a3, int a4) { long long v4; // rax long long v5; // rdi v4 = *a1; v5 = a1[16] + 664LL * a2; return (unsigned __int8)(tree_insert(v5, a3, (unsigned int)(*(_DWORD *)(v4 + 824) + a4), *(_QWORD *)(v5 + 560)) == 0) << 7; }
_mi_ck_write_tree: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV R8,qword ptr [RDI + 0x80] MOV ESI,ESI IMUL RSI,RSI,0x298 LEA RDI,[R8 + RSI*0x1] ADD ECX,dword ptr [RAX + 0x338] MOV RAX,qword ptr [R8 + RSI*0x1 + 0x230] MOV RSI,RDX MOV EDX,ECX MOV RCX,RAX CALL 0x001a47f2 XOR ECX,ECX TEST RAX,RAX SETZ CL SHL ECX,0x7 MOV EAX,ECX POP RBP RET
long _mi_ck_write_tree(long *param_1,uint param_2,int8 param_3,int param_4) { long lVar1; lVar1 = tree_insert(param_1[0x10] + (ulong)param_2 * 0x298,param_3, param_4 + *(int *)(*param_1 + 0x338), *(int8 *)(param_1[0x10] + 0x230 + (ulong)param_2 * 0x298)); return (ulong)(lVar1 == 0) << 7; }
2,837
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O3
cpp
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r12 movq %rsi, %rbx movq (%rdi), %rsi movq 0x8(%rdi), %rax subq %rsi, %rax cmpq $0x20, %rax jne 0x7bb93 leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x8de04 movq (%rbx), %rdi movq (%rdi), %rax movq %r14, %rsi movq %r12, %rdx callq *0x28(%rax) leaq 0x48(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x5c5ee movq %rbx, %rdi callq 0x61a6a movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x7bb49 callq 0x7140a movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x7bb58 callq 0x7140a movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x7bb67 callq 0x7140a movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x7bcb5 movq 0xb43fc(%rip), %rax # 0x12ff78 cmpb $0x0, (%rax) je 0x7bca0 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7bcaa movq %rbx, (%rsp) cmpq $0x0, 0x10(%r12) je 0x7bcc4 movq %rdi, %r15 movq %r12, %rdi callq 0x93e4e movq (%r15), %rsi movq 0x8(%r15), %rcx movq %rcx, %rdx subq %rsi, %rdx sarq $0x5, %rdx cmpq %rdx, %rax jne 0x7bcc4 cmpq %rsi, %rcx je 0x7bcb5 xorl %ebx, %ebx leaq 0x8(%rsp), %r13 xorl %ebp, %ebp movq (%rsp), %rax movq (%rax), %r14 addq %rbx, %rsi movq %r13, %rdi callq 0x8de04 movq %r12, %rdi movq %rbp, %rsi callq 0x93fae movq (%r14), %rcx movq %r14, %rdi movq %r13, %rsi movq %rax, %rdx callq *0x28(%rcx) leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5c5ee movq %r14, %rdi callq 0x61a6a movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x7bc2c callq 0x7140a movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x7bc3b callq 0x7140a movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x7bc4a callq 0x7140a movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x7bc80 movq 0xb431d(%rip), %rax # 0x12ff78 cmpb $0x0, (%rax) je 0x7bc6b movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7bc75 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x7bc80 movq (%rdi), %rax callq *0x18(%rax) incq %rbp movq (%r15), %rsi movq 0x8(%r15), %rax subq %rsi, %rax sarq $0x5, %rax addq $0x20, %rbx cmpq %rax, %rbp jb 0x7bbda jmp 0x7bcb5 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x7bcb5 movq (%rdi), %rax callq *0x18(%rax) addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b4d0 movq %rax, %r14 leaq 0x78317(%rip), %rsi # 0xf3fef movq %rax, %rdi callq 0x1b370 movq 0xb4301(%rip), %rsi # 0x12ffe8 movq 0xb4262(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1c1c0 movq %rax, %rbx movq %r14, %rdi callq 0x1b760 jmp 0x7bd12 jmp 0x7bd05 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x89da6 movq %rbx, %rdi callq 0x1c250
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r12, rdx mov rbx, rsi mov rsi, [rdi] mov rax, [rdi+8] sub rax, rsi cmp rax, 20h ; ' ' jnz loc_7BB93 lea r14, [rsp+88h+var_80] mov rdi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rbx] mov rax, [rdi] mov rsi, r14 mov rdx, r12 call qword ptr [rax+28h] lea rbx, [rsp+88h+var_40] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_7BB49 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BB49: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_7BB58 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BB58: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_7BB67 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BB67: mov rdi, [rsp+88h+var_78] test rdi, rdi jz loc_7BCB5 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz loc_7BCA0 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp loc_7BCAA loc_7BB93: mov [rsp+88h+var_88], rbx cmp qword ptr [r12+10h], 0 jz loc_7BCC4 mov r15, rdi mov rdi, r12; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov rsi, [r15] mov rcx, [r15+8] mov rdx, rcx sub rdx, rsi sar rdx, 5 cmp rax, rdx jnz loc_7BCC4 cmp rcx, rsi jz loc_7BCB5 xor ebx, ebx lea r13, [rsp+88h+var_80] xor ebp, ebp loc_7BBDA: mov rax, [rsp+88h+var_88] mov r14, [rax] add rsi, rbx mov rdi, r13 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r12; this mov rsi, rbp; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov rcx, [r14] mov rdi, r14 mov rsi, r13 mov rdx, rax call qword ptr [rcx+28h] lea r14, [rsp+88h+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() mov rdi, [rsp+88h+var_48] test rdi, rdi jz short loc_7BC2C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BC2C: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_7BC3B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BC3B: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_7BC4A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BC4A: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_7BC80 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_7BC6B mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_7BC75 loc_7BC6B: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7BC75: cmp eax, 1 jnz short loc_7BC80 mov rax, [rdi] call qword ptr [rax+18h] loc_7BC80: inc rbp mov rsi, [r15] mov rax, [r15+8] sub rax, rsi sar rax, 5 add rbx, 20h ; ' ' cmp rbp, rax jb loc_7BBDA jmp short loc_7BCB5 loc_7BCA0: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7BCAA: cmp eax, 1 jnz short loc_7BCB5 mov rax, [rdi] call qword ptr [rax+18h] loc_7BCB5: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7BCC4: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_7BD12 jmp short $+2 loc_7BD05: mov rbx, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_7BD12: mov rdi, rbx call __Unwind_Resume
unsigned long long minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3) { unsigned long long result; // rax long long v5; // rdi long long v7; // rsi long long v8; // rbx unsigned long long v9; // rbp long long v10; // r14 long long v11; // rax long long v12; // rdi signed __int32 v13; // eax std::runtime_error *exception; // r14 _BYTE v16[8]; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] volatile signed __int32 *v18; // [rsp+20h] [rbp-68h] volatile signed __int32 *v19; // [rsp+30h] [rbp-58h] volatile signed __int32 *v20; // [rsp+40h] [rbp-48h] char v21[64]; // [rsp+48h] [rbp-40h] BYREF if ( a1[1] - *a1 == 32LL ) { minja::Value::Value(v16, *a1); (*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v16, a3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v21); result = 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); if ( v20 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); if ( v18 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); v5 = v17; if ( v17 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v17 + 12); *(_DWORD *)(v17 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } } else { if ( !*((_QWORD *)a3 + 2) || (result = minja::Value::size(a3), v7 = *a1, result != (long long)(a1[1] - *a1) >> 5) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( a1[1] != v7 ) { v8 = 0LL; v9 = 0LL; do { v10 = *a2; minja::Value::Value(v16, v8 + v7); v11 = minja::Value::at(a3, v9); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v10 + 40LL))(v10, v16, 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(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); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); v12 = v17; if ( v17 ) { if ( _libc_single_threaded ) { v13 = *(_DWORD *)(v17 + 12); *(_DWORD *)(v17 + 12) = v13 - 1; } else { v13 = _InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( v13 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v12 + 24LL))(v12, 0LL); } ++v9; v7 = *a1; result = (long long)(a1[1] - *a1) >> 5; v8 += 32LL; } while ( v9 < result ); } } return result; }
destructuring_assign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R12,RDX MOV RBX,RSI MOV RSI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,RSI CMP RAX,0x20 JNZ 0x0017bb93 LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x0018de04 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] LAB_0017bb1b: MOV RSI,R14 MOV RDX,R12 CALL qword ptr [RAX + 0x28] LAB_0017bb24: LEA RBX,[RSP + 0x48] MOV RDI,RBX XOR ESI,ESI CALL 0x0015c5ee MOV RDI,RBX CALL 0x00161a6a MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x0017bb49 CALL 0x0017140a LAB_0017bb49: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0017bb58 CALL 0x0017140a LAB_0017bb58: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0017bb67 CALL 0x0017140a LAB_0017bb67: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0017bcb5 MOV RAX,qword ptr [0x0022ff78] CMP byte ptr [RAX],0x0 JZ 0x0017bca0 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017bcaa LAB_0017bb93: MOV qword ptr [RSP],RBX CMP qword ptr [R12 + 0x10],0x0 JZ 0x0017bcc4 MOV R15,RDI MOV RDI,R12 CALL 0x00193e4e MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,RCX SUB RDX,RSI SAR RDX,0x5 CMP RAX,RDX JNZ 0x0017bcc4 CMP RCX,RSI JZ 0x0017bcb5 XOR EBX,EBX LEA R13,[RSP + 0x8] XOR EBP,EBP LAB_0017bbda: MOV RAX,qword ptr [RSP] MOV R14,qword ptr [RAX] ADD RSI,RBX MOV RDI,R13 CALL 0x0018de04 LAB_0017bbec: MOV RDI,R12 MOV RSI,RBP CALL 0x00193fae MOV RCX,qword ptr [R14] MOV RDI,R14 MOV RSI,R13 MOV RDX,RAX CALL qword ptr [RCX + 0x28] LAB_0017bc06: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x0015c5ee MOV RDI,R14 CALL 0x00161a6a MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0017bc2c CALL 0x0017140a LAB_0017bc2c: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0017bc3b CALL 0x0017140a LAB_0017bc3b: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0017bc4a CALL 0x0017140a LAB_0017bc4a: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0017bc80 MOV RAX,qword ptr [0x0022ff78] CMP byte ptr [RAX],0x0 JZ 0x0017bc6b MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017bc75 LAB_0017bc6b: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017bc75: CMP EAX,0x1 JNZ 0x0017bc80 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0017bc80: INC RBP MOV RSI,qword ptr [R15] MOV RAX,qword ptr [R15 + 0x8] SUB RAX,RSI SAR RAX,0x5 ADD RBX,0x20 CMP RBP,RAX JC 0x0017bbda JMP 0x0017bcb5 LAB_0017bca0: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017bcaa: CMP EAX,0x1 JNZ 0x0017bcb5 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0017bcb5: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017bcc4: MOV EDI,0x10 CALL 0x0011b4d0 MOV R14,RAX LAB_0017bcd1: LEA RSI,[0x1f3fef] MOV RDI,RAX CALL 0x0011b370 LAB_0017bce0: MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011c1c0
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { int *piVar1; long *plVar2; int iVar3; long lVar4; int8 uVar5; runtime_error *this; ulong uVar6; long lVar7; Value local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) { Value::Value(local_80,*(string **)param_1); /* try { // try from 0017bb1b to 0017bb23 has its CatchHandler @ 0017bd03 */ (**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_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); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_0022ff78 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } return; } if (*(long *)(param_3 + 0x10) != 0) { lVar4 = Value::size(param_3); lVar7 = *(long *)param_1; if (lVar4 == *(long *)(param_1 + 8) - lVar7 >> 5) { if (*(long *)(param_1 + 8) == lVar7) { return; } lVar4 = 0; uVar6 = 0; do { plVar2 = *(long **)param_2; Value::Value(local_80,(string *)(lVar7 + lVar4)); /* try { // try from 0017bbec to 0017bc05 has its CatchHandler @ 0017bd05 */ uVar5 = Value::at(param_3,uVar6); (**(code **)(*plVar2 + 0x28))(plVar2,local_80,uVar5); 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); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_0022ff78 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } uVar6 = uVar6 + 1; lVar7 = *(long *)param_1; lVar4 = lVar4 + 0x20; } while (uVar6 < (ulong)(*(long *)(param_1 + 8) - lVar7 >> 5)); return; } } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017bcd1 to 0017bcdf has its CatchHandler @ 0017bcf6 */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); }
2,838
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/./json.hpp
inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, diyfp M_minus, diyfp w, diyfp M_plus) { static_assert(kAlpha >= -60, "internal error"); static_assert(kGamma <= -32, "internal error"); // Generates the digits (and the exponent) of a decimal floating-point // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma. // // <--------------------------- delta ----> // <---- dist ---------> // --------------[------------------+-------------------]-------------- // M- w M+ // // Grisu2 generates the digits of M+ from left to right and stops as soon as // V is in [M-,M+]. JSON_ASSERT(M_plus.e >= kAlpha); JSON_ASSERT(M_plus.e <= kGamma); std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e) std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e) // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): // // M+ = f * 2^e // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e // = ((p1 ) * 2^-e + (p2 )) * 2^e // = p1 + p2 * 2^e const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e // 1) // // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] JSON_ASSERT(p1 > 0); std::uint32_t pow10{}; const int k = find_largest_pow10(p1, pow10); // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) // // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) // // M+ = p1 + p2 * 2^e // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e // = d[k-1] * 10^(k-1) + ( rest) * 2^e // // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) // // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] // // but stop as soon as // // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e int n = k; while (n > 0) { // Invariants: // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) // pow10 = 10^(n-1) <= p1 < 10^n // const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) // // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) // JSON_ASSERT(d <= 9); buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d // // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) // p1 = r; n--; // // M+ = buffer * 10^n + (p1 + p2 * 2^e) // pow10 = 10^n // // Now check if enough digits have been generated. // Compute // // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e // // Note: // Since rest and delta share the same exponent e, it suffices to // compare the significands. const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; if (rest <= delta) { // V = buffer * 10^n, with M- <= V <= M+. decimal_exponent += n; // We may now just stop. But instead look if the buffer could be // decremented to bring V closer to w. // // pow10 = 10^n is now 1 ulp in the decimal representation V. // The rounding procedure works with diyfp's with an implicit // exponent of e. // // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e // const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; grisu2_round(buffer, length, dist, delta, rest, ten_n); return; } pow10 /= 10; // // pow10 = 10^(n-1) <= p1 < 10^n // Invariants restored. } // 2) // // The digits of the integral part have been generated: // // M+ = d[k-1]...d[1]d[0] + p2 * 2^e // = buffer + p2 * 2^e // // Now generate the digits of the fractional part p2 * 2^e. // // Note: // No decimal point is generated: the exponent is adjusted instead. // // p2 actually represents the fraction // // p2 * 2^e // = p2 / 2^-e // = d[-1] / 10^1 + d[-2] / 10^2 + ... // // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) // // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) // // using // // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) // = ( d) * 2^-e + ( r) // // or // 10^m * p2 * 2^e = d + r * 2^e // // i.e. // // M+ = buffer + p2 * 2^e // = buffer + 10^-m * (d + r * 2^e) // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e // // and stop as soon as 10^-m * r * 2^e <= delta * 2^e JSON_ASSERT(p2 > delta); int m = 0; for (;;) { // Invariant: // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e // = buffer * 10^-m + 10^-m * (p2 ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e // JSON_ASSERT(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10); p2 *= 10; const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e // // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e // JSON_ASSERT(d <= 9); buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d // // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e // p2 = r; m++; // // M+ = buffer * 10^-m + 10^-m * p2 * 2^e // Invariant restored. // Check if enough digits have been generated. // // 10^-m * p2 * 2^e <= delta * 2^e // p2 * 2^e <= 10^m * delta * 2^e // p2 <= 10^m * delta delta *= 10; dist *= 10; if (p2 <= delta) { break; } } // V = buffer * 10^-m, with M- <= V <= M+. decimal_exponent -= m; // 1 ulp in the decimal representation is now 10^-m. // Since delta and dist are now scaled by 10^m, we need to do the // same with ulp in order to keep the units in sync. // // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e // const std::uint64_t ten_m = one.f; grisu2_round(buffer, length, dist, delta, p2, ten_m); // By construction this algorithm generates the shortest possible decimal // number (Loitsch, Theorem 6.2) which rounds back to w. // For an input number of precision p, at least // // N = 1 + ceil(p * log_10(2)) // // decimal digits are sufficient to identify all binary floating-point // numbers (Matula, "In-and-Out conversions"). // This implies that the algorithm does not produce more than N decimal // digits. // // N = 17 for p = 53 (IEEE double precision) // N = 9 for p = 24 (IEEE single precision) }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, 0x8(%rsp) movl %r8d, 0x10(%rsp) movl 0x68(%rsp), %eax cmpl $-0x3d, %eax jle 0x74e3a movq %rdx, (%rsp) cmpl $-0x1f, %eax jge 0x74e56 movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsp), %r13 leaq 0x50(%rsp), %rbp leaq 0x8(%rsp), %rsi movq %r13, %rdi callq 0x74eaa movq %rax, %r12 movq %r13, %rdi movq %rbp, %rsi callq 0x74eaa xorl %ecx, %ecx subl 0x8(%r13), %ecx movl $0x1, %r9d shlq %cl, %r9 movq (%r13), %r8 movq %r8, %rdx shrq %cl, %rdx testl %edx, %edx je 0x74e72 movq %rax, %r10 leaq -0x1(%r9), %rsi cmpl $0x3b9ac9ff, %edx # imm = 0x3B9AC9FF jbe 0x74c43 movl $0x3b9aca00, %edi # imm = 0x3B9ACA00 movl $0xa, %r13d jmp 0x74ce8 cmpl $0x5f5e0ff, %edx # imm = 0x5F5E0FF jbe 0x74c5b movl $0x5f5e100, %edi # imm = 0x5F5E100 movl $0x9, %r13d jmp 0x74ce8 cmpl $0x98967f, %edx # imm = 0x98967F jbe 0x74c70 movl $0x989680, %edi # imm = 0x989680 movl $0x8, %r13d jmp 0x74ce8 cmpl $0xf423f, %edx # imm = 0xF423F jbe 0x74c85 movl $0xf4240, %edi # imm = 0xF4240 movl $0x7, %r13d jmp 0x74ce8 cmpl $0x1869f, %edx # imm = 0x1869F jbe 0x74c9a movl $0x186a0, %edi # imm = 0x186A0 movl $0x6, %r13d jmp 0x74ce8 cmpl $0x270f, %edx # imm = 0x270F jbe 0x74caf movl $0x2710, %edi # imm = 0x2710 movl $0x5, %r13d jmp 0x74ce8 cmpl $0x3e7, %edx # imm = 0x3E7 jbe 0x74cc4 movl $0x3e8, %edi # imm = 0x3E8 movl $0x4, %r13d jmp 0x74ce8 cmpl $0x63, %edx jbe 0x74cd6 movl $0x64, %edi movl $0x3, %r13d jmp 0x74ce8 xorl %r13d, %r13d cmpl $0xa, %edx setae %r13b leal 0x1(%r13,%r13,8), %edi incl %r13d andq %rsi, %r8 incl %r13d movl $0xcccccccd, %ebp # imm = 0xCCCCCCCD movl %edx, %eax xorl %edx, %edx divl %edi cmpl $0xa, %eax jae 0x74de1 movslq (%r14), %r15 leal 0x1(%r15), %r11d movl %r11d, (%r14) movl %edx, %r11d shlq %cl, %r11 orb $0x30, %al movb %al, (%rbx,%r15) addq %r8, %r11 cmpq %r12, %r11 jbe 0x74daa movl %edi, %edi imulq %rbp, %rdi shrq $0x23, %rdi decl %r13d cmpl $0x1, %r13d ja 0x74cf3 cmpq %r12, %r8 jbe 0x74e8e xorl %eax, %eax movabsq $0x199999999999999a, %rdx # imm = 0x199999999999999A cmpq %rdx, %r8 jae 0x74dfd addq %r8, %r8 leaq (%r8,%r8,4), %r8 movq %r8, %rdi shrq %cl, %rdi cmpq $0xa, %rdi jae 0x74e19 andq %rsi, %r8 orb $0x30, %dil movslq (%r14), %r11 leal 0x1(%r11), %ebp movl %ebp, (%r14) movb %dil, (%rbx,%r11) addq %r12, %r12 leaq (%r12,%r12,4), %r12 addq %r10, %r10 leaq (%r10,%r10,4), %r10 decl %eax cmpq %r12, %r8 ja 0x74d4c movq (%rsp), %rcx addl %eax, (%rcx) movl (%r14), %esi movq %rbx, %rdi movq %r10, %rdx movq %r12, %rcx jmp 0x74dcd movq (%rsp), %rdx movl (%rdx), %eax addl %r13d, %eax addl $-0x2, %eax movl %eax, (%rdx) movl %edi, %r9d shlq %cl, %r9 movl (%r14), %esi movq %rbx, %rdi movq %r10, %rdx movq %r12, %rcx movq %r11, %r8 callq 0x74ef4 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xd0f46(%rip), %rdi # 0x145d2e leaq 0xd0f8b(%rip), %rdx # 0x145d7a leaq 0xd2e14(%rip), %rcx # 0x147c0a movl $0x44a3, %esi # imm = 0x44A3 jmp 0x74e33 leaq 0xd0f2a(%rip), %rdi # 0x145d2e leaq 0xd0f6f(%rip), %rdx # 0x145d7a leaq 0xd2e0a(%rip), %rcx # 0x147c1c movl $0x4505, %esi # imm = 0x4505 jmp 0x74e33 leaq 0xd0f0e(%rip), %rdi # 0x145d2e leaq 0xd0f53(%rip), %rdx # 0x145d7a leaq 0xd2ddc(%rip), %rcx # 0x147c0a movl $0x450e, %esi # imm = 0x450E xorl %eax, %eax callq 0x20250 leaq 0xd0eed(%rip), %rdi # 0x145d2e leaq 0xd0f32(%rip), %rdx # 0x145d7a leaq 0xd2d8e(%rip), %rcx # 0x147bdd movl $0x4469, %esi # imm = 0x4469 jmp 0x74e33 leaq 0xd0ed1(%rip), %rdi # 0x145d2e leaq 0xd0f16(%rip), %rdx # 0x145d7a leaq 0xd2d85(%rip), %rcx # 0x147bf0 movl $0x446a, %esi # imm = 0x446A jmp 0x74e33 leaq 0xd0eb5(%rip), %rdi # 0x145d2e leaq 0xd0efa(%rip), %rdx # 0x145d7a leaq 0xd2d7c(%rip), %rcx # 0x147c03 movl $0x447f, %esi # imm = 0x447F jmp 0x74e33 leaq 0xd0e99(%rip), %rdi # 0x145d2e leaq 0xd0ede(%rip), %rdx # 0x145d7a leaq 0xd2d6e(%rip), %rcx # 0x147c11 movl $0x44fa, %esi # imm = 0x44FA jmp 0x74e33
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_40], rcx mov [rsp+48h+var_38], r8d mov eax, [rsp+48h+arg_18] cmp eax, 0FFFFFFC3h jle loc_74E3A mov [rsp+48h+var_48], rdx; unsigned __int64 cmp eax, 0FFFFFFE1h jge loc_74E56 mov r14, rsi mov rbx, rdi lea r13, [rsp+48h+arg_10] lea rbp, [rsp+48h+arg_0] lea rsi, [rsp+48h+var_40] mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r12, rax mov rdi, r13 mov rsi, rbp call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) xor ecx, ecx sub ecx, [r13+8] mov r9d, 1 shl r9, cl mov r8, [r13+0] mov rdx, r8 shr rdx, cl test edx, edx jz loc_74E72 mov r10, rax lea rsi, [r9-1] cmp edx, 3B9AC9FFh jbe short loc_74C43 mov edi, 3B9ACA00h mov r13d, 0Ah jmp loc_74CE8 loc_74C43: cmp edx, 5F5E0FFh jbe short loc_74C5B mov edi, 5F5E100h mov r13d, 9 jmp loc_74CE8 loc_74C5B: cmp edx, 98967Fh jbe short loc_74C70 mov edi, 989680h mov r13d, 8 jmp short loc_74CE8 loc_74C70: cmp edx, offset loc_F423F jbe short loc_74C85 mov edi, 0F4240h mov r13d, 7 jmp short loc_74CE8 loc_74C85: cmp edx, 1869Fh jbe short loc_74C9A mov edi, offset stru_186A0 mov r13d, 6 jmp short loc_74CE8 loc_74C9A: cmp edx, 270Fh jbe short loc_74CAF mov edi, 2710h mov r13d, 5 jmp short loc_74CE8 loc_74CAF: cmp edx, 3E7h jbe short loc_74CC4 mov edi, 3E8h mov r13d, 4 jmp short loc_74CE8 loc_74CC4: cmp edx, 63h ; 'c' jbe short loc_74CD6 mov edi, 64h ; 'd' mov r13d, 3 jmp short loc_74CE8 loc_74CD6: xor r13d, r13d cmp edx, 0Ah setnb r13b lea edi, [r13+r13*8+1] inc r13d loc_74CE8: and r8, rsi inc r13d mov ebp, 0CCCCCCCDh loc_74CF3: mov eax, edx xor edx, edx div edi cmp eax, 0Ah jnb loc_74DE1 movsxd r15, dword ptr [r14] lea r11d, [r15+1] mov [r14], r11d mov r11d, edx shl r11, cl or al, 30h mov [rbx+r15], al add r11, r8 cmp r11, r12 jbe loc_74DAA mov edi, edi imul rdi, rbp shr rdi, 23h dec r13d cmp r13d, 1 ja short loc_74CF3 cmp r8, r12 jbe loc_74E8E xor eax, eax mov rdx, 199999999999999Ah loc_74D4C: cmp r8, rdx jnb loc_74DFD add r8, r8 lea r8, [r8+r8*4] mov rdi, r8 shr rdi, cl cmp rdi, 0Ah jnb loc_74E19 and r8, rsi or dil, 30h movsxd r11, dword ptr [r14] lea ebp, [r11+1] mov [r14], ebp mov [rbx+r11], dil add r12, r12 lea r12, [r12+r12*4] add r10, r10 lea r10, [r10+r10*4] dec eax cmp r8, r12 ja short loc_74D4C mov rcx, [rsp+48h+var_48] add [rcx], eax mov esi, [r14] mov rdi, rbx mov rdx, r10 mov rcx, r12 jmp short loc_74DCD loc_74DAA: mov rdx, [rsp+48h+var_48] mov eax, [rdx] add eax, r13d add eax, 0FFFFFFFEh mov [rdx], eax mov r9d, edi shl r9, cl; unsigned __int64 mov esi, [r14]; char * mov rdi, rbx; this mov rdx, r10; int mov rcx, r12; unsigned __int64 mov r8, r11; unsigned __int64 loc_74DCD: call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char *,int,ulong,ulong,ulong,ulong) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_74DE1: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aD9; "d <= 9" mov esi, 44A3h jmp short loc_74E33 loc_74DFD: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP2StdNumericLi; "p2 <= (std::numeric_limits<std::uint64_"... mov esi, 4505h jmp short loc_74E33 loc_74E19: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aD9; "d <= 9" mov esi, 450Eh loc_74E33: xor eax, eax call _ggml_abort loc_74E3A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEKalpha; "M_plus.e >= kAlpha" mov esi, 4469h jmp short loc_74E33 loc_74E56: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEKgamma; "M_plus.e <= kGamma" mov esi, 446Ah jmp short loc_74E33 loc_74E72: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP10; "p1 > 0" mov esi, 447Fh jmp short loc_74E33 loc_74E8E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP2Delta; "p2 > delta" mov esi, 44FAh jmp short loc_74E33
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, unsigned int *a2, _DWORD *a3, long long a4, int a5, long long a6, char a7, int a8, unsigned long long a9, int a10) { unsigned long long v12; // r12 int v13; // eax int v14; // ecx unsigned long long v15; // r9 unsigned long long v16; // rdx int v17; // r10d unsigned long long v18; // rsi Elf64_Rela *v19; // rdi int v20; // r13d BOOL v21; // r13d unsigned long long v22; // r8 unsigned int v23; // r13d unsigned int v24; // eax unsigned int v25; // eax long long v26; // r15 unsigned long long v27; // r11 int v28; // eax unsigned long long v29; // r8 unsigned long long v30; // rdi long long v31; // r11 char *v32; // rsi nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v33; // rdi int v34; // edx unsigned long long v35; // rcx long long v38; // [rsp+8h] [rbp-40h] BYREF int v39; // [rsp+10h] [rbp-38h] v38 = a4; v39 = a5; if ( a10 <= -61 ) { while ( 1 ) LABEL_36: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17513LL, "GGML_ASSERT(%s) failed", "M_plus.e >= kAlpha"); } if ( a10 >= -31 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17514LL, "GGML_ASSERT(%s) failed", "M_plus.e <= kGamma"); goto LABEL_36; } v12 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &v38); v13 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &a7); v14 = -a10; v15 = 1LL << -(char)a10; v16 = a9 >> -(char)a10; if ( !(_DWORD)v16 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17535LL, "GGML_ASSERT(%s) failed", "p1 > 0"); goto LABEL_36; } v17 = v13; v18 = v15 - 1; if ( (unsigned int)v16 <= 0x3B9AC9FF ) { if ( (unsigned int)v16 <= 0x5F5E0FF ) { if ( (unsigned int)v16 <= 0x98967F ) { if ( (unsigned int)v16 <= (unsigned int)&loc_F423F ) { if ( (unsigned int)v16 <= 0x1869F ) { if ( (unsigned int)v16 <= 0x270F ) { if ( (unsigned int)v16 <= 0x3E7 ) { if ( (unsigned int)v16 <= 0x63 ) { v21 = (unsigned int)v16 >= 0xA; LODWORD(v19) = 9 * v21 + 1; v20 = v21 + 1; } else { LODWORD(v19) = 100; v20 = 3; } } else { LODWORD(v19) = 1000; v20 = 4; } } else { LODWORD(v19) = 10000; v20 = 5; } } else { v19 = &stru_186A0; v20 = 6; } } else { LODWORD(v19) = 1000000; v20 = 7; } } else { LODWORD(v19) = 10000000; v20 = 8; } } else { LODWORD(v19) = 100000000; v20 = 9; } } else { LODWORD(v19) = 1000000000; v20 = 10; } v22 = v18 & a9; v23 = v20 + 1; do { v24 = v16; LODWORD(v16) = (unsigned int)v16 % (unsigned int)v19; v25 = v24 / (unsigned int)v19; if ( v25 >= 0xA ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17571LL, "GGML_ASSERT(%s) failed", "d <= 9"); goto LABEL_36; } v26 = (int)*a2; *a2 = v26 + 1; *((_BYTE *)this + v26) = v25 | 0x30; v27 = v22 + ((unsigned long long)(unsigned int)v16 << v14); if ( v27 <= v12 ) { *a3 = v23 + *a3 - 2; v15 = (unsigned long long)(unsigned int)v19 << v14; v32 = (char *)*a2; v33 = this; v34 = v17; v35 = v12; v22 = v27; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round( v33, v32, v34, v35, v22, v15, (unsigned long long)a3); } LODWORD(v19) = (unsigned int)v19 / 0xA; --v23; } while ( v23 > 1 ); if ( v22 <= v12 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17658LL, "GGML_ASSERT(%s) failed", "p2 > delta"); goto LABEL_36; } v28 = 0; while ( 2 ) { if ( v22 >= 0x199999999999999ALL ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17669LL, "GGML_ASSERT(%s) failed", "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10"); goto LABEL_36; } v29 = 10 * v22; v30 = v29 >> v14; if ( v29 >> v14 >= 0xA ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17678LL, "GGML_ASSERT(%s) failed", "d <= 9"); goto LABEL_36; } v22 = v18 & v29; v31 = (int)*a2; *a2 = v31 + 1; *((_BYTE *)this + v31) = v30 | 0x30; v12 *= 10LL; v17 *= 10; --v28; if ( v22 > v12 ) continue; break; } *a3 += v28; v32 = (char *)*a2; v33 = this; v34 = v17; v35 = v12; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(v33, v32, v34, v35, v22, v15, (unsigned long long)a3); }
grisu2_digit_gen: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RCX MOV dword ptr [RSP + 0x10],R8D MOV EAX,dword ptr [RSP + 0x68] CMP EAX,-0x3d JLE 0x00174e3a MOV qword ptr [RSP],RDX CMP EAX,-0x1f JGE 0x00174e56 MOV R14,RSI MOV RBX,RDI LEA R13,[RSP + 0x60] LEA RBP,[RSP + 0x50] LEA RSI,[RSP + 0x8] MOV RDI,R13 CALL 0x00174eaa MOV R12,RAX MOV RDI,R13 MOV RSI,RBP CALL 0x00174eaa XOR ECX,ECX SUB ECX,dword ptr [R13 + 0x8] MOV R9D,0x1 SHL R9,CL MOV R8,qword ptr [R13] MOV RDX,R8 SHR RDX,CL TEST EDX,EDX JZ 0x00174e72 MOV R10,RAX LEA RSI,[R9 + -0x1] CMP EDX,0x3b9ac9ff JBE 0x00174c43 MOV EDI,0x3b9aca00 MOV R13D,0xa JMP 0x00174ce8 LAB_00174c43: CMP EDX,0x5f5e0ff JBE 0x00174c5b MOV EDI,0x5f5e100 MOV R13D,0x9 JMP 0x00174ce8 LAB_00174c5b: CMP EDX,0x98967f JBE 0x00174c70 MOV EDI,0x989680 MOV R13D,0x8 JMP 0x00174ce8 LAB_00174c70: CMP EDX,0xf423f JBE 0x00174c85 MOV EDI,0xf4240 MOV R13D,0x7 JMP 0x00174ce8 LAB_00174c85: CMP EDX,0x1869f JBE 0x00174c9a MOV EDI,0x186a0 MOV R13D,0x6 JMP 0x00174ce8 LAB_00174c9a: CMP EDX,0x270f JBE 0x00174caf MOV EDI,0x2710 MOV R13D,0x5 JMP 0x00174ce8 LAB_00174caf: CMP EDX,0x3e7 JBE 0x00174cc4 MOV EDI,0x3e8 MOV R13D,0x4 JMP 0x00174ce8 LAB_00174cc4: CMP EDX,0x63 JBE 0x00174cd6 MOV EDI,0x64 MOV R13D,0x3 JMP 0x00174ce8 LAB_00174cd6: XOR R13D,R13D CMP EDX,0xa SETNC R13B LEA EDI,[R13 + R13*0x8 + 0x1] INC R13D LAB_00174ce8: AND R8,RSI INC R13D MOV EBP,0xcccccccd LAB_00174cf3: MOV EAX,EDX XOR EDX,EDX DIV EDI CMP EAX,0xa JNC 0x00174de1 MOVSXD R15,dword ptr [R14] LEA R11D,[R15 + 0x1] MOV dword ptr [R14],R11D MOV R11D,EDX SHL R11,CL OR AL,0x30 MOV byte ptr [RBX + R15*0x1],AL ADD R11,R8 CMP R11,R12 JBE 0x00174daa MOV EDI,EDI IMUL RDI,RBP SHR RDI,0x23 DEC R13D CMP R13D,0x1 JA 0x00174cf3 CMP R8,R12 JBE 0x00174e8e XOR EAX,EAX MOV RDX,0x199999999999999a LAB_00174d4c: CMP R8,RDX JNC 0x00174dfd ADD R8,R8 LEA R8,[R8 + R8*0x4] MOV RDI,R8 SHR RDI,CL CMP RDI,0xa JNC 0x00174e19 AND R8,RSI OR DIL,0x30 MOVSXD R11,dword ptr [R14] LEA EBP,[R11 + 0x1] MOV dword ptr [R14],EBP MOV byte ptr [RBX + R11*0x1],DIL ADD R12,R12 LEA R12,[R12 + R12*0x4] ADD R10,R10 LEA R10,[R10 + R10*0x4] DEC EAX CMP R8,R12 JA 0x00174d4c MOV RCX,qword ptr [RSP] ADD dword ptr [RCX],EAX MOV ESI,dword ptr [R14] MOV RDI,RBX MOV RDX,R10 MOV RCX,R12 JMP 0x00174dcd LAB_00174daa: MOV RDX,qword ptr [RSP] MOV EAX,dword ptr [RDX] ADD EAX,R13D ADD EAX,-0x2 MOV dword ptr [RDX],EAX MOV R9D,EDI SHL R9,CL MOV ESI,dword ptr [R14] MOV RDI,RBX MOV RDX,R10 MOV RCX,R12 MOV R8,R11 LAB_00174dcd: CALL 0x00174ef4 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00174de1: LEA RDI,[0x245d2e] LEA RDX,[0x245d7a] LEA RCX,[0x247c0a] MOV ESI,0x44a3 JMP 0x00174e33 LAB_00174dfd: LEA RDI,[0x245d2e] LEA RDX,[0x245d7a] LEA RCX,[0x247c1c] MOV ESI,0x4505 JMP 0x00174e33 LAB_00174e19: LEA RDI,[0x245d2e] LEA RDX,[0x245d7a] LEA RCX,[0x247c0a] MOV ESI,0x450e LAB_00174e33: XOR EAX,EAX CALL 0x00120250 LAB_00174e3a: LEA RDI,[0x245d2e] LEA RDX,[0x245d7a] LEA RCX,[0x247bdd] MOV ESI,0x4469 JMP 0x00174e33 LAB_00174e56: LEA RDI,[0x245d2e] LEA RDX,[0x245d7a] LEA RCX,[0x247bf0] MOV ESI,0x446a JMP 0x00174e33 LAB_00174e72: LEA RDI,[0x245d2e] LEA RDX,[0x245d7a] LEA RCX,[0x247c03] MOV ESI,0x447f JMP 0x00174e33 LAB_00174e8e: LEA RDI,[0x245d2e] LEA RDX,[0x245d7a] LEA RCX,[0x247c11] MOV ESI,0x44fa JMP 0x00174e33
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen (char *param_1,int *param_2,int *param_3,int8 param_4,int4 param_5) { int iVar1; byte bVar2; int iVar3; ulong uVar4; ulong uVar5; char *pcVar6; ulong uVar7; int8 uVar8; ulong uVar9; ulong uVar10; ulong uVar11; ulong uVar12; uint uVar13; ulong in_stack_00000018; int in_stack_00000020; int8 local_40; int4 local_38; local_40 = param_4; local_38 = param_5; if (in_stack_00000020 < -0x3c) { pcVar6 = "M_plus.e >= kAlpha"; uVar8 = 0x4469; } else if (in_stack_00000020 < -0x1f) { uVar4 = diyfp::sub((diyfp *)&stack0x00000018,(diyfp *)&local_40); uVar5 = diyfp::sub((diyfp *)&stack0x00000018,&stack0x00000008); bVar2 = -(char)in_stack_00000020; uVar11 = 1L << (bVar2 & 0x3f); uVar7 = in_stack_00000018 >> (bVar2 & 0x3f); uVar13 = (uint)uVar7; if (uVar13 == 0) { pcVar6 = "p1 > 0"; uVar8 = 0x447f; } else { if (uVar13 < 1000000000) { if (uVar13 < 100000000) { if (uVar13 < 10000000) { if (uVar13 < 1000000) { if (uVar13 < 100000) { if (uVar13 < 10000) { if (uVar13 < 1000) { if (uVar13 < 100) { uVar9 = (ulong)(9 < uVar13) * 9 + 1; iVar3 = (9 < uVar13) + 1; } else { uVar9 = 100; iVar3 = 3; } } else { uVar9 = 1000; iVar3 = 4; } } else { uVar9 = 10000; iVar3 = 5; } } else { uVar9 = 100000; iVar3 = 6; } } else { uVar9 = 1000000; iVar3 = 7; } } else { uVar9 = 10000000; iVar3 = 8; } } else { uVar9 = 100000000; iVar3 = 9; } } else { uVar9 = 1000000000; iVar3 = 10; } uVar10 = in_stack_00000018 & uVar11 - 1; uVar13 = iVar3 + 1; do { uVar12 = (uVar7 & 0xffffffff) / uVar9; uVar7 = (uVar7 & 0xffffffff) % uVar9; if (9 < (uint)uVar12) { pcVar6 = "d <= 9"; uVar8 = 0x44a3; goto LAB_00174e33; } iVar3 = *param_2; *param_2 = iVar3 + 1; param_1[iVar3] = (byte)uVar12 | 0x30; uVar12 = (uVar7 << (bVar2 & 0x3f)) + uVar10; if (uVar12 <= uVar4) { *param_3 = *param_3 + uVar13 + -2; uVar11 = uVar9 << (bVar2 & 0x3f); iVar3 = *param_2; goto LAB_00174dcd; } uVar9 = uVar9 / 10; uVar13 = uVar13 - 1; } while (1 < uVar13); if (uVar4 < uVar10) { iVar3 = 0; while( true ) { if (0x1999999999999999 < uVar10) { pcVar6 = "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10"; uVar8 = 0x4505; goto LAB_00174e33; } uVar7 = uVar10 * 10 >> (bVar2 & 0x3f); if (9 < uVar7) break; uVar10 = uVar10 * 10 & uVar11 - 1; iVar1 = *param_2; *param_2 = iVar1 + 1; param_1[iVar1] = (byte)uVar7 | 0x30; uVar4 = uVar4 * 10; uVar5 = uVar5 * 10; iVar3 = iVar3 + -1; if (uVar10 <= uVar4) { *param_3 = *param_3 + iVar3; iVar3 = *param_2; uVar12 = uVar10; LAB_00174dcd: grisu2_round(param_1,iVar3,uVar5,uVar4,uVar12,uVar11); return; } } pcVar6 = "d <= 9"; uVar8 = 0x450e; } else { pcVar6 = "p2 > delta"; uVar8 = 0x44fa; } } } else { pcVar6 = "M_plus.e <= kGamma"; uVar8 = 0x446a; } LAB_00174e33: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",uVar8, "GGML_ASSERT(%s) failed",pcVar6); }
2,839
nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::output_adapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/json.hpp
output_adapter(StringType& s) : oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {}
O2
cpp
nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::output_adapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq %rsp, %rdi callq 0xa336b leaq 0x8(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x4e2f6 addq $0x10, %rsp popq %rbx retq
_ZN8nlohmann16json_abi_v3_11_36detail14output_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2ERS8_: push rbx sub rsp, 10h mov rbx, rdi mov rdi, rsp call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_36detail21output_string_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEJRS9_EESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::string>,std::string&>(std::string&) lea rdi, [rsp+18h+var_10] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() add rsp, 10h pop rbx retn
long long nlohmann::json_abi_v3_11_3::detail::output_adapter<char,std::string>::output_adapter(_OWORD *a1) { __int128 v1; // xmm0 __int128 v3; // [rsp+0h] [rbp-18h] BYREF std::make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::string>,std::string&>(&v3); v1 = v3; *((_QWORD *)&v3 + 1) = 0LL; *a1 = v1; *(_QWORD *)&v3 = 0LL; return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v3 + 1); }
output_adapter: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV RDI,RSP CALL 0x001a336b LEA RDI,[RSP + 0x8] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x0014e2f6 ADD RSP,0x10 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::string >::output_adapter(std::__cxx11::string&) */ void nlohmann::json_abi_v3_11_3::detail::output_adapter<char,std::__cxx11::string>::output_adapter (string *param_1) { int8 uVar1; int8 local_18; int8 uStack_10; std:: make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::__cxx11::string>,std::__cxx11::string&> ((string *)&local_18); uVar1 = uStack_10; uStack_10 = 0; *(int8 *)param_1 = local_18; *(int8 *)(param_1 + 8) = uVar1; local_18 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10); return; }
2,840
std::less<ftxui::(anonymous namespace)::TileEncoding>::operator()(ftxui::(anonymous namespace)::TileEncoding const&, ftxui::(anonymous namespace)::TileEncoding const&) const
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/screen.cpp
bool operator<(const TileEncoding& other) const { if (left < other.left) { return true; } if (left > other.left) { return false; } if (top < other.top) { return true; } if (top > other.top) { return false; } if (right < other.right) { return true; } if (right > other.right) { return false; } if (down < other.down) { return true; } if (down > other.down) { return false; } if (round < other.round) { return true; } if (round > other.round) { return false; } return false; }
O3
cpp
std::less<ftxui::(anonymous namespace)::TileEncoding>::operator()(ftxui::(anonymous namespace)::TileEncoding const&, ftxui::(anonymous namespace)::TileEncoding const&) const: movl %edi, %ecx andl $0x3, %ecx movl %esi, %edx andl $0x3, %edx movb $0x1, %al cmpw %dx, %cx jb 0x3a22b jbe 0x3a22c xorl %eax, %eax retq movl %edi, %ecx shrl $0x2, %ecx andl $0x3, %ecx movl %esi, %edx shrl $0x2, %edx andl $0x3, %edx cmpw %dx, %cx jb 0x3a22b ja 0x3a229 movl %edi, %ecx shrl $0x4, %ecx andl $0x3, %ecx movl %esi, %edx shrl $0x4, %edx andl $0x3, %edx cmpw %dx, %cx jb 0x3a22b ja 0x3a229 movl %edi, %ecx shrl $0x6, %ecx andl $0x3, %ecx movl %esi, %edx shrl $0x6, %edx andl $0x3, %edx cmpw %dx, %cx jb 0x3a22b ja 0x3a229 shrl $0x8, %edi andl $0x1, %edi btl $0x8, %esi sbbw $0x0, %di setb %al retq nop
_ZNKSt4lessIN5ftxui12_GLOBAL__N_112TileEncodingEEclERKS2_S5_: mov ecx, edi and ecx, 3 mov edx, esi and edx, 3 mov al, 1 cmp cx, dx jb short locret_3A22B jbe short loc_3A22C loc_3A229: xor eax, eax locret_3A22B: retn loc_3A22C: mov ecx, edi shr ecx, 2 and ecx, 3 mov edx, esi shr edx, 2 and edx, 3 cmp cx, dx jb short locret_3A22B ja short loc_3A229 mov ecx, edi shr ecx, 4 and ecx, 3 mov edx, esi shr edx, 4 and edx, 3 cmp cx, dx jb short locret_3A22B ja short loc_3A229 mov ecx, edi shr ecx, 6 and ecx, 3 mov edx, esi shr edx, 6 and edx, 3 cmp cx, dx jb short locret_3A22B ja short loc_3A229 shr edi, 8 and edi, 1 bt esi, 8 sbb di, 0 setb al retn
bool std::less<ftxui::`anonymous namespace'::TileEncoding>::operator()(unsigned int a1, unsigned int a2) { unsigned __int16 v2; // cx unsigned __int16 v3; // dx bool result; // al unsigned __int16 v5; // cx unsigned __int16 v6; // dx v2 = a1 & 3; v3 = a2 & 3; result = 1; if ( v2 >= v3 ) { if ( v2 > v3 ) return 0; if ( (unsigned __int16)((a1 >> 2) & 3) >= (unsigned __int16)((a2 >> 2) & 3) ) { if ( (unsigned __int16)((a1 >> 2) & 3) > (unsigned __int16)((a2 >> 2) & 3) ) return 0; if ( (unsigned __int16)((a1 >> 4) & 3) >= (unsigned __int16)((a2 >> 4) & 3) ) { if ( (unsigned __int16)((a1 >> 4) & 3) > (unsigned __int16)((a2 >> 4) & 3) ) return 0; v5 = (unsigned __int8)a1 >> 6; v6 = (unsigned __int8)a2 >> 6; if ( v5 >= v6 ) { if ( v5 <= v6 ) return (unsigned __int16)((a1 >> 8) & 1) < (unsigned __int8)((a2 & 0x100) != 0); return 0; } } } } return result; }
operator(): MOV ECX,EDI AND ECX,0x3 MOV EDX,ESI AND EDX,0x3 MOV AL,0x1 CMP CX,DX JC 0x0013a22b JBE 0x0013a22c LAB_0013a229: XOR EAX,EAX LAB_0013a22b: RET LAB_0013a22c: MOV ECX,EDI SHR ECX,0x2 AND ECX,0x3 MOV EDX,ESI SHR EDX,0x2 AND EDX,0x3 CMP CX,DX JC 0x0013a22b JA 0x0013a229 MOV ECX,EDI SHR ECX,0x4 AND ECX,0x3 MOV EDX,ESI SHR EDX,0x4 AND EDX,0x3 CMP CX,DX JC 0x0013a22b JA 0x0013a229 MOV ECX,EDI SHR ECX,0x6 AND ECX,0x3 MOV EDX,ESI SHR EDX,0x6 AND EDX,0x3 CMP CX,DX JC 0x0013a22b JA 0x0013a229 SHR EDI,0x8 AND EDI,0x1 BT ESI,0x8 SBB DI,0x0 SETC AL RET
/* std::less<ftxui::(anonymous namespace)::TileEncoding>::TEMPNAMEPLACEHOLDERVALUE(ftxui::(anonymous namespace)::TileEncoding const&, ftxui::(anonymous namespace)::TileEncoding const&) const */ bool std::less<ftxui::(anonymous_namespace)::TileEncoding>::operator() (TileEncoding *param_1,TileEncoding *param_2) { bool bVar1; ushort uVar2; ushort uVar3; uVar2 = (ushort)param_1 & 3; uVar3 = (ushort)param_2 & 3; bVar1 = true; if (uVar3 <= uVar2) { if (uVar2 <= uVar3) { uVar2 = (ushort)((ulong)param_1 >> 2) & 3; uVar3 = (ushort)((ulong)param_2 >> 2) & 3; if (uVar2 < uVar3) { return true; } if (uVar2 <= uVar3) { uVar2 = (ushort)((ulong)param_1 >> 4) & 3; uVar3 = (ushort)((ulong)param_2 >> 4) & 3; if (uVar2 < uVar3) { return true; } if (uVar2 <= uVar3) { uVar2 = (ushort)((ulong)param_1 >> 6) & 3; uVar3 = (ushort)((ulong)param_2 >> 6) & 3; if (uVar2 < uVar3) { return true; } if (uVar2 <= uVar3) { return ((ushort)((ulong)param_1 >> 8) & 1) < (ushort)(((uint)param_2 >> 8 & 1) != 0); } } } } bVar1 = false; } return bVar1; }
2,841
glfwPlatformCreateStandardCursor
untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_window.c
int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape) { int native = 0; if (shape == GLFW_ARROW_CURSOR) native = XC_left_ptr; else if (shape == GLFW_IBEAM_CURSOR) native = XC_xterm; else if (shape == GLFW_CROSSHAIR_CURSOR) native = XC_crosshair; else if (shape == GLFW_HAND_CURSOR) native = XC_hand2; else if (shape == GLFW_HRESIZE_CURSOR) native = XC_sb_h_double_arrow; else if (shape == GLFW_VRESIZE_CURSOR) native = XC_sb_v_double_arrow; else return GLFW_FALSE; cursor->x11.handle = XCreateFontCursor(_glfw.x11.display, native); if (!cursor->x11.handle) { _glfwInputError(GLFW_PLATFORM_ERROR, "X11: Failed to create standard cursor"); return GLFW_FALSE; } return GLFW_TRUE; }
O3
c
glfwPlatformCreateStandardCursor: pushq %rbp pushq %rbx pushq %rax addl $0xfffc9fff, %esi # imm = 0xFFFC9FFF xorl %ebp, %ebp cmpl $0x5, %esi ja 0x25513 movq %rdi, %rbx movl %esi, %eax leaq 0x6067e(%rip), %rcx # 0x85b58 movl (%rcx,%rax,4), %esi leaq 0x83154(%rip), %rax # 0xa8638 movq 0x1fec0(%rax), %rdi callq 0xc4b0 movq %rax, 0x8(%rbx) movl $0x1, %ebp testq %rax, %rax jne 0x25513 leaq 0x6072b(%rip), %rsi # 0x85c30 xorl %ebp, %ebp movl $0x10008, %edi # imm = 0x10008 xorl %eax, %eax callq 0x18e91 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
_glfwPlatformCreateStandardCursor: push rbp push rbx push rax add esi, 0FFFC9FFFh xor ebp, ebp cmp esi, 5 ja short loc_25513 mov rbx, rdi mov eax, esi lea rcx, unk_85B58 mov esi, [rcx+rax*4] lea rax, _glfw mov rdi, [rax+1FEC0h] call _XCreateFontCursor mov [rbx+8], rax mov ebp, 1 test rax, rax jnz short loc_25513 lea rsi, aX11FailedToCre_0; "X11: Failed to create standard cursor" xor ebp, ebp mov edi, 10008h xor eax, eax call _glfwInputError loc_25513: mov eax, ebp add rsp, 8 pop rbx pop rbp retn
long long glfwPlatformCreateStandardCursor(long long a1, int a2) { unsigned int v2; // esi unsigned int v3; // ebp long long v4; // rax v2 = a2 - 221185; v3 = 0; if ( v2 <= 5 ) { v4 = XCreateFontCursor(*(_QWORD *)&glfw[32688], dword_85B58[v2]); *(_QWORD *)(a1 + 8) = v4; v3 = 1; if ( !v4 ) { v3 = 0; glfwInputError(0x10008u, (long long)"X11: Failed to create standard cursor"); } } return v3; }
_glfwPlatformCreateStandardCursor: PUSH RBP PUSH RBX PUSH RAX ADD ESI,0xfffc9fff XOR EBP,EBP CMP ESI,0x5 JA 0x00125513 MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x185b58] MOV ESI,dword ptr [RCX + RAX*0x4] LEA RAX,[0x1a8638] MOV RDI,qword ptr [RAX + 0x1fec0] CALL 0x0010c4b0 MOV qword ptr [RBX + 0x8],RAX MOV EBP,0x1 TEST RAX,RAX JNZ 0x00125513 LEA RSI,[0x185c30] XOR EBP,EBP MOV EDI,0x10008 XOR EAX,EAX CALL 0x00118e91 LAB_00125513: MOV EAX,EBP ADD RSP,0x8 POP RBX POP RBP RET
int8 _glfwPlatformCreateStandardCursor(long param_1,int param_2) { long lVar1; int8 uVar2; uVar2 = 0; if (param_2 - 0x36001U < 6) { lVar1 = XCreateFontCursor(DAT_001c84f8, *(int4 *)(&DAT_00185b58 + (ulong)(param_2 - 0x36001U) * 4)); *(long *)(param_1 + 8) = lVar1; uVar2 = 1; if (lVar1 == 0) { uVar2 = 0; _glfwInputError(0x10008,"X11: Failed to create standard cursor"); } } return uVar2; }
2,842
expand_tilde
eloqsql/mysys/mf_pack.c
static char * expand_tilde(char **path) { if (path[0][0] == FN_LIBCHAR) return home_dir; /* ~/ expanded to home */ #ifdef HAVE_GETPWNAM { char *str,save; struct passwd *user_entry; if (!(str=strchr(*path,FN_LIBCHAR))) str=strend(*path); save= *str; *str= '\0'; user_entry=getpwnam(*path); *str=save; endpwent(); if (user_entry) { *path=str; return user_entry->pw_dir; } } #endif return (char *) 0; }
O0
c
expand_tilde: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0xec52e leaq 0xba1566(%rip), %rax # 0xc8da88 movq (%rax), %rax movq %rax, -0x8(%rbp) jmp 0xec5af movq -0x10(%rbp), %rax movq (%rax), %rdi movl $0x2f, %esi callq 0x2a420 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0xec559 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x157dc0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x2a580 movq %rax, -0x28(%rbp) movb -0x19(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, (%rax) callq 0x2a890 cmpq $0x0, -0x28(%rbp) je 0xec5a7 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x8(%rbp) jmp 0xec5af movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
expand_tilde: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_EC52E lea rax, home_dir mov rax, [rax] mov [rbp+var_8], rax jmp loc_EC5AF loc_EC52E: mov rax, [rbp+var_10] mov rdi, [rax] mov esi, 2Fh ; '/' call _strchr mov [rbp+var_18], rax cmp rax, 0 jnz short loc_EC559 mov rax, [rbp+var_10] mov rdi, [rax] call strend mov [rbp+var_18], rax loc_EC559: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_19], al mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rdi, [rax] call _getpwnam mov [rbp+var_28], rax mov cl, [rbp+var_19] mov rax, [rbp+var_18] mov [rax], cl call _endpwent cmp [rbp+var_28], 0 jz short loc_EC5A7 mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_28] mov rax, [rax+20h] mov [rbp+var_8], rax jmp short loc_EC5AF loc_EC5A7: mov [rbp+var_8], 0 loc_EC5AF: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long expand_tilde(char **a1) { long long v2; // [rsp+8h] [rbp-28h] char v3; // [rsp+17h] [rbp-19h] char *v4; // [rsp+18h] [rbp-18h] if ( **a1 == 47 ) return home_dir; v4 = (char *)strchr(*a1, 47LL); if ( !v4 ) v4 = (char *)strend(*a1); v3 = *v4; *v4 = 0; v2 = getpwnam(*a1); *v4 = v3; endpwent(); if ( !v2 ) return 0LL; *a1 = v4; return *(_QWORD *)(v2 + 32); }
expand_tilde: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001ec52e LEA RAX,[0xd8da88] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x001ec5af LAB_001ec52e: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x2f CALL 0x0012a420 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x001ec559 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00257dc0 MOV qword ptr [RBP + -0x18],RAX LAB_001ec559: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0012a580 MOV qword ptr [RBP + -0x28],RAX MOV CL,byte ptr [RBP + -0x19] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL CALL 0x0012a890 CMP qword ptr [RBP + -0x28],0x0 JZ 0x001ec5a7 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x001ec5af LAB_001ec5a7: MOV qword ptr [RBP + -0x8],0x0 LAB_001ec5af: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * expand_tilde(int8 *param_1) { char cVar1; passwd *ppVar2; char *local_20; char *local_10; if (*(char *)*param_1 == '/') { local_10 = home_dir; } else { local_20 = strchr((char *)*param_1,0x2f); if (local_20 == (char *)0x0) { local_20 = (char *)strend(*param_1); } cVar1 = *local_20; *local_20 = '\0'; ppVar2 = getpwnam((char *)*param_1); *local_20 = cVar1; endpwent(); if (ppVar2 == (passwd *)0x0) { local_10 = (char *)0x0; } else { *param_1 = local_20; local_10 = ppVar2->pw_dir; } } return local_10; }
2,843
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>>>>>::scan()
monkey531[P]llama/common/json.hpp
token_type scan() { // initially, skip the BOM if (position.chars_read_total == 0 && !skip_bom()) { error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return token_type::parse_error; } // read next character and ignore whitespace skip_whitespace(); // ignore comments while (ignore_comments && current == '/') { if (!scan_comment()) { return token_type::parse_error; } // skip following whitespace skip_whitespace(); } switch (current) { // structural characters case '[': return token_type::begin_array; case ']': return token_type::end_array; case '{': return token_type::begin_object; case '}': return token_type::end_object; case ':': return token_type::name_separator; case ',': return token_type::value_separator; // literals case 't': { std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); } case 'f': { std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); } case 'n': { std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); } // string case '\"': return scan_string(); // number case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return scan_number(); // end of input (the null byte is needed when parsing from // string literals) case '\0': case char_traits<char_type>::eof(): return token_type::end_of_input; // error default: error_message = "invalid literal"; return token_type::parse_error; } }
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>>>>>::scan(): subq $0x58, %rsp movq %rdi, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x30(%rsp) cmpq $0x0, 0x20(%rax) jne 0xdd7e5 movq 0x30(%rsp), %rdi callq 0xdd9e0 testb $0x1, %al jne 0xdd7e5 movq 0x30(%rsp), %rax leaq 0x13ec66(%rip), %rcx # 0x21c43a movq %rcx, 0x70(%rax) movl $0xe, 0x54(%rsp) jmp 0xdd9d0 movq 0x30(%rsp), %rdi callq 0xdda60 movq 0x30(%rsp), %rcx xorl %eax, %eax testb $0x1, 0x10(%rcx) movb %al, 0x2f(%rsp) je 0xdd810 movq 0x30(%rsp), %rax cmpl $0x2f, 0x14(%rax) sete %al movb %al, 0x2f(%rsp) movb 0x2f(%rsp), %al testb $0x1, %al jne 0xdd81a jmp 0xdd841 movq 0x30(%rsp), %rdi callq 0xddad0 testb $0x1, %al jne 0xdd835 movl $0xe, 0x54(%rsp) jmp 0xdd9d0 movq 0x30(%rsp), %rdi callq 0xdda60 jmp 0xdd7ef movq 0x30(%rsp), %rax movl 0x14(%rax), %eax incl %eax movl %eax, %ecx movq %rcx, 0x20(%rsp) subl $0x7e, %eax ja 0xdd9b8 movq 0x20(%rsp), %rax leaq 0x138c71(%rip), %rcx # 0x2164d8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x8, 0x54(%rsp) jmp 0xdd9d0 movl $0xa, 0x54(%rsp) jmp 0xdd9d0 movl $0x9, 0x54(%rsp) jmp 0xdd9d0 movl $0xb, 0x54(%rsp) jmp 0xdd9d0 movl $0xc, 0x54(%rsp) jmp 0xdd9d0 movl $0xd, 0x54(%rsp) jmp 0xdd9d0 movl 0x138bdc(%rip), %eax # 0x2164a0 movl %eax, 0x44(%rsp) leaq 0x44(%rsp), %rdi callq 0xddcc0 movq %rax, 0x18(%rsp) leaq 0x44(%rsp), %rdi callq 0xddcd0 movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rax, %rdx movl $0x1, %ecx callq 0xddbd0 movl %eax, 0x54(%rsp) jmp 0xdd9d0 movl 0x140101(%rip), %eax # 0x21da08 movl %eax, 0x3f(%rsp) movb 0x1400fb(%rip), %al # 0x21da0c movb %al, 0x43(%rsp) leaq 0x3f(%rsp), %rdi callq 0xddce0 movq %rax, 0x10(%rsp) leaq 0x3f(%rsp), %rdi callq 0xddcf0 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rsi movq %rax, %rdx movl $0x2, %ecx callq 0xddbd0 movl %eax, 0x54(%rsp) jmp 0xdd9d0 movl 0x138b50(%rip), %eax # 0x2164a4 movl %eax, 0x3b(%rsp) leaq 0x3b(%rsp), %rdi callq 0xddcc0 movq %rax, 0x8(%rsp) leaq 0x3b(%rsp), %rdi callq 0xddcd0 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi movq %rax, %rdx movl $0x3, %ecx callq 0xddbd0 movl %eax, 0x54(%rsp) jmp 0xdd9d0 movq 0x30(%rsp), %rdi callq 0xddd00 movl %eax, 0x54(%rsp) jmp 0xdd9d0 movq 0x30(%rsp), %rdi callq 0xde990 movl %eax, 0x54(%rsp) jmp 0xdd9d0 movl $0xf, 0x54(%rsp) jmp 0xdd9d0 movq 0x30(%rsp), %rax leaq 0x13eaa3(%rip), %rcx # 0x21c467 movq %rcx, 0x70(%rax) movl $0xe, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %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_EEEEE4scanEv: sub rsp, 58h mov [rsp+58h+var_10], rdi mov rax, [rsp+58h+var_10] mov [rsp+58h+var_28], rax cmp qword ptr [rax+20h], 0 jnz short loc_DD7E5 mov rdi, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv; 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>>>::skip_bom(void) test al, 1 jnz short loc_DD7E5 mov rax, [rsp+58h+var_28] lea rcx, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "... mov [rax+70h], rcx mov [rsp+58h+var_4], 0Eh jmp loc_DD9D0 loc_DD7E5: mov rdi, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE15skip_whitespaceEv; 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>>>::skip_whitespace(void) loc_DD7EF: mov rcx, [rsp+58h+var_28] xor eax, eax test byte ptr [rcx+10h], 1 mov [rsp+58h+var_29], al jz short loc_DD810 mov rax, [rsp+58h+var_28] cmp dword ptr [rax+14h], 2Fh ; '/' setz al mov [rsp+58h+var_29], al loc_DD810: mov al, [rsp+58h+var_29] test al, 1 jnz short loc_DD81A jmp short loc_DD841 loc_DD81A: mov rdi, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv; 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>>>::scan_comment(void) test al, 1 jnz short loc_DD835 mov [rsp+58h+var_4], 0Eh jmp loc_DD9D0 loc_DD835: mov rdi, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE15skip_whitespaceEv; 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>>>::skip_whitespace(void) jmp short loc_DD7EF loc_DD841: mov rax, [rsp+58h+var_28] mov eax, [rax+14h] inc eax; switch 127 cases mov ecx, eax mov [rsp+58h+var_38], rcx sub eax, 7Eh ja def_DD86E; jumptable 00000000000DD86E default case, cases 1-33,35-43,46,47,59-90,92,94-101,103-109,111-115,117-122,124 mov rax, [rsp+58h+var_38] lea rcx, jpt_DD86E movsxd rax, ds:(jpt_DD86E - 2164D8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_DD870: mov [rsp+58h+var_4], 8; jumptable 00000000000DD86E case 91 jmp loc_DD9D0 loc_DD87D: mov [rsp+58h+var_4], 0Ah; jumptable 00000000000DD86E case 93 jmp loc_DD9D0 loc_DD88A: mov [rsp+58h+var_4], 9; jumptable 00000000000DD86E case 123 jmp loc_DD9D0 loc_DD897: mov [rsp+58h+var_4], 0Bh; jumptable 00000000000DD86E case 125 jmp loc_DD9D0 loc_DD8A4: mov [rsp+58h+var_4], 0Ch; jumptable 00000000000DD86E case 58 jmp loc_DD9D0 loc_DD8B1: mov [rsp+58h+var_4], 0Dh; jumptable 00000000000DD86E case 44 jmp loc_DD9D0 loc_DD8BE: mov eax, cs:dword_2164A0; jumptable 00000000000DD86E case 116 mov [rsp+58h+var_14], eax lea rdi, [rsp+58h+var_14] call _ZNSt5arrayIcLm4EE4dataEv; std::array<char,4ul>::data(void) mov [rsp+58h+var_40], rax lea rdi, [rsp+58h+var_14] call _ZNKSt5arrayIcLm4EE4sizeEv; std::array<char,4ul>::size(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_40] mov rdx, rax mov ecx, 1 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; 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>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov [rsp+58h+var_4], eax jmp loc_DD9D0 loc_DD901: mov eax, cs:dword_21DA08; jumptable 00000000000DD86E case 102 mov [rsp+58h+var_19], eax mov al, cs:byte_21DA0C mov [rsp+58h+var_15], al lea rdi, [rsp+58h+var_19] call _ZNSt5arrayIcLm5EE4dataEv; std::array<char,5ul>::data(void) mov [rsp+58h+var_48], rax lea rdi, [rsp+58h+var_19] call _ZNKSt5arrayIcLm5EE4sizeEv; std::array<char,5ul>::size(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_48] mov rdx, rax mov ecx, 2 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; 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>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov [rsp+58h+var_4], eax jmp loc_DD9D0 loc_DD94E: mov eax, cs:dword_2164A4; jumptable 00000000000DD86E case 110 mov [rsp+58h+var_1D], eax lea rdi, [rsp+58h+var_1D] call _ZNSt5arrayIcLm4EE4dataEv; std::array<char,4ul>::data(void) mov [rsp+58h+var_50], rax lea rdi, [rsp+58h+var_1D] call _ZNKSt5arrayIcLm4EE4sizeEv; std::array<char,4ul>::size(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_50] mov rdx, rax mov ecx, 3 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; 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>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov [rsp+58h+var_4], eax jmp short loc_DD9D0 loc_DD98E: mov rdi, [rsp+58h+var_28]; jumptable 00000000000DD86E case 34 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(void) mov [rsp+58h+var_4], eax jmp short loc_DD9D0 loc_DD99E: mov rdi, [rsp+58h+var_28]; jumptable 00000000000DD86E cases 45,48-57 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; 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>>>::scan_number(void) mov [rsp+58h+var_4], eax jmp short loc_DD9D0 loc_DD9AE: mov [rsp+58h+var_4], 0Fh; jumptable 00000000000DD86E cases -1,0 jmp short loc_DD9D0 def_DD86E: mov rax, [rsp+58h+var_28]; jumptable 00000000000DD86E default case, cases 1-33,35-43,46,47,59-90,92,94-101,103-109,111-115,117-122,124 lea rcx, aInvalidLiteral; "invalid literal" mov [rax+70h], rcx mov [rsp+58h+var_4], 0Eh loc_DD9D0: mov eax, [rsp+58h+var_4] add rsp, 58h 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>>>::scan( long long a1) { long long v1; // rax long long v2; // rax long long v3; // rax long long v5; // [rsp+8h] [rbp-50h] long long v6; // [rsp+10h] [rbp-48h] long long v7; // [rsp+18h] [rbp-40h] bool v8; // [rsp+2Fh] [rbp-29h] int v9; // [rsp+3Bh] [rbp-1Dh] BYREF _BYTE v10[5]; // [rsp+3Fh] [rbp-19h] BYREF int v11; // [rsp+44h] [rbp-14h] BYREF long long v12; // [rsp+48h] [rbp-10h] unsigned int v13; // [rsp+54h] [rbp-4h] v12 = a1; if ( *(_QWORD *)(a1 + 32) || (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>>>::skip_bom(a1) & 1) != 0 ) { while ( 1 ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,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>>>::skip_whitespace(a1); v8 = 0; if ( (*(_BYTE *)(a1 + 16) & 1) != 0 ) v8 = *(_DWORD *)(a1 + 20) == 47; if ( !v8 ) break; if ( (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>>>::scan_comment(a1) & 1) == 0 ) return 14; } switch ( *(_DWORD *)(a1 + 20) ) { case 0xFFFFFFFF: case 0: v13 = 15; break; case 0x22: v13 = 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>>>::scan_string(a1); break; case 0x2C: v13 = 13; break; case 0x2D: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: v13 = 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>>>::scan_number(a1); break; case 0x3A: v13 = 12; break; case 0x5B: v13 = 8; break; case 0x5D: v13 = 10; break; case 0x66: qmemcpy(v10, "false", sizeof(v10)); v6 = std::array<char,5ul>::data(v10); v2 = std::array<char,5ul>::size(v10); v13 = 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>>>::scan_literal( a1, v6, v2, 2LL); break; case 0x6E: v9 = 1819047278; v5 = std::array<char,4ul>::data(&v9); v3 = std::array<char,4ul>::size(&v9); v13 = 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>>>::scan_literal( a1, v5, v3, 3LL); break; case 0x74: v11 = 1702195828; v7 = std::array<char,4ul>::data(&v11); v1 = std::array<char,4ul>::size(&v11); v13 = 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>>>::scan_literal( a1, v7, v1, 1LL); break; case 0x7B: v13 = 9; break; case 0x7D: v13 = 11; break; default: *(_QWORD *)(a1 + 112) = "invalid literal"; v13 = 14; break; } } else { *(_QWORD *)(a1 + 112) = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return 14; } return v13; }
scan: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDI MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RAX + 0x20],0x0 JNZ 0x001dd7e5 MOV RDI,qword ptr [RSP + 0x30] CALL 0x001dd9e0 TEST AL,0x1 JNZ 0x001dd7e5 MOV RAX,qword ptr [RSP + 0x30] LEA RCX,[0x31c43a] MOV qword ptr [RAX + 0x70],RCX MOV dword ptr [RSP + 0x54],0xe JMP 0x001dd9d0 LAB_001dd7e5: MOV RDI,qword ptr [RSP + 0x30] CALL 0x001dda60 LAB_001dd7ef: MOV RCX,qword ptr [RSP + 0x30] XOR EAX,EAX TEST byte ptr [RCX + 0x10],0x1 MOV byte ptr [RSP + 0x2f],AL JZ 0x001dd810 MOV RAX,qword ptr [RSP + 0x30] CMP dword ptr [RAX + 0x14],0x2f SETZ AL MOV byte ptr [RSP + 0x2f],AL LAB_001dd810: MOV AL,byte ptr [RSP + 0x2f] TEST AL,0x1 JNZ 0x001dd81a JMP 0x001dd841 LAB_001dd81a: MOV RDI,qword ptr [RSP + 0x30] CALL 0x001ddad0 TEST AL,0x1 JNZ 0x001dd835 MOV dword ptr [RSP + 0x54],0xe JMP 0x001dd9d0 LAB_001dd835: MOV RDI,qword ptr [RSP + 0x30] CALL 0x001dda60 JMP 0x001dd7ef LAB_001dd841: MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0x14] INC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x20],RCX SUB EAX,0x7e JA 0x001dd9b8 MOV RAX,qword ptr [RSP + 0x20] LEA RCX,[0x3164d8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5b: MOV dword ptr [RSP + 0x54],0x8 JMP 0x001dd9d0 caseD_5d: MOV dword ptr [RSP + 0x54],0xa JMP 0x001dd9d0 caseD_7b: MOV dword ptr [RSP + 0x54],0x9 JMP 0x001dd9d0 caseD_7d: MOV dword ptr [RSP + 0x54],0xb JMP 0x001dd9d0 caseD_3a: MOV dword ptr [RSP + 0x54],0xc JMP 0x001dd9d0 caseD_2c: MOV dword ptr [RSP + 0x54],0xd JMP 0x001dd9d0 caseD_74: MOV EAX,dword ptr [0x003164a0] MOV dword ptr [RSP + 0x44],EAX LEA RDI,[RSP + 0x44] CALL 0x001ddcc0 MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x44] CALL 0x001ddcd0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,RAX MOV ECX,0x1 CALL 0x001ddbd0 MOV dword ptr [RSP + 0x54],EAX JMP 0x001dd9d0 caseD_66: MOV EAX,dword ptr [0x0031da08] MOV dword ptr [RSP + 0x3f],EAX MOV AL,byte ptr [0x0031da0c] MOV byte ptr [RSP + 0x43],AL LEA RDI,[RSP + 0x3f] CALL 0x001ddce0 MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x3f] CALL 0x001ddcf0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RAX MOV ECX,0x2 CALL 0x001ddbd0 MOV dword ptr [RSP + 0x54],EAX JMP 0x001dd9d0 caseD_6e: MOV EAX,dword ptr [0x003164a4] MOV dword ptr [RSP + 0x3b],EAX LEA RDI,[RSP + 0x3b] CALL 0x001ddcc0 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x3b] CALL 0x001ddcd0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RAX MOV ECX,0x3 CALL 0x001ddbd0 MOV dword ptr [RSP + 0x54],EAX JMP 0x001dd9d0 caseD_22: MOV RDI,qword ptr [RSP + 0x30] CALL 0x001ddd00 MOV dword ptr [RSP + 0x54],EAX JMP 0x001dd9d0 caseD_2d: MOV RDI,qword ptr [RSP + 0x30] CALL 0x001de990 MOV dword ptr [RSP + 0x54],EAX JMP 0x001dd9d0 caseD_ffffffff: MOV dword ptr [RSP + 0x54],0xf JMP 0x001dd9d0 caseD_1: MOV RAX,qword ptr [RSP + 0x30] LEA RCX,[0x31c467] MOV qword ptr [RAX + 0x70],RCX MOV dword ptr [RSP + 0x54],0xe LAB_001dd9d0: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 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 > > >::scan() */ int4 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan(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; ulong uVar2; int8 uVar3; int8 uVar4; bool bVar5; array<char,4ul> local_1d [4]; array<char,5ul> local_19 [4]; char local_15; array<char,4ul> local_14 [4]; 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 ((*(long *)(this + 0x20) == 0) && (uVar2 = skip_bom(this), (uVar2 & 1) == 0)) { *(char **)(this + 0x70) = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; } else { skip_whitespace(this); while( true ) { bVar5 = false; if (((byte)this[0x10] & 1) != 0) { bVar5 = *(int *)(this + 0x14) == 0x2f; } if (!bVar5) { switch(*(int4 *)(this + 0x14)) { default: *(char **)(this + 0x70) = "invalid literal"; return 0xe; case 0x22: uVar1 = scan_string(this); return uVar1; case 0x2c: return 0xd; case 0x2d: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar1 = scan_number(this); return uVar1; case 0x3a: return 0xc; case 0x5b: return 8; case 0x5d: return 10; case 0x66: local_19[0] = (array<char,5ul>)s_false_0031da08[0]; local_19[1] = (array<char,5ul>)s_false_0031da08[1]; local_19[2] = (array<char,5ul>)s_false_0031da08[2]; local_19[3] = (array<char,5ul>)s_false_0031da08[3]; local_15 = s_false_0031da08[4]; uVar3 = std::array<char,5ul>::data(local_19); uVar4 = std::array<char,5ul>::size(); uVar1 = scan_literal(this,uVar3,uVar4,2); return uVar1; case 0x6e: local_1d[0] = (array<char,4ul>)s_truenull_003164a0[4]; local_1d[1] = (array<char,4ul>)s_truenull_003164a0[5]; local_1d[2] = (array<char,4ul>)s_truenull_003164a0[6]; local_1d[3] = (array<char,4ul>)s_truenull_003164a0[7]; uVar3 = std::array<char,4ul>::data(local_1d); uVar4 = std::array<char,4ul>::size(); uVar1 = scan_literal(this,uVar3,uVar4,3); return uVar1; case 0x74: local_14[0] = (array<char,4ul>)s_truenull_003164a0[0]; local_14[1] = (array<char,4ul>)s_truenull_003164a0[1]; local_14[2] = (array<char,4ul>)s_truenull_003164a0[2]; local_14[3] = (array<char,4ul>)s_truenull_003164a0[3]; uVar3 = std::array<char,4ul>::data(local_14); uVar4 = std::array<char,4ul>::size(); uVar1 = scan_literal(this,uVar3,uVar4,1); return uVar1; case 0x7b: return 9; case 0x7d: return 0xb; case 0xffffffff: case 0: return 0xf; } } uVar2 = scan_comment(this); if ((uVar2 & 1) == 0) break; skip_whitespace(this); } } return 0xe; }
2,844
trnman_free_trn
eloqsql/storage/maria/trnman.c
static void trnman_free_trn(TRN *trn) { /* union is to solve strict aliasing issue. without it gcc 3.4.3 doesn't notice that updating *(void **)&tmp modifies the value of tmp. */ union { TRN *trn; void *v; } tmp; DBUG_ASSERT(trn != &dummy_transaction_object); mysql_mutex_lock(&trn->state_lock); trn->short_id= 0; mysql_mutex_unlock(&trn->state_lock); tmp.trn= pool; do { /* without this volatile cast gcc-3.4.4 moves the assignment down after the loop at -O2 */ *(TRN * volatile *)&(trn->next)= tmp.trn; } while (!my_atomic_casptr((void **)(char*)&pool, &tmp.v, trn)); }
O0
c
trnman_free_trn: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) jmp 0x777fe movq -0x8(%rbp), %rdi addq $0x10, %rdi leaq 0xe5815(%rip), %rsi # 0x15d022 movl $0x22d, %edx # imm = 0x22D callq 0x77720 movq -0x8(%rbp), %rax movw $0x0, 0xac(%rax) movq -0x8(%rbp), %rdi addq $0x10, %rdi callq 0x77790 movq 0x40f870(%rip), %rax # 0x4870a8 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx lock cmpxchgq %rcx, 0x40f847(%rip) # 0x4870a8 movq %rax, %rcx sete %al movb %al, -0x29(%rbp) movq %rcx, -0x28(%rbp) testb $0x1, %al jne 0x7787a movq -0x28(%rbp), %rax movq %rax, -0x10(%rbp) movb -0x29(%rbp), %al andb $0x1, %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al xorb $-0x1, %al testb $0x1, %al jne 0x7783c addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
trnman_free_trn: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi jmp short $+2 loc_777FE: mov rdi, [rbp+var_8] add rdi, 10h lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 22Dh call inline_mysql_mutex_lock_10 mov rax, [rbp+var_8] mov word ptr [rax+0ACh], 0 mov rdi, [rbp+var_8] add rdi, 10h call inline_mysql_mutex_unlock_11 mov rax, cs:pool mov [rbp+var_10], rax loc_7783C: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+68h], rcx mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rcx, [rbp+var_18] lock cmpxchg cs:pool, rcx mov rcx, rax setz al mov [rbp+var_29], al mov [rbp+var_28], rcx test al, 1 jnz short loc_7787A mov rax, [rbp+var_28] mov [rbp+var_10], rax loc_7787A: mov al, [rbp+var_29] and al, 1 mov [rbp+var_19], al mov al, [rbp+var_19] xor al, 0FFh test al, 1 jnz short loc_7783C add rsp, 30h pop rbp retn
char trnman_free_trn(signed long long a1) { signed long long v1; // rax signed long long v2; // rtt char result; // al bool v4; // [rsp+7h] [rbp-29h] signed long long v5; // [rsp+20h] [rbp-10h] inline_mysql_mutex_lock_10( a1 + 16, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x22Du); *(_WORD *)(a1 + 172) = 0; inline_mysql_mutex_unlock_11(a1 + 16); v5 = pool; do { *(_QWORD *)(a1 + 104) = v5; v2 = v5; v1 = _InterlockedCompareExchange64(&pool, a1, v5); v4 = v2 == v1; if ( v2 != v1 ) v5 = v1; result = ~v4; } while ( !v4 ); return result; }
trnman_free_trn: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI JMP 0x001777fe LAB_001777fe: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x10 LEA RSI,[0x25d022] MOV EDX,0x22d CALL 0x00177720 MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0xac],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x10 CALL 0x00177790 MOV RAX,qword ptr [0x005870a8] MOV qword ptr [RBP + -0x10],RAX LAB_0017783c: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x68],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] CMPXCHG.LOCK qword ptr [0x005870a8],RCX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x29],AL MOV qword ptr [RBP + -0x28],RCX TEST AL,0x1 JNZ 0x0017787a MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x10],RAX LAB_0017787a: MOV AL,byte ptr [RBP + -0x29] AND AL,0x1 MOV byte ptr [RBP + -0x19],AL MOV AL,byte ptr [RBP + -0x19] XOR AL,0xff TEST AL,0x1 JNZ 0x0017783c ADD RSP,0x30 POP RBP RET
void trnman_free_trn(long param_1) { long lVar1; bool bVar2; long local_18; inline_mysql_mutex_lock (param_1 + 0x10,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x22d) ; *(int2 *)(param_1 + 0xac) = 0; inline_mysql_mutex_unlock(param_1 + 0x10); local_18 = pool; do { *(long *)(param_1 + 0x68) = local_18; LOCK(); bVar2 = local_18 != pool; lVar1 = param_1; if (bVar2) { local_18 = pool; lVar1 = pool; } pool = lVar1; UNLOCK(); } while (bVar2); return; }
2,845
my_sync_dir_by_file
eloqsql/mysys/my_sync.c
int my_sync_dir_by_file(const char *file_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR char dir_name[FN_REFLEN]; size_t dir_name_length; dirname_part(dir_name, file_name, &dir_name_length); return my_sync_dir(dir_name, my_flags & ~MY_NOSYMLINKS); #else return 0; #endif }
O0
c
my_sync_dir_by_file: pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x218(%rbp), %rsi leaq -0x210(%rbp), %rdi movq %rdi, -0x238(%rbp) leaq -0x228(%rbp), %rdx callq 0x27200 movq -0x238(%rbp), %rdi movq -0x220(%rbp), %rax andl $0xfffffdff, %eax # imm = 0xFFFFFDFF movl %eax, %esi callq 0x2f8a0 movl %eax, -0x22c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2f9d8 movl -0x22c(%rbp), %eax addq $0x240, %rsp # imm = 0x240 popq %rbp retq callq 0x24300 nopl (%rax)
my_sync_dir_by_file: push rbp mov rbp, rsp sub rsp, 240h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rsi, [rbp+var_218] lea rdi, [rbp+var_210] mov [rbp+var_238], rdi lea rdx, [rbp+var_228] call dirname_part mov rdi, [rbp+var_238] mov rax, [rbp+var_220] and eax, 0FFFFFDFFh mov esi, eax call my_sync_dir mov [rbp+var_22C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2F9D8 mov eax, [rbp+var_22C] add rsp, 240h pop rbp retn loc_2F9D8: call ___stack_chk_fail
long long my_sync_dir_by_file(_BYTE *a1, long long a2) { long long v3; // [rsp+18h] [rbp-228h] BYREF long long v4; // [rsp+20h] [rbp-220h] _BYTE *v5; // [rsp+28h] [rbp-218h] _BYTE v6[520]; // [rsp+30h] [rbp-210h] BYREF unsigned long long v7; // [rsp+238h] [rbp-8h] v7 = __readfsqword(0x28u); v5 = a1; v4 = a2; dirname_part((long long)v6, a1, &v3); return (unsigned int)my_sync_dir(v6, (unsigned int)v4 & 0xFFFFFDFF); }
my_sync_dir_by_file: PUSH RBP MOV RBP,RSP SUB RSP,0x240 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 RSI,qword ptr [RBP + -0x218] LEA RDI,[RBP + -0x210] MOV qword ptr [RBP + -0x238],RDI LEA RDX,[RBP + -0x228] CALL 0x00127200 MOV RDI,qword ptr [RBP + -0x238] MOV RAX,qword ptr [RBP + -0x220] AND EAX,0xfffffdff MOV ESI,EAX CALL 0x0012f8a0 MOV dword ptr [RBP + -0x22c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012f9d8 MOV EAX,dword ptr [RBP + -0x22c] ADD RSP,0x240 POP RBP RET LAB_0012f9d8: CALL 0x00124300
int4 my_sync_dir_by_file(int8 param_1,int8 param_2) { int4 uVar1; long in_FS_OFFSET; int1 local_230 [8]; int8 local_228; int8 local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_228 = param_2; local_220 = param_1; dirname_part(local_218,param_1,local_230); uVar1 = my_sync_dir(local_218,(uint)local_228 & 0xfffffdff); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return uVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
2,846
fmt::v8::detail::float_specs fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler, char>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/core.h
FMT_CONSTEXPR auto parse_float_type_spec(const basic_format_specs<Char>& specs, ErrorHandler&& eh = {}) -> float_specs { auto result = float_specs(); result.showpoint = specs.alt; result.locale = specs.localized; switch (specs.type) { case 0: result.format = float_format::general; break; case 'G': result.upper = true; FMT_FALLTHROUGH; case 'g': result.format = float_format::general; break; case 'E': result.upper = true; FMT_FALLTHROUGH; case 'e': result.format = float_format::exp; result.showpoint |= specs.precision != 0; break; case 'F': result.upper = true; FMT_FALLTHROUGH; case 'f': result.format = float_format::fixed; result.showpoint |= specs.precision != 0; break; case 'A': result.upper = true; FMT_FALLTHROUGH; case 'a': result.format = float_format::hex; break; default: eh.on_error("invalid type specifier"); break; } return result; }
O0
c
fmt::v8::detail::float_specs fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler, char>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq $0x0, 0x20(%rsp) movq 0x18(%rsp), %rax movzwl 0x9(%rax), %ecx movl 0x24(%rsp), %eax shll $0xd, %ecx andl $0x100000, %ecx # imm = 0x100000 andl $0xffefffff, %eax # imm = 0xFFEFFFFF orl %ecx, %eax movl %eax, 0x24(%rsp) movq 0x18(%rsp), %rax movzbl 0xa(%rax), %ecx movl 0x24(%rsp), %eax andl $0x1, %ecx shll $0x11, %ecx andl $0xfffdffff, %eax # imm = 0xFFFDFFFF orl %ecx, %eax movl %eax, 0x24(%rsp) movq 0x18(%rsp), %rax movsbl 0x8(%rax), %eax movl %eax, 0xc(%rsp) testl %eax, %eax je 0xa3ad8 jmp 0xa3a69 movl 0xc(%rsp), %eax subl $0x41, %eax je 0xa3bdd jmp 0xa3a78 movl 0xc(%rsp), %eax subl $0x45, %eax je 0xa3b14 jmp 0xa3a87 movl 0xc(%rsp), %eax subl $0x46, %eax je 0xa3b7a jmp 0xa3a96 movl 0xc(%rsp), %eax subl $0x47, %eax je 0xa3aed jmp 0xa3aa1 movl 0xc(%rsp), %eax subl $0x61, %eax je 0xa3bef jmp 0xa3ab0 movl 0xc(%rsp), %eax subl $0x65, %eax je 0xa3b26 jmp 0xa3abb movl 0xc(%rsp), %eax subl $0x66, %eax je 0xa3b8c jmp 0xa3aca movl 0xc(%rsp), %eax subl $0x67, %eax je 0xa3aff jmp 0xa3c01 movl 0x24(%rsp), %eax andl $0xffffff00, %eax # imm = 0xFFFFFF00 orl $0x0, %eax movl %eax, 0x24(%rsp) jmp 0xa3c12 movl 0x24(%rsp), %eax andl $0xfffeffff, %eax # imm = 0xFFFEFFFF orl $0x10000, %eax # imm = 0x10000 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax andl $0xffffff00, %eax # imm = 0xFFFFFF00 orl $0x0, %eax movl %eax, 0x24(%rsp) jmp 0xa3c12 movl 0x24(%rsp), %eax andl $0xfffeffff, %eax # imm = 0xFFFEFFFF orl $0x10000, %eax # imm = 0x10000 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax andl $0xffffff00, %eax # imm = 0xFFFFFF00 orl $0x1, %eax movl %eax, 0x24(%rsp) movq 0x18(%rsp), %rax cmpl $0x0, 0x4(%rax) setne %al andb $0x1, %al movzbl %al, %ecx movl 0x24(%rsp), %eax shrl $0x14, %eax andl $0x1, %eax andb $0x1, %al movzbl %al, %eax orl %ecx, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %ecx movl 0x24(%rsp), %eax shll $0x14, %ecx andl $0xffefffff, %eax # imm = 0xFFEFFFFF orl %ecx, %eax movl %eax, 0x24(%rsp) jmp 0xa3c12 movl 0x24(%rsp), %eax andl $0xfffeffff, %eax # imm = 0xFFFEFFFF orl $0x10000, %eax # imm = 0x10000 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax andl $0xffffff00, %eax # imm = 0xFFFFFF00 orl $0x2, %eax movl %eax, 0x24(%rsp) movq 0x18(%rsp), %rax cmpl $0x0, 0x4(%rax) setne %al andb $0x1, %al movzbl %al, %ecx movl 0x24(%rsp), %eax shrl $0x14, %eax andl $0x1, %eax andb $0x1, %al movzbl %al, %eax orl %ecx, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %ecx movl 0x24(%rsp), %eax shll $0x14, %ecx andl $0xffefffff, %eax # imm = 0xFFEFFFFF orl %ecx, %eax movl %eax, 0x24(%rsp) jmp 0xa3c12 movl 0x24(%rsp), %eax andl $0xfffeffff, %eax # imm = 0xFFFEFFFF orl $0x10000, %eax # imm = 0x10000 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax andl $0xffffff00, %eax # imm = 0xFFFFFF00 orl $0x3, %eax movl %eax, 0x24(%rsp) jmp 0xa3c12 movq 0x10(%rsp), %rdi leaq 0x6ed1f(%rip), %rsi # 0x11292c callq 0x1028a0 movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopl (%rax)
_ZN3fmt2v86detail21parse_float_type_specINS1_13error_handlerEcEENS1_11float_specsERKNS0_18basic_format_specsIT0_EEOT_: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_8], 0 mov rax, [rsp+28h+var_10] movzx ecx, word ptr [rax+9] mov eax, dword ptr [rsp+28h+var_8+4] shl ecx, 0Dh and ecx, 100000h and eax, 0FFEFFFFFh or eax, ecx mov dword ptr [rsp+28h+var_8+4], eax mov rax, [rsp+28h+var_10] movzx ecx, byte ptr [rax+0Ah] mov eax, dword ptr [rsp+28h+var_8+4] and ecx, 1 shl ecx, 11h and eax, 0FFFDFFFFh or eax, ecx mov dword ptr [rsp+28h+var_8+4], eax mov rax, [rsp+28h+var_10] movsx eax, byte ptr [rax+8] mov [rsp+28h+var_1C], eax test eax, eax jz short loc_A3AD8 jmp short $+2 loc_A3A69: mov eax, [rsp+28h+var_1C] sub eax, 41h ; 'A' jz loc_A3BDD jmp short $+2 loc_A3A78: mov eax, [rsp+28h+var_1C] sub eax, 45h ; 'E' jz loc_A3B14 jmp short $+2 loc_A3A87: mov eax, [rsp+28h+var_1C] sub eax, 46h ; 'F' jz loc_A3B7A jmp short $+2 loc_A3A96: mov eax, [rsp+28h+var_1C] sub eax, 47h ; 'G' jz short loc_A3AED jmp short $+2 loc_A3AA1: mov eax, [rsp+28h+var_1C] sub eax, 61h ; 'a' jz loc_A3BEF jmp short $+2 loc_A3AB0: mov eax, [rsp+28h+var_1C] sub eax, 65h ; 'e' jz short loc_A3B26 jmp short $+2 loc_A3ABB: mov eax, [rsp+28h+var_1C] sub eax, 66h ; 'f' jz loc_A3B8C jmp short $+2 loc_A3ACA: mov eax, [rsp+28h+var_1C] sub eax, 67h ; 'g' jz short loc_A3AFF jmp loc_A3C01 loc_A3AD8: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFFFF00h or eax, 0 mov dword ptr [rsp+28h+var_8+4], eax jmp loc_A3C12 loc_A3AED: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFEFFFFh or eax, 10000h mov dword ptr [rsp+28h+var_8+4], eax loc_A3AFF: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFFFF00h or eax, 0 mov dword ptr [rsp+28h+var_8+4], eax jmp loc_A3C12 loc_A3B14: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFEFFFFh or eax, 10000h mov dword ptr [rsp+28h+var_8+4], eax loc_A3B26: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFFFF00h or eax, 1 mov dword ptr [rsp+28h+var_8+4], eax mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4], 0 setnz al and al, 1 movzx ecx, al mov eax, dword ptr [rsp+28h+var_8+4] shr eax, 14h and eax, 1 and al, 1 movzx eax, al or eax, ecx cmp eax, 0 setnz al and al, 1 movzx ecx, al mov eax, dword ptr [rsp+28h+var_8+4] shl ecx, 14h and eax, 0FFEFFFFFh or eax, ecx mov dword ptr [rsp+28h+var_8+4], eax jmp loc_A3C12 loc_A3B7A: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFEFFFFh or eax, 10000h mov dword ptr [rsp+28h+var_8+4], eax loc_A3B8C: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFFFF00h or eax, 2 mov dword ptr [rsp+28h+var_8+4], eax mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4], 0 setnz al and al, 1 movzx ecx, al mov eax, dword ptr [rsp+28h+var_8+4] shr eax, 14h and eax, 1 and al, 1 movzx eax, al or eax, ecx cmp eax, 0 setnz al and al, 1 movzx ecx, al mov eax, dword ptr [rsp+28h+var_8+4] shl ecx, 14h and eax, 0FFEFFFFFh or eax, ecx mov dword ptr [rsp+28h+var_8+4], eax jmp short loc_A3C12 loc_A3BDD: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFEFFFFh or eax, 10000h mov dword ptr [rsp+28h+var_8+4], eax loc_A3BEF: mov eax, dword ptr [rsp+28h+var_8+4] and eax, 0FFFFFF00h or eax, 3 mov dword ptr [rsp+28h+var_8+4], eax jmp short loc_A3C12 loc_A3C01: mov rdi, [rsp+28h+var_18]; this lea rsi, aInvalidTypeSpe; "invalid type specifier" call _ZN3fmt2v86detail13error_handler8on_errorEPKc; fmt::v8::detail::error_handler::on_error(char const*) loc_A3C12: mov rax, [rsp+28h+var_8] add rsp, 28h retn
long long fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler,char>( long long a1, fmt::v8::detail::error_handler *a2) { int v3; // [rsp+Ch] [rbp-1Ch] long long v4; // [rsp+20h] [rbp-8h] LODWORD(v4) = 0; HIDWORD(v4) = ((*(_BYTE *)(a1 + 10) & 1) << 17) | (*(unsigned __int16 *)(a1 + 9) << 13) & 0x100000; v3 = *(char *)(a1 + 8); if ( *(_BYTE *)(a1 + 8) ) { switch ( v3 ) { case 'A': HIDWORD(v4) = ((*(_BYTE *)(a1 + 10) & 1) << 17) | (*(unsigned __int16 *)(a1 + 9) << 13) & 0x100000 | 0x10000; break; case 'E': HIDWORD(v4) = ((*(_BYTE *)(a1 + 10) & 1) << 17) | (*(unsigned __int16 *)(a1 + 9) << 13) & 0x100000 | 0x10000; goto LABEL_15; case 'F': HIDWORD(v4) = ((*(_BYTE *)(a1 + 10) & 1) << 17) | (*(unsigned __int16 *)(a1 + 9) << 13) & 0x100000 | 0x10000; goto LABEL_17; case 'G': HIDWORD(v4) = ((*(_BYTE *)(a1 + 10) & 1) << 17) | (*(unsigned __int16 *)(a1 + 9) << 13) & 0x100000 | 0x10000; LABEL_13: HIDWORD(v4) &= 0xFFFFFF00; return v4; case 'a': break; case 'e': LABEL_15: HIDWORD(v4) = ((*(_DWORD *)(a1 + 4) != 0 || (v4 & 0x10000000000000LL) != 0) << 20) | HIDWORD(v4) & 0xFFEFFF00 | 1; return v4; case 'f': LABEL_17: HIDWORD(v4) = ((*(_DWORD *)(a1 + 4) != 0 || (v4 & 0x10000000000000LL) != 0) << 20) | HIDWORD(v4) & 0xFFEFFF00 | 2; return v4; case 'g': goto LABEL_13; default: fmt::v8::detail::error_handler::on_error(a2, "invalid type specifier"); } HIDWORD(v4) = HIDWORD(v4) & 0xFFFFFF00 | 3; return v4; } HIDWORD(v4) = ((*(_BYTE *)(a1 + 10) & 1) << 17) | (*(unsigned __int16 *)(a1 + 9) << 13) & 0x100000; return v4; }
parse_float_type_spec<fmt::v8::detail::error_handler,char>: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x20],0x0 MOV RAX,qword ptr [RSP + 0x18] MOVZX ECX,word ptr [RAX + 0x9] MOV EAX,dword ptr [RSP + 0x24] SHL ECX,0xd AND ECX,0x100000 AND EAX,0xffefffff OR EAX,ECX MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x18] MOVZX ECX,byte ptr [RAX + 0xa] MOV EAX,dword ptr [RSP + 0x24] AND ECX,0x1 SHL ECX,0x11 AND EAX,0xfffdffff OR EAX,ECX MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x18] MOVSX EAX,byte ptr [RAX + 0x8] MOV dword ptr [RSP + 0xc],EAX TEST EAX,EAX JZ 0x001a3ad8 JMP 0x001a3a69 LAB_001a3a69: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x41 JZ 0x001a3bdd JMP 0x001a3a78 LAB_001a3a78: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x45 JZ 0x001a3b14 JMP 0x001a3a87 LAB_001a3a87: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x46 JZ 0x001a3b7a JMP 0x001a3a96 LAB_001a3a96: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x47 JZ 0x001a3aed JMP 0x001a3aa1 LAB_001a3aa1: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x61 JZ 0x001a3bef JMP 0x001a3ab0 LAB_001a3ab0: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x65 JZ 0x001a3b26 JMP 0x001a3abb LAB_001a3abb: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x66 JZ 0x001a3b8c JMP 0x001a3aca LAB_001a3aca: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x67 JZ 0x001a3aff JMP 0x001a3c01 LAB_001a3ad8: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xffffff00 OR EAX,0x0 MOV dword ptr [RSP + 0x24],EAX JMP 0x001a3c12 LAB_001a3aed: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xfffeffff OR EAX,0x10000 MOV dword ptr [RSP + 0x24],EAX LAB_001a3aff: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xffffff00 OR EAX,0x0 MOV dword ptr [RSP + 0x24],EAX JMP 0x001a3c12 LAB_001a3b14: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xfffeffff OR EAX,0x10000 MOV dword ptr [RSP + 0x24],EAX LAB_001a3b26: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xffffff00 OR EAX,0x1 MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4],0x0 SETNZ AL AND AL,0x1 MOVZX ECX,AL MOV EAX,dword ptr [RSP + 0x24] SHR EAX,0x14 AND EAX,0x1 AND AL,0x1 MOVZX EAX,AL OR EAX,ECX CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX ECX,AL MOV EAX,dword ptr [RSP + 0x24] SHL ECX,0x14 AND EAX,0xffefffff OR EAX,ECX MOV dword ptr [RSP + 0x24],EAX JMP 0x001a3c12 LAB_001a3b7a: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xfffeffff OR EAX,0x10000 MOV dword ptr [RSP + 0x24],EAX LAB_001a3b8c: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xffffff00 OR EAX,0x2 MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4],0x0 SETNZ AL AND AL,0x1 MOVZX ECX,AL MOV EAX,dword ptr [RSP + 0x24] SHR EAX,0x14 AND EAX,0x1 AND AL,0x1 MOVZX EAX,AL OR EAX,ECX CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX ECX,AL MOV EAX,dword ptr [RSP + 0x24] SHL ECX,0x14 AND EAX,0xffefffff OR EAX,ECX MOV dword ptr [RSP + 0x24],EAX JMP 0x001a3c12 LAB_001a3bdd: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xfffeffff OR EAX,0x10000 MOV dword ptr [RSP + 0x24],EAX LAB_001a3bef: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0xffffff00 OR EAX,0x3 MOV dword ptr [RSP + 0x24],EAX JMP 0x001a3c12 LAB_001a3c01: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[0x21292c] CALL 0x002028a0 LAB_001a3c12: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
/* fmt::v8::detail::float_specs fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler, char>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&) */ ulong fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler,char> (basic_format_specs *param_1,error_handler *param_2) { basic_format_specs bVar1; uint uVar2; ulong local_8; local_8 = (ulong)((*(ushort *)(param_1 + 9) & 0x80) << 0xd | ((byte)param_1[10] & 1) << 0x11) << 0x20; bVar1 = param_1[8]; if (bVar1 == (basic_format_specs)0x0) { return local_8; } if (bVar1 == (basic_format_specs)0x41) { local_8 = local_8 | 0x1000000000000; LAB_001a3bef: local_8 = local_8 | 0x300000000; } else { if (bVar1 == (basic_format_specs)0x45) { local_8 = local_8 | 0x1000000000000; LAB_001a3b26: uVar2 = (uint)(local_8 >> 0x20); local_8 = (ulong)(uVar2 & 0xffefffff | 1 | (uint)(uVar2 >> 0x14 != 0 || *(int *)(param_1 + 4) != 0) << 0x14) << 0x20; return local_8; } if (bVar1 == (basic_format_specs)0x46) { local_8 = local_8 | 0x1000000000000; } else { if (bVar1 == (basic_format_specs)0x47) { local_8 = local_8 | 0x1000000000000; return local_8; } if (bVar1 == (basic_format_specs)0x61) goto LAB_001a3bef; if (bVar1 == (basic_format_specs)0x65) goto LAB_001a3b26; if (bVar1 != (basic_format_specs)0x66) { if (bVar1 == (basic_format_specs)0x67) { return local_8; } /* WARNING: Subroutine does not return */ error_handler::on_error(param_2,"invalid type specifier"); } } uVar2 = (uint)(local_8 >> 0x20); local_8 = (ulong)(uVar2 & 0xffefffff | 2 | (uint)(uVar2 >> 0x14 != 0 || *(int *)(param_1 + 4) != 0) << 0x14) << 0x20; } return local_8; }
2,847
fmt::v8::detail::float_specs fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler, char>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/core.h
FMT_CONSTEXPR auto parse_float_type_spec(const basic_format_specs<Char>& specs, ErrorHandler&& eh = {}) -> float_specs { auto result = float_specs(); result.showpoint = specs.alt; result.locale = specs.localized; switch (specs.type) { case 0: result.format = float_format::general; break; case 'G': result.upper = true; FMT_FALLTHROUGH; case 'g': result.format = float_format::general; break; case 'E': result.upper = true; FMT_FALLTHROUGH; case 'e': result.format = float_format::exp; result.showpoint |= specs.precision != 0; break; case 'F': result.upper = true; FMT_FALLTHROUGH; case 'f': result.format = float_format::fixed; result.showpoint |= specs.precision != 0; break; case 'A': result.upper = true; FMT_FALLTHROUGH; case 'a': result.format = float_format::hex; break; default: eh.on_error("invalid type specifier"); break; } return result; }
O3
c
fmt::v8::detail::float_specs fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler, char>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&): movzwl 0x9(%rdi), %eax movl %eax, %ecx shrl $0x7, %ecx andl $0x1, %ecx movl %ecx, %edx shll $0x14, %edx shll $0x9, %eax andl $0x20000, %eax # imm = 0x20000 orl %edx, %eax movzbl 0x8(%rdi), %edx leal -0x41(%rdx), %r8d cmpl $0x6, %r8d jbe 0x2eb96 leal -0x61(%rdx), %r8d cmpl $0x6, %r8d ja 0x2ebb1 leaq 0x1d0ac(%rip), %rdx # 0x4bc38 movslq (%rdx,%r8,4), %r8 addq %rdx, %r8 jmpq *%r8 leaq 0x1d07f(%rip), %rdx # 0x4bc1c movslq (%rdx,%r8,4), %r8 addq %rdx, %r8 jmpq *%r8 orl $0x10000, %eax # imm = 0x10000 orl $0x3, %eax jmp 0x2ec10 testl %edx, %edx je 0x2ec10 pushq %rax leaq 0x1c128(%rip), %rax # 0x4ace5 movq %rsi, %rdi movq %rax, %rsi callq 0x449b6 orl $0x10000, %eax # imm = 0x10000 xorl %edx, %edx cmpl $0x0, 0x4(%rdi) setne %dl movzwl %cx, %ecx orl %edx, %ecx shll $0x14, %ecx andl $0xffffd, %eax # imm = 0xFFFFD addl %ecx, %eax addl $0x2, %eax jmp 0x2ec10 orl $0x10000, %eax # imm = 0x10000 xorl %edx, %edx cmpl $0x0, 0x4(%rdi) setne %dl movzwl %cx, %ecx orl %edx, %ecx shll $0x14, %ecx andl $0xffffe, %eax # imm = 0xFFFFE addl %ecx, %eax incl %eax jmp 0x2ec10 orl $0x10000, %eax # imm = 0x10000 shlq $0x20, %rax retq
_ZN3fmt2v86detail21parse_float_type_specINS1_13error_handlerEcEENS1_11float_specsERKNS0_18basic_format_specsIT0_EEOT_: movzx eax, word ptr [rdi+9] mov ecx, eax shr ecx, 7 and ecx, 1 mov edx, ecx shl edx, 14h shl eax, 9 and eax, 20000h or eax, edx movzx edx, byte ptr [rdi+8] lea r8d, [rdx-41h]; switch 7 cases cmp r8d, 6 jbe short loc_2EB96 def_2EBA4: lea r8d, [rdx-61h]; jumptable 000000000002EBA4 default case cmp r8d, 6 ja short def_2EB93; jumptable 000000000002EB93 default case lea rdx, jpt_2EB93 movsxd r8, ds:(jpt_2EB93 - 4BC38h)[rdx+r8*4] add r8, rdx jmp r8; switch jump loc_2EB96: lea rdx, jpt_2EBA4 movsxd r8, ds:(jpt_2EBA4 - 4BC1Ch)[rdx+r8*4] add r8, rdx jmp r8; switch jump loc_2EBA7: or eax, 10000h; jumptable 000000000002EBA4 case 65 loc_2EBAC: or eax, 3; jumptable 000000000002EB93 case 97 jmp short loc_2EC10; jumptable 000000000002EB93 case 103 def_2EB93: test edx, edx; jumptable 000000000002EB93 default case jz short loc_2EC10; jumptable 000000000002EB93 case 103 loc_2EBB5: push rax; jumptable 000000000002EB93 cases 98-100 lea rax, aInvalidTypeSpe; "invalid type specifier" mov rdi, rsi; this mov rsi, rax; char * call _ZN3fmt2v86detail13error_handler8on_errorEPKc; fmt::v8::detail::error_handler::on_error(char const*) loc_2EBC8: or eax, 10000h; jumptable 000000000002EBA4 case 70 loc_2EBCD: xor edx, edx; jumptable 000000000002EB93 case 102 cmp dword ptr [rdi+4], 0 setnz dl movzx ecx, cx or ecx, edx shl ecx, 14h and eax, 0FFFFDh add eax, ecx add eax, 2 jmp short loc_2EC10; jumptable 000000000002EB93 case 103 loc_2EBEA: or eax, 10000h; jumptable 000000000002EBA4 case 69 loc_2EBEF: xor edx, edx; jumptable 000000000002EB93 case 101 cmp dword ptr [rdi+4], 0 setnz dl movzx ecx, cx or ecx, edx shl ecx, 14h and eax, 0FFFFEh add eax, ecx inc eax jmp short loc_2EC10; jumptable 000000000002EB93 case 103 loc_2EC0B: or eax, 10000h; jumptable 000000000002EBA4 case 71 loc_2EC10: shl rax, 20h; jumptable 000000000002EB93 case 103 retn
long long fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler,char>( long long a1, fmt::v8::detail::error_handler *a2) { int v2; // ecx long long v3; // rax v2 = (*(unsigned __int16 *)(a1 + 9) >> 7) & 1; v3 = (v2 << 20) | (*(unsigned __int16 *)(a1 + 9) << 9) & 0x20000u; switch ( *(_BYTE *)(a1 + 8) ) { case 'A': LODWORD(v3) = v3 | 0x10000; LABEL_5: v3 = (unsigned int)v3 | 3; break; case 'B': case 'C': case 'D': LABEL_7: fmt::v8::detail::error_handler::on_error(a2, "invalid type specifier"); case 'E': LODWORD(v3) = v3 | 0x10000; LABEL_11: v3 = (((*(_DWORD *)(a1 + 4) != 0) | (unsigned __int16)v2) << 20) + ((unsigned int)v3 & 0xFFFFE) + 1; break; case 'F': LODWORD(v3) = v3 | 0x10000; LABEL_9: v3 = (((*(_DWORD *)(a1 + 4) != 0) | (unsigned __int16)v2) << 20) + ((unsigned int)v3 & 0xFFFFD) + 2; break; case 'G': v3 = (unsigned int)v3 | 0x10000; break; default: switch ( *(_BYTE *)(a1 + 8) ) { case 'a': goto LABEL_5; case 'b': case 'c': case 'd': goto LABEL_7; case 'e': goto LABEL_11; case 'f': goto LABEL_9; case 'g': return v3 << 32; default: if ( *(_BYTE *)(a1 + 8) ) goto LABEL_7; return v3 << 32; } } return v3 << 32; }
parse_float_type_spec<fmt::v8::detail::error_handler,char>: MOVZX EAX,word ptr [RDI + 0x9] MOV ECX,EAX SHR ECX,0x7 AND ECX,0x1 MOV EDX,ECX SHL EDX,0x14 SHL EAX,0x9 AND EAX,0x20000 OR EAX,EDX MOVZX EDX,byte ptr [RDI + 0x8] LEA R8D,[RDX + -0x41] CMP R8D,0x6 JBE 0x0012eb96 default: LEA R8D,[RDX + -0x61] CMP R8D,0x6 JA 0x0012ebb1 LEA RDX,[0x14bc38] MOVSXD R8,dword ptr [RDX + R8*0x4] ADD R8,RDX switchD: JMP R8 LAB_0012eb96: LEA RDX,[0x14bc1c] MOVSXD R8,dword ptr [RDX + R8*0x4] ADD R8,RDX switchD: JMP R8 caseD_41: OR EAX,0x10000 caseD_61: OR EAX,0x3 JMP 0x0012ec10 default: TEST EDX,EDX JZ 0x0012ec10 caseD_62: PUSH RAX LEA RAX,[0x14ace5] MOV RDI,RSI MOV RSI,RAX CALL 0x001449b6 caseD_46: OR EAX,0x10000 caseD_66: XOR EDX,EDX CMP dword ptr [RDI + 0x4],0x0 SETNZ DL MOVZX ECX,CX OR ECX,EDX SHL ECX,0x14 AND EAX,0xffffd ADD EAX,ECX ADD EAX,0x2 JMP 0x0012ec10 caseD_45: OR EAX,0x10000 caseD_65: XOR EDX,EDX CMP dword ptr [RDI + 0x4],0x0 SETNZ DL MOVZX ECX,CX OR ECX,EDX SHL ECX,0x14 AND EAX,0xffffe ADD EAX,ECX INC EAX JMP 0x0012ec10 caseD_47: OR EAX,0x10000 caseD_67: SHL RAX,0x20 RET
/* fmt::v8::detail::float_specs fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler, char>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&) */ long fmt::v8::detail::parse_float_type_spec<fmt::v8::detail::error_handler,char> (basic_format_specs *param_1,error_handler *param_2) { basic_format_specs bVar1; uint uVar2; uint uVar4; ulong uVar3; uVar4 = *(ushort *)(param_1 + 9) >> 7 & 1; uVar2 = (*(ushort *)(param_1 + 9) & 0x100) << 9 | uVar4 << 0x14; uVar3 = (ulong)uVar2; bVar1 = param_1[8]; switch(bVar1) { case (basic_format_specs)0x41: uVar2 = uVar2 | 0x10000; switchD_0012eb93_caseD_61: uVar3 = (ulong)(uVar2 | 3); break; case (basic_format_specs)0x42: case (basic_format_specs)0x43: case (basic_format_specs)0x44: switchD_0012eb93_caseD_62: /* WARNING: Subroutine does not return */ error_handler::on_error(param_2,"invalid type specifier"); case (basic_format_specs)0x45: uVar2 = uVar2 | 0x10000; switchD_0012eb93_caseD_65: uVar3 = (ulong)((uVar2 & 0xffffe) + (uVar4 | *(int *)(param_1 + 4) != 0) * 0x100000 + 1); break; case (basic_format_specs)0x46: uVar2 = uVar2 | 0x10000; switchD_0012eb93_caseD_66: uVar3 = (ulong)((uVar2 & 0xffffd) + (uVar4 | *(int *)(param_1 + 4) != 0) * 0x100000 + 2); break; case (basic_format_specs)0x47: uVar3 = (ulong)(uVar2 | 0x10000); break; default: switch(bVar1) { case (basic_format_specs)0x61: goto switchD_0012eb93_caseD_61; case (basic_format_specs)0x62: case (basic_format_specs)0x63: case (basic_format_specs)0x64: goto switchD_0012eb93_caseD_62; case (basic_format_specs)0x65: goto switchD_0012eb93_caseD_65; case (basic_format_specs)0x66: goto switchD_0012eb93_caseD_66; case (basic_format_specs)0x67: break; default: if (bVar1 != (basic_format_specs)0x0) goto switchD_0012eb93_caseD_62; } } return uVar3 << 0x20; }
2,848
my_xml_error_lineno
eloqsql/strings/xml.c
uint my_xml_error_lineno(MY_XML_PARSER *p) { uint res=0; const char *s; for (s=p->beg ; s<p->cur; s++) { if (s[0] == '\n') res++; } return res; }
O0
c
my_xml_error_lineno: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movq 0x128(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x130(%rcx), %rax jae 0x7f4c4 movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0xa, %eax jne 0x7f4b4 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x7f4b6 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x7f48e movl -0xc(%rbp), %eax popq %rbp retq nopl (%rax)
my_xml_error_lineno: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov rax, [rax+128h] mov [rbp+var_18], rax loc_7F48E: mov rax, [rbp+var_18] mov rcx, [rbp+var_8] cmp rax, [rcx+130h] jnb short loc_7F4C4 mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 0Ah jnz short loc_7F4B4 mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax loc_7F4B4: jmp short $+2 loc_7F4B6: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_7F48E loc_7F4C4: mov eax, [rbp+var_C] pop rbp retn
long long my_xml_error_lineno(long long a1) { _BYTE *i; // [rsp+0h] [rbp-18h] unsigned int v3; // [rsp+Ch] [rbp-Ch] v3 = 0; for ( i = *(_BYTE **)(a1 + 296); (unsigned long long)i < *(_QWORD *)(a1 + 304); ++i ) { if ( *i == 10 ) ++v3; } return v3; }
my_xml_error_lineno: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x128] MOV qword ptr [RBP + -0x18],RAX LAB_0017f48e: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x130] JNC 0x0017f4c4 MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0xa JNZ 0x0017f4b4 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX LAB_0017f4b4: JMP 0x0017f4b6 LAB_0017f4b6: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0017f48e LAB_0017f4c4: MOV EAX,dword ptr [RBP + -0xc] POP RBP RET
int my_xml_error_lineno(long param_1) { char *local_20; int local_14; local_14 = 0; for (local_20 = *(char **)(param_1 + 0x128); local_20 < *(char **)(param_1 + 0x130); local_20 = local_20 + 1) { if (*local_20 == '\n') { local_14 = local_14 + 1; } } return local_14; }
2,849
SET_store_json
xtate/src/xconf.c
static ConfRes SET_store_json(void *conf, const char *name, const char *value) { XConf *xconf = (XConf *)conf; if (xconf->echo) { return 0; } FREE(xconf->store_json_file); xconf->store_json_file = STRDUP(value); xconf->op = Op_StoreJson; return Conf_OK; }
O3
c
SET_store_json: cmpq $0x0, 0x2a8(%rdi) jne 0x59628 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx movq 0x710(%rdi), %rdi testq %rdi, %rdi je 0x59608 callq 0x151e0 movq $0x0, 0x710(%rbx) movq %r14, %rdi callq 0x508d7 movq %rax, 0x710(%rbx) movl $0x1b, 0x6b0(%rbx) addq $0x8, %rsp popq %rbx popq %r14 xorl %eax, %eax retq
SET_store_json: cmp qword ptr [rdi+2A8h], 0 jnz short loc_59628 push r14 push rbx push rax mov r14, rdx mov rbx, rdi mov rdi, [rdi+710h] test rdi, rdi jz short loc_59608 call _free mov qword ptr [rbx+710h], 0 loc_59608: mov rdi, r14 call STRDUP mov [rbx+710h], rax mov dword ptr [rbx+6B0h], 1Bh add rsp, 8 pop rbx pop r14 loc_59628: xor eax, eax retn
long long SET_store_json(long long a1, long long a2, long long a3) { long long v5; // rdi if ( !*(_QWORD *)(a1 + 680) ) { v5 = *(_QWORD *)(a1 + 1808); if ( v5 ) { free(v5); *(_QWORD *)(a1 + 1808) = 0LL; } *(_QWORD *)(a1 + 1808) = STRDUP(a3); *(_DWORD *)(a1 + 1712) = 27; } return 0LL; }
SET_store_json: CMP qword ptr [RDI + 0x2a8],0x0 JNZ 0x00159628 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x710] TEST RDI,RDI JZ 0x00159608 CALL 0x001151e0 MOV qword ptr [RBX + 0x710],0x0 LAB_00159608: MOV RDI,R14 CALL 0x001508d7 MOV qword ptr [RBX + 0x710],RAX MOV dword ptr [RBX + 0x6b0],0x1b ADD RSP,0x8 POP RBX POP R14 LAB_00159628: XOR EAX,EAX RET
int8 SET_store_json(long param_1,int8 param_2,int8 param_3) { int8 uVar1; if (*(long *)(param_1 + 0x2a8) == 0) { if (*(void **)(param_1 + 0x710) != (void *)0x0) { free(*(void **)(param_1 + 0x710)); *(int8 *)(param_1 + 0x710) = 0; } uVar1 = STRDUP(param_3); *(int8 *)(param_1 + 0x710) = uVar1; *(int4 *)(param_1 + 0x6b0) = 0x1b; } return 0; }
2,850
js_worker_postMessage
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_postMessage(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id); JSWorkerMessagePipe *ps; size_t data_len, i; uint8_t *data; JSWorkerMessage *msg; JSSABTab sab_tab; if (!worker) return JS_EXCEPTION; data = JS_WriteObject2(ctx, &data_len, argv[0], JS_WRITE_OBJ_SAB | JS_WRITE_OBJ_REFERENCE, &sab_tab); if (!data) return JS_EXCEPTION; msg = malloc(sizeof(*msg)); if (!msg) goto fail; msg->data = NULL; msg->sab_tab = NULL; /* must reallocate because the allocator may be different */ msg->data = malloc(data_len); if (!msg->data) goto fail; memcpy(msg->data, data, data_len); msg->data_len = data_len; if (sab_tab.len > 0) { msg->sab_tab = malloc(sizeof(msg->sab_tab[0]) * sab_tab.len); if (!msg->sab_tab) goto fail; memcpy(msg->sab_tab, sab_tab.tab, sizeof(msg->sab_tab[0]) * sab_tab.len); } msg->sab_tab_len = sab_tab.len; js_free(ctx, data); js_free(ctx, sab_tab.tab); /* increment the SAB reference counts */ for(i = 0; i < msg->sab_tab_len; i++) { js_sab_dup(NULL, msg->sab_tab[i]); } ps = worker->send_pipe; pthread_mutex_lock(&ps->mutex); /* indicate that data is present */ if (list_empty(&ps->msg_queue)) { uint8_t ch = '\0'; int ret; for(;;) { ret = write(ps->write_fd, &ch, 1); if (ret == 1) break; if (ret < 0 && (errno != EAGAIN || errno != EINTR)) break; } } list_add_tail(&msg->link, &ps->msg_queue); pthread_mutex_unlock(&ps->mutex); return JS_UNDEFINED; fail: if (msg) { free(msg->data); free(msg->sab_tab); free(msg); } js_free(ctx, data); js_free(ctx, sab_tab.tab); return JS_EXCEPTION; }
O0
c
js_worker_postMessage: subq $0x98, %rsp movq %rsi, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq %rdi, 0x70(%rsp) movl %ecx, 0x6c(%rsp) movq %r8, 0x60(%rsp) movq 0x70(%rsp), %rdi callq 0x2e1f0 movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x178c0 movq %rax, 0x50(%rsp) movq 0x70(%rsp), %rdi movq 0x50(%rsp), %rax movl 0x7c(%rax), %ecx movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x3e6a0 movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) jne 0x1d428 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x1d6cf movq 0x70(%rsp), %rdi movq 0x60(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x38(%rsp), %rsi movl $0xc, %r8d leaq 0x10(%rsp), %r9 callq 0x511e0 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jne 0x1d477 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x1d6cf movl $0x30, %edi callq 0xe6c0 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x1d493 jmp 0x1d66c movq 0x20(%rsp), %rax movq $0x0, 0x10(%rax) movq 0x20(%rsp), %rax movq $0x0, 0x20(%rax) movq 0x38(%rsp), %rdi callq 0xe6c0 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x20(%rsp), %rax cmpq $0x0, 0x10(%rax) jne 0x1d4d4 jmp 0x1d66c movq 0x20(%rsp), %rax movq 0x10(%rax), %rdi movq 0x28(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0xe610 movq 0x38(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x18(%rax) cmpq $0x0, 0x18(%rsp) jbe 0x1d549 movq 0x18(%rsp), %rdi shlq $0x3, %rdi callq 0xe6c0 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x20(%rax) movq 0x20(%rsp), %rax cmpq $0x0, 0x20(%rax) jne 0x1d52d jmp 0x1d66c movq 0x20(%rsp), %rax movq 0x20(%rax), %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx shlq $0x3, %rdx callq 0xe610 movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x28(%rax) movq 0x70(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x280a0 movq 0x70(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x280a0 movq $0x0, 0x30(%rsp) movq 0x30(%rsp), %rax movq 0x20(%rsp), %rcx cmpq 0x28(%rcx), %rax jae 0x1d5b9 movq 0x20(%rsp), %rax movq 0x20(%rax), %rax movq 0x30(%rsp), %rcx movq (%rax,%rcx,8), %rsi xorl %eax, %eax movl %eax, %edi callq 0x17730 movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) jmp 0x1d57e movq 0x48(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdi addq $0x8, %rdi callq 0xea00 movq 0x40(%rsp), %rdi addq $0x30, %rdi callq 0x1d9f0 cmpl $0x0, %eax je 0x1d632 movb $0x0, 0xf(%rsp) movq 0x40(%rsp), %rax movl 0x44(%rax), %edi leaq 0xf(%rsp), %rsi movl $0x1, %edx callq 0xe1f0 movl %eax, 0x8(%rsp) cmpl $0x1, 0x8(%rsp) jne 0x1d611 jmp 0x1d630 cmpl $0x0, 0x8(%rsp) jge 0x1d62e callq 0xe0b0 cmpl $0xb, (%rax) jne 0x1d62c callq 0xe0b0 cmpl $0x4, (%rax) je 0x1d62e jmp 0x1d630 jmp 0x1d5ed jmp 0x1d632 movq 0x20(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x30, %rsi callq 0x1da10 movq 0x40(%rsp), %rdi addq $0x8, %rdi callq 0xe6b0 movl $0x0, 0x88(%rsp) movq $0x3, 0x90(%rsp) jmp 0x1d6cf cmpq $0x0, 0x20(%rsp) je 0x1d69a movq 0x20(%rsp), %rax movq 0x10(%rax), %rdi callq 0xe060 movq 0x20(%rsp), %rax movq 0x20(%rax), %rdi callq 0xe060 movq 0x20(%rsp), %rdi callq 0xe060 movq 0x70(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x280a0 movq 0x70(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x280a0 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) movq 0x88(%rsp), %rax movq 0x90(%rsp), %rdx addq $0x98, %rsp retq nopw (%rax,%rax)
js_worker_postMessage: sub rsp, 98h mov [rsp+98h+var_20], rsi mov [rsp+98h+var_18], rdx mov [rsp+98h+var_28], rdi mov [rsp+98h+var_2C], ecx mov [rsp+98h+var_38], r8 mov rdi, [rsp+98h+var_28] call JS_GetRuntime mov [rsp+98h+var_40], rax mov rdi, [rsp+98h+var_40] call js_get_thread_state mov [rsp+98h+var_48], rax mov rdi, [rsp+98h+var_28] mov rax, [rsp+98h+var_48] mov ecx, [rax+7Ch] mov rsi, [rsp+98h+var_20] mov rdx, [rsp+98h+var_18] call JS_GetOpaque2 mov [rsp+98h+var_50], rax cmp [rsp+98h+var_50], 0 jnz short loc_1D428 mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_1D6CF loc_1D428: mov rdi, [rsp+98h+var_28] mov rax, [rsp+98h+var_38] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+98h+var_60] mov r8d, 0Ch lea r9, [rsp+98h+var_88] call JS_WriteObject2 mov [rsp+98h+var_70], rax cmp [rsp+98h+var_70], 0 jnz short loc_1D477 mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_1D6CF loc_1D477: mov edi, 30h ; '0' call _malloc mov [rsp+98h+var_78], rax cmp [rsp+98h+var_78], 0 jnz short loc_1D493 jmp loc_1D66C loc_1D493: mov rax, [rsp+98h+var_78] mov qword ptr [rax+10h], 0 mov rax, [rsp+98h+var_78] mov qword ptr [rax+20h], 0 mov rdi, [rsp+98h+var_60] call _malloc mov rcx, rax mov rax, [rsp+98h+var_78] mov [rax+10h], rcx mov rax, [rsp+98h+var_78] cmp qword ptr [rax+10h], 0 jnz short loc_1D4D4 jmp loc_1D66C loc_1D4D4: mov rax, [rsp+98h+var_78] mov rdi, [rax+10h] mov rsi, [rsp+98h+var_70] mov rdx, [rsp+98h+var_60] call _memcpy mov rcx, [rsp+98h+var_60] mov rax, [rsp+98h+var_78] mov [rax+18h], rcx cmp [rsp+98h+var_80], 0 jbe short loc_1D549 mov rdi, [rsp+98h+var_80] shl rdi, 3 call _malloc mov rcx, rax mov rax, [rsp+98h+var_78] mov [rax+20h], rcx mov rax, [rsp+98h+var_78] cmp qword ptr [rax+20h], 0 jnz short loc_1D52D jmp loc_1D66C loc_1D52D: mov rax, [rsp+98h+var_78] mov rdi, [rax+20h] mov rsi, [rsp+98h+var_88] mov rdx, [rsp+98h+var_80] shl rdx, 3 call _memcpy loc_1D549: mov rcx, [rsp+98h+var_80] mov rax, [rsp+98h+var_78] mov [rax+28h], rcx mov rdi, [rsp+98h+var_28] mov rsi, [rsp+98h+var_70] call js_free mov rdi, [rsp+98h+var_28] mov rsi, [rsp+98h+var_88] call js_free mov [rsp+98h+var_68], 0 loc_1D57E: mov rax, [rsp+98h+var_68] mov rcx, [rsp+98h+var_78] cmp rax, [rcx+28h] jnb short loc_1D5B9 mov rax, [rsp+98h+var_78] mov rax, [rax+20h] mov rcx, [rsp+98h+var_68] mov rsi, [rax+rcx*8] xor eax, eax mov edi, eax call js_sab_dup mov rax, [rsp+98h+var_68] add rax, 1 mov [rsp+98h+var_68], rax jmp short loc_1D57E loc_1D5B9: mov rax, [rsp+98h+var_50] mov rax, [rax+8] mov [rsp+98h+var_58], rax mov rdi, [rsp+98h+var_58] add rdi, 8 call _pthread_mutex_lock mov rdi, [rsp+98h+var_58] add rdi, 30h ; '0' call list_empty_0 cmp eax, 0 jz short loc_1D632 mov [rsp+98h+var_89], 0 loc_1D5ED: mov rax, [rsp+98h+var_58] mov edi, [rax+44h] lea rsi, [rsp+98h+var_89] mov edx, 1 call _write mov [rsp+98h+var_90], eax cmp [rsp+98h+var_90], 1 jnz short loc_1D611 jmp short loc_1D630 loc_1D611: cmp [rsp+98h+var_90], 0 jge short loc_1D62E call ___errno_location cmp dword ptr [rax], 0Bh jnz short loc_1D62C call ___errno_location cmp dword ptr [rax], 4 jz short loc_1D62E loc_1D62C: jmp short loc_1D630 loc_1D62E: jmp short loc_1D5ED loc_1D630: jmp short $+2 loc_1D632: mov rdi, [rsp+98h+var_78] mov rsi, [rsp+98h+var_58] add rsi, 30h ; '0' call list_add_tail_0 mov rdi, [rsp+98h+var_58] add rdi, 8 call _pthread_mutex_unlock mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 3 jmp short loc_1D6CF loc_1D66C: cmp [rsp+98h+var_78], 0 jz short loc_1D69A mov rax, [rsp+98h+var_78] mov rdi, [rax+10h] call _free mov rax, [rsp+98h+var_78] mov rdi, [rax+20h] call _free mov rdi, [rsp+98h+var_78] call _free loc_1D69A: mov rdi, [rsp+98h+var_28] mov rsi, [rsp+98h+var_70] call js_free mov rdi, [rsp+98h+var_28] mov rsi, [rsp+98h+var_88] call js_free mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 loc_1D6CF: mov rax, [rsp+98h+var_10] mov rdx, [rsp+98h+var_8] add rsp, 98h retn
long long js_worker_postMessage(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rax int v11; // [rsp+8h] [rbp-90h] char v12; // [rsp+Fh] [rbp-89h] BYREF long long v13; // [rsp+10h] [rbp-88h] BYREF long long v14; // [rsp+18h] [rbp-80h] _QWORD *v15; // [rsp+20h] [rbp-78h] long long v16; // [rsp+28h] [rbp-70h] unsigned long long i; // [rsp+30h] [rbp-68h] long long v18; // [rsp+38h] [rbp-60h] BYREF long long v19; // [rsp+40h] [rbp-58h] long long Opaque2; // [rsp+48h] [rbp-50h] long long thread_state; // [rsp+50h] [rbp-48h] long long Runtime; // [rsp+58h] [rbp-40h] _QWORD *v23; // [rsp+60h] [rbp-38h] int v24; // [rsp+6Ch] [rbp-2Ch] long long v25; // [rsp+70h] [rbp-28h] long long v26; // [rsp+78h] [rbp-20h] long long v27; // [rsp+80h] [rbp-18h] long long v28; // [rsp+88h] [rbp-10h] long long v29; // [rsp+90h] [rbp-8h] v26 = a2; v27 = a3; v25 = a1; v24 = a4; v23 = a5; Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8); Opaque2 = JS_GetOpaque2(a1, a2, v27, *(unsigned int *)(thread_state + 124)); if ( !Opaque2 ) { LODWORD(v28) = 0; v29 = 6LL; return v28; } v16 = JS_WriteObject2(v25, &v18, *v23, v23[1], 12LL, &v13); if ( !v16 ) { LODWORD(v28) = 0; v29 = 6LL; return v28; } v15 = (_QWORD *)malloc(48LL); if ( v15 ) { v15[2] = 0LL; v15[4] = 0LL; v9 = malloc(v18); v15[2] = v9; if ( v15[2] ) { memcpy(v15[2], v16, v18); v15[3] = v18; if ( !v14 ) goto LABEL_10; v15[4] = malloc(8 * v14); if ( v15[4] ) { memcpy(v15[4], v13, 8 * v14); LABEL_10: v15[5] = v14; js_free(v25, v16); js_free(v25, v13); for ( i = 0LL; i < v15[5]; ++i ) js_sab_dup(0LL, *(_QWORD *)(v15[4] + 8 * i)); v19 = *(_QWORD *)(Opaque2 + 8); pthread_mutex_lock(v19 + 8); if ( (unsigned int)list_empty_0(v19 + 48) ) { v12 = 0; do v11 = write(*(unsigned int *)(v19 + 68), &v12, 1LL); while ( v11 != 1 && (v11 >= 0 || *(_DWORD *)__errno_location() == 11 && *(_DWORD *)__errno_location() == 4) ); } list_add_tail_0(v15, v19 + 48); pthread_mutex_unlock(v19 + 8); LODWORD(v28) = 0; v29 = 3LL; return v28; } } } if ( v15 ) { free(v15[2]); free(v15[4]); free(v15); } js_free(v25, v16); js_free(v25, v13); LODWORD(v28) = 0; v29 = 6LL; return v28; }
js_worker_postMessage: SUB RSP,0x98 MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x80],RDX MOV qword ptr [RSP + 0x70],RDI MOV dword ptr [RSP + 0x6c],ECX MOV qword ptr [RSP + 0x60],R8 MOV RDI,qword ptr [RSP + 0x70] CALL 0x0012e1f0 MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x001178c0 MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x50] MOV ECX,dword ptr [RAX + 0x7c] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] CALL 0x0013e6a0 MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 JNZ 0x0011d428 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0011d6cf LAB_0011d428: MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x38] MOV R8D,0xc LEA R9,[RSP + 0x10] CALL 0x001511e0 MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JNZ 0x0011d477 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0011d6cf LAB_0011d477: MOV EDI,0x30 CALL 0x0010e6c0 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x0011d493 JMP 0x0011d66c LAB_0011d493: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x20],0x0 MOV RDI,qword ptr [RSP + 0x38] CALL 0x0010e6c0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0011d4d4 JMP 0x0011d66c LAB_0011d4d4: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x38] CALL 0x0010e610 MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x18],RCX CMP qword ptr [RSP + 0x18],0x0 JBE 0x0011d549 MOV RDI,qword ptr [RSP + 0x18] SHL RDI,0x3 CALL 0x0010e6c0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x0011d52d JMP 0x0011d66c LAB_0011d52d: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] SHL RDX,0x3 CALL 0x0010e610 LAB_0011d549: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x28],RCX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001280a0 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x10] CALL 0x001280a0 MOV qword ptr [RSP + 0x30],0x0 LAB_0011d57e: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RCX + 0x28] JNC 0x0011d5b9 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RAX + RCX*0x8] XOR EAX,EAX MOV EDI,EAX CALL 0x00117730 MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX JMP 0x0011d57e LAB_0011d5b9: MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x8 CALL 0x0010ea00 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x30 CALL 0x0011d9f0 CMP EAX,0x0 JZ 0x0011d632 MOV byte ptr [RSP + 0xf],0x0 LAB_0011d5ed: MOV RAX,qword ptr [RSP + 0x40] MOV EDI,dword ptr [RAX + 0x44] LEA RSI,[RSP + 0xf] MOV EDX,0x1 CALL 0x0010e1f0 MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x8],0x1 JNZ 0x0011d611 JMP 0x0011d630 LAB_0011d611: CMP dword ptr [RSP + 0x8],0x0 JGE 0x0011d62e CALL 0x0010e0b0 CMP dword ptr [RAX],0xb JNZ 0x0011d62c CALL 0x0010e0b0 CMP dword ptr [RAX],0x4 JZ 0x0011d62e LAB_0011d62c: JMP 0x0011d630 LAB_0011d62e: JMP 0x0011d5ed LAB_0011d630: JMP 0x0011d632 LAB_0011d632: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x40] ADD RSI,0x30 CALL 0x0011da10 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x8 CALL 0x0010e6b0 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x3 JMP 0x0011d6cf LAB_0011d66c: CMP qword ptr [RSP + 0x20],0x0 JZ 0x0011d69a MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0010e060 MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x20] CALL 0x0010e060 MOV RDI,qword ptr [RSP + 0x20] CALL 0x0010e060 LAB_0011d69a: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001280a0 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x10] CALL 0x001280a0 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 LAB_0011d6cf: MOV RAX,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] ADD RSP,0x98 RET
int1 [16] js_worker_postMessage (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; void *pvVar3; ssize_t sVar4; int *piVar5; int1 local_89; void *local_88; long local_80; void *local_78; void *local_70; ulong local_68; size_t local_60; long local_58; long local_50; long local_48; int8 local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_40 = JS_GetRuntime(param_1); local_48 = js_get_thread_state(local_40); local_50 = JS_GetOpaque2(local_28,local_20,local_18,*(int4 *)(local_48 + 0x7c)); if (local_50 == 0) { local_8 = 6; goto LAB_0011d6cf; } local_70 = (void *)JS_WriteObject2(local_28,&local_60,*local_38,local_38[1],0xc,&local_88); if (local_70 == (void *)0x0) { local_8 = 6; goto LAB_0011d6cf; } local_78 = malloc(0x30); if (local_78 != (void *)0x0) { *(int8 *)((long)local_78 + 0x10) = 0; *(int8 *)((long)local_78 + 0x20) = 0; pvVar3 = malloc(local_60); *(void **)((long)local_78 + 0x10) = pvVar3; if (*(long *)((long)local_78 + 0x10) != 0) { memcpy(*(void **)((long)local_78 + 0x10),local_70,local_60); *(size_t *)((long)local_78 + 0x18) = local_60; if (local_80 != 0) { pvVar3 = malloc(local_80 << 3); *(void **)((long)local_78 + 0x20) = pvVar3; if (*(long *)((long)local_78 + 0x20) == 0) goto LAB_0011d66c; memcpy(*(void **)((long)local_78 + 0x20),local_88,local_80 << 3); } *(long *)((long)local_78 + 0x28) = local_80; js_free(local_28,local_70); js_free(local_28,local_88); for (local_68 = 0; local_68 < *(ulong *)((long)local_78 + 0x28); local_68 = local_68 + 1) { js_sab_dup(0,*(int8 *)(*(long *)((long)local_78 + 0x20) + local_68 * 8)); } local_58 = *(long *)(local_50 + 8); pthread_mutex_lock((pthread_mutex_t *)(local_58 + 8)); iVar2 = list_empty(local_58 + 0x30); if (iVar2 != 0) { local_89 = 0; while( true ) { sVar4 = write(*(int *)(local_58 + 0x44),&local_89,1); if ((int)sVar4 == 1) break; if (((int)sVar4 < 0) && ((piVar5 = __errno_location(), *piVar5 != 0xb || (piVar5 = __errno_location(), *piVar5 != 4)))) break; } } list_add_tail(local_78,local_58 + 0x30); pthread_mutex_unlock((pthread_mutex_t *)(local_58 + 8)); local_8 = 3; goto LAB_0011d6cf; } } LAB_0011d66c: if (local_78 != (void *)0x0) { free(*(void **)((long)local_78 + 0x10)); free(*(void **)((long)local_78 + 0x20)); free(local_78); } js_free(local_28,local_70); js_free(local_28,local_88); local_8 = 6; LAB_0011d6cf: auVar1._4_8_ = local_8; auVar1._0_4_ = uStack_c; auVar1._12_4_ = 0; return auVar1 << 0x20; }
2,851
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::value_type>(), (void)()) nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>&)
monkey531[P]llama/common/json.hpp
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) -> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), j.template get<typename ConstructibleArrayType::value_type>(), void()) { if (JSON_HEDLEY_UNLIKELY(!j.is_array())) { JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); } from_json_array_impl(j, arr, priority_tag<3> {}); }
O3
cpp
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::value_type>(), (void)()) nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x473a3 movq 0x8(%r14), %rax movq %rsi, %rdi movq %rax, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x474c2 movl $0x20, %edi callq 0x19370 movq %rax, %rbx movq %r14, %rdi callq 0x374f2 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x705b4(%rip), %rsi # 0xb797b leaq 0x10(%rsp), %rdi callq 0x47439 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x465f6 xorl %ebp, %ebp leaq 0xa1d96(%rip), %rsi # 0xe9188 leaq -0x13c77(%rip), %rdx # 0x33782 movq %rbx, %rdi callq 0x19ba0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4741f movq 0x20(%rsp), %rsi incq %rsi callq 0x196d0 testb %bpl, %bpl jne 0x47429 jmp 0x47431 movq %rax, %r14 movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19c00
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_473A3 mov rax, [r14+8] mov rdi, rsi mov rsi, rax add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEaSERKSF_; 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>>::operator=(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>> const&) loc_473A3: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeArra; "type must be array, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>(char const(&)[28],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4741F mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4741F: test bpl, bpl jnz short loc_47429 jmp short loc_47431 mov r14, rax loc_47429: mov rdi, rbx; void * call ___cxa_free_exception loc_47431: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>( v4, "type must be array, but is "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return 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>>::operator=( a2, *(_QWORD *)(a1 + 8)); }
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x001473a3 MOV RAX,qword ptr [R14 + 0x8] MOV RDI,RSI MOV RSI,RAX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001474c2 LAB_001473a3: MOV EDI,0x20 CALL 0x00119370 MOV RBX,RAX MOV RDI,R14 CALL 0x001374f2 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001473c0: LEA RSI,[0x1b797b] LEA RDI,[RSP + 0x10] CALL 0x00147439 MOV BPL,0x1 LAB_001473d4: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x001465f6 XOR EBP,EBP LEA RSI,[0x1e9188] LEA RDX,[0x133782] MOV RDI,RBX CALL 0x00119ba0
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1, 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) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { 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>>> ::operator=(param_2,*(vector **)(param_1 + 8)); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001473c0 to 001473d0 has its CatchHandler @ 00147426 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[28],char_const*> (local_38,"type must be array, but is ",&local_40); /* try { // try from 001473d4 to 00147400 has its CatchHandler @ 00147401 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
2,852
LefDefParser::lefAddStringDefine(char const*, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lef_keywords.cpp
void lefAddStringDefine(const char *token, const char *str) { string tmpStr((lefData->lefDefIf == TRUE) ? "" : "\""); tmpStr += str; lefData->defines_set[strip_case(token)] = tmpStr; lefData->lefDefIf = FALSE; lefData->inDefine = 0; }
O3
cpp
LefDefParser::lefAddStringDefine(char const*, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x52c18(%rip), %r12 # 0x775e0 movq (%r12), %rax xorl %esi, %esi cmpl $0x1, 0x1ac(%rax) setne %sil leaq 0x29990(%rip), %rax # 0x4e370 leaq 0x2ac7b(%rip), %rdi # 0x4f662 cmovneq %rax, %rdi addq %rdi, %rsi leaq 0x8(%rsp), %rdx callq 0x26eec leaq 0x10(%rsp), %r15 movq %rax, (%r15) movq %rbx, %rdi callq 0x20d0 movq %r15, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x2060 movq (%r12), %rbx leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r14, %rsi callq 0x26796 movq (%r12), %rax cmpl $0x0, 0x220(%rax) je 0x24a9f addq $0x16e8, %rbx # imm = 0x16E8 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x267d6 leaq 0x10(%rsp), %rsi movq %rax, %rdi callq 0x2280 leaq 0x8(%rsp), %rbx movq (%rbx), %rdi addq $-0x18, %rdi leaq 0x7(%rsp), %rsi callq 0x2130 movq (%r12), %rax xorl %ecx, %ecx movl %ecx, 0x1ac(%rax) movl %ecx, 0x184(%rax) movq 0x10(%rsp), %rdi addq $-0x18, %rdi movq %rbx, %rsi callq 0x2130 addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x8(%rsp), %rax movl -0x8(%rax), %ecx testl %ecx, %ecx js 0x24aba leaq 0x8(%rsp), %rdi callq 0x2070 movq 0x8(%rsp), %rax leaq 0x8(%rsp), %r14 movq %rax, %r15 movl -0x8(%rax), %ecx testl %ecx, %ecx js 0x24ad6 movq %r14, %rdi callq 0x2070 movq 0x8(%rsp), %rax addq -0x18(%rax), %rax cmpq %rax, %r15 je 0x24a39 movsbl (%r15), %edi callq 0x2390 movb %al, (%r15) incq %r15 movq 0x8(%rsp), %rax jmp 0x24ac2 jmp 0x24b04 jmp 0x24afd movq %rax, %rbx jmp 0x24b1a jmp 0x24b04 movq %rax, %rbx movq 0x8(%rsp), %rdi addq $-0x18, %rdi leaq 0x7(%rsp), %rsi callq 0x2130 movq 0x10(%rsp), %rdi addq $-0x18, %rdi leaq 0x8(%rsp), %rsi callq 0x2130 movq %rbx, %rdi callq 0x2350
_ZN12LefDefParser18lefAddStringDefineEPKcS1_: push r15 push r14 push r12 push rbx sub rsp, 18h mov rbx, rsi mov r14, rdi lea r12, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [r12] xor esi, esi cmp dword ptr [rax+1ACh], 1 setnz sil lea rax, aIncorrectSynta+0FBh; "\"" lea rdi, asc_4F65F+3; "" cmovnz rdi, rax add rsi, rdi lea rdx, [rsp+38h+var_30] call _ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag; std::string::_S_construct<char const*>(char const*,char const*,std::allocator<char> const&,std::forward_iterator_tag) lea r15, [rsp+38h+var_28] mov [r15], rax mov rdi, rbx call _strlen mov rdi, r15; this mov rsi, rbx; char * mov rdx, rax; unsigned __int64 call __ZNSs6appendEPKcm; std::string::append(char const*,ulong) mov rbx, [r12] lea rdi, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rsi, r14 call _ZNSsC2ISaIcEEEPKcRKS0_; std::string::string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, [r12] cmp dword ptr [rax+220h], 0 jz short loc_24A9F loc_24A39: add rbx, 16E8h lea rsi, [rsp+38h+var_30] mov rdi, rbx call _ZNSt3mapISsSsN12LefDefParser17lefCompareStringsESaISt4pairIKSsSsEEEixEOSs; std::map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::operator[](std::string &&) lea rsi, [rsp+38h+var_28]; std::string * mov rdi, rax; this call __ZNSs6assignERKSs; std::string::assign(std::string const&) lea rbx, [rsp+38h+var_30] mov rdi, [rbx] add rdi, 0FFFFFFFFFFFFFFE8h lea rsi, [rsp+38h+var_31] call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&) mov rax, [r12] xor ecx, ecx mov [rax+1ACh], ecx mov [rax+184h], ecx mov rdi, [rsp+38h+var_28] add rdi, 0FFFFFFFFFFFFFFE8h mov rsi, rbx call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&) add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn loc_24A9F: mov rax, [rsp+38h+var_30] mov ecx, [rax-8] test ecx, ecx js short loc_24ABA lea rdi, [rsp+38h+var_30]; this call __ZNSs12_M_leak_hardEv; std::string::_M_leak_hard(void) mov rax, [rsp+38h+var_30] loc_24ABA: lea r14, [rsp+38h+var_30] mov r15, rax loc_24AC2: mov ecx, [rax-8] test ecx, ecx js short loc_24AD6 mov rdi, r14; this call __ZNSs12_M_leak_hardEv; std::string::_M_leak_hard(void) mov rax, [rsp+38h+var_30] loc_24AD6: add rax, [rax-18h] cmp r15, rax jz loc_24A39 movsx edi, byte ptr [r15] call _toupper mov [r15], al inc r15 mov rax, [rsp+38h+var_30] jmp short loc_24AC2 jmp short loc_24B04 jmp short $+2 loc_24AFD: mov rbx, rax jmp short loc_24B1A jmp short $+2 loc_24B04: mov rbx, rax mov rdi, [rsp+arg_0] add rdi, 0FFFFFFFFFFFFFFE8h lea rsi, [rsp+7] call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&) loc_24B1A: mov rdi, [rsp+arg_8] add rdi, 0FFFFFFFFFFFFFFE8h lea rsi, [rsp+arg_0] call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&) mov rdi, rbx call __Unwind_Resume
long long LefDefParser::lefAddStringDefine(LefDefParser *this, const char *a2, const char *a3) { char *v4; // rdi unsigned long long v5; // rax long long v6; // rbx std::string *v7; // rax long long v8; // rax _BYTE *v10; // rax _BYTE *i; // r15 char v12; // [rsp+7h] [rbp-31h] BYREF _BYTE *v13; // [rsp+8h] [rbp-30h] BYREF _QWORD v14[5]; // [rsp+10h] [rbp-28h] BYREF v4 = ""; if ( *(_DWORD *)(*(_QWORD *)LefDefParser::lefData + 428LL) != 1 ) v4 = "\""; v14[0] = std::string::_S_construct<char const*>( v4, &v4[*(_DWORD *)(*(_QWORD *)LefDefParser::lefData + 428LL) != 1], &v13); v5 = strlen(a2); std::string::append((std::string *)v14, a2, v5); v6 = *(_QWORD *)LefDefParser::lefData; std::string::string<std::allocator<char>>(&v13, this, &v12); if ( !*(_DWORD *)(*(_QWORD *)LefDefParser::lefData + 544LL) ) { v10 = v13; if ( *((int *)v13 - 2) >= 0 ) { std::string::_M_leak_hard((std::string *)&v13); v10 = v13; } for ( i = v10; ; ++i ) { if ( *((int *)v10 - 2) >= 0 ) { std::string::_M_leak_hard((std::string *)&v13); v10 = v13; } if ( i == &v10[*((_QWORD *)v10 - 3)] ) break; *i = toupper((unsigned int)(char)*i); v10 = v13; } } v7 = (std::string *)std::map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::operator[]( v6 + 5864, &v13); std::string::assign(v7, (const std::string *)v14); std::string::_Rep::_M_dispose(v13 - 24, &v12); v8 = *(_QWORD *)LefDefParser::lefData; *(_DWORD *)(*(_QWORD *)LefDefParser::lefData + 428LL) = 0; *(_DWORD *)(v8 + 388) = 0; return std::string::_Rep::_M_dispose(v14[0] - 24LL, &v13); }
lefAddStringDefine: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV R14,RDI LEA R12,[0x1775e0] MOV RAX,qword ptr [R12] XOR ESI,ESI CMP dword ptr [RAX + 0x1ac],0x1 SETNZ SIL LEA RAX,[0x14e370] LEA RDI,[0x14f662] CMOVNZ RDI,RAX ADD RSI,RDI LEA RDX,[RSP + 0x8] CALL 0x00126eec LEA R15,[RSP + 0x10] MOV qword ptr [R15],RAX MOV RDI,RBX CALL 0x001020d0 LAB_00124a08: MOV RDI,R15 MOV RSI,RBX MOV RDX,RAX CALL 0x00102060 MOV RBX,qword ptr [R12] LAB_00124a1a: LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RSI,R14 CALL 0x00126796 MOV RAX,qword ptr [R12] CMP dword ptr [RAX + 0x220],0x0 JZ 0x00124a9f LAB_00124a39: ADD RBX,0x16e8 LAB_00124a40: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001267d6 LEA RSI,[RSP + 0x10] MOV RDI,RAX CALL 0x00102280 LEA RBX,[RSP + 0x8] MOV RDI,qword ptr [RBX] ADD RDI,-0x18 LEA RSI,[RSP + 0x7] CALL 0x00102130 MOV RAX,qword ptr [R12] XOR ECX,ECX MOV dword ptr [RAX + 0x1ac],ECX MOV dword ptr [RAX + 0x184],ECX MOV RDI,qword ptr [RSP + 0x10] ADD RDI,-0x18 MOV RSI,RBX CALL 0x00102130 ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET LAB_00124a9f: MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RAX + -0x8] TEST ECX,ECX JS 0x00124aba LAB_00124aab: LEA RDI,[RSP + 0x8] CALL 0x00102070 MOV RAX,qword ptr [RSP + 0x8] LAB_00124aba: LEA R14,[RSP + 0x8] MOV R15,RAX LAB_00124ac2: MOV ECX,dword ptr [RAX + -0x8] TEST ECX,ECX JS 0x00124ad6 LAB_00124ac9: MOV RDI,R14 CALL 0x00102070 LAB_00124ad1: MOV RAX,qword ptr [RSP + 0x8] LAB_00124ad6: ADD RAX,qword ptr [RAX + -0x18] CMP R15,RAX JZ 0x00124a39 MOVSX EDI,byte ptr [R15] CALL 0x00102390 MOV byte ptr [R15],AL INC R15 MOV RAX,qword ptr [RSP + 0x8] JMP 0x00124ac2
/* LefDefParser::lefAddStringDefine(char const*, char const*) */ void LefDefParser::lefAddStringDefine(char *param_1,char *param_2) { long lVar1; int iVar2; string *psVar3; char *pcVar4; bool bVar5; allocator local_31; char *local_30; char *local_28; bVar5 = *(int *)(lefData + 0x1ac) != 1; pcVar4 = ""; if (bVar5) { pcVar4 = "\""; } local_28 = std::string::_S_construct<char_const*>(pcVar4,pcVar4 + bVar5,&local_30); strlen(param_2); /* try { // try from 00124a08 to 00124a15 has its CatchHandler @ 00124afd */ std::string::append((char *)&local_28,(ulong)param_2); lVar1 = lefData; /* try { // try from 00124a1a to 00124a2b has its CatchHandler @ 00124afb */ std::string::string<std::allocator<char>>((string *)&local_30,param_1,&local_31); if (*(int *)(lefData + 0x220) == 0) { pcVar4 = local_30; if (-1 < *(int *)(local_30 + -8)) { /* try { // try from 00124aab to 00124ab4 has its CatchHandler @ 00124af9 */ std::string::_M_leak_hard(); pcVar4 = local_30; } while( true ) { if (-1 < *(int *)(local_30 + -8)) { /* try { // try from 00124ac9 to 00124ad0 has its CatchHandler @ 00124b04 */ std::string::_M_leak_hard(); } if (pcVar4 == local_30 + *(long *)(local_30 + -0x18)) break; iVar2 = toupper((int)*pcVar4); *pcVar4 = (char)iVar2; pcVar4 = pcVar4 + 1; } } /* try { // try from 00124a40 to 00124a59 has its CatchHandler @ 00124b02 */ psVar3 = (string *) std:: map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string_const,std::string>>> ::operator[]((map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string_const,std::string>>> *)(lVar1 + 0x16e8),(string *)&local_30); std::string::assign(psVar3); std::string::_Rep::_M_dispose((allocator *)(local_30 + -0x18)); lVar1 = lefData; *(int4 *)(lefData + 0x1ac) = 0; *(int4 *)(lVar1 + 0x184) = 0; std::string::_Rep::_M_dispose((allocator *)(local_28 + -0x18)); return; }
2,853
ast_create_if
eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_if(Arena* arena, AstNode* condition, AstNode* then_branch, AstNode* else_branch, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_IF, line, column); if (!node) { return NULL; } node->as.if_expr.condition = condition; node->as.if_expr.then_branch = then_branch; node->as.if_expr.else_branch = else_branch; return node; }
O3
c
ast_create_if: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movl $0x9, %esi movq %r8, %rdx movq %r9, %rcx callq 0x3978 testq %rax, %rax je 0x2d6c movq %r15, 0x48(%rax) movq %r14, 0x50(%rax) movq %rbx, 0x58(%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ast_create_if: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi mov esi, 9 mov rdx, r8 mov rcx, r9 call ast_create_node test rax, rax jz short loc_2D6C mov [rax+48h], r15 mov [rax+50h], r14 mov [rax+58h], rbx loc_2D6C: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
_QWORD * ast_create_if(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { _QWORD *result; // rax result = (_QWORD *)ast_create_node(a1, 9LL, a5, a6); if ( result ) { result[9] = a2; result[10] = a3; result[11] = a4; } return result; }
ast_create_if: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV ESI,0x9 MOV RDX,R8 MOV RCX,R9 CALL 0x00103978 TEST RAX,RAX JZ 0x00102d6c MOV qword ptr [RAX + 0x48],R15 MOV qword ptr [RAX + 0x50],R14 MOV qword ptr [RAX + 0x58],RBX LAB_00102d6c: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void ast_create_if(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { long lVar1; lVar1 = ast_create_node(param_1,9,param_5,param_6); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; *(int8 *)(lVar1 + 0x58) = param_4; } return; }
2,854
ssz_len
corpus-core[P]colibri-stateless/src/util/ssz.c
uint32_t ssz_len(ssz_ob_t ob) { switch (ob.def->type) { case SSZ_TYPE_VECTOR: return ob.def->def.vector.len; case SSZ_TYPE_LIST: { int fixed_length = ssz_fixed_length(ob.def->def.vector.type); if (fixed_length == 0) return 0; return ob.bytes.len > 4 && ssz_is_dynamic(ob.def->def.vector.type) ? uint32_from_le(ob.bytes.data) / 4 : ob.bytes.len / fixed_length; } case SSZ_TYPE_BIT_VECTOR: return ob.bytes.len * 8; case SSZ_TYPE_BIT_LIST: { uint8_t last_bit = ob.bytes.data[ob.bytes.len - 1]; if (last_bit == 1) return ob.bytes.len * 8 - 8; for (int i = 7; i >= 0; i--) { if (last_bit & (1 << i)) return ((ob.bytes.len - 1) * 8) + i; } return ob.bytes.len * 8; // this should never happen, since the spec requires to set a bit in the last byte } default: return 0; } }
O2
c
ssz_len: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x40(%rsp), %rax movl 0x8(%rax), %ecx xorl %ebx, %ebx addl $-0x3, %ecx cmpl $0x3, %ecx ja 0x4c6ee leaq 0x30(%rsp), %r12 leaq 0x32b70(%rip), %rdx # 0x7f1c0 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movl 0x18(%rax), %ebx jmp 0x4c6ee movl (%r12), %ebx shll $0x3, %ebx jmp 0x4c6ee movq 0x8(%r12), %rcx movl (%r12), %eax leal -0x1(%rax), %edx movzbl (%rcx,%rdx), %ecx cmpl $0x1, %ecx jne 0x4c6c5 leal -0x8(,%rax,8), %ebx jmp 0x4c6ee movq 0x10(%rax), %r15 movq %r15, %rdi callq 0x4bc4b movq %rax, %r14 testl %r14d, %r14d je 0x4c6ee movl (%r12), %ebx cmpl $0x5, %ebx jb 0x4c6de movq %r15, %rdi callq 0x4bbf0 testb %al, %al je 0x4c6de movq 0x8(%r12), %rdi callq 0x4affd movl %eax, %ebx shrl $0x2, %ebx jmp 0x4c6ee leal -0x1(,%rax,8), %ebx pushq $0x7 popq %rdx testl %edx, %edx js 0x4c6e9 btl %edx, %ecx jb 0x4c6ee decl %edx decl %ebx jmp 0x4c6cf movl %ebx, %eax xorl %edx, %edx divl %r14d movl %eax, %ebx jmp 0x4c6ee shll $0x3, %eax movl %eax, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
ssz_len: push r15 push r14 push r12 push rbx push rax mov rax, [rsp+28h+arg_10] mov ecx, [rax+8] xor ebx, ebx add ecx, 0FFFFFFFDh; switch 4 cases cmp ecx, 3 ja def_4C657; jumptable 000000000004C657 default case lea r12, [rsp+28h+arg_0] lea rdx, jpt_4C657 movsxd rcx, ds:(jpt_4C657 - 7F1C0h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_4C659: mov ebx, [rax+18h]; jumptable 000000000004C657 case 3 jmp def_4C657; jumptable 000000000004C657 default case loc_4C661: mov ebx, [r12]; jumptable 000000000004C657 case 5 shl ebx, 3 jmp def_4C657; jumptable 000000000004C657 default case loc_4C66D: mov rcx, [r12+8]; jumptable 000000000004C657 case 6 mov eax, [r12] lea edx, [rax-1] movzx ecx, byte ptr [rcx+rdx] cmp ecx, 1 jnz short loc_4C6C5 lea ebx, ds:0FFFFFFFFFFFFFFF8h[rax*8] jmp short def_4C657; jumptable 000000000004C657 default case loc_4C68B: mov r15, [rax+10h]; jumptable 000000000004C657 case 4 mov rdi, r15 call ssz_fixed_length mov r14, rax test r14d, r14d jz short def_4C657; jumptable 000000000004C657 default case mov ebx, [r12] cmp ebx, 5 jb short loc_4C6DE mov rdi, r15 call ssz_is_dynamic test al, al jz short loc_4C6DE mov rdi, [r12+8] call uint32_from_le mov ebx, eax shr ebx, 2 jmp short def_4C657; jumptable 000000000004C657 default case loc_4C6C5: lea ebx, ds:0FFFFFFFFFFFFFFFFh[rax*8] push 7 pop rdx loc_4C6CF: test edx, edx js short loc_4C6E9 bt ecx, edx jb short def_4C657; jumptable 000000000004C657 default case dec edx dec ebx jmp short loc_4C6CF loc_4C6DE: mov eax, ebx xor edx, edx div r14d mov ebx, eax jmp short def_4C657; jumptable 000000000004C657 default case loc_4C6E9: shl eax, 3 mov ebx, eax def_4C657: mov eax, ebx; jumptable 000000000004C657 default case add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long ssz_len( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, unsigned int a7, unsigned int *a8, long long a9) { unsigned int v9; // ebx int v10; // ecx _DWORD *v11; // r15 unsigned int v12; // r14d signed int i; // edx v9 = 0; switch ( *(_DWORD *)(a9 + 8) ) { case 3: v9 = *(_DWORD *)(a9 + 24); break; case 4: v11 = *(_DWORD **)(a9 + 16); v12 = ssz_fixed_length(v11); if ( v12 ) { if ( a7 >= 5 && (unsigned __int8)ssz_is_dynamic((long long)v11) ) v9 = (unsigned int)uint32_from_le(a8) >> 2; else v9 = a7 / v12; } break; case 5: v9 = 8 * a7; break; case 6: v10 = *((unsigned __int8 *)a8 + a7 - 1); if ( v10 == 1 ) { v9 = 8 * a7 - 8; } else { v9 = 8 * a7 - 1; for ( i = 7; i >= 0; --i ) { if ( _bittest(&v10, i) ) return v9; --v9; } v9 = 8 * a7; } break; default: return v9; } return v9; }
ssz_len: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RAX,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RAX + 0x8] XOR EBX,EBX ADD ECX,-0x3 CMP ECX,0x3 JA 0x0014c6ee LEA R12,[RSP + 0x30] LEA RDX,[0x17f1c0] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_3: MOV EBX,dword ptr [RAX + 0x18] JMP 0x0014c6ee caseD_5: MOV EBX,dword ptr [R12] SHL EBX,0x3 JMP 0x0014c6ee caseD_6: MOV RCX,qword ptr [R12 + 0x8] MOV EAX,dword ptr [R12] LEA EDX,[RAX + -0x1] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP ECX,0x1 JNZ 0x0014c6c5 LEA EBX,[-0x8 + RAX*0x8] JMP 0x0014c6ee caseD_4: MOV R15,qword ptr [RAX + 0x10] MOV RDI,R15 CALL 0x0014bc4b MOV R14,RAX TEST R14D,R14D JZ 0x0014c6ee MOV EBX,dword ptr [R12] CMP EBX,0x5 JC 0x0014c6de MOV RDI,R15 CALL 0x0014bbf0 TEST AL,AL JZ 0x0014c6de MOV RDI,qword ptr [R12 + 0x8] CALL 0x0014affd MOV EBX,EAX SHR EBX,0x2 JMP 0x0014c6ee LAB_0014c6c5: LEA EBX,[-0x1 + RAX*0x8] PUSH 0x7 POP RDX LAB_0014c6cf: TEST EDX,EDX JS 0x0014c6e9 BT ECX,EDX JC 0x0014c6ee DEC EDX DEC EBX JMP 0x0014c6cf LAB_0014c6de: MOV EAX,EBX XOR EDX,EDX DIV R14D MOV EBX,EAX JMP 0x0014c6ee LAB_0014c6e9: SHL EAX,0x3 MOV EBX,EAX default: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
uint ssz_len(void) { byte bVar1; int8 uVar2; char cVar3; uint uVar4; uint uVar5; uint in_stack_00000008; long in_stack_00000010; long in_stack_00000018; uVar4 = 0; switch(*(int4 *)(in_stack_00000018 + 8)) { case 3: uVar4 = *(uint *)(in_stack_00000018 + 0x18); break; case 4: uVar2 = *(int8 *)(in_stack_00000018 + 0x10); uVar5 = ssz_fixed_length(uVar2); uVar4 = 0; if (uVar5 != 0) { if ((in_stack_00000008 < 5) || (cVar3 = ssz_is_dynamic(uVar2), cVar3 == '\0')) { uVar4 = in_stack_00000008 / uVar5; } else { uVar4 = uint32_from_le(in_stack_00000010); uVar4 = uVar4 >> 2; } } break; case 5: uVar4 = in_stack_00000008 << 3; break; case 6: bVar1 = *(byte *)(in_stack_00000010 + (ulong)(in_stack_00000008 - 1)); if (bVar1 == 1) { uVar4 = in_stack_00000008 * 8 - 8; } else { uVar4 = in_stack_00000008 * 8; for (uVar5 = 7; uVar4 = uVar4 - 1, -1 < (int)uVar5; uVar5 = uVar5 - 1) { if ((bVar1 >> (uVar5 & 0x1f) & 1) != 0) { return uVar4; } } uVar4 = in_stack_00000008 << 3; } } return uVar4; }
2,855
ssz_len
corpus-core[P]colibri-stateless/src/util/ssz.c
uint32_t ssz_len(ssz_ob_t ob) { switch (ob.def->type) { case SSZ_TYPE_VECTOR: return ob.def->def.vector.len; case SSZ_TYPE_LIST: { int fixed_length = ssz_fixed_length(ob.def->def.vector.type); if (fixed_length == 0) return 0; return ob.bytes.len > 4 && ssz_is_dynamic(ob.def->def.vector.type) ? uint32_from_le(ob.bytes.data) / 4 : ob.bytes.len / fixed_length; } case SSZ_TYPE_BIT_VECTOR: return ob.bytes.len * 8; case SSZ_TYPE_BIT_LIST: { uint8_t last_bit = ob.bytes.data[ob.bytes.len - 1]; if (last_bit == 1) return ob.bytes.len * 8 - 8; for (int i = 7; i >= 0; i--) { if (last_bit & (1 << i)) return ((ob.bytes.len - 1) * 8) + i; } return ob.bytes.len * 8; // this should never happen, since the spec requires to set a bit in the last byte } default: return 0; } }
O3
c
ssz_len: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x40(%rsp), %rax movl 0x8(%rax), %ecx xorl %ebx, %ebx addl $-0x3, %ecx cmpl $0x3, %ecx ja 0x5487f leaq 0x30(%rsp), %r12 leaq 0x379ce(%rip), %rdx # 0x8c1b0 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movl 0x18(%rax), %ebx jmp 0x5487f movl (%r12), %ebx shll $0x3, %ebx jmp 0x5487f movq 0x8(%r12), %rcx movl (%r12), %eax leal -0x1(%rax), %edx movzbl (%rcx,%rdx), %ecx cmpl $0x1, %ecx jne 0x54857 leal -0x8(,%rax,8), %ebx jmp 0x5487f movq 0x10(%rax), %r15 movq %r15, %rdi callq 0x53d08 movq %rax, %r14 testl %r14d, %r14d je 0x5487f movl (%r12), %ebx cmpl $0x5, %ebx jb 0x54876 movq %r15, %rdi callq 0x53cc0 testb %al, %al je 0x54876 movq 0x8(%r12), %rdi callq 0x52f9d movl %eax, %ebx shrl $0x2, %ebx jmp 0x5487f leal -0x1(,%rax,8), %ebx movl $0x7, %edx btl %edx, %ecx jb 0x5487f decl %ebx addl $-0x1, %edx jb 0x54863 shll $0x3, %eax movl %eax, %ebx jmp 0x5487f movl %ebx, %eax xorl %edx, %edx divl %r14d movl %eax, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
ssz_len: push r15 push r14 push r12 push rbx push rax mov rax, [rsp+28h+arg_10] mov ecx, [rax+8] xor ebx, ebx add ecx, 0FFFFFFFDh; switch 4 cases cmp ecx, 3 ja def_547E9; jumptable 00000000000547E9 default case lea r12, [rsp+28h+arg_0] lea rdx, jpt_547E9 movsxd rcx, ds:(jpt_547E9 - 8C1B0h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_547EB: mov ebx, [rax+18h]; jumptable 00000000000547E9 case 3 jmp def_547E9; jumptable 00000000000547E9 default case loc_547F3: mov ebx, [r12]; jumptable 00000000000547E9 case 5 shl ebx, 3 jmp def_547E9; jumptable 00000000000547E9 default case loc_547FF: mov rcx, [r12+8]; jumptable 00000000000547E9 case 6 mov eax, [r12] lea edx, [rax-1] movzx ecx, byte ptr [rcx+rdx] cmp ecx, 1 jnz short loc_54857 lea ebx, ds:0FFFFFFFFFFFFFFF8h[rax*8] jmp short def_547E9; jumptable 00000000000547E9 default case loc_5481D: mov r15, [rax+10h]; jumptable 00000000000547E9 case 4 mov rdi, r15 call ssz_fixed_length mov r14, rax test r14d, r14d jz short def_547E9; jumptable 00000000000547E9 default case mov ebx, [r12] cmp ebx, 5 jb short loc_54876 mov rdi, r15 call ssz_is_dynamic test al, al jz short loc_54876 mov rdi, [r12+8] call uint32_from_le mov ebx, eax shr ebx, 2 jmp short def_547E9; jumptable 00000000000547E9 default case loc_54857: lea ebx, ds:0FFFFFFFFFFFFFFFFh[rax*8] mov edx, 7 loc_54863: bt ecx, edx jb short def_547E9; jumptable 00000000000547E9 default case dec ebx add edx, 0FFFFFFFFh jb short loc_54863 shl eax, 3 mov ebx, eax jmp short def_547E9; jumptable 00000000000547E9 default case loc_54876: mov eax, ebx xor edx, edx div r14d mov ebx, eax def_547E9: mov eax, ebx; jumptable 00000000000547E9 default case add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long ssz_len( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, unsigned int a7, unsigned int *a8, long long a9) { unsigned int v9; // ebx int v10; // ecx long long v11; // r15 unsigned int v12; // r14d unsigned int v13; // edx v9 = 0; switch ( *(_DWORD *)(a9 + 8) ) { case 3: v9 = *(_DWORD *)(a9 + 24); break; case 4: v11 = *(_QWORD *)(a9 + 16); v12 = ssz_fixed_length(v11); if ( v12 ) { if ( a7 >= 5 && (unsigned __int8)ssz_is_dynamic(v11) ) v9 = (unsigned int)uint32_from_le(a8) >> 2; else v9 = a7 / v12; } break; case 5: v9 = 8 * a7; break; case 6: v10 = *((unsigned __int8 *)a8 + a7 - 1); if ( v10 == 1 ) { v9 = 8 * a7 - 8; } else { v9 = 8 * a7 - 1; v13 = 7; while ( !_bittest(&v10, v13) ) { --v9; if ( v13-- == 0 ) return 8 * a7; } } break; default: return v9; } return v9; }
ssz_len: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RAX,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RAX + 0x8] XOR EBX,EBX ADD ECX,-0x3 CMP ECX,0x3 JA 0x0015487f LEA R12,[RSP + 0x30] LEA RDX,[0x18c1b0] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_3: MOV EBX,dword ptr [RAX + 0x18] JMP 0x0015487f caseD_5: MOV EBX,dword ptr [R12] SHL EBX,0x3 JMP 0x0015487f caseD_6: MOV RCX,qword ptr [R12 + 0x8] MOV EAX,dword ptr [R12] LEA EDX,[RAX + -0x1] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP ECX,0x1 JNZ 0x00154857 LEA EBX,[-0x8 + RAX*0x8] JMP 0x0015487f caseD_4: MOV R15,qword ptr [RAX + 0x10] MOV RDI,R15 CALL 0x00153d08 MOV R14,RAX TEST R14D,R14D JZ 0x0015487f MOV EBX,dword ptr [R12] CMP EBX,0x5 JC 0x00154876 MOV RDI,R15 CALL 0x00153cc0 TEST AL,AL JZ 0x00154876 MOV RDI,qword ptr [R12 + 0x8] CALL 0x00152f9d MOV EBX,EAX SHR EBX,0x2 JMP 0x0015487f LAB_00154857: LEA EBX,[-0x1 + RAX*0x8] MOV EDX,0x7 LAB_00154863: BT ECX,EDX JC 0x0015487f DEC EBX ADD EDX,-0x1 JC 0x00154863 SHL EAX,0x3 MOV EBX,EAX JMP 0x0015487f LAB_00154876: MOV EAX,EBX XOR EDX,EDX DIV R14D MOV EBX,EAX default: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
uint ssz_len(void) { byte bVar1; int8 uVar2; char cVar3; uint uVar4; uint uVar5; bool bVar6; uint in_stack_00000008; long in_stack_00000010; long in_stack_00000018; uVar4 = 0; switch(*(int4 *)(in_stack_00000018 + 8)) { case 3: uVar4 = *(uint *)(in_stack_00000018 + 0x18); break; case 4: uVar2 = *(int8 *)(in_stack_00000018 + 0x10); uVar5 = ssz_fixed_length(uVar2); uVar4 = 0; if (uVar5 != 0) { if ((in_stack_00000008 < 5) || (cVar3 = ssz_is_dynamic(uVar2), cVar3 == '\0')) { uVar4 = in_stack_00000008 / uVar5; } else { uVar4 = uint32_from_le(in_stack_00000010); uVar4 = uVar4 >> 2; } } break; case 5: uVar4 = in_stack_00000008 << 3; break; case 6: bVar1 = *(byte *)(in_stack_00000010 + (ulong)(in_stack_00000008 - 1)); if (bVar1 == 1) { uVar4 = in_stack_00000008 * 8 - 8; } else { uVar4 = in_stack_00000008 * 8; uVar5 = 7; do { uVar4 = uVar4 - 1; if ((bVar1 >> (uVar5 & 0x1f) & 1) != 0) { return uVar4; } bVar6 = uVar5 != 0; uVar5 = uVar5 - 1; } while (bVar6); uVar4 = in_stack_00000008 << 3; } } return uVar4; }
2,856
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xa5232 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xa5217 movq %rbx, %rdi movq %r15, %rsi callq 0x1b220 testl %eax, %eax je 0xa5214 addq $0x30, %rbx jmp 0xa51f5 movq %rbx, %rax movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0xa528e addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b440 movq %rax, %rbx movq %r14, %rdi callq 0x5e434 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x4faec(%rip), %rsi # 0xf4d42 movq %rsp, %rdi callq 0xab3d7 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x5e1dc xorl %ebp, %ebp leaq 0x88c7b(%rip), %rsi # 0x12def8 leaq -0x4ad0e(%rip), %rdx # 0x5a576 movq %rbx, %rdi callq 0x1bef0 jmp 0xa5307 movl $0x20, %edi callq 0x1b440 movq %rax, %rbx leaq 0x30(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1b3e0 leaq (%rax,%r15), %rdx leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x21d38 leaq 0x4faad(%rip), %rsi # 0xf4d72 leaq 0x4faac(%rip), %rcx # 0xf4d78 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0xab9e0 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x5c74e xorl %ebp, %ebp leaq 0x88b80(%rip), %rsi # 0x12de78 leaq -0x4ad89(%rip), %rdx # 0x5a576 movq %rbx, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa532d movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0xa532d movq %rax, %r14 movb $0x1, %bpl movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xa5366 movq 0x30(%rsp), %rsi jmp 0xa5356 jmp 0xa5360 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa5366 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0xa5366 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xa5373 movq %rbx, %rdi callq 0x1b650 movq %r14, %rdi callq 0x1bf70 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_A5232 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] loc_A51F5: mov rax, [r12+8] cmp rbx, rax jz short loc_A5217 mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_A5214 add rbx, 30h ; '0' jmp short loc_A51F5 loc_A5214: mov rax, rbx loc_A5217: mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_A528E add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A5232: 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+68h+var_48] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_A5307 loc_A528E: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_38] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] lea rdi, [rsp+68h+var_48] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" mov rdi, rsp lea rdx, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_A5307: mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A532D mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A532D mov r14, rax mov bpl, 1 loc_A532D: mov rdi, [rsp+68h+var_48] cmp rdi, r12 jz short loc_A5366 mov rsi, [rsp+68h+var_38] jmp short loc_A5356 jmp short loc_A5360 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A5366 mov rsi, [rsp+68h+var_58] loc_A5356: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A5366 loc_A5360: mov r14, rax mov bpl, 1 loc_A5366: test bpl, bpl jz short loc_A5373 mov rdi, rbx; void * call ___cxa_free_exception loc_A5373: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long i; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax _QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF long long v11; // [rsp+30h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v9, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, v9); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(long long **)(a1 + 8); for ( i = *v2; ; i += 48LL ) { v4 = v2[1]; if ( i == v4 ) break; if ( !(unsigned int)std::string::compare(i, a2) ) { v4 = i; break; } } if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = &v11; v8 = strlen(a2); std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v9, "key '", v10, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v7, 403, v9); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001a5232 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] LAB_001a51f5: MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001a5217 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b220 TEST EAX,EAX JZ 0x001a5214 ADD RBX,0x30 JMP 0x001a51f5 LAB_001a5214: MOV RAX,RBX LAB_001a5217: MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x001a528e ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a5232: MOV EDI,0x20 CALL 0x0011b440 MOV RBX,RAX MOV RDI,R14 CALL 0x0015e434 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001a524f: LEA RSI,[0x1f4d42] MOV RDI,RSP CALL 0x001ab3d7 MOV BPL,0x1 LAB_001a5261: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0015e1dc XOR EBP,EBP LEA RSI,[0x22def8] LEA RDX,[0x15a576] MOV RDI,RBX CALL 0x0011bef0 LAB_001a528e: MOV EDI,0x20 CALL 0x0011b440 MOV RBX,RAX LEA R12,[RSP + 0x30] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011b3e0 LEA RDX,[RAX + R15*0x1] LAB_001a52b1: LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x00121d38 LAB_001a52be: LEA RSI,[0x1f4d72] LEA RCX,[0x1f4d78] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001ab9e0 MOV BPL,0x1 LAB_001a52dc: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0015c74e XOR EBP,EBP LEA RSI,[0x22de78] LEA RDX,[0x15a576] MOV RDI,RBX CALL 0x0011bef0
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { int8 *puVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; detail adStack_68 [32]; char *local_48 [2]; char local_38 [16]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001a524f to 001a525d has its CatchHandler @ 001a5360 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (adStack_68,"cannot use at() with ",local_48); /* try { // try from 001a5261 to 001a528b has its CatchHandler @ 001a5340 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x130,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } puVar1 = *(int8 **)(param_1 + 8); pcVar6 = (char *)*puVar1; while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 && (iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) { pcVar6 = pcVar6 + 0x30; } if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = local_38; sVar5 = strlen(param_2); /* try { // try from 001a52b1 to 001a52bd has its CatchHandler @ 001a533e */ std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5); /* try { // try from 001a52be to 001a52d8 has its CatchHandler @ 001a5327 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (adStack_68,"key \'",(string *)local_48,"\' not found"); /* try { // try from 001a52dc to 001a5306 has its CatchHandler @ 001a5307 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x193,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
2,857
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x7ab4d movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x7e7e6 movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x7abab addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx movq %r14, %rdi callq 0x434f0 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x3c1b3(%rip), %rsi # 0xb6d22 leaq 0x8(%rsp), %rdi callq 0x7ddd5 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x433a4 xorl %ebp, %ebp leaq 0x8339e(%rip), %rsi # 0xfdf38 leaq -0x3ab21(%rip), %rdx # 0x40080 movq %rbx, %rdi callq 0x24ee0 jmp 0x7ac15 pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x27852 leaq 0x3c183(%rip), %rsi # 0xb6d52 leaq 0x3c182(%rip), %rcx # 0xb6d58 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x7e3df movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x41c50 xorl %ebp, %ebp leaq 0x832b2(%rip), %rsi # 0xfdeb8 leaq -0x3ab8d(%rip), %rdx # 0x40080 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x251b8 jmp 0x7ac2a movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x7ac3b jmp 0x7ac47 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x7ac4a jmp 0x7ac52 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_7AB4D mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_7ABAB add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_7AB4D: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_7AC15 loc_7ABAB: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_7AC15: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7AC2A mov r14, rax mov bpl, 1 loc_7AC2A: lea rdi, [rsp+68h+var_40] jmp short loc_7AC3B jmp short loc_7AC47 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_7AC3B: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7AC4A jmp short loc_7AC52 loc_7AC47: mov r14, rax loc_7AC4A: mov rdi, rbx; void * call ___cxa_free_exception loc_7AC52: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v6, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v6, "key '", v7, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 403, (long long)v6, a1); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0017ab4d MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x0017e7e6 MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0017abab ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0017ab4d: PUSH 0x20 POP RDI CALL 0x00124460 MOV RBX,RAX MOV RDI,R14 CALL 0x001434f0 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0017ab68: LEA RSI,[0x1b6d22] LEA RDI,[RSP + 0x8] CALL 0x0017ddd5 MOV BPL,0x1 LAB_0017ab7c: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x001433a4 XOR EBP,EBP LEA RSI,[0x1fdf38] LEA RDX,[0x140080] MOV RDI,RBX CALL 0x00124ee0 LAB_0017abab: PUSH 0x20 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_0017abb6: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x00127852 LAB_0017abc8: LEA RSI,[0x1b6d52] LEA RCX,[0x1b6d58] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x0017e3df MOV BPL,0x1 LAB_0017abe8: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00141c50 XOR EBP,EBP LEA RSI,[0x1fdeb8] LEA RDX,[0x140080] MOV RDI,RBX CALL 0x00124ee0
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0017ab68 to 0017ab78 has its CatchHandler @ 0017ac47 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 0017ab7c to 0017aba8 has its CatchHandler @ 0017ac33 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0017abb6 to 0017abc7 has its CatchHandler @ 0017ac31 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 0017abc8 to 0017abe4 has its CatchHandler @ 0017ac24 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 0017abe8 to 0017ac14 has its CatchHandler @ 0017ac15 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
2,858
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/./json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x120(%rsp) movq %rsi, 0x118(%rsp) movl %edx, 0x114(%rsp) movq %rcx, 0x108(%rsp) movq 0x118(%rsp), %rax movq %rax, 0x10(%rsp) movb $0x0, 0x107(%rsp) leaq 0x106(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x55db0 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rdx leaq 0x158401(%rip), %rsi # 0x1d64ec callq 0x72000 jmp 0x7e0f2 leaq 0x106(%rsp), %rdi callq 0x560f0 movq 0x108(%rsp), %rdi callq 0x553e0 testb $0x1, %al jne 0x7e1ca movq 0x108(%rsp), %rdx movb $0x20, 0xcf(%rsp) leaq 0x166483(%rip), %rsi # 0x1e45ae leaq 0xd0(%rsp), %rdi leaq 0xcf(%rsp), %rcx callq 0x90370 jmp 0x7e142 movq 0x18(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0x55110 jmp 0x7e156 leaq 0xd0(%rsp), %rdi callq 0x56110 jmp 0x7e1ca movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x106(%rsp), %rdi callq 0x560f0 jmp 0x7e3d2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) jmp 0x7e3c8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0xd0(%rsp), %rdi callq 0x56110 jmp 0x7e3c8 movq 0x18(%rsp), %rdi leaq 0x158324(%rip), %rsi # 0x1d64fa callq 0x551c0 jmp 0x7e1dd movq 0x10(%rsp), %rax cmpl $0xe, 0x20(%rax) jne 0x7e2c5 movq 0x10(%rsp), %rdi addq $0x28, %rdi movq %rdi, (%rsp) callq 0x90500 movq (%rsp), %rsi movq %rax, 0xa0(%rsp) leaq 0x80(%rsp), %rdi callq 0x7dcd0 jmp 0x7e219 movb $0x27, 0x7f(%rsp) leaq 0x1582d8(%rip), %rdx # 0x1d64fd leaq 0xa8(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x80(%rsp), %rcx leaq 0x7f(%rsp), %r8 callq 0x90430 jmp 0x7e249 movq 0x18(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0x55110 jmp 0x7e25d leaq 0xa8(%rsp), %rdi callq 0x56110 leaq 0x80(%rsp), %rdi callq 0x56110 jmp 0x7e32f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) jmp 0x7e2b3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0xa8(%rsp), %rdi callq 0x56110 leaq 0x80(%rsp), %rdi callq 0x56110 jmp 0x7e3c8 movq 0x10(%rsp), %rax movl 0x20(%rax), %edi callq 0x905c0 movq %rax, 0x50(%rsp) leaq 0x15822e(%rip), %rsi # 0x1d650c leaq 0x58(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0x90510 jmp 0x7e2ef movq 0x18(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x55110 jmp 0x7e300 leaq 0x58(%rsp), %rdi callq 0x56110 jmp 0x7e32f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x58(%rsp), %rdi callq 0x56110 jmp 0x7e3c8 cmpl $0x0, 0x114(%rsp) je 0x7e39f movl 0x114(%rsp), %edi callq 0x905c0 movq %rax, 0x28(%rsp) leaq 0x1581c7(%rip), %rsi # 0x1d6518 leaq 0x30(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x90510 jmp 0x7e362 movq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x55110 jmp 0x7e373 leaq 0x30(%rsp), %rdi callq 0x56110 jmp 0x7e39f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x30(%rsp), %rdi callq 0x56110 jmp 0x7e3c8 movb $0x1, 0x107(%rsp) testb $0x1, 0x107(%rsp) jne 0x7e3bb movq 0x18(%rsp), %rdi callq 0x56110 movq 0x8(%rsp), %rax addq $0x128, %rsp # imm = 0x128 retq movq 0x18(%rsp), %rdi callq 0x56110 movq 0xf8(%rsp), %rdi callq 0x559a0 nop
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: sub rsp, 128h mov [rsp+128h+var_110], rdi; __int64 mov rax, rdi mov [rsp+128h+var_120], rax; void * mov [rsp+128h+var_8], rdi mov qword ptr [rsp+128h+var_10], rsi mov [rsp+128h+var_14], edx mov [rsp+128h+var_22+2], rcx mov rax, qword ptr [rsp+128h+var_10] mov qword ptr [rsp+128h+var_118], rax; int mov byte ptr [rsp+128h+var_22+1], 0 lea rdi, [rsp+128h+var_22] mov [rsp+128h+var_108], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+128h+var_110] mov rdx, [rsp+128h+var_108] lea rsi, aSyntaxError; "syntax error " call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_7E0F2: lea rdi, [rsp+128h+var_22] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+128h+var_22+2] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz loc_7E1CA mov rdx, [rsp+128h+var_22+2]; int mov byte ptr [rsp+128h+var_59], 20h ; ' ' lea rsi, aSyntaxErrorWhi+0Dh; int lea rdi, [rsp+128h+var_59+1]; int lea rcx, [rsp+128h+var_59]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&) jmp short $+2 loc_7E142: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_59+1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_7E156: lea rdi, [rsp+128h+var_59+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_7E1CA mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_FE] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_7E3D2 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax jmp loc_7E3C8 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_7E3C8 loc_7E1CA: mov rdi, [rsp+128h+var_110] lea rsi, asc_1D64FA; "- " call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_7E1DD: mov rax, qword ptr [rsp+128h+var_118] cmp dword ptr [rax+20h], 0Eh jnz loc_7E2C5 mov rdi, qword ptr [rsp+128h+var_118] add rdi, 28h ; '(' mov qword ptr [rsp+128h+var_128], rdi; int call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_error_messageEv; 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_error_message(void) mov rsi, qword ptr [rsp+128h+var_128]; int mov [rsp+128h+var_88], rax lea rdi, [rsp+128h+var_A8]; int call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) jmp short $+2 loc_7E219: mov [rsp+128h+var_A9], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+128h+var_80] lea rsi, [rsp+128h+var_88] lea rcx, [rsp+128h+var_A8] lea r8, [rsp+128h+var_A9] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) jmp short $+2 loc_7E249: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_7E25D: lea rdi, [rsp+128h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+128h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_7E32F mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax jmp short loc_7E2B3 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7E2B3: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_7E3C8 loc_7E2C5: mov rax, qword ptr [rsp+128h+var_118] mov edi, [rax+20h] call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov qword ptr [rsp+128h+var_D8], rax lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+128h+var_D0]; int lea rdx, [rsp+128h+var_D8]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) jmp short $+2 loc_7E2EF: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_7E300: lea rdi, [rsp+128h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_7E32F mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_7E3C8 loc_7E32F: cmp [rsp+128h+var_14], 0 jz short loc_7E39F mov edi, [rsp+128h+var_14] call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov qword ptr [rsp+128h+var_100], rax lea rsi, aExpected; "; expected " lea rdi, [rsp+128h+var_F8]; int lea rdx, [rsp+128h+var_100]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) jmp short $+2 loc_7E362: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_7E373: lea rdi, [rsp+128h+var_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_7E39F mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_7E3C8 loc_7E39F: mov byte ptr [rsp+128h+var_22+1], 1 test byte ptr [rsp+128h+var_22+1], 1 jnz short loc_7E3BB mov rdi, [rsp+128h+var_110]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7E3BB: mov rax, [rsp+128h+var_120] add rsp, 128h retn loc_7E3C8: mov rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7E3D2: mov rdi, [rsp+arg_F0] call __Unwind_Resume
void * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( long long a1, long long a2, unsigned int a3, long long a4) { int v4; // r8d int v5; // r9d int v6; // r9d int v7; // ecx int v8; // r8d int v9; // r9d int v10; // ecx int v11; // r8d int v12; // r9d void *v14; // [rsp+0h] [rbp-128h] int v15; // [rsp+0h] [rbp-128h] void *v16; // [rsp+8h] [rbp-120h] void *v17; // [rsp+8h] [rbp-120h] int v18[2]; // [rsp+10h] [rbp-118h] int v19; // [rsp+10h] [rbp-118h] void *v20; // [rsp+18h] [rbp-110h] void *v21; // [rsp+18h] [rbp-110h] void *v22; // [rsp+18h] [rbp-110h] int v23[2]; // [rsp+28h] [rbp-100h] BYREF int v24[8]; // [rsp+30h] [rbp-F8h] BYREF int v25[2]; // [rsp+50h] [rbp-D8h] BYREF int v26[9]; // [rsp+58h] [rbp-D0h] BYREF char v27; // [rsp+7Fh] [rbp-A9h] BYREF int v28[8]; // [rsp+80h] [rbp-A8h] BYREF long long error_message; // [rsp+A0h] [rbp-88h] BYREF _BYTE v30[39]; // [rsp+A8h] [rbp-80h] BYREF char v31; // [rsp+CFh] [rbp-59h] BYREF _BYTE v32[54]; // [rsp+D0h] [rbp-58h] BYREF _BYTE v33[14]; // [rsp+106h] [rbp-22h] BYREF unsigned int v34; // [rsp+114h] [rbp-14h] int v35[2]; // [rsp+118h] [rbp-10h] long long v36; // [rsp+120h] [rbp-8h] v20 = (void *)a1; v16 = (void *)a1; v36 = a1; *(_QWORD *)v35 = a2; v34 = a3; *(_QWORD *)&v33[2] = a4; *(_QWORD *)v18 = a2; v33[1] = 0; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error ", (long long)v33); std::allocator<char>::~allocator(v33); if ( (std::string::empty(*(_QWORD *)&v33[2]) & 1) == 0 ) { v31 = 32; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>( (int)v32, (int)"while parsing ", *(int *)&v33[2], (int)&v31, v4, v5, v14, a1, a2, a1, (long long)v33); std::string::operator+=(v20, v32); std::string::~string(v32); } std::string::operator+=(v20, "- "); if ( *(_DWORD *)(*(_QWORD *)v18 + 32LL) == 14 ) { error_message = 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_error_message(); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( (long long)v28, *(_QWORD *)v18 + 40LL); v27 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( (unsigned int)v30, (unsigned int)&error_message, (unsigned int)"; last read: '", (unsigned int)v28, (unsigned int)&v27, v6, v18[0] + 40, (_DWORD)v16, v18[0], (long long)v20); std::string::operator+=(v21, v30); std::string::~string(v30); std::string::~string(v28); } else { *(_QWORD *)v25 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(*(unsigned int *)(*(_QWORD *)v18 + 32LL)); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>( (int)v26, (int)"unexpected ", (int)v25, v7, v8, v9, (int)v14, v16, v18[0], (long long)v20); std::string::operator+=(v21, v26); std::string::~string(v26); } if ( v34 ) { *(_QWORD *)v23 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(v34); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>( (int)v24, (int)"; expected ", (int)v23, v10, v11, v12, v15, v17, v19, (long long)v21); std::string::operator+=(v22, v24); std::string::~string(v24); } return v17; }
exception_message: SUB RSP,0x128 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x120],RDI MOV qword ptr [RSP + 0x118],RSI MOV dword ptr [RSP + 0x114],EDX MOV qword ptr [RSP + 0x108],RCX MOV RAX,qword ptr [RSP + 0x118] MOV qword ptr [RSP + 0x10],RAX MOV byte ptr [RSP + 0x107],0x0 LEA RDI,[RSP + 0x106] MOV qword ptr [RSP + 0x20],RDI CALL 0x00155db0 MOV RDI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_0017e0e4: LEA RSI,[0x2d64ec] CALL 0x00172000 JMP 0x0017e0f2 LAB_0017e0f2: LEA RDI,[RSP + 0x106] CALL 0x001560f0 MOV RDI,qword ptr [RSP + 0x108] CALL 0x001553e0 TEST AL,0x1 JNZ 0x0017e1ca MOV RDX,qword ptr [RSP + 0x108] MOV byte ptr [RSP + 0xcf],0x20 LAB_0017e124: LEA RSI,[0x2e45ae] LEA RDI,[RSP + 0xd0] LEA RCX,[RSP + 0xcf] CALL 0x00190370 JMP 0x0017e142 LAB_0017e142: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xd0] CALL 0x00155110 JMP 0x0017e156 LAB_0017e156: LEA RDI,[RSP + 0xd0] CALL 0x00156110 JMP 0x0017e1ca LAB_0017e1ca: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x2d64fa] CALL 0x001551c0 JMP 0x0017e1dd LAB_0017e1dd: MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x20],0xe JNZ 0x0017e2c5 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x28 MOV qword ptr [RSP],RDI CALL 0x00190500 MOV RSI,qword ptr [RSP] MOV qword ptr [RSP + 0xa0],RAX LEA RDI,[RSP + 0x80] CALL 0x0017dcd0 JMP 0x0017e219 LAB_0017e219: MOV byte ptr [RSP + 0x7f],0x27 LAB_0017e21e: LEA RDX,[0x2d64fd] LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0xa0] LEA RCX,[RSP + 0x80] LEA R8,[RSP + 0x7f] CALL 0x00190430 JMP 0x0017e249 LAB_0017e249: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xa8] CALL 0x00155110 JMP 0x0017e25d LAB_0017e25d: LEA RDI,[RSP + 0xa8] CALL 0x00156110 LEA RDI,[RSP + 0x80] CALL 0x00156110 JMP 0x0017e32f LAB_0017e2c5: MOV RAX,qword ptr [RSP + 0x10] MOV EDI,dword ptr [RAX + 0x20] CALL 0x001905c0 MOV qword ptr [RSP + 0x50],RAX LAB_0017e2d7: LEA RSI,[0x2d650c] LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x50] CALL 0x00190510 JMP 0x0017e2ef LAB_0017e2ef: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x58] CALL 0x00155110 JMP 0x0017e300 LAB_0017e300: LEA RDI,[RSP + 0x58] CALL 0x00156110 JMP 0x0017e32f LAB_0017e32f: CMP dword ptr [RSP + 0x114],0x0 JZ 0x0017e39f MOV EDI,dword ptr [RSP + 0x114] CALL 0x001905c0 MOV qword ptr [RSP + 0x28],RAX LAB_0017e34a: LEA RSI,[0x2d6518] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x28] CALL 0x00190510 JMP 0x0017e362 LAB_0017e362: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x30] CALL 0x00155110 LAB_0017e371: JMP 0x0017e373 LAB_0017e373: LEA RDI,[RSP + 0x30] CALL 0x00156110 JMP 0x0017e39f LAB_0017e39f: MOV byte ptr [RSP + 0x107],0x1 TEST byte ptr [RSP + 0x107],0x1 JNZ 0x0017e3bb MOV RDI,qword ptr [RSP + 0x18] CALL 0x00156110 LAB_0017e3bb: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x128 RET
/* WARNING: Removing unreachable block (ram,0x0017e3b1) */ /* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::token_type, std::__cxx11::string const&) */ string * nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::exception_message(string *param_1,long param_2,int param_3,string *param_4) { ulong uVar1; char *local_100; detail local_f8 [32]; char *local_d8; detail local_d0 [39]; char local_a9; string local_a8 [32]; char *local_88; detail local_80 [39]; char local_59; detail local_58 [54]; allocator local_22; int1 local_21; string *local_20; int local_14; long local_10; string *local_8; local_21 = 0; local_20 = param_4; local_14 = param_3; local_10 = param_2; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 0017e0e4 to 0017e0ef has its CatchHandler @ 0017e165 */ std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",&local_22); std::allocator<char>::~allocator((allocator<char> *)&local_22); uVar1 = std::__cxx11::string::empty(); if ((uVar1 & 1) == 0) { local_59 = ' '; /* try { // try from 0017e124 to 0017e13f has its CatchHandler @ 0017e18b */ concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char> (local_58,"while parsing ",local_20,&local_59); /* try { // try from 0017e142 to 0017e153 has its CatchHandler @ 0017e1a4 */ std::__cxx11::string::operator+=(param_1,(string *)local_58); std::__cxx11::string::~string((string *)local_58); } /* try { // try from 0017e1ca to 0017e216 has its CatchHandler @ 0017e18b */ std::__cxx11::string::operator+=(param_1,"- "); if (*(int *)(param_2 + 0x20) == 0xe) { local_88 = (char *)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_error_message((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>>> *)(param_2 + 0x28)); lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_a9 = '\''; /* try { // try from 0017e21e to 0017e246 has its CatchHandler @ 0017e27c */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> (local_80,&local_88,"; last read: \'",local_a8,&local_a9); /* try { // try from 0017e249 to 0017e25a has its CatchHandler @ 0017e292 */ std::__cxx11::string::operator+=(param_1,(string *)local_80); std::__cxx11::string::~string((string *)local_80); std::__cxx11::string::~string(local_a8); } else { local_d8 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(*(int4 *)(param_2 + 0x20)); /* try { // try from 0017e2d7 to 0017e2ec has its CatchHandler @ 0017e18b */ concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_d0,"unexpected ",&local_d8); /* try { // try from 0017e2ef to 0017e2fd has its CatchHandler @ 0017e30c */ std::__cxx11::string::operator+=(param_1,(string *)local_d0); std::__cxx11::string::~string((string *)local_d0); } if (local_14 != 0) { local_100 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(local_14); /* try { // try from 0017e34a to 0017e35f has its CatchHandler @ 0017e18b */ concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_f8,"; expected ",&local_100); /* try { // try from 0017e362 to 0017e370 has its CatchHandler @ 0017e37f */ std::__cxx11::string::operator+=(param_1,(string *)local_f8); std::__cxx11::string::~string((string *)local_f8); } return param_1; }
2,859
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/./json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) leaq 0x89607(%rip), %rsi # 0xb3f88 leaq 0x8960d(%rip), %rdx # 0xb3f95 callq 0x320e8 movq 0x8(%r15), %rsi testq %rsi, %rsi je 0x2aa14 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) addq $0xf, %rsi leaq 0x8(%rsp), %rdi callq 0x19a70 leaq 0x895d5(%rip), %rsi # 0xb3f96 leaq 0x8(%rsp), %rdi callq 0x19d00 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x191d0 leaq 0x8(%rsp), %rdi movl $0x20, %esi callq 0x195b0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x191d0 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x2aa14 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x8958a(%rip), %rsi # 0xb3fa5 movq %rbx, %rdi callq 0x19d00 movl 0x20(%r14), %edi cmpl $0xe, %edi jne 0x2aab7 movq 0x98(%r14), %rax addq $0x28, %r14 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x2a6a2 leaq 0x2f(%rsp), %r8 movb $0x27, (%r8) leaq 0x8954b(%rip), %rdx # 0xb3fa8 leaq 0x8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x38(%rsp), %rcx callq 0x30c80 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x191d0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2aa9e movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2ab31 movq 0x48(%rsp), %rsi jmp 0x2ab29 callq 0x30d42 movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x19310 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x19a70 leaq 0x894c6(%rip), %rsi # 0xb3fb7 leaq 0x8(%rsp), %rdi callq 0x19d00 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x19d00 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x191d0 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x2ab31 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 testl %ebp, %ebp je 0x2abb1 movl %ebp, %edi callq 0x30d42 movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x19310 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x19a70 leaq 0x89452(%rip), %rsi # 0xb3fc3 leaq 0x8(%rsp), %rdi callq 0x19d00 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x19d00 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x191d0 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x2abb1 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x2ac0a movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2abe8 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x2abe8 movq %rax, %r14 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2ac33 movq 0x48(%rsp), %rsi jmp 0x2ac2b jmp 0x2ac03 jmp 0x2ac0a jmp 0x2ac19 movq %rax, %r14 jmp 0x2ac33 jmp 0x2ac0a movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi jne 0x2ac26 jmp 0x2ac33 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x2ac33 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 movq (%rbx), %rdi cmpq %r12, %rdi je 0x2ac47 movq (%r12), %rsi incq %rsi callq 0x196b0 movq %r14, %rdi callq 0x19be0 nop
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rcx mov ebp, edx mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 lea rsi, aSyntaxError; "syntax error " lea rdx, aSyntaxError+0Dh; "" 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 rsi, [r15+8] test rsi, rsi jz short loc_2AA14 lea r13, [rsp+88h+var_70] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 add rsi, 0Fh lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aWhileParsing; "while parsing " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rdi, [rsp+88h+var_80] mov esi, 20h ; ' ' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r13 jz short loc_2AA14 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2AA14: lea rsi, asc_B3FA5; "- " mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov edi, [r14+20h] cmp edi, 0Eh jnz loc_2AAB7 mov rax, [r14+98h] add r14, 28h ; '(' mov [rsp+88h+var_58], rax lea rdi, [rsp+88h+var_50] mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) lea r8, [rsp+88h+var_59] mov byte ptr [r8], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_58] lea rcx, [rsp+88h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2AA9E mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2AA9E: lea rax, [rsp+88h+var_40] mov rdi, [rax-10h] cmp rdi, rax jz loc_2AB31 mov rsi, [rsp+88h+var_40] jmp short loc_2AB29 loc_2AAB7: call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_2AB31 mov rsi, [rsp+88h+var_70] loc_2AB29: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2AB31: test ebp, ebp jz short loc_2ABB1 mov edi, ebp call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aExpected; "; expected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_2ABB1 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2ABB1: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_2AC0A mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2ABE8 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2ABE8 mov r14, rax loc_2ABE8: lea rax, [rsp+arg_40] mov rdi, [rax-10h] cmp rdi, rax jz short loc_2AC33 mov rsi, [rsp+arg_40] jmp short loc_2AC2B jmp short loc_2AC03 jmp short loc_2AC0A jmp short loc_2AC19 loc_2AC03: mov r14, rax jmp short loc_2AC33 jmp short $+2 loc_2AC0A: mov r14, rax mov rdi, [rsp+arg_0] cmp rdi, r15 jnz short loc_2AC26 jmp short loc_2AC33 loc_2AC19: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_2AC33 loc_2AC26: mov rsi, [rsp+arg_10] loc_2AC2B: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2AC33: mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_2AC47 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2AC47: mov rdi, r14 call __Unwind_Resume
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( _QWORD *a1, long long a2, unsigned int a3, _QWORD *a4) { long long v8; // rsi void *v9; // rdi long long v10; // rsi long long v11; // r14 long long v12; // rax long long v13; // r14 long long v14; // rax void *v16; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] _QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF char v19; // [rsp+2Fh] [rbp-59h] BYREF long long v20; // [rsp+30h] [rbp-58h] BYREF _QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF long long v22; // [rsp+48h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "syntax error ", ""); v8 = a4[1]; if ( v8 ) { v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; std::string::reserve(&v16, v8 + 15); std::string::append(&v16, "while parsing "); std::string::_M_append(&v16, *a4, a4[1]); std::string::push_back(&v16, 32LL); std::string::_M_append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } std::string::append(a1, "- "); if ( *(_DWORD *)(a2 + 32) == 14 ) { v20 = *(_QWORD *)(a2 + 152); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( (long long)v21, a2 + 40); v19 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( &v16, &v20, "; last read: '", v21, &v19); std::string::_M_append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); v9 = (void *)v21[0]; if ( (long long *)v21[0] != &v22 ) { v10 = v22; LABEL_11: operator delete(v9, v10 + 1); } } else { v11 = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name)(); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v12 = strlen(v11); std::string::reserve(&v16, v12 + 11); std::string::append(&v16, "unexpected "); std::string::append(&v16, v11); std::string::_M_append(a1, v16, v17); v9 = v16; if ( v16 != v18 ) { v10 = v18[0]; goto LABEL_11; } } if ( a3 ) { v13 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(a3); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v14 = strlen(v13); std::string::reserve(&v16, v14 + 11); std::string::append(&v16, "; expected "); std::string::append(&v16, v13); std::string::_M_append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } return a1; }
exception_message: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RCX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 LEA RSI,[0x1b3f88] LEA RDX,[0x1b3f95] CALL 0x001320e8 MOV RSI,qword ptr [R15 + 0x8] TEST RSI,RSI JZ 0x0012aa14 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 ADD RSI,0xf LAB_0012a9b0: LEA RDI,[RSP + 0x8] CALL 0x00119a70 LEA RSI,[0x1b3f96] LEA RDI,[RSP + 0x8] CALL 0x00119d00 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x001191d0 LEA RDI,[RSP + 0x8] MOV ESI,0x20 CALL 0x001195b0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0012a9f5: MOV RDI,RBX CALL 0x001191d0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0012aa14 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196b0 LAB_0012aa14: LEA RSI,[0x1b3fa5] MOV RDI,RBX CALL 0x00119d00 MOV EDI,dword ptr [R14 + 0x20] CMP EDI,0xe JNZ 0x0012aab7 MOV RAX,qword ptr [R14 + 0x98] ADD R14,0x28 MOV qword ptr [RSP + 0x30],RAX LAB_0012aa40: LEA RDI,[RSP + 0x38] MOV RSI,R14 CALL 0x0012a6a2 LEA R8,[RSP + 0x2f] MOV byte ptr [R8],0x27 LAB_0012aa56: LEA RDX,[0x1b3fa8] LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x30] LEA RCX,[RSP + 0x38] CALL 0x00130c80 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0012aa7b: MOV RDI,RBX CALL 0x001191d0 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012aa9e MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196b0 LAB_0012aa9e: LEA RAX,[RSP + 0x48] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012ab31 MOV RSI,qword ptr [RSP + 0x48] JMP 0x0012ab29 LAB_0012aab7: CALL 0x00130d42 MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x00119310 LEA RSI,[RAX + 0xb] LAB_0012aae0: LEA RDI,[RSP + 0x8] CALL 0x00119a70 LEA RSI,[0x1b3fb7] LEA RDI,[RSP + 0x8] CALL 0x00119d00 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00119d00 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0012ab12: MOV RDI,RBX CALL 0x001191d0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x0012ab31 MOV RSI,qword ptr [RSP + 0x18] LAB_0012ab29: INC RSI CALL 0x001196b0 LAB_0012ab31: TEST EBP,EBP JZ 0x0012abb1 MOV EDI,EBP CALL 0x00130d42 MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x00119310 LEA RSI,[RAX + 0xb] LAB_0012ab60: LEA RDI,[RSP + 0x8] CALL 0x00119a70 LEA RSI,[0x1b3fc3] LEA RDI,[RSP + 0x8] CALL 0x00119d00 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00119d00 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0012ab92: MOV RDI,RBX CALL 0x001191d0 LAB_0012ab9a: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x0012abb1 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196b0 LAB_0012abb1: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::token_type, std::__cxx11::string const&) */ long * nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>>> ::exception_message(long *param_1,long param_2,int param_3,ulong *param_4) { char *pcVar1; long *local_80; int8 local_78; int1 local_70; int7 uStack_6f; int1 local_59; int8 local_58; long *local_50 [2]; long local_40 [2]; *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ",""); if (param_4[1] != 0) { local_78 = 0; local_70 = 0; /* try { // try from 0012a9b0 to 0012a9ea has its CatchHandler @ 0012ac19 */ local_80 = (long *)&local_70; std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::_M_append((char *)&local_80,*param_4); std::__cxx11::string::push_back((char)&local_80); /* try { // try from 0012a9f5 to 0012a9fc has its CatchHandler @ 0012ac01 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } /* try { // try from 0012aa14 to 0012aa22 has its CatchHandler @ 0012ac03 */ std::__cxx11::string::append((char *)param_1); if (*(int *)(param_2 + 0x20) == 0xe) { local_58 = *(int8 *)(param_2 + 0x98); /* try { // try from 0012aa40 to 0012aa4c has its CatchHandler @ 0012abfd */ lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_59 = 0x27; /* try { // try from 0012aa56 to 0012aa70 has its CatchHandler @ 0012abe5 */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> ((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50); /* try { // try from 0012aa7b to 0012aa82 has its CatchHandler @ 0012abc5 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } if (local_50[0] == local_40) goto LAB_0012ab31; } else { pcVar1 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 0012aae0 to 0012ab07 has its CatchHandler @ 0012ac08 */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 0012ab12 to 0012ab19 has its CatchHandler @ 0012abc3 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 == (long *)&local_70) goto LAB_0012ab31; local_40[0] = CONCAT71(uStack_6f,local_70); local_50[0] = local_80; } operator_delete(local_50[0],local_40[0] + 1); LAB_0012ab31: if (param_3 != 0) { pcVar1 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(param_3); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 0012ab60 to 0012ab87 has its CatchHandler @ 0012ac0a */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 0012ab92 to 0012ab99 has its CatchHandler @ 0012abff */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } return param_1; }
2,860
llama_sbatch::add_seq_to_ubatch(llama_ubatch&, llama_sbatch_seq&, unsigned long)
monkey531[P]llama/src/llama-batch.cpp
void llama_sbatch::add_seq_to_ubatch(llama_ubatch & ubatch, llama_sbatch_seq & seq, size_t length) { GGML_ASSERT(batch != nullptr); GGML_ASSERT(length <= seq.length); // Can only add sequences of equal lengths to a batch, // otherwise it isn't clear to which sequence a token belongs GGML_ASSERT(seq.n_seq_id == 0 || ubatch.n_seqs == 0 || length == (size_t) ubatch.n_tokens / ubatch.n_seqs); GGML_ASSERT((seq.n_seq_id != 0) == ubatch.equal_seqs); // NOTE: loops are separated for cache-friendliness if (batch->token) { if (ubatch.equal_seqs) { for (size_t i = 0; i < length; ++i) { ubatch.token[ubatch.n_tokens + i] = batch->token[ids[seq.offset + i]]; } } else { // simple split ubatch.token = batch->token + seq.offset; } } else { ubatch.token = nullptr; } if (batch->embd) { if (ubatch.equal_seqs) { for (size_t i = 0; i < length; ++i) { memcpy( ubatch.embd + (n_embd * (ubatch.n_tokens + i)), batch->embd + (n_embd * ids[seq.offset + i]), n_embd * sizeof(float) ); } } else { // simple split ubatch.embd = batch->embd + (n_embd * seq.offset); } } else { ubatch.embd = nullptr; } if (ubatch.equal_seqs) { for (size_t i = 0; i < length; ++i) { ubatch.pos[ubatch.n_tokens + i] = batch->pos[ids[seq.offset + i]]; } } else { // simple split ubatch.pos = batch->pos + seq.offset; } if (ubatch.equal_seqs) { ubatch.n_seq_id[ubatch.n_seqs] = seq.n_seq_id; if (seq.seq_id) { ubatch.seq_id[ubatch.n_seqs] = seq.seq_id; } } else { // simple split if (batch->n_seq_id) { ubatch.n_seq_id = batch->n_seq_id + seq.offset; } else { for (size_t i = 0; i < length; ++i) { ubatch.n_seq_id[ubatch.n_seqs + i] = 1; } } if (batch->seq_id) { ubatch.seq_id = batch->seq_id + seq.offset; } } if (logits_all) { for (size_t i = 0; i < length; ++i) { ubatch.output[ubatch.n_tokens + i] = 1; out_ids.push_back(ids[seq.offset + i]); } } else if (batch->logits) { if (ubatch.equal_seqs) { for (size_t i = 0; i < length; ++i) { size_t id = ids[seq.offset + i]; int8_t is_output = batch->logits[id]; ubatch.output[ubatch.n_tokens + i] = is_output; if (is_output) { out_ids.push_back(id); } } } else { // simple split ubatch.output = batch->logits + seq.offset; for (size_t i = 0; i < length; ++i) { if (ubatch.output[i] != 0) { out_ids.push_back(seq.offset + i); } } } } else { // only get last output for (size_t i = 0; i < length; ++i) { size_t id = ids[seq.offset + i]; int8_t is_last = id == ids.size() - 1; ubatch.output[ubatch.n_tokens + i] = is_last; if (is_last) { out_ids.push_back(id); } } } if (ubatch.n_tokens == 0 && ubatch.n_seqs == 0) { ubatch.n_seq_tokens = ubatch.equal_seqs ? length : 1; } ubatch.n_tokens += length; ubatch.n_seqs += ubatch.equal_seqs ? 1 : length; // virtual sequences for simple splits seq.offset += length; seq.length -= length; n_tokens -= length; GGML_ASSERT(ubatch.n_tokens == ubatch.n_seq_tokens * ubatch.n_seqs); }
O2
cpp
llama_sbatch::add_seq_to_ubatch(llama_ubatch&, llama_sbatch_seq&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq 0x60(%rdi), %rcx testq %rcx, %rcx je 0xd19c9 movq %rdx, %r15 cmpq %rbx, 0x18(%rdx) jb 0xd19e2 movq %rsi, %r12 movq %rdi, %rbp movl (%r15), %esi testl %esi, %esi je 0xd1649 movl 0xc(%r12), %edi testl %edi, %edi je 0xd1649 movl 0x4(%r12), %eax xorl %edx, %edx divl %edi cmpq %rbx, %rax jne 0xd1a30 testl %esi, %esi setne %dl movb (%r12), %al cmpb %dl, %al jne 0xd19fb movq 0x8(%rcx), %rdx testq %rdx, %rdx je 0xd169e testb %al, %al je 0xd1700 movq 0x10(%r15), %rsi shlq $0x3, %rsi addq 0x18(%rbp), %rsi movq 0x10(%r12), %rdi xorl %r8d, %r8d cmpq %r8, %rbx je 0xd16a4 movq (%rsi,%r8,8), %r9 movl (%rdx,%r9,4), %r9d movl 0x4(%r12), %r10d leaq (%rdi,%r10,4), %r10 movl %r9d, (%r10,%r8,4) incq %r8 jmp 0xd167f andq $0x0, 0x10(%r12) movq 0x10(%rcx), %rcx testq %rcx, %rcx je 0xd1716 testb %al, %al je 0xd171e xorl %r13d, %r13d cmpq %r13, %rbx je 0xd1732 movl 0x4(%r12), %edi addq %r13, %rdi movq 0x8(%rbp), %rdx movq 0x60(%rbp), %rax imulq %rdx, %rdi shlq $0x2, %rdi addq 0x18(%r12), %rdi movq 0x10(%r15), %rcx shlq $0x3, %rcx addq 0x18(%rbp), %rcx movq (%rcx,%r13,8), %rsi imulq %rdx, %rsi shlq $0x2, %rsi addq 0x10(%rax), %rsi shlq $0x2, %rdx callq 0xa07f0 incq %r13 jmp 0xd16b4 movq 0x10(%r15), %rsi leaq (%rdx,%rsi,4), %rdx movq %rdx, 0x10(%r12) movq 0x10(%rcx), %rcx testq %rcx, %rcx jne 0xd1722 andq $0x0, 0x18(%r12) jmp 0xd1736 movq 0x10(%r15), %rsi imulq 0x8(%rbp), %rsi leaq (%rcx,%rsi,4), %rcx movq %rcx, 0x18(%r12) jmp 0xd1736 movb (%r12), %al movq 0x60(%rbp), %rdx movq 0x10(%r15), %rcx testb $0x1, %al je 0xd1779 leaq (,%rcx,8), %rsi addq 0x18(%rbp), %rsi movq 0x20(%r12), %rdi xorl %r8d, %r8d cmpq %r8, %rbx je 0xd17b8 movq 0x18(%rdx), %r9 movq (%rsi,%r8,8), %r10 movl (%r9,%r10,4), %r9d movl 0x4(%r12), %r10d leaq (%rdi,%r10,4), %r10 movl %r9d, (%r10,%r8,4) incq %r8 jmp 0xd1756 leaq (,%rcx,4), %rsi addq 0x18(%rdx), %rsi movq %rsi, 0x20(%r12) movq 0x60(%rbp), %rdx movq 0x20(%rdx), %rsi testq %rsi, %rsi je 0xd18a4 leaq (%rsi,%rcx,4), %rsi movq %rsi, 0x28(%r12) movq 0x28(%rdx), %rdx testq %rdx, %rdx je 0xd17df leaq (%rdx,%rcx,8), %rdx movq %rdx, 0x30(%r12) jmp 0xd17df movl (%r15), %edx movq 0x28(%r12), %rsi movl 0xc(%r12), %edi movl %edx, (%rsi,%rdi,4) movq 0x8(%r15), %rdx testq %rdx, %rdx je 0xd17df movq 0x30(%r12), %rsi movl 0xc(%r12), %edi movq %rdx, (%rsi,%rdi,8) cmpb $0x1, 0x10(%rbp) movq %rbp, 0x8(%rsp) jne 0xd1830 leaq 0x30(%rbp), %r13 xorl %ebp, %ebp xorl %r14d, %r14d cmpq %r14, %rbx je 0xd1962 movl 0x4(%r12), %eax addq 0x38(%r12), %rax movb $0x1, (%r14,%rax) movq 0x10(%r15), %rsi shlq $0x3, %rsi movq 0x8(%rsp), %rax addq 0x18(%rax), %rsi addq %rbp, %rsi movq %r13, %rdi callq 0x9e270 incq %r14 addq $0x8, %rbp jmp 0xd17f3 movq 0x60(%rbp), %rdx movq 0x30(%rdx), %rdx leaq 0x30(%rbp), %r13 testq %rdx, %rdx je 0xd18c9 testb $0x1, %al je 0xd1925 xorl %ebp, %ebp leaq 0x10(%rsp), %r14 cmpq %rbp, %rbx je 0xd1962 movq 0x10(%r15), %rax shlq $0x3, %rax movq 0x8(%rsp), %rcx addq 0x18(%rcx), %rax movq (%rax,%rbp,8), %rax movq %rax, 0x10(%rsp) movq 0x60(%rcx), %rcx movq 0x30(%rcx), %rcx movb (%rcx,%rax), %al movl 0x4(%r12), %ecx addq 0x38(%r12), %rcx movb %al, (%rbp,%rcx) testb %al, %al je 0xd189f movq %r13, %rdi movq %r14, %rsi callq 0x9e270 incq %rbp jmp 0xd1854 movq 0x28(%r12), %rsi movq %rbx, %rdi subq $0x1, %rdi jb 0xd17a4 movl 0xc(%r12), %r8d movl $0x1, (%rsi,%r8,4) addq $0x4, %rsi jmp 0xd18ac xorl %ebp, %ebp leaq 0x10(%rsp), %r14 cmpq %rbp, %rbx je 0xd1962 movq 0x10(%r15), %rax movq 0x8(%rsp), %rdx movq 0x18(%rdx), %rcx leaq (%rcx,%rax,8), %rax movq (%rax,%rbp,8), %rax movq %rax, 0x10(%rsp) movq 0x20(%rdx), %rdx subq %rcx, %rdx sarq $0x3, %rdx decq %rdx movl 0x4(%r12), %ecx addq 0x38(%r12), %rcx cmpq %rdx, %rax sete (%rbp,%rcx) jne 0xd1920 movq %r13, %rdi movq %r14, %rsi callq 0x9e270 incq %rbp jmp 0xd18d0 addq %rcx, %rdx movq %rdx, 0x38(%r12) xorl %r14d, %r14d leaq 0x10(%rsp), %rbp cmpq %r14, %rbx je 0xd1962 movq 0x38(%r12), %rax cmpb $0x0, (%rax,%r14) je 0xd195d movq 0x10(%r15), %rax addq %r14, %rax movq %rax, 0x10(%rsp) movq %r13, %rdi movq %rbp, %rsi callq 0xa0f80 incq %r14 jmp 0xd1935 movl 0x4(%r12), %eax movl 0xc(%r12), %edx movl %eax, %ecx orl %edx, %ecx movb (%r12), %dil pushq $0x1 popq %rcx jne 0xd1989 testb $0x1, %dil movl %ecx, %esi cmovnel %ebx, %esi movl %esi, 0x8(%r12) jmp 0xd198e movl 0x8(%r12), %esi movq 0x8(%rsp), %r8 addl %ebx, %eax movl %eax, 0x4(%r12) testb $0x1, %dil cmovel %ebx, %ecx addl %edx, %ecx movl %ecx, 0xc(%r12) addq %rbx, 0x10(%r15) subq %rbx, 0x18(%r15) subq %rbx, (%r8) imull %esi, %ecx cmpl %ecx, %eax jne 0xd1a14 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x70050(%rip), %rdi # 0x141a20 leaq 0x6c9ad(%rip), %rdx # 0x13e384 leaq 0x70090(%rip), %rcx # 0x141a6e pushq $0x27 jmp 0xd1a47 leaq 0x70037(%rip), %rdi # 0x141a20 leaq 0x6c994(%rip), %rdx # 0x13e384 leaq 0x70088(%rip), %rcx # 0x141a7f pushq $0x28 jmp 0xd1a47 leaq 0x7001e(%rip), %rdi # 0x141a20 leaq 0x6c97b(%rip), %rdx # 0x13e384 leaq 0x700e2(%rip), %rcx # 0x141af2 pushq $0x2c jmp 0xd1a47 leaq 0x70005(%rip), %rdi # 0x141a20 leaq 0x6c962(%rip), %rdx # 0x13e384 leaq 0x700f2(%rip), %rcx # 0x141b1b movl $0x89, %esi jmp 0xd1a48 leaq 0x6ffe9(%rip), %rdi # 0x141a20 leaq 0x6c946(%rip), %rdx # 0x13e384 leaq 0x7004f(%rip), %rcx # 0x141a94 pushq $0x2b popq %rsi xorl %eax, %eax callq 0xa6ac0 nop
_ZN12llama_sbatch17add_seq_to_ubatchER12llama_ubatchR16llama_sbatch_seqm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rcx mov rcx, [rdi+60h] test rcx, rcx jz loc_D19C9 mov r15, rdx cmp [rdx+18h], rbx jb loc_D19E2 mov r12, rsi mov rbp, rdi mov esi, [r15] test esi, esi jz short loc_D1649 mov edi, [r12+0Ch] test edi, edi jz short loc_D1649 mov eax, [r12+4] xor edx, edx div edi cmp rax, rbx jnz loc_D1A30 loc_D1649: test esi, esi setnz dl mov al, [r12] cmp al, dl jnz loc_D19FB mov rdx, [rcx+8] test rdx, rdx jz short loc_D169E test al, al jz loc_D1700 mov rsi, [r15+10h] shl rsi, 3 add rsi, [rbp+18h] mov rdi, [r12+10h] xor r8d, r8d loc_D167F: cmp rbx, r8 jz short loc_D16A4 mov r9, [rsi+r8*8] mov r9d, [rdx+r9*4] mov r10d, [r12+4] lea r10, [rdi+r10*4] mov [r10+r8*4], r9d inc r8 jmp short loc_D167F loc_D169E: and qword ptr [r12+10h], 0 loc_D16A4: mov rcx, [rcx+10h] test rcx, rcx jz short loc_D1716 test al, al jz short loc_D171E xor r13d, r13d loc_D16B4: cmp rbx, r13 jz short loc_D1732 mov edi, [r12+4] add rdi, r13 mov rdx, [rbp+8] mov rax, [rbp+60h] imul rdi, rdx shl rdi, 2 add rdi, [r12+18h] mov rcx, [r15+10h] shl rcx, 3 add rcx, [rbp+18h] mov rsi, [rcx+r13*8] imul rsi, rdx shl rsi, 2 add rsi, [rax+10h] shl rdx, 2 call _memcpy inc r13 jmp short loc_D16B4 loc_D1700: mov rsi, [r15+10h] lea rdx, [rdx+rsi*4] mov [r12+10h], rdx mov rcx, [rcx+10h] test rcx, rcx jnz short loc_D1722 loc_D1716: and qword ptr [r12+18h], 0 jmp short loc_D1736 loc_D171E: mov rsi, [r15+10h] loc_D1722: imul rsi, [rbp+8] lea rcx, [rcx+rsi*4] mov [r12+18h], rcx jmp short loc_D1736 loc_D1732: mov al, [r12] loc_D1736: mov rdx, [rbp+60h] mov rcx, [r15+10h] test al, 1 jz short loc_D1779 lea rsi, ds:0[rcx*8] add rsi, [rbp+18h] mov rdi, [r12+20h] xor r8d, r8d loc_D1756: cmp rbx, r8 jz short loc_D17B8 mov r9, [rdx+18h] mov r10, [rsi+r8*8] mov r9d, [r9+r10*4] mov r10d, [r12+4] lea r10, [rdi+r10*4] mov [r10+r8*4], r9d inc r8 jmp short loc_D1756 loc_D1779: lea rsi, ds:0[rcx*4] add rsi, [rdx+18h] mov [r12+20h], rsi mov rdx, [rbp+60h] mov rsi, [rdx+20h] test rsi, rsi jz loc_D18A4 lea rsi, [rsi+rcx*4] mov [r12+28h], rsi loc_D17A4: mov rdx, [rdx+28h] test rdx, rdx jz short loc_D17DF lea rdx, [rdx+rcx*8] mov [r12+30h], rdx jmp short loc_D17DF loc_D17B8: mov edx, [r15] mov rsi, [r12+28h] mov edi, [r12+0Ch] mov [rsi+rdi*4], edx mov rdx, [r15+8] test rdx, rdx jz short loc_D17DF mov rsi, [r12+30h] mov edi, [r12+0Ch] mov [rsi+rdi*8], rdx loc_D17DF: cmp byte ptr [rbp+10h], 1 mov [rsp+48h+var_40], rbp jnz short loc_D1830 lea r13, [rbp+30h] xor ebp, ebp xor r14d, r14d loc_D17F3: cmp rbx, r14 jz loc_D1962 mov eax, [r12+4] add rax, [r12+38h] mov byte ptr [r14+rax], 1 mov rsi, [r15+10h] shl rsi, 3 mov rax, [rsp+48h+var_40] add rsi, [rax+18h] add rsi, rbp mov rdi, r13 call __ZNSt6vectorImSaImEE9push_backERKm; std::vector<ulong>::push_back(ulong const&) inc r14 add rbp, 8 jmp short loc_D17F3 loc_D1830: mov rdx, [rbp+60h] mov rdx, [rdx+30h] lea r13, [rbp+30h] test rdx, rdx jz loc_D18C9 test al, 1 jz loc_D1925 xor ebp, ebp lea r14, [rsp+48h+var_38] loc_D1854: cmp rbx, rbp jz loc_D1962 mov rax, [r15+10h] shl rax, 3 mov rcx, [rsp+48h+var_40] add rax, [rcx+18h] mov rax, [rax+rbp*8] mov [rsp+48h+var_38], rax mov rcx, [rcx+60h] mov rcx, [rcx+30h] mov al, [rcx+rax] mov ecx, [r12+4] add rcx, [r12+38h] mov [rbp+rcx+0], al test al, al jz short loc_D189F mov rdi, r13 mov rsi, r14 call __ZNSt6vectorImSaImEE9push_backERKm; std::vector<ulong>::push_back(ulong const&) loc_D189F: inc rbp jmp short loc_D1854 loc_D18A4: mov rsi, [r12+28h] mov rdi, rbx loc_D18AC: sub rdi, 1 jb loc_D17A4 mov r8d, [r12+0Ch] mov dword ptr [rsi+r8*4], 1 add rsi, 4 jmp short loc_D18AC loc_D18C9: xor ebp, ebp lea r14, [rsp+48h+var_38] loc_D18D0: cmp rbx, rbp jz loc_D1962 mov rax, [r15+10h] mov rdx, [rsp+48h+var_40] mov rcx, [rdx+18h] lea rax, [rcx+rax*8] mov rax, [rax+rbp*8] mov [rsp+48h+var_38], rax mov rdx, [rdx+20h] sub rdx, rcx sar rdx, 3 dec rdx mov ecx, [r12+4] add rcx, [r12+38h] cmp rax, rdx setz byte ptr [rbp+rcx+0] jnz short loc_D1920 mov rdi, r13 mov rsi, r14 call __ZNSt6vectorImSaImEE9push_backERKm; std::vector<ulong>::push_back(ulong const&) loc_D1920: inc rbp jmp short loc_D18D0 loc_D1925: add rdx, rcx mov [r12+38h], rdx xor r14d, r14d lea rbp, [rsp+48h+var_38] loc_D1935: cmp rbx, r14 jz short loc_D1962 mov rax, [r12+38h] cmp byte ptr [rax+r14], 0 jz short loc_D195D mov rax, [r15+10h] add rax, r14 mov [rsp+48h+var_38], rax mov rdi, r13 mov rsi, rbp call __ZNSt6vectorImSaImEE12emplace_backIJmEEERmDpOT_; std::vector<ulong>::emplace_back<ulong>(ulong &&) loc_D195D: inc r14 jmp short loc_D1935 loc_D1962: mov eax, [r12+4] mov edx, [r12+0Ch] mov ecx, eax or ecx, edx mov dil, [r12] push 1 pop rcx jnz short loc_D1989 test dil, 1 mov esi, ecx cmovnz esi, ebx mov [r12+8], esi jmp short loc_D198E loc_D1989: mov esi, [r12+8] loc_D198E: mov r8, [rsp+48h+var_40] add eax, ebx mov [r12+4], eax test dil, 1 cmovz ecx, ebx add ecx, edx mov [r12+0Ch], ecx add [r15+10h], rbx sub [r15+18h], rbx sub [r8], rbx imul ecx, esi cmp eax, ecx jnz short loc_D1A14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D19C9: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBatchNullptr; "batch != nullptr" push 27h ; ''' jmp short loc_D1A47 loc_D19E2: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aLengthSeqLengt; "length <= seq.length" push 28h ; '(' jmp short loc_D1A47 loc_D19FB: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSeqNSeqId0Ubat; "(seq.n_seq_id != 0) == ubatch.equal_seq"... push 2Ch ; ',' jmp short loc_D1A47 loc_D1A14: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aUbatchNTokensU; "ubatch.n_tokens == ubatch.n_seq_tokens "... mov esi, 89h jmp short loc_D1A48 loc_D1A30: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSeqNSeqId0Ubat_0; "seq.n_seq_id == 0 || ubatch.n_seqs == 0"... push 2Bh ; '+' loc_D1A47: pop rsi loc_D1A48: xor eax, eax call _ggml_abort nop
long long llama_sbatch::add_seq_to_ubatch(long long a1, char *a2, long long a3, unsigned long long a4) { long long v5; // rcx unsigned int v9; // edi char v10; // al long long v11; // rdx long long v12; // rsi long long v13; // rdi long long i; // r8 long long v15; // rcx long long j; // r13 long long v17; // rsi long long v18; // rdx long long v19; // rcx long long v20; // rsi long long v21; // rdi long long k; // r8 long long v23; // rdx long long v24; // rsi long long v25; // rdx long long v26; // rdx long long v27; // r13 long long v28; // rbp long long m; // r14 long long v30; // rdx long long v31; // r13 long long n; // rbp char v33; // al long long v34; // rsi unsigned long long v35; // rdi long long jj; // rbp long long v38; // rcx long long v39; // rax long long v40; // rdx long long ii; // r14 int v42; // eax int v43; // edx char v44; // di int v45; // ecx int v46; // esi long long result; // rax int v48; // ecx const char *v49; // rcx unsigned long long v50; // rsi long long v51; // [rsp-8h] [rbp-50h] _QWORD *v52; // [rsp+8h] [rbp-40h] _QWORD v53[7]; // [rsp+10h] [rbp-38h] BYREF v5 = *(_QWORD *)(a1 + 96); if ( !v5 ) { v49 = "batch != nullptr"; v51 = 39LL; LABEL_71: v50 = v51; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-batch.cpp", v51, "GGML_ASSERT(%s) failed", v49); return llama_sbatch::split_simple( (llama_sbatch *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-batch.cpp", v50); } if ( *(_QWORD *)(a3 + 24) < a4 ) { v49 = "length <= seq.length"; v51 = 40LL; goto LABEL_71; } if ( *(_DWORD *)a3 ) { v9 = *((_DWORD *)a2 + 3); if ( v9 ) { if ( *((_DWORD *)a2 + 1) / v9 != a4 ) { v49 = "seq.n_seq_id == 0 || ubatch.n_seqs == 0 || length == (size_t) ubatch.n_tokens / ubatch.n_seqs"; v51 = 43LL; goto LABEL_71; } } } v10 = *a2; if ( *a2 != (*(_DWORD *)a3 != 0) ) { v49 = "(seq.n_seq_id != 0) == ubatch.equal_seqs"; v51 = 44LL; goto LABEL_71; } v11 = *(_QWORD *)(v5 + 8); if ( v11 ) { if ( !v10 ) { v17 = *(_QWORD *)(a3 + 16); *((_QWORD *)a2 + 2) = v11 + 4 * v17; v15 = *(_QWORD *)(v5 + 16); if ( v15 ) { LABEL_21: *((_QWORD *)a2 + 3) = v15 + 4 * *(_QWORD *)(a1 + 8) * v17; goto LABEL_23; } LABEL_19: *((_QWORD *)a2 + 3) = 0LL; goto LABEL_23; } v12 = *(_QWORD *)(a1 + 24) + 8LL * *(_QWORD *)(a3 + 16); v13 = *((_QWORD *)a2 + 2); for ( i = 0LL; a4 != i; ++i ) *(_DWORD *)(v13 + 4LL * *((unsigned int *)a2 + 1) + 4 * i) = *(_DWORD *)(v11 + 4LL * *(_QWORD *)(v12 + 8 * i)); } else { *((_QWORD *)a2 + 2) = 0LL; } v15 = *(_QWORD *)(v5 + 16); if ( !v15 ) goto LABEL_19; if ( !v10 ) { v17 = *(_QWORD *)(a3 + 16); goto LABEL_21; } for ( j = 0LL; a4 != j; ++j ) memcpy( *((_QWORD *)a2 + 3) + 4 * *(_QWORD *)(a1 + 8) * (j + *((unsigned int *)a2 + 1)), *(_QWORD *)(*(_QWORD *)(a1 + 96) + 16LL) + 4LL * *(_QWORD *)(a1 + 8) * *(_QWORD *)(*(_QWORD *)(a1 + 24) + 8LL * *(_QWORD *)(a3 + 16) + 8 * j), 4LL * *(_QWORD *)(a1 + 8)); v10 = *a2; LABEL_23: v18 = *(_QWORD *)(a1 + 96); v19 = *(_QWORD *)(a3 + 16); if ( (v10 & 1) != 0 ) { v20 = *(_QWORD *)(a1 + 24) + 8 * v19; v21 = *((_QWORD *)a2 + 4); for ( k = 0LL; a4 != k; ++k ) *(_DWORD *)(v21 + 4LL * *((unsigned int *)a2 + 1) + 4 * k) = *(_DWORD *)(*(_QWORD *)(v18 + 24) + 4LL * *(_QWORD *)(v20 + 8 * k)); *(_DWORD *)(*((_QWORD *)a2 + 5) + 4LL * *((unsigned int *)a2 + 3)) = *(_DWORD *)a3; v26 = *(_QWORD *)(a3 + 8); if ( v26 ) *(_QWORD *)(*((_QWORD *)a2 + 6) + 8LL * *((unsigned int *)a2 + 3)) = v26; } else { *((_QWORD *)a2 + 4) = *(_QWORD *)(v18 + 24) + 4 * v19; v23 = *(_QWORD *)(a1 + 96); v24 = *(_QWORD *)(v23 + 32); if ( v24 ) { *((_QWORD *)a2 + 5) = v24 + 4 * v19; } else { v34 = *((_QWORD *)a2 + 5); v35 = a4; while ( v35-- != 0 ) { *(_DWORD *)(v34 + 4LL * *((unsigned int *)a2 + 3)) = 1; v34 += 4LL; } } v25 = *(_QWORD *)(v23 + 40); if ( v25 ) *((_QWORD *)a2 + 6) = v25 + 8 * v19; } v52 = (_QWORD *)a1; if ( *(_BYTE *)(a1 + 16) == 1 ) { v27 = a1 + 48; v28 = 0LL; for ( m = 0LL; a4 != m; ++m ) { *(_BYTE *)(m + *((_QWORD *)a2 + 7) + *((unsigned int *)a2 + 1)) = 1; std::vector<unsigned long>::push_back(v27, v28 + v52[3] + 8LL * *(_QWORD *)(a3 + 16)); v28 += 8LL; } } else { v30 = *(_QWORD *)(*(_QWORD *)(a1 + 96) + 48LL); v31 = a1 + 48; if ( v30 ) { if ( (v10 & 1) != 0 ) { for ( n = 0LL; a4 != n; ++n ) { v53[0] = *(_QWORD *)(v52[3] + 8LL * *(_QWORD *)(a3 + 16) + 8 * n); v33 = *(_BYTE *)(*(_QWORD *)(v52[12] + 48LL) + v53[0]); *(_BYTE *)(n + *((_QWORD *)a2 + 7) + *((unsigned int *)a2 + 1)) = v33; if ( v33 ) std::vector<unsigned long>::push_back(v31, v53); } } else { *((_QWORD *)a2 + 7) = v19 + v30; for ( ii = 0LL; a4 != ii; ++ii ) { if ( *(_BYTE *)(*((_QWORD *)a2 + 7) + ii) ) { v53[0] = ii + *(_QWORD *)(a3 + 16); std::vector<unsigned long>::emplace_back<unsigned long>(v31, v53); } } } } else { for ( jj = 0LL; a4 != jj; ++jj ) { v38 = v52[3]; v39 = *(_QWORD *)(v38 + 8LL * *(_QWORD *)(a3 + 16) + 8 * jj); v53[0] = v39; v40 = ((v52[4] - v38) >> 3) - 1; *(_BYTE *)(jj + *((_QWORD *)a2 + 7) + *((unsigned int *)a2 + 1)) = v39 == v40; if ( v39 == v40 ) std::vector<unsigned long>::push_back(v31, v53); } } } v42 = *((_DWORD *)a2 + 1); v43 = *((_DWORD *)a2 + 3); v44 = *a2; v45 = 1; if ( v43 | v42 ) { v46 = *((_DWORD *)a2 + 2); } else { v46 = 1; if ( (v44 & 1) != 0 ) v46 = a4; *((_DWORD *)a2 + 2) = v46; } result = (unsigned int)(a4 + v42); *((_DWORD *)a2 + 1) = result; if ( (v44 & 1) == 0 ) v45 = a4; v48 = v43 + v45; *((_DWORD *)a2 + 3) = v48; *(_QWORD *)(a3 + 16) += a4; *(_QWORD *)(a3 + 24) -= a4; *v52 -= a4; if ( (_DWORD)result != v46 * v48 ) { v50 = 137LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-batch.cpp", 137LL, "GGML_ASSERT(%s) failed", "ubatch.n_tokens == ubatch.n_seq_tokens * ubatch.n_seqs"); return llama_sbatch::split_simple( (llama_sbatch *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-batch.cpp", v50); } return result; }
add_seq_to_ubatch: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV RCX,qword ptr [RDI + 0x60] TEST RCX,RCX JZ 0x001d19c9 MOV R15,RDX CMP qword ptr [RDX + 0x18],RBX JC 0x001d19e2 MOV R12,RSI MOV RBP,RDI MOV ESI,dword ptr [R15] TEST ESI,ESI JZ 0x001d1649 MOV EDI,dword ptr [R12 + 0xc] TEST EDI,EDI JZ 0x001d1649 MOV EAX,dword ptr [R12 + 0x4] XOR EDX,EDX DIV EDI CMP RAX,RBX JNZ 0x001d1a30 LAB_001d1649: TEST ESI,ESI SETNZ DL MOV AL,byte ptr [R12] CMP AL,DL JNZ 0x001d19fb MOV RDX,qword ptr [RCX + 0x8] TEST RDX,RDX JZ 0x001d169e TEST AL,AL JZ 0x001d1700 MOV RSI,qword ptr [R15 + 0x10] SHL RSI,0x3 ADD RSI,qword ptr [RBP + 0x18] MOV RDI,qword ptr [R12 + 0x10] XOR R8D,R8D LAB_001d167f: CMP RBX,R8 JZ 0x001d16a4 MOV R9,qword ptr [RSI + R8*0x8] MOV R9D,dword ptr [RDX + R9*0x4] MOV R10D,dword ptr [R12 + 0x4] LEA R10,[RDI + R10*0x4] MOV dword ptr [R10 + R8*0x4],R9D INC R8 JMP 0x001d167f LAB_001d169e: AND qword ptr [R12 + 0x10],0x0 LAB_001d16a4: MOV RCX,qword ptr [RCX + 0x10] TEST RCX,RCX JZ 0x001d1716 TEST AL,AL JZ 0x001d171e XOR R13D,R13D LAB_001d16b4: CMP RBX,R13 JZ 0x001d1732 MOV EDI,dword ptr [R12 + 0x4] ADD RDI,R13 MOV RDX,qword ptr [RBP + 0x8] MOV RAX,qword ptr [RBP + 0x60] IMUL RDI,RDX SHL RDI,0x2 ADD RDI,qword ptr [R12 + 0x18] MOV RCX,qword ptr [R15 + 0x10] SHL RCX,0x3 ADD RCX,qword ptr [RBP + 0x18] MOV RSI,qword ptr [RCX + R13*0x8] IMUL RSI,RDX SHL RSI,0x2 ADD RSI,qword ptr [RAX + 0x10] SHL RDX,0x2 CALL 0x001a07f0 INC R13 JMP 0x001d16b4 LAB_001d1700: MOV RSI,qword ptr [R15 + 0x10] LEA RDX,[RDX + RSI*0x4] MOV qword ptr [R12 + 0x10],RDX MOV RCX,qword ptr [RCX + 0x10] TEST RCX,RCX JNZ 0x001d1722 LAB_001d1716: AND qword ptr [R12 + 0x18],0x0 JMP 0x001d1736 LAB_001d171e: MOV RSI,qword ptr [R15 + 0x10] LAB_001d1722: IMUL RSI,qword ptr [RBP + 0x8] LEA RCX,[RCX + RSI*0x4] MOV qword ptr [R12 + 0x18],RCX JMP 0x001d1736 LAB_001d1732: MOV AL,byte ptr [R12] LAB_001d1736: MOV RDX,qword ptr [RBP + 0x60] MOV RCX,qword ptr [R15 + 0x10] TEST AL,0x1 JZ 0x001d1779 LEA RSI,[RCX*0x8] ADD RSI,qword ptr [RBP + 0x18] MOV RDI,qword ptr [R12 + 0x20] XOR R8D,R8D LAB_001d1756: CMP RBX,R8 JZ 0x001d17b8 MOV R9,qword ptr [RDX + 0x18] MOV R10,qword ptr [RSI + R8*0x8] MOV R9D,dword ptr [R9 + R10*0x4] MOV R10D,dword ptr [R12 + 0x4] LEA R10,[RDI + R10*0x4] MOV dword ptr [R10 + R8*0x4],R9D INC R8 JMP 0x001d1756 LAB_001d1779: LEA RSI,[RCX*0x4] ADD RSI,qword ptr [RDX + 0x18] MOV qword ptr [R12 + 0x20],RSI MOV RDX,qword ptr [RBP + 0x60] MOV RSI,qword ptr [RDX + 0x20] TEST RSI,RSI JZ 0x001d18a4 LEA RSI,[RSI + RCX*0x4] MOV qword ptr [R12 + 0x28],RSI LAB_001d17a4: MOV RDX,qword ptr [RDX + 0x28] TEST RDX,RDX JZ 0x001d17df LEA RDX,[RDX + RCX*0x8] MOV qword ptr [R12 + 0x30],RDX JMP 0x001d17df LAB_001d17b8: MOV EDX,dword ptr [R15] MOV RSI,qword ptr [R12 + 0x28] MOV EDI,dword ptr [R12 + 0xc] MOV dword ptr [RSI + RDI*0x4],EDX MOV RDX,qword ptr [R15 + 0x8] TEST RDX,RDX JZ 0x001d17df MOV RSI,qword ptr [R12 + 0x30] MOV EDI,dword ptr [R12 + 0xc] MOV qword ptr [RSI + RDI*0x8],RDX LAB_001d17df: CMP byte ptr [RBP + 0x10],0x1 MOV qword ptr [RSP + 0x8],RBP JNZ 0x001d1830 LEA R13,[RBP + 0x30] XOR EBP,EBP XOR R14D,R14D LAB_001d17f3: CMP RBX,R14 JZ 0x001d1962 MOV EAX,dword ptr [R12 + 0x4] ADD RAX,qword ptr [R12 + 0x38] MOV byte ptr [R14 + RAX*0x1],0x1 MOV RSI,qword ptr [R15 + 0x10] SHL RSI,0x3 MOV RAX,qword ptr [RSP + 0x8] ADD RSI,qword ptr [RAX + 0x18] ADD RSI,RBP MOV RDI,R13 CALL 0x0019e270 INC R14 ADD RBP,0x8 JMP 0x001d17f3 LAB_001d1830: MOV RDX,qword ptr [RBP + 0x60] MOV RDX,qword ptr [RDX + 0x30] LEA R13,[RBP + 0x30] TEST RDX,RDX JZ 0x001d18c9 TEST AL,0x1 JZ 0x001d1925 XOR EBP,EBP LEA R14,[RSP + 0x10] LAB_001d1854: CMP RBX,RBP JZ 0x001d1962 MOV RAX,qword ptr [R15 + 0x10] SHL RAX,0x3 MOV RCX,qword ptr [RSP + 0x8] ADD RAX,qword ptr [RCX + 0x18] MOV RAX,qword ptr [RAX + RBP*0x8] MOV qword ptr [RSP + 0x10],RAX MOV RCX,qword ptr [RCX + 0x60] MOV RCX,qword ptr [RCX + 0x30] MOV AL,byte ptr [RCX + RAX*0x1] MOV ECX,dword ptr [R12 + 0x4] ADD RCX,qword ptr [R12 + 0x38] MOV byte ptr [RBP + RCX*0x1],AL TEST AL,AL JZ 0x001d189f MOV RDI,R13 MOV RSI,R14 CALL 0x0019e270 LAB_001d189f: INC RBP JMP 0x001d1854 LAB_001d18a4: MOV RSI,qword ptr [R12 + 0x28] MOV RDI,RBX LAB_001d18ac: SUB RDI,0x1 JC 0x001d17a4 MOV R8D,dword ptr [R12 + 0xc] MOV dword ptr [RSI + R8*0x4],0x1 ADD RSI,0x4 JMP 0x001d18ac LAB_001d18c9: XOR EBP,EBP LEA R14,[RSP + 0x10] LAB_001d18d0: CMP RBX,RBP JZ 0x001d1962 MOV RAX,qword ptr [R15 + 0x10] MOV RDX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RDX + 0x18] LEA RAX,[RCX + RAX*0x8] MOV RAX,qword ptr [RAX + RBP*0x8] MOV qword ptr [RSP + 0x10],RAX MOV RDX,qword ptr [RDX + 0x20] SUB RDX,RCX SAR RDX,0x3 DEC RDX MOV ECX,dword ptr [R12 + 0x4] ADD RCX,qword ptr [R12 + 0x38] CMP RAX,RDX SETZ byte ptr [RBP + RCX*0x1] JNZ 0x001d1920 MOV RDI,R13 MOV RSI,R14 CALL 0x0019e270 LAB_001d1920: INC RBP JMP 0x001d18d0 LAB_001d1925: ADD RDX,RCX MOV qword ptr [R12 + 0x38],RDX XOR R14D,R14D LEA RBP,[RSP + 0x10] LAB_001d1935: CMP RBX,R14 JZ 0x001d1962 MOV RAX,qword ptr [R12 + 0x38] CMP byte ptr [RAX + R14*0x1],0x0 JZ 0x001d195d MOV RAX,qword ptr [R15 + 0x10] ADD RAX,R14 MOV qword ptr [RSP + 0x10],RAX MOV RDI,R13 MOV RSI,RBP CALL 0x001a0f80 LAB_001d195d: INC R14 JMP 0x001d1935 LAB_001d1962: MOV EAX,dword ptr [R12 + 0x4] MOV EDX,dword ptr [R12 + 0xc] MOV ECX,EAX OR ECX,EDX MOV DIL,byte ptr [R12] PUSH 0x1 POP RCX JNZ 0x001d1989 TEST DIL,0x1 MOV ESI,ECX CMOVNZ ESI,EBX MOV dword ptr [R12 + 0x8],ESI JMP 0x001d198e LAB_001d1989: MOV ESI,dword ptr [R12 + 0x8] LAB_001d198e: MOV R8,qword ptr [RSP + 0x8] ADD EAX,EBX MOV dword ptr [R12 + 0x4],EAX TEST DIL,0x1 CMOVZ ECX,EBX ADD ECX,EDX MOV dword ptr [R12 + 0xc],ECX ADD qword ptr [R15 + 0x10],RBX SUB qword ptr [R15 + 0x18],RBX SUB qword ptr [R8],RBX IMUL ECX,ESI CMP EAX,ECX JNZ 0x001d1a14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d19c9: LEA RDI,[0x241a20] LEA RDX,[0x23e384] LEA RCX,[0x241a6e] PUSH 0x27 JMP 0x001d1a47 LAB_001d19e2: LEA RDI,[0x241a20] LEA RDX,[0x23e384] LEA RCX,[0x241a7f] PUSH 0x28 JMP 0x001d1a47 LAB_001d19fb: LEA RDI,[0x241a20] LEA RDX,[0x23e384] LEA RCX,[0x241af2] PUSH 0x2c JMP 0x001d1a47 LAB_001d1a14: LEA RDI,[0x241a20] LEA RDX,[0x23e384] LEA RCX,[0x241b1b] MOV ESI,0x89 JMP 0x001d1a48 LAB_001d1a30: LEA RDI,[0x241a20] LEA RDX,[0x23e384] LEA RCX,[0x241a94] PUSH 0x2b LAB_001d1a47: POP RSI LAB_001d1a48: XOR EAX,EAX CALL 0x001a6ac0
/* llama_sbatch::add_seq_to_ubatch(llama_ubatch&, llama_sbatch_seq&, unsigned long) */ void __thiscall llama_sbatch::add_seq_to_ubatch (llama_sbatch *this,llama_ubatch *param_1,llama_sbatch_seq *param_2,ulong param_3) { vector<unsigned_long,std::allocator<unsigned_long>> *this_00; char cVar1; long lVar2; long lVar3; long lVar4; llama_ubatch lVar5; int iVar6; int iVar7; char *pcVar8; int iVar9; long lVar10; int iVar11; long lVar12; ulong uVar13; bool bVar14; int8 uStack_50; ulong local_38; lVar10 = *(long *)(this + 0x60); if (lVar10 == 0) { pcVar8 = "batch != nullptr"; uStack_50 = 0x27; goto LAB_001d1a48; } if (*(ulong *)(param_2 + 0x18) < param_3) { pcVar8 = "length <= seq.length"; uStack_50 = 0x28; goto LAB_001d1a48; } if (((*(int *)param_2 != 0) && (*(uint *)(param_1 + 0xc) != 0)) && ((ulong)*(uint *)(param_1 + 4) / (ulong)*(uint *)(param_1 + 0xc) != param_3)) { pcVar8 = "seq.n_seq_id == 0 || ubatch.n_seqs == 0 || length == (size_t) ubatch.n_tokens / ubatch.n_seqs"; uStack_50 = 0x2b; goto LAB_001d1a48; } lVar5 = *param_1; if (lVar5 != (llama_ubatch)(*(int *)param_2 != 0)) { pcVar8 = "(seq.n_seq_id != 0) == ubatch.equal_seqs"; uStack_50 = 0x2c; goto LAB_001d1a48; } lVar2 = *(long *)(lVar10 + 8); if (lVar2 == 0) { *(int8 *)(param_1 + 0x10) = 0; LAB_001d16a4: lVar10 = *(long *)(lVar10 + 0x10); if (lVar10 == 0) { LAB_001d1716: *(int8 *)(param_1 + 0x18) = 0; } else { if (lVar5 == (llama_ubatch)0x0) { lVar12 = *(long *)(param_2 + 0x10); goto LAB_001d1722; } for (uVar13 = 0; param_3 != uVar13; uVar13 = uVar13 + 1) { lVar10 = *(long *)(this + 8); memcpy((void *)((*(uint *)(param_1 + 4) + uVar13) * lVar10 * 4 + *(long *)(param_1 + 0x18)), (void *)(*(long *)(*(long *)(param_2 + 0x10) * 8 + *(long *)(this + 0x18) + uVar13 * 8) * lVar10 * 4 + *(long *)(*(long *)(this + 0x60) + 0x10) ),lVar10 << 2); } lVar5 = *param_1; } } else { if (lVar5 != (llama_ubatch)0x0) { lVar12 = *(long *)(param_2 + 0x10); lVar3 = *(long *)(this + 0x18); lVar4 = *(long *)(param_1 + 0x10); for (uVar13 = 0; param_3 != uVar13; uVar13 = uVar13 + 1) { *(int4 *)(lVar4 + (ulong)*(uint *)(param_1 + 4) * 4 + uVar13 * 4) = *(int4 *)(lVar2 + *(long *)(lVar12 * 8 + lVar3 + uVar13 * 8) * 4); } goto LAB_001d16a4; } lVar12 = *(long *)(param_2 + 0x10); *(long *)(param_1 + 0x10) = lVar2 + lVar12 * 4; lVar10 = *(long *)(lVar10 + 0x10); if (lVar10 == 0) goto LAB_001d1716; LAB_001d1722: *(long *)(param_1 + 0x18) = lVar10 + lVar12 * *(long *)(this + 8) * 4; } lVar10 = *(long *)(this + 0x60); lVar2 = *(long *)(param_2 + 0x10); if (((byte)lVar5 & 1) == 0) { *(long *)(param_1 + 0x20) = lVar2 * 4 + *(long *)(lVar10 + 0x18); lVar10 = *(long *)(this + 0x60); lVar12 = *(long *)(lVar10 + 0x20); if (lVar12 == 0) { lVar12 = *(long *)(param_1 + 0x28); uVar13 = param_3; while (bVar14 = uVar13 != 0, uVar13 = uVar13 - 1, bVar14) { *(int4 *)(lVar12 + (ulong)*(uint *)(param_1 + 0xc) * 4) = 1; lVar12 = lVar12 + 4; } } else { *(long *)(param_1 + 0x28) = lVar12 + lVar2 * 4; } lVar10 = *(long *)(lVar10 + 0x28); if (lVar10 != 0) { *(long *)(param_1 + 0x30) = lVar10 + lVar2 * 8; } } else { lVar12 = *(long *)(this + 0x18); lVar3 = *(long *)(param_1 + 0x20); for (uVar13 = 0; param_3 != uVar13; uVar13 = uVar13 + 1) { *(int4 *)(lVar3 + (ulong)*(uint *)(param_1 + 4) * 4 + uVar13 * 4) = *(int4 *) (*(long *)(lVar10 + 0x18) + *(long *)(lVar2 * 8 + lVar12 + uVar13 * 8) * 4); } *(int4 *)(*(long *)(param_1 + 0x28) + (ulong)*(uint *)(param_1 + 0xc) * 4) = *(int4 *)param_2; if (*(long *)(param_2 + 8) != 0) { *(long *)(*(long *)(param_1 + 0x30) + (ulong)*(uint *)(param_1 + 0xc) * 8) = *(long *)(param_2 + 8); } } if (this[0x10] == (llama_sbatch)0x1) { lVar10 = 0; for (uVar13 = 0; param_3 != uVar13; uVar13 = uVar13 + 1) { *(int1 *)(uVar13 + (ulong)*(uint *)(param_1 + 4) + *(long *)(param_1 + 0x38)) = 1; std::vector<unsigned_long,std::allocator<unsigned_long>>::push_back ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), (ulong *)(*(long *)(param_2 + 0x10) * 8 + *(long *)(this + 0x18) + lVar10)); lVar10 = lVar10 + 8; } } else { this_00 = (vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30); if (*(long *)(*(long *)(this + 0x60) + 0x30) == 0) { for (uVar13 = 0; param_3 != uVar13; uVar13 = uVar13 + 1) { local_38 = *(ulong *)(*(long *)(this + 0x18) + *(long *)(param_2 + 0x10) * 8 + uVar13 * 8); bVar14 = local_38 == (*(long *)(this + 0x20) - *(long *)(this + 0x18) >> 3) - 1U; *(bool *)(uVar13 + (ulong)*(uint *)(param_1 + 4) + *(long *)(param_1 + 0x38)) = bVar14; if (bVar14) { std::vector<unsigned_long,std::allocator<unsigned_long>>::push_back(this_00,&local_38); } } } else if (((byte)lVar5 & 1) == 0) { *(long *)(param_1 + 0x38) = *(long *)(*(long *)(this + 0x60) + 0x30) + lVar2; for (uVar13 = 0; param_3 != uVar13; uVar13 = uVar13 + 1) { if (*(char *)(*(long *)(param_1 + 0x38) + uVar13) != '\0') { local_38 = *(long *)(param_2 + 0x10) + uVar13; std::vector<unsigned_long,std::allocator<unsigned_long>>::emplace_back<unsigned_long> (this_00,&local_38); } } } else { for (uVar13 = 0; param_3 != uVar13; uVar13 = uVar13 + 1) { local_38 = *(ulong *)(*(long *)(param_2 + 0x10) * 8 + *(long *)(this + 0x18) + uVar13 * 8); cVar1 = *(char *)(*(long *)(*(long *)(this + 0x60) + 0x30) + local_38); *(char *)(uVar13 + (ulong)*(uint *)(param_1 + 4) + *(long *)(param_1 + 0x38)) = cVar1; if (cVar1 != '\0') { std::vector<unsigned_long,std::allocator<unsigned_long>>::push_back(this_00,&local_38); } } } } iVar9 = (int)param_3; if (*(int *)(param_1 + 4) == 0 && *(int *)(param_1 + 0xc) == 0) { iVar11 = 1; if (((byte)*param_1 & 1) != 0) { iVar11 = iVar9; } *(int *)(param_1 + 8) = iVar11; } else { iVar11 = *(int *)(param_1 + 8); } iVar6 = *(int *)(param_1 + 4) + iVar9; *(int *)(param_1 + 4) = iVar6; iVar7 = 1; if (((byte)*param_1 & 1) == 0) { iVar7 = iVar9; } iVar7 = iVar7 + *(int *)(param_1 + 0xc); *(int *)(param_1 + 0xc) = iVar7; *(ulong *)(param_2 + 0x10) = *(long *)(param_2 + 0x10) + param_3; *(ulong *)(param_2 + 0x18) = *(long *)(param_2 + 0x18) - param_3; *(ulong *)this = *(long *)this - param_3; if (iVar6 == iVar7 * iVar11) { return; } pcVar8 = "ubatch.n_tokens == ubatch.n_seq_tokens * ubatch.n_seqs"; uStack_50 = 0x89; LAB_001d1a48: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-batch.cpp", uStack_50,"GGML_ASSERT(%s) failed",pcVar8); }
2,861
ma_check_print_info
eloqsql/storage/maria/ma_check_standalone.h
void _ma_check_print_info(HA_CHECK *param __attribute__((unused)), const char *fmt,...) { va_list args; DBUG_ENTER("_ma_check_print_info"); DBUG_PRINT("enter", ("format: %s", fmt)); va_start(args,fmt); vfprintf(stdout, fmt, args); fputc('\n',stdout); va_end(args); DBUG_VOID_RETURN; }
O3
c
ma_check_print_info: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0xc8, %rsp movq %rsi, %r10 leaq -0xd0(%rbp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x312c9 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %rcx movq %rsi, 0x10(%rcx) leaq 0x10(%rbp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rcx) movq 0x355cb3(%rip), %rbx # 0x386fa0 movq (%rbx), %rdi movl $0x1, %esi movq %r10, %rdx callq 0x29700 movq (%rbx), %rsi movl $0xa, %edi callq 0x29680 addq $0xc8, %rsp popq %rbx popq %rbp retq
_ma_check_print_info: push rbp mov rbp, rsp push rbx sub rsp, 0C8h mov r10, rsi lea rsi, [rbp+var_D0] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_312C9 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_312C9: lea rcx, [rbp+var_20] mov [rcx+10h], rsi lea rax, [rbp+arg_0] mov [rcx+8], rax mov rax, 3000000010h mov [rcx], rax mov rbx, cs:stdout_ptr mov rdi, [rbx] mov esi, 1 mov rdx, r10 call ___vfprintf_chk mov rsi, [rbx] mov edi, 0Ah call _fputc add rsp, 0C8h pop rbx pop rbp retn
long long ma_check_print_info( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+10h] [rbp-C0h] long long v18; // [rsp+18h] [rbp-B8h] long long v19; // [rsp+20h] [rbp-B0h] long long v20; // [rsp+28h] [rbp-A8h] __m128 v21; // [rsp+30h] [rbp-A0h] __m128 v22; // [rsp+40h] [rbp-90h] __m128 v23; // [rsp+50h] [rbp-80h] __m128 v24; // [rsp+60h] [rbp-70h] __m128 v25; // [rsp+70h] [rbp-60h] __m128 v26; // [rsp+80h] [rbp-50h] __m128 v27; // [rsp+90h] [rbp-40h] __m128 v28; // [rsp+A0h] [rbp-30h] _QWORD v29[4]; // [rsp+B0h] [rbp-20h] BYREF v21 = a1; v22 = a2; v23 = a3; v24 = a4; v25 = a5; v26 = a6; v27 = a7; v28 = a8; v17 = a11; v18 = a12; v19 = a13; v20 = a14; v29[2] = &v16; v29[1] = &a15; v29[0] = 0x3000000010LL; __vfprintf_chk(stdout, 1LL, a10, v29); return fputc(10LL, stdout); }
_ma_check_print_info: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xc8 MOV R10,RSI LEA RSI,[RBP + -0xd0] 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 0x001312c9 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_001312c9: LEA RCX,[RBP + -0x20] MOV qword ptr [RCX + 0x10],RSI LEA RAX,[RBP + 0x10] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RCX],RAX MOV RBX,qword ptr [0x00486fa0] MOV RDI,qword ptr [RBX] MOV ESI,0x1 MOV RDX,R10 CALL 0x00129700 MOV RSI,qword ptr [RBX] MOV EDI,0xa CALL 0x00129680 ADD RSP,0xc8 POP RBX POP RBP RET
void _ma_check_print_info (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int *puVar1; char in_AL; 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; int8 local_28; int1 *local_20; int1 *local_18; puVar1 = PTR_stdout_00486fa0; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000010; local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; __vfprintf_chk(*(int8 *)PTR_stdout_00486fa0,1,param_10); fputc(10,*(FILE **)puVar1); return; }
2,862
ma_kpos
eloqsql/storage/maria/ma_search.c
my_off_t _ma_kpos(uint nod_flag, const uchar *after_key) { after_key-=nod_flag; switch (nod_flag) { #if SIZEOF_OFF_T > 4 case 7: return mi_uint7korr(after_key)*maria_block_size; case 6: return mi_uint6korr(after_key)*maria_block_size; case 5: return mi_uint5korr(after_key)*maria_block_size; #else case 7: after_key++; case 6: after_key++; case 5: after_key++; #endif case 4: return ((my_off_t) mi_uint4korr(after_key))*maria_block_size; case 3: return ((my_off_t) mi_uint3korr(after_key))*maria_block_size; case 2: return (my_off_t) (mi_uint2korr(after_key)*maria_block_size); case 1: return (uint) (*after_key)*maria_block_size; case 0: /* At leaf page */ default: /* Impossible */ return(HA_OFFSET_ERROR); } }
O0
c
ma_kpos: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movl -0xc(%rbp), %eax movl %eax, %ecx movq -0x18(%rbp), %rax subq %rcx, %rax movq %rax, -0x18(%rbp) movl -0xc(%rbp), %eax movq %rax, -0x20(%rbp) subq $0x7, %rax ja 0x9558d movq -0x20(%rbp), %rax leaq 0xc3bf9(%rip), %rcx # 0x159064 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rdi callq 0x955a0 leaq 0x227d8c(%rip), %rcx # 0x2bd210 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x95595 movq -0x18(%rbp), %rdi callq 0x95600 leaq 0x227d6f(%rip), %rcx # 0x2bd210 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x95595 movq -0x18(%rbp), %rdi callq 0x95650 leaq 0x227d52(%rip), %rcx # 0x2bd210 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x95595 movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx shll $0x18, %ecx orl %ecx, %eax movl %eax, %eax leaq 0x227d0e(%rip), %rcx # 0x2bd210 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x95595 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax leaq 0x227cd7(%rip), %rcx # 0x2bd210 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x95595 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax leaq 0x227ca9(%rip), %rcx # 0x2bd210 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x95595 movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax leaq 0x227c8f(%rip), %rcx # 0x2bd210 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x95595 jmp 0x9558d movq $-0x1, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
_ma_kpos: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov eax, [rbp+var_C] mov ecx, eax mov rax, [rbp+var_18] sub rax, rcx mov [rbp+var_18], rax mov eax, [rbp+var_C] mov [rbp+var_20], rax sub rax, 7; switch 8 cases ja def_95472; jumptable 0000000000095472 default case mov rax, [rbp+var_20] lea rcx, jpt_95472 movsxd rax, ds:(jpt_95472 - 159064h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_95474: mov rdi, [rbp+var_18]; jumptable 0000000000095472 case 7 call mi_uint7korr lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp loc_95595 loc_95491: mov rdi, [rbp+var_18]; jumptable 0000000000095472 case 6 call mi_uint6korr lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp loc_95595 loc_954AE: mov rdi, [rbp+var_18]; jumptable 0000000000095472 case 5 call mi_uint5korr lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp loc_95595 loc_954CB: mov rax, [rbp+var_18]; jumptable 0000000000095472 case 4 movzx eax, byte ptr [rax+3] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 10h or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] shl ecx, 18h or eax, ecx mov eax, eax lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp loc_95595 loc_9550F: mov rax, [rbp+var_18]; jumptable 0000000000095472 case 3 movzx eax, byte ptr [rax+2] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] shl ecx, 10h or eax, ecx mov eax, eax lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp short loc_95595 loc_95543: mov rax, [rbp+var_18]; jumptable 0000000000095472 case 2 movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp short loc_95595 loc_95571: mov rax, [rbp+var_18]; jumptable 0000000000095472 case 1 movzx eax, byte ptr [rax] mov eax, eax lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp short loc_95595 loc_9558B: jmp short $+2; jumptable 0000000000095472 case 0 def_95472: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh; jumptable 0000000000095472 default case loc_95595: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long ma_kpos(unsigned int a1, long long a2) { unsigned __int8 *v3; // [rsp+8h] [rbp-18h] long long v4; // [rsp+18h] [rbp-8h] v3 = (unsigned __int8 *)(a2 - a1); switch ( a1 ) { case 1u: v4 = *(_QWORD *)&maria_block_size * *v3; break; case 2u: v4 = *(_QWORD *)&maria_block_size * _byteswap_ushort(*(_WORD *)v3); break; case 3u: v4 = *(_QWORD *)&maria_block_size * ((*v3 << 16) | (v3[1] << 8) | (unsigned int)v3[2]); break; case 4u: v4 = *(_QWORD *)&maria_block_size * _byteswap_ulong(*(_DWORD *)v3); break; case 5u: v4 = *(_QWORD *)&maria_block_size * mi_uint5korr(v3); break; case 6u: v4 = *(_QWORD *)&maria_block_size * mi_uint6korr(v3); break; case 7u: v4 = *(_QWORD *)&maria_block_size * mi_uint7korr(v3); break; default: v4 = -1LL; break; } return v4; }
_ma_kpos: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x20],RAX SUB RAX,0x7 JA 0x0019558d MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x259064] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_7: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001955a0 LEA RCX,[0x3bd210] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00195595 caseD_6: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00195600 LEA RCX,[0x3bd210] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00195595 caseD_5: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00195650 LEA RCX,[0x3bd210] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00195595 caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX LEA RCX,[0x3bd210] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00195595 caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX LEA RCX,[0x3bd210] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00195595 caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX LEA RCX,[0x3bd210] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00195595 caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX LEA RCX,[0x3bd210] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00195595 caseD_0: JMP 0x0019558d default: MOV qword ptr [RBP + -0x8],-0x1 LAB_00195595: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long _ma_kpos(uint param_1,long param_2) { byte *pbVar1; long local_10; pbVar1 = (byte *)(param_2 - (ulong)param_1); switch(param_1) { case 0: default: local_10 = -1; break; case 1: local_10 = (ulong)*pbVar1 * maria_block_size; break; case 2: local_10 = (ulong)CONCAT11(*pbVar1,pbVar1[1]) * maria_block_size; break; case 3: local_10 = (ulong)CONCAT12(*pbVar1,CONCAT11(pbVar1[1],pbVar1[2])) * maria_block_size; break; case 4: local_10 = (ulong)CONCAT13(*pbVar1,CONCAT12(pbVar1[1],CONCAT11(pbVar1[2],pbVar1[3]))) * maria_block_size; break; case 5: local_10 = mi_uint5korr(pbVar1); local_10 = local_10 * maria_block_size; break; case 6: local_10 = mi_uint6korr(pbVar1); local_10 = local_10 * maria_block_size; break; case 7: local_10 = mi_uint7korr(pbVar1); local_10 = local_10 * maria_block_size; } return local_10; }
2,863
get_segment_integrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
segment_integrity_t *get_segment_integrity(segment_t *s) { if (!s) return 0; // In our layout, the integrity data comes after the segment_t structure // but before the user data begins. // Calculate the proper aligned offset for the integrity structure uintptr_t segment_addr = (uintptr_t) (s); uintptr_t user_data_addr = (uintptr_t) (SegmentToPtr(s)); // The integrity structure is placed between the segment header and the user data uintptr_t integrity_addr = segment_addr + sizeof(segment_t); // Make sure there's enough space for the integrity structure if (integrity_addr + sizeof(segment_integrity_t) > user_data_addr) { HEAP_LOG("Warning: Not enough space for integrity data in segment %p\n", s); return 0; } return (segment_integrity_t *) (integrity_addr); }
O0
c
get_segment_integrity: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x41ed movq $0x0, -0x8(%rbp) jmp 0x422e movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x4010 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax addq $0x30, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0xc, %rax cmpq -0x20(%rbp), %rax jbe 0x4226 movq $0x0, -0x8(%rbp) jmp 0x422e movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
get_segment_integrity: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jnz short loc_41ED mov [rbp+var_8], 0 jmp short loc_422E loc_41ED: mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rdi, [rbp+var_10] call SegmentToPtr mov [rbp+var_20], rax mov rax, [rbp+var_18] add rax, 30h ; '0' mov [rbp+var_28], rax mov rax, [rbp+var_28] add rax, 0Ch cmp rax, [rbp+var_20] jbe short loc_4226 mov [rbp+var_8], 0 jmp short loc_422E loc_4226: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_422E: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long get_segment_integrity(long long a1) { if ( !a1 ) return 0LL; if ( a1 + 60 <= SegmentToPtr(a1) ) return a1 + 48; return 0LL; }
get_segment_integrity: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x001041ed MOV qword ptr [RBP + -0x8],0x0 JMP 0x0010422e LAB_001041ed: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00104010 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x30 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0xc CMP RAX,qword ptr [RBP + -0x20] JBE 0x00104226 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0010422e LAB_00104226: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0010422e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long get_segment_integrity(long param_1) { ulong uVar1; long local_10; if (param_1 == 0) { local_10 = 0; } else { uVar1 = SegmentToPtr(param_1); local_10 = param_1 + 0x30; if (uVar1 < param_1 + 0x3cU) { local_10 = 0; } } return local_10; }
2,864
OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices(OpenSubdiv::v3_6_0::Vtr::internal::Level const&, int, int*, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp
unsigned int getFaceVertexIncidentFaceVertexIndices( Level const& level, Index vIndex, Index indices[], int fvarChannel) { //Index vIndex = level.getFaceVertices(baseFace)[cornerVertex]; ConstIndexArray vFaces = level.getVertexFaces(vIndex); ConstLocalIndexArray vInFace = level.getVertexFaceLocalIndices(vIndex); int nIndices = 0; for (int i = 0; i < vFaces.size(); ++i) { ConstIndexArray srcIndices = (fvarChannel < 0) ? level.getFaceVertices(vFaces[i]) : level.getFaceFVarValues(vFaces[i], fvarChannel); int srcStart = vInFace[i]; int srcCount = srcIndices.size(); for (int j = srcStart; j < srcCount; ++j) indices[nIndices++] = srcIndices[j]; for (int j = 0; j < srcStart; ++j) indices[nIndices++] = srcIndices[j]; } return nIndices; }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices(OpenSubdiv::v3_6_0::Vtr::internal::Level const&, int, int*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %ecx, %ebx movq %rdx, 0x8(%rsp) leal (%rsi,%rsi), %ecx movq 0x108(%rdi), %rax movslq %ecx, %rcx movslq (%rax,%rcx,4), %rcx movq %rcx, 0x10(%rsp) testq %rcx, %rcx jle 0xb0275 movq %rdi, %r15 leal 0x1(,%rsi,2), %ecx movslq %ecx, %rcx movslq (%rax,%rcx,4), %r13 leaq (,%r13,4), %r12 addq 0x120(%rdi), %r12 addq %r13, %r13 addq 0x138(%rdi), %r13 xorl %r14d, %r14d xorl %ebp, %ebp movslq (%r12,%r14,4), %rsi testl %ebx, %ebx js 0xb01f3 movq %r15, %rdi movl %ebx, %edx callq 0x3af30 jmp 0xb020d movq 0x18(%r15), %rcx movslq 0x4(%rcx,%rsi,8), %rax addq %rsi, %rsi shlq $0x2, %rax addq 0x30(%r15), %rax movslq %esi, %rdx movl (%rcx,%rdx,4), %edx movzwl (%r13,%r14,2), %ecx cmpl %ecx, %edx jle 0xb0242 movslq %ebp, %rsi movl %edx, %edx movq 0x8(%rsp), %rdi leaq (%rdi,%rsi,4), %rsi leaq (%rax,%rcx,4), %rdi subq %rcx, %rdx xorl %r8d, %r8d movl (%rdi,%r8,4), %r9d movl %r9d, (%rsi,%r8,4) incq %r8 cmpq %r8, %rdx jne 0xb022f addl %r8d, %ebp testq %rcx, %rcx je 0xb0265 movslq %ebp, %rdx movq 0x8(%rsp), %rsi leaq (%rsi,%rdx,4), %rsi xorl %edx, %edx movl (%rax,%rdx,4), %edi movl %edi, (%rsi,%rdx,4) incq %rdx cmpq %rdx, %rcx jne 0xb0255 addl %edx, %ebp incq %r14 cmpq 0x10(%rsp), %r14 jne 0xb01df jmp 0xb0277 xorl %ebp, %ebp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Tmr38getFaceVertexIncidentFaceVertexIndicesERKNS0_3Vtr8internal5LevelEiPii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebx, ecx mov [rsp+48h+var_40], rdx lea ecx, [rsi+rsi] mov rax, [rdi+108h] movsxd rcx, ecx movsxd rcx, dword ptr [rax+rcx*4] mov [rsp+48h+var_38], rcx test rcx, rcx jle loc_B0275 mov r15, rdi lea ecx, ds:1[rsi*2] movsxd rcx, ecx movsxd r13, dword ptr [rax+rcx*4] lea r12, ds:0[r13*4] add r12, [rdi+120h] add r13, r13 add r13, [rdi+138h] xor r14d, r14d xor ebp, ebp loc_B01DF: movsxd rsi, dword ptr [r12+r14*4]; int test ebx, ebx js short loc_B01F3 mov rdi, r15; this mov edx, ebx; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int) jmp short loc_B020D loc_B01F3: mov rcx, [r15+18h] movsxd rax, dword ptr [rcx+rsi*8+4] add rsi, rsi shl rax, 2 add rax, [r15+30h] movsxd rdx, esi mov edx, [rcx+rdx*4] loc_B020D: movzx ecx, word ptr [r13+r14*2+0] cmp edx, ecx jle short loc_B0242 movsxd rsi, ebp mov edx, edx mov rdi, [rsp+48h+var_40] lea rsi, [rdi+rsi*4] lea rdi, [rax+rcx*4] sub rdx, rcx xor r8d, r8d loc_B022F: mov r9d, [rdi+r8*4] mov [rsi+r8*4], r9d inc r8 cmp rdx, r8 jnz short loc_B022F add ebp, r8d loc_B0242: test rcx, rcx jz short loc_B0265 movsxd rdx, ebp mov rsi, [rsp+48h+var_40] lea rsi, [rsi+rdx*4] xor edx, edx loc_B0255: mov edi, [rax+rdx*4] mov [rsi+rdx*4], edi inc rdx cmp rcx, rdx jnz short loc_B0255 add ebp, edx loc_B0265: inc r14 cmp r14, [rsp+48h+var_38] jnz loc_B01DF jmp short loc_B0277 loc_B0275: xor ebp, ebp loc_B0277: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices( OpenSubdiv::v3_6_0::Tmr *this, const OpenSubdiv::v3_6_0::Vtr::internal::Level *a2, long long a3, int *a4) { int v4; // ebx long long v5; // rax long long v6; // r13 long long v7; // r12 long long v8; // r13 long long v9; // r14 unsigned int v10; // ebp long long v11; // rsi long long FaceFVarValues; // rax int v13; // edx long long v14; // rcx long long v15; // rcx long long v16; // rdx long long v17; // r8 long long i; // rdx long long v21; // [rsp+10h] [rbp-38h] v4 = (int)a4; v5 = *((_QWORD *)this + 33); v21 = *(int *)(v5 + 8LL * (_DWORD)a2); if ( v21 <= 0 ) { return 0; } else { v6 = *(int *)(v5 + 4LL * (2 * (int)a2 + 1)); v7 = *((_QWORD *)this + 36) + 4 * v6; v8 = *((_QWORD *)this + 39) + 2 * v6; v9 = 0LL; v10 = 0; do { v11 = *(int *)(v7 + 4 * v9); if ( v4 < 0 ) { v14 = *((_QWORD *)this + 3); FaceFVarValues = *((_QWORD *)this + 6) + 4LL * *(int *)(v14 + 8 * v11 + 4); v13 = *(_DWORD *)(v14 + 8LL * (_DWORD)v11); } else { FaceFVarValues = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(this, v11, v4); } v15 = *(unsigned __int16 *)(v8 + 2 * v9); if ( v13 > (int)v15 ) { v16 = (unsigned int)v13 - v15; v17 = 0LL; do { *(_DWORD *)(a3 + 4LL * (int)v10 + 4 * v17) = *(_DWORD *)(FaceFVarValues + 4 * v15 + 4 * v17); ++v17; } while ( v16 != v17 ); v10 += v17; } if ( v15 ) { for ( i = 0LL; i != v15; ++i ) *(_DWORD *)(a3 + 4LL * (int)v10 + 4 * i) = *(_DWORD *)(FaceFVarValues + 4 * i); v10 += i; } ++v9; } while ( v9 != v21 ); } return v10; }
getFaceVertexIncidentFaceVertexIndices: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,ECX MOV qword ptr [RSP + 0x8],RDX LEA ECX,[RSI + RSI*0x1] MOV RAX,qword ptr [RDI + 0x108] MOVSXD RCX,ECX MOVSXD RCX,dword ptr [RAX + RCX*0x4] MOV qword ptr [RSP + 0x10],RCX TEST RCX,RCX JLE 0x001b0275 MOV R15,RDI LEA ECX,[0x1 + RSI*0x2] MOVSXD RCX,ECX MOVSXD R13,dword ptr [RAX + RCX*0x4] LEA R12,[R13*0x4] ADD R12,qword ptr [RDI + 0x120] ADD R13,R13 ADD R13,qword ptr [RDI + 0x138] XOR R14D,R14D XOR EBP,EBP LAB_001b01df: MOVSXD RSI,dword ptr [R12 + R14*0x4] TEST EBX,EBX JS 0x001b01f3 MOV RDI,R15 MOV EDX,EBX CALL 0x0013af30 JMP 0x001b020d LAB_001b01f3: MOV RCX,qword ptr [R15 + 0x18] MOVSXD RAX,dword ptr [RCX + RSI*0x8 + 0x4] ADD RSI,RSI SHL RAX,0x2 ADD RAX,qword ptr [R15 + 0x30] MOVSXD RDX,ESI MOV EDX,dword ptr [RCX + RDX*0x4] LAB_001b020d: MOVZX ECX,word ptr [R13 + R14*0x2] CMP EDX,ECX JLE 0x001b0242 MOVSXD RSI,EBP MOV EDX,EDX MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RDI + RSI*0x4] LEA RDI,[RAX + RCX*0x4] SUB RDX,RCX XOR R8D,R8D LAB_001b022f: MOV R9D,dword ptr [RDI + R8*0x4] MOV dword ptr [RSI + R8*0x4],R9D INC R8 CMP RDX,R8 JNZ 0x001b022f ADD EBP,R8D LAB_001b0242: TEST RCX,RCX JZ 0x001b0265 MOVSXD RDX,EBP MOV RSI,qword ptr [RSP + 0x8] LEA RSI,[RSI + RDX*0x4] XOR EDX,EDX LAB_001b0255: MOV EDI,dword ptr [RAX + RDX*0x4] MOV dword ptr [RSI + RDX*0x4],EDI INC RDX CMP RCX,RDX JNZ 0x001b0255 ADD EBP,EDX LAB_001b0265: INC R14 CMP R14,qword ptr [RSP + 0x10] JNZ 0x001b01df JMP 0x001b0277 LAB_001b0275: XOR EBP,EBP LAB_001b0277: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices(OpenSubdiv::v3_6_0::Vtr::internal::Level const&, int, int*, int) */ int OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices (Level *param_1,int param_2,int *param_3,int param_4) { ushort uVar1; int iVar2; long lVar3; long lVar4; long lVar5; ulong uVar6; ulong uVar7; int iVar8; long lVar9; long lVar10; long lVar11; int1 auVar12 [12]; lVar5 = (long)*(int *)(*(long *)(param_1 + 0x108) + (long)(param_2 * 2) * 4); if (lVar5 < 1) { iVar8 = 0; } else { lVar10 = (long)*(int *)(*(long *)(param_1 + 0x108) + (long)(param_2 * 2 + 1) * 4); lVar3 = *(long *)(param_1 + 0x120); lVar4 = *(long *)(param_1 + 0x138); lVar11 = 0; iVar8 = 0; do { iVar2 = *(int *)(lVar10 * 4 + lVar3 + lVar11 * 4); if (param_4 < 0) { auVar12._8_4_ = *(int4 *)(*(long *)(param_1 + 0x18) + (long)(iVar2 * 2) * 4); auVar12._0_8_ = (long)*(int *)(*(long *)(param_1 + 0x18) + 4 + (long)iVar2 * 8) * 4 + *(long *)(param_1 + 0x30); } else { auVar12 = Vtr::internal::Level::getFaceFVarValues(param_1,iVar2,param_4); } uVar1 = *(ushort *)(lVar10 * 2 + lVar4 + lVar11 * 2); uVar6 = (ulong)uVar1; if ((int)(uint)uVar1 < (int)auVar12._8_4_) { lVar9 = 0; do { param_3[iVar8 + lVar9] = *(int *)(auVar12._0_8_ + uVar6 * 4 + lVar9 * 4); lVar9 = lVar9 + 1; } while (auVar12._8_4_ - uVar6 != lVar9); iVar8 = iVar8 + (int)lVar9; } if (uVar6 != 0) { uVar7 = 0; do { param_3[(long)iVar8 + uVar7] = *(int *)(auVar12._0_8_ + uVar7 * 4); uVar7 = uVar7 + 1; } while (uVar6 != uVar7); iVar8 = iVar8 + (int)uVar7; } lVar11 = lVar11 + 1; } while (lVar11 != lVar5); } return iVar8; }
2,865
OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices(OpenSubdiv::v3_6_0::Vtr::internal::Level const&, int, int*, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp
unsigned int getFaceVertexIncidentFaceVertexIndices( Level const& level, Index vIndex, Index indices[], int fvarChannel) { //Index vIndex = level.getFaceVertices(baseFace)[cornerVertex]; ConstIndexArray vFaces = level.getVertexFaces(vIndex); ConstLocalIndexArray vInFace = level.getVertexFaceLocalIndices(vIndex); int nIndices = 0; for (int i = 0; i < vFaces.size(); ++i) { ConstIndexArray srcIndices = (fvarChannel < 0) ? level.getFaceVertices(vFaces[i]) : level.getFaceFVarValues(vFaces[i], fvarChannel); int srcStart = vInFace[i]; int srcCount = srcIndices.size(); for (int j = srcStart; j < srcCount; ++j) indices[nIndices++] = srcIndices[j]; for (int j = 0; j < srcStart; ++j) indices[nIndices++] = srcIndices[j]; } return nIndices; }
O2
cpp
OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices(OpenSubdiv::v3_6_0::Vtr::internal::Level const&, int, int*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %ecx, %ebx movq %rdx, %r14 movl %esi, %ebp movq %rdi, %r15 callq 0x55df0 movq %rax, 0x10(%rsp) movl %edx, %r13d movq %r15, 0x8(%rsp) movq %r15, %rdi movl %ebp, %esi callq 0x507c0 movq %rax, %rbp xorl %r15d, %r15d testl %r13d, %r13d cmovlel %r15d, %r13d xorl %r12d, %r12d cmpq %r13, %r15 je 0xba4f2 movq 0x10(%rsp), %rax movl (%rax,%r15,4), %esi testl %ebx, %ebx js 0xba498 movq 0x8(%rsp), %rdi movl %ebx, %edx callq 0x53d20 jmp 0xba4a2 movq 0x8(%rsp), %rdi callq 0x52db0 movzwl (%rbp,%r15,2), %ecx movslq %r12d, %rdi movslq %edx, %rsi leaq (%r14,%rdi,4), %rdx movq %rcx, %r8 cmpq %rsi, %r8 jge 0xba4ce movl (%rax,%r8,4), %r9d movl %r9d, (%r14,%rdi,4) incq %rdi incq %r8 addq $0x4, %rdx jmp 0xba4b5 cmpq %rcx, %rsi cmovleq %rcx, %rsi addl %esi, %r12d xorl %esi, %esi cmpq %rsi, %rcx je 0xba4ed movl (%rax,%rsi,4), %edi movl %edi, (%rdx) incq %rsi addq $0x4, %rdx jmp 0xba4da incq %r15 jmp 0xba478 movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Tmr38getFaceVertexIncidentFaceVertexIndicesERKNS0_3Vtr8internal5LevelEiPii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebx, ecx mov r14, rdx mov ebp, esi mov r15, rdi call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(int) mov [rsp+48h+var_38], rax mov r13d, edx mov [rsp+48h+var_40], r15 mov rdi, r15; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexFaceLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(int) mov rbp, rax xor r15d, r15d test r13d, r13d cmovle r13d, r15d xor r12d, r12d loc_BA478: cmp r15, r13 jz short loc_BA4F2 mov rax, [rsp+48h+var_38] mov esi, [rax+r15*4]; int test ebx, ebx js short loc_BA498 mov rdi, [rsp+48h+var_40]; this mov edx, ebx; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int) jmp short loc_BA4A2 loc_BA498: mov rdi, [rsp+48h+var_40]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int) loc_BA4A2: movzx ecx, word ptr [rbp+r15*2+0] movsxd rdi, r12d movsxd rsi, edx lea rdx, [r14+rdi*4] mov r8, rcx loc_BA4B5: cmp r8, rsi jge short loc_BA4CE mov r9d, [rax+r8*4] mov [r14+rdi*4], r9d inc rdi inc r8 add rdx, 4 jmp short loc_BA4B5 loc_BA4CE: cmp rsi, rcx cmovle rsi, rcx add r12d, esi xor esi, esi loc_BA4DA: cmp rcx, rsi jz short loc_BA4ED mov edi, [rax+rsi*4] mov [rdx], edi inc rsi add rdx, 4 jmp short loc_BA4DA loc_BA4ED: inc r15 jmp short loc_BA478 loc_BA4F2: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices( OpenSubdiv::v3_6_0::Tmr *this, const OpenSubdiv::v3_6_0::Vtr::internal::Level *a2, long long a3, int *a4) { int v4; // ebx unsigned int v6; // edx long long v7; // r13 long long VertexFaceLocalIndices; // rbp long long v9; // r15 unsigned int v10; // r12d int v11; // esi long long FaceVertices; // rax int v13; // edx long long v14; // rcx long long v15; // rdi long long v16; // rsi _DWORD *v17; // rdx long long i; // r8 long long j; // rsi long long VertexFaces; // [rsp+10h] [rbp-38h] v4 = (int)a4; VertexFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(this, (int)a2); v7 = v6; VertexFaceLocalIndices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(this, (int)a2); v9 = 0LL; if ( (int)v7 <= 0 ) v7 = 0LL; v10 = 0; while ( v9 != v7 ) { v11 = *(_DWORD *)(VertexFaces + 4 * v9); if ( v4 < 0 ) FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(this, v11); else FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(this, v11, v4); v14 = *(unsigned __int16 *)(VertexFaceLocalIndices + 2 * v9); v15 = (int)v10; v16 = v13; v17 = (_DWORD *)(a3 + 4LL * (int)v10); for ( i = v14; i < v16; ++i ) { *(_DWORD *)(a3 + 4 * v15++) = *(_DWORD *)(FaceVertices + 4 * i); ++v17; } if ( v16 <= v14 ) LODWORD(v16) = v14; v10 += v16; for ( j = 0LL; v14 != j; ++j ) *v17++ = *(_DWORD *)(FaceVertices + 4 * j); ++v9; } return v10; }
getFaceVertexIncidentFaceVertexIndices: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,ECX MOV R14,RDX MOV EBP,ESI MOV R15,RDI CALL 0x00155df0 MOV qword ptr [RSP + 0x10],RAX MOV R13D,EDX MOV qword ptr [RSP + 0x8],R15 MOV RDI,R15 MOV ESI,EBP CALL 0x001507c0 MOV RBP,RAX XOR R15D,R15D TEST R13D,R13D CMOVLE R13D,R15D XOR R12D,R12D LAB_001ba478: CMP R15,R13 JZ 0x001ba4f2 MOV RAX,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RAX + R15*0x4] TEST EBX,EBX JS 0x001ba498 MOV RDI,qword ptr [RSP + 0x8] MOV EDX,EBX CALL 0x00153d20 JMP 0x001ba4a2 LAB_001ba498: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00152db0 LAB_001ba4a2: MOVZX ECX,word ptr [RBP + R15*0x2] MOVSXD RDI,R12D MOVSXD RSI,EDX LEA RDX,[R14 + RDI*0x4] MOV R8,RCX LAB_001ba4b5: CMP R8,RSI JGE 0x001ba4ce MOV R9D,dword ptr [RAX + R8*0x4] MOV dword ptr [R14 + RDI*0x4],R9D INC RDI INC R8 ADD RDX,0x4 JMP 0x001ba4b5 LAB_001ba4ce: CMP RSI,RCX CMOVLE RSI,RCX ADD R12D,ESI XOR ESI,ESI LAB_001ba4da: CMP RCX,RSI JZ 0x001ba4ed MOV EDI,dword ptr [RAX + RSI*0x4] MOV dword ptr [RDX],EDI INC RSI ADD RDX,0x4 JMP 0x001ba4da LAB_001ba4ed: INC R15 JMP 0x001ba478 LAB_001ba4f2: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices(OpenSubdiv::v3_6_0::Vtr::internal::Level const&, int, int*, int) */ int OpenSubdiv::v3_6_0::Tmr::getFaceVertexIncidentFaceVertexIndices (Level *param_1,int param_2,int *param_3,int param_4) { ushort uVar1; int iVar2; long lVar3; ulong uVar4; uint uVar5; int *piVar6; long lVar7; ulong uVar8; int iVar9; ulong uVar10; ulong uVar11; int1 auVar12 [12]; int1 auVar13 [12]; auVar12 = Vtr::internal::Level::getVertexFaces(param_1,param_2); lVar3 = Vtr::internal::Level::getVertexFaceLocalIndices(param_1,param_2); uVar11 = 0; uVar10 = (ulong)auVar12._8_4_; if ((int)auVar12._8_4_ < 1) { uVar10 = uVar11; } iVar9 = 0; for (; uVar11 != uVar10; uVar11 = uVar11 + 1) { iVar2 = *(int *)(auVar12._0_8_ + uVar11 * 4); if (param_4 < 0) { auVar13 = Vtr::internal::Level::getFaceVertices(param_1,iVar2); } else { auVar13 = Vtr::internal::Level::getFaceFVarValues(param_1,iVar2,param_4); } uVar5 = auVar13._8_4_; uVar1 = *(ushort *)(lVar3 + uVar11 * 2); lVar7 = (long)iVar9; piVar6 = param_3 + lVar7; uVar4 = (ulong)uVar1; for (uVar8 = uVar4; (long)uVar8 < (long)(int)uVar5; uVar8 = uVar8 + 1) { param_3[lVar7] = *(int *)(auVar13._0_8_ + uVar8 * 4); lVar7 = lVar7 + 1; piVar6 = piVar6 + 1; } if ((long)(int)uVar5 <= (long)uVar4) { uVar5 = (uint)uVar1; } iVar9 = iVar9 + uVar5; for (uVar8 = 0; uVar4 != uVar8; uVar8 = uVar8 + 1) { *piVar6 = *(int *)(auVar13._0_8_ + uVar8 * 4); piVar6 = piVar6 + 1; } } return iVar9; }
2,866
fmt::v11::detail::do_report_error(void (*)(fmt::v11::detail::buffer<char>&, int, char const*), int, char const*)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format-inl.h
FMT_FUNC void do_report_error(format_func func, int error_code, const char* message) noexcept { memory_buffer full_message; func(full_message, error_code, message); // Don't use fwrite_all because the latter may throw. if (std::fwrite(full_message.data(), full_message.size(), 1, stderr) > 0) std::fputc('\n', stderr); }
O1
c
fmt::v11::detail::do_report_error(void (*)(fmt::v11::detail::buffer<char>&, int, char const*), int, char const*): pushq %rbx subq $0x220, %rsp # imm = 0x220 movq %rdi, %rax xorps %xmm0, %xmm0 leaq 0x20(%rsp), %rbx movaps %xmm0, -0x20(%rbx) leaq 0x279f(%rip), %rcx # 0x3fbfe movq %rcx, -0x8(%rbx) movq %rbx, -0x20(%rbx) movq $0x1f4, -0x10(%rbx) # imm = 0x1F4 movq %rsp, %rdi callq *%rax movq %rsp, %rdi movq %rbx, %rsi callq 0x1101b addq $0x220, %rsp # imm = 0x220 popq %rbx retq movq %rax, %rdi callq 0x14fdb
_ZN3fmt3v116detail15do_report_errorEPFvRNS1_6bufferIcEEiPKcEiS6_: push rbx sub rsp, 220h mov rax, rdi xorps xmm0, xmm0 lea rbx, [rsp+228h+var_208] movaps xmmword ptr [rbx-20h], xmm0 lea rcx, _ZN3fmt3v1119basic_memory_bufferIcLm500ENS0_6detail9allocatorIcEEE4growERNS2_6bufferIcEEm; fmt::v11::basic_memory_buffer<char,500ul,fmt::v11::detail::allocator<char>>::grow(fmt::v11::detail::buffer<char> &,ulong) mov [rbx-8], rcx mov [rbx-20h], rbx mov qword ptr [rbx-10h], 1F4h mov rdi, rsp call rax mov rdi, rsp mov rsi, rbx call _ZN3fmt3v116detail15do_report_errorEPFvRNS1_6bufferIcEEiPKcEiS6__cold_1; fmt::v11::detail::do_report_error(void (*)(fmt::v11::detail::buffer<char> &,int,char const*),int,char const*) [clone] add rsp, 220h pop rbx retn mov rdi, rax call __clang_call_terminate
long long fmt::v11::detail::do_report_error(void ( *a1)(__int128 *)) { __int128 v2; // [rsp+0h] [rbp-228h] BYREF long long v3; // [rsp+10h] [rbp-218h] long long ( *v4)(); // [rsp+18h] [rbp-210h] _BYTE v5[520]; // [rsp+20h] [rbp-208h] BYREF v2 = 0LL; v4 = fmt::v11::basic_memory_buffer<char,500ul,fmt::v11::detail::allocator<char>>::grow; *(_QWORD *)&v2 = v5; v3 = 500LL; a1(&v2); return fmt::v11::detail::do_report_error(&v2, (long long)v5); }
do_report_error: PUSH RBX SUB RSP,0x220 MOV RAX,RDI XORPS XMM0,XMM0 LEA RBX,[RSP + 0x20] MOVAPS xmmword ptr [RBX + -0x20],XMM0 LEA RCX,[0x13fbfe] MOV qword ptr [RBX + -0x8],RCX MOV qword ptr [RBX + -0x20],RBX MOV qword ptr [RBX + -0x10],0x1f4 LAB_0013d46f: MOV RDI,RSP CALL RAX MOV RDI,RSP MOV RSI,RBX CALL 0x0011101b ADD RSP,0x220 POP RBX RET
/* fmt::v11::detail::do_report_error(void (*)(fmt::v11::detail::buffer<char>&, int, char const*), int, char const*) */ void fmt::v11::detail::do_report_error (_func_void_buffer_ptr_int_char_ptr *param_1,int param_2,char *param_3) { char *extraout_RDX; int1 *local_228; int8 uStack_220; int8 local_218; code *local_210; int1 local_208 [512]; uStack_220 = 0; local_210 = basic_memory_buffer<char,500ul,fmt::v11::detail::allocator<char>>::grow; local_218 = 500; local_228 = local_208; /* try { // try from 0013d46f to 0013d473 has its CatchHandler @ 0013d488 */ (*param_1)((buffer *)&local_228,param_2,param_3); do_report_error((_func_void_buffer_ptr_int_char_ptr *)&local_228,(int)local_208,extraout_RDX); return; }
2,867
js_string_repeat
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_repeat(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue str; StringBuffer b_s, *b = &b_s; JSString *p; int64_t val; int n, len; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) goto fail; if (JS_ToInt64Sat(ctx, &val, argv[0])) goto fail; if (val < 0 || val > 2147483647) { JS_ThrowRangeError(ctx, "invalid repeat count"); goto fail; } n = val; p = JS_VALUE_GET_STRING(str); len = p->len; if (len == 0 || n == 1) return str; if (val * len > JS_STRING_LEN_MAX) { JS_ThrowRangeError(ctx, "invalid string length"); goto fail; } if (string_buffer_init2(ctx, b, n * len, p->is_wide_char)) goto fail; if (len == 1) { string_buffer_fill(b, string_get(p, 0), n); } else { while (n-- > 0) { string_buffer_concat(b, p, 0, len); } } JS_FreeValue(ctx, str); return string_buffer_end(b); fail: JS_FreeValue(ctx, str); return JS_EXCEPTION; }
O1
c
js_string_repeat: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r12 movq %rdi, %r14 callq 0x425ff movq %rax, %r15 movq %rdx, %rbx movq %rax, 0x8(%rsp) cmpl $0x6, %ebx je 0x7c211 movq (%r12), %rdx movq 0x8(%r12), %rcx movq %rdx, 0x10(%rsp) cmpl $-0x9, %ecx jb 0x7c1e1 movq 0x10(%rsp), %rax incl (%rax) leaq 0x30(%rsp), %rsi movq %r14, %rdi callq 0x277bc testl %eax, %eax jne 0x7c211 movq 0x30(%rsp), %r13 testq $-0x80000000, %r13 # imm = 0x80000000 je 0x7c239 leaq 0x26007(%rip), %rsi # 0xa220e movq %r14, %rdi xorl %eax, %eax callq 0x20add movq 0x18(%r14), %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1d8c6 movl $0x6, %ebx xorl %eax, %eax movq %rbx, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0x1, %r13 je 0x7c26f movq 0x8(%rsp), %r12 movq 0x4(%r12), %rdx movl %edx, %ebp andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF je 0x7c26f movl %edx, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF imulq %r13, %rax cmpq $0x40000000, %rax # imm = 0x40000000 jl 0x7c276 leaq 0x22701(%rip), %rsi # 0x9e96e jmp 0x7c207 movq 0x8(%rsp), %rax jmp 0x7c227 movl %ebp, %esi imull %r13d, %esi shrl $0x1f, %edx movq %r14, 0x10(%rsp) movl %esi, 0x24(%rsp) xorl %eax, %eax movl %eax, 0x20(%rsp) movl %edx, 0x28(%rsp) movl %eax, 0x2c(%rsp) movq %r14, %rdi callq 0x20b73 movq %rax, 0x18(%rsp) testq %rax, %rax je 0x7c31a cmpl $0x1, %ebp jne 0x7c2bd testb $-0x80, 0x7(%r12) jne 0x7c2e4 movzbl 0x18(%r12), %esi jmp 0x7c2ea testq %r13, %r13 je 0x7c2f7 incl %r13d leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi xorl %edx, %edx movl %ebp, %ecx callq 0x420b9 decl %r13d cmpl $0x1, %r13d jg 0x7c2ca jmp 0x7c2f7 movzwl 0x18(%r12), %esi leaq 0x10(%rsp), %rdi movl %r13d, %edx callq 0x7d9bb movq 0x8(%rsp), %rsi movq 0x18(%r14), %rdi movq %rbx, %rdx callq 0x1d8c6 leaq 0x10(%rsp), %rdi callq 0x33444 movq %rdx, %rbx jmp 0x7c227 movl $0x0, 0x24(%rsp) movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF jmp 0x7c211
js_string_repeat: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, r8 mov r14, rdi call JS_ToStringCheckObject mov r15, rax mov rbx, rdx mov [rsp+68h+var_60], rax cmp ebx, 6 jz short loc_7C211 mov rdx, [r12] mov rcx, [r12+8] mov [rsp+68h+var_58], rdx cmp ecx, 0FFFFFFF7h jb short loc_7C1E1 mov rax, [rsp+68h+var_58] inc dword ptr [rax] loc_7C1E1: lea rsi, [rsp+68h+var_38] mov rdi, r14 call JS_ToInt64SatFree test eax, eax jnz short loc_7C211 mov r13, [rsp+68h+var_38] test r13, 0FFFFFFFF80000000h jz short loc_7C239 lea rsi, aInvalidRepeatC; "invalid repeat count" loc_7C207: mov rdi, r14 xor eax, eax call JS_ThrowRangeError loc_7C211: mov rdi, [r14+18h] mov rsi, r15 mov rdx, rbx call JS_FreeValueRT mov ebx, 6 xor eax, eax loc_7C227: mov rdx, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7C239: cmp r13, 1 jz short loc_7C26F mov r12, [rsp+68h+var_60] mov rdx, [r12+4] mov ebp, edx and ebp, 7FFFFFFFh jz short loc_7C26F mov eax, edx and eax, 7FFFFFFFh imul rax, r13 cmp rax, 40000000h jl short loc_7C276 lea rsi, aInvalidStringL; "invalid string length" jmp short loc_7C207 loc_7C26F: mov rax, [rsp+68h+var_60] jmp short loc_7C227 loc_7C276: mov esi, ebp imul esi, r13d shr edx, 1Fh mov [rsp+68h+var_58], r14 mov [rsp+68h+var_44], esi xor eax, eax mov [rsp+68h+var_48], eax mov [rsp+68h+var_40], edx mov [rsp+68h+var_3C], eax mov rdi, r14 call js_alloc_string mov [rsp+68h+var_50], rax test rax, rax jz short loc_7C31A cmp ebp, 1 jnz short loc_7C2BD test byte ptr [r12+7], 80h jnz short loc_7C2E4 movzx esi, byte ptr [r12+18h] jmp short loc_7C2EA loc_7C2BD: test r13, r13 jz short loc_7C2F7 inc r13d lea r15, [rsp+68h+var_58] loc_7C2CA: mov rdi, r15 mov rsi, r12 xor edx, edx mov ecx, ebp call string_buffer_concat dec r13d cmp r13d, 1 jg short loc_7C2CA jmp short loc_7C2F7 loc_7C2E4: movzx esi, word ptr [r12+18h] loc_7C2EA: lea rdi, [rsp+68h+var_58] mov edx, r13d call string_buffer_fill loc_7C2F7: mov rsi, [rsp+68h+var_60] mov rdi, [r14+18h] mov rdx, rbx call JS_FreeValueRT lea rdi, [rsp+68h+var_58] call string_buffer_end mov rbx, rdx jmp loc_7C227 loc_7C31A: mov [rsp+68h+var_44], 0 mov [rsp+68h+var_3C], 0FFFFFFFFh jmp loc_7C211
_DWORD * js_string_repeat( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long v15; // r15 long long v16; // rdx long long v17; // rbx long long v18; // rdx long long v19; // rcx long long v20; // rdx long long v21; // rcx long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 unsigned long long v26; // r13 const char *v27; // rsi unsigned int v29; // ebp long long v30; // rsi int v31; // r13d char v32; // [rsp+0h] [rbp-68h] _DWORD *v33; // [rsp+10h] [rbp-58h] BYREF int v35; // [rsp+20h] [rbp-48h] unsigned int v36; // [rsp+24h] [rbp-44h] unsigned int v37; // [rsp+28h] [rbp-40h] int v38; // [rsp+2Ch] [rbp-3Ch] unsigned long long v39[7]; // [rsp+30h] [rbp-38h] BYREF v15 = JS_ToStringCheckObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = v16; if ( (_DWORD)v16 == 6 ) goto LABEL_8; v18 = *a5; v19 = a5[1]; v33 = (_DWORD *)*a5; if ( (unsigned int)v19 >= 0xFFFFFFF7 ) ++*v33; if ( (unsigned int)JS_ToInt64SatFree(a1, v39, v18, v19) ) goto LABEL_8; v26 = v39[0]; if ( (v39[0] & 0xFFFFFFFF80000000LL) != 0 ) { v27 = "invalid repeat count"; LABEL_7: JS_ThrowRangeError(a1, (long long)v27, v20, v21, v22, v23, a7, a8, a9, a10, v24, v25, a13, a14, v32); LABEL_8: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v15, v17); return 0LL; } if ( v39[0] == 1 ) return (_DWORD *)v15; v20 = *(_QWORD *)(v15 + 4); v29 = v20 & 0x7FFFFFFF; if ( (v20 & 0x7FFFFFFF) == 0 ) return (_DWORD *)v15; if ( (long long)(v39[0] * (v20 & 0x7FFFFFFF)) >= 0x40000000 ) { v27 = "invalid string length"; goto LABEL_7; } v33 = (_DWORD *)a1; v36 = LODWORD(v39[0]) * v29; v35 = 0; v37 = (unsigned int)v20 >> 31; v38 = 0; if ( !js_alloc_string(a1, LODWORD(v39[0]) * v29, (unsigned int)v20 >> 31) ) { v36 = 0; v38 = -1; goto LABEL_8; } if ( v29 == 1 ) { if ( *(char *)(v15 + 7) < 0 ) v30 = *(unsigned __int16 *)(v15 + 24); else v30 = *(unsigned __int8 *)(v15 + 24); string_buffer_fill(&v33, v30, (unsigned int)v26); } else if ( v26 ) { v31 = v26 + 1; do { string_buffer_concat((long long)&v33, v15, 0, v29); --v31; } while ( v31 > 1 ); } JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v15, v17); return string_buffer_end((long long)&v33); }
js_string_repeat: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,R8 MOV R14,RDI CALL 0x001425ff MOV R15,RAX MOV RBX,RDX MOV qword ptr [RSP + 0x8],RAX CMP EBX,0x6 JZ 0x0017c211 MOV RDX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] MOV qword ptr [RSP + 0x10],RDX CMP ECX,-0x9 JC 0x0017c1e1 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_0017c1e1: LEA RSI,[RSP + 0x30] MOV RDI,R14 CALL 0x001277bc TEST EAX,EAX JNZ 0x0017c211 MOV R13,qword ptr [RSP + 0x30] TEST R13,-0x80000000 JZ 0x0017c239 LEA RSI,[0x1a220e] LAB_0017c207: MOV RDI,R14 XOR EAX,EAX CALL 0x00120add LAB_0017c211: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R15 MOV RDX,RBX CALL 0x0011d8c6 MOV EBX,0x6 XOR EAX,EAX LAB_0017c227: MOV RDX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017c239: CMP R13,0x1 JZ 0x0017c26f MOV R12,qword ptr [RSP + 0x8] MOV RDX,qword ptr [R12 + 0x4] MOV EBP,EDX AND EBP,0x7fffffff JZ 0x0017c26f MOV EAX,EDX AND EAX,0x7fffffff IMUL RAX,R13 CMP RAX,0x40000000 JL 0x0017c276 LEA RSI,[0x19e96e] JMP 0x0017c207 LAB_0017c26f: MOV RAX,qword ptr [RSP + 0x8] JMP 0x0017c227 LAB_0017c276: MOV ESI,EBP IMUL ESI,R13D SHR EDX,0x1f MOV qword ptr [RSP + 0x10],R14 MOV dword ptr [RSP + 0x24],ESI XOR EAX,EAX MOV dword ptr [RSP + 0x20],EAX MOV dword ptr [RSP + 0x28],EDX MOV dword ptr [RSP + 0x2c],EAX MOV RDI,R14 CALL 0x00120b73 MOV qword ptr [RSP + 0x18],RAX TEST RAX,RAX JZ 0x0017c31a CMP EBP,0x1 JNZ 0x0017c2bd TEST byte ptr [R12 + 0x7],0x80 JNZ 0x0017c2e4 MOVZX ESI,byte ptr [R12 + 0x18] JMP 0x0017c2ea LAB_0017c2bd: TEST R13,R13 JZ 0x0017c2f7 INC R13D LEA R15,[RSP + 0x10] LAB_0017c2ca: MOV RDI,R15 MOV RSI,R12 XOR EDX,EDX MOV ECX,EBP CALL 0x001420b9 DEC R13D CMP R13D,0x1 JG 0x0017c2ca JMP 0x0017c2f7 LAB_0017c2e4: MOVZX ESI,word ptr [R12 + 0x18] LAB_0017c2ea: LEA RDI,[RSP + 0x10] MOV EDX,R13D CALL 0x0017d9bb LAB_0017c2f7: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [R14 + 0x18] MOV RDX,RBX CALL 0x0011d8c6 LEA RDI,[RSP + 0x10] CALL 0x00133444 MOV RBX,RDX JMP 0x0017c227 LAB_0017c31a: MOV dword ptr [RSP + 0x24],0x0 MOV dword ptr [RSP + 0x2c],0xffffffff JMP 0x0017c211
int1 [16] js_string_repeat(int *param_1) { ulong uVar1; int iVar2; long lVar3; uint uVar4; ushort uVar5; char *pcVar6; int8 *in_R8; int1 auVar7 [16]; int *local_58; long local_50; int4 local_48; int local_44; uint local_40; int4 local_3c; ulong local_38; auVar7 = JS_ToStringCheckObject(); lVar3 = auVar7._0_8_; if (auVar7._8_4_ != 6) { local_58 = (int *)*in_R8; if (0xfffffff6 < (uint)in_R8[1]) { *local_58 = *local_58 + 1; } iVar2 = JS_ToInt64SatFree(param_1,&local_38); if (iVar2 == 0) { if ((local_38 & 0xffffffff80000000) == 0) { if (local_38 == 1) { return auVar7; } uVar1 = *(ulong *)(lVar3 + 4); uVar4 = (uint)uVar1 & 0x7fffffff; if ((uVar1 & 0x7fffffff) == 0) { return auVar7; } if ((long)(((uint)uVar1 & 0x7fffffff) * local_38) < 0x40000000) { local_44 = uVar4 * (int)local_38; local_40 = (uint)(uVar1 >> 0x1f) & 1; local_48 = 0; local_3c = 0; local_58 = param_1; local_50 = js_alloc_string(param_1); if (local_50 != 0) { if (uVar4 == 1) { if ((*(byte *)(lVar3 + 7) & 0x80) == 0) { uVar5 = (ushort)*(byte *)(lVar3 + 0x18); } else { uVar5 = *(ushort *)(lVar3 + 0x18); } string_buffer_fill(&local_58,uVar5,local_38 & 0xffffffff); } else if (local_38 != 0) { iVar2 = (int)local_38 + 1; do { string_buffer_concat(&local_58,lVar3,0,uVar4); iVar2 = iVar2 + -1; } while (1 < iVar2); } JS_FreeValueRT(*(int8 *)(param_1 + 6),lVar3,auVar7._8_8_); auVar7 = string_buffer_end(&local_58); return auVar7; } local_44 = 0; local_3c = 0xffffffff; local_50 = 0; goto LAB_0017c211; } pcVar6 = "invalid string length"; } else { pcVar6 = "invalid repeat count"; } JS_ThrowRangeError(param_1,pcVar6); } } LAB_0017c211: JS_FreeValueRT(*(int8 *)(param_1 + 6),lVar3,auVar7._8_8_); return ZEXT816(6) << 0x40; }
2,868
js_string_repeat
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_repeat(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue str; StringBuffer b_s, *b = &b_s; JSString *p; int64_t val; int n, len; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) goto fail; if (JS_ToInt64Sat(ctx, &val, argv[0])) goto fail; if (val < 0 || val > 2147483647) { JS_ThrowRangeError(ctx, "invalid repeat count"); goto fail; } n = val; p = JS_VALUE_GET_STRING(str); len = p->len; if (len == 0 || n == 1) return str; if (val * len > JS_STRING_LEN_MAX) { JS_ThrowRangeError(ctx, "invalid string length"); goto fail; } if (string_buffer_init2(ctx, b, n * len, p->is_wide_char)) goto fail; if (len == 1) { string_buffer_fill(b, string_get(p, 0), n); } else { while (n-- > 0) { string_buffer_concat(b, p, 0, len); } } JS_FreeValue(ctx, str); return string_buffer_end(b); fail: JS_FreeValue(ctx, str); return JS_EXCEPTION; }
O2
c
js_string_repeat: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r12 movq %rdi, %r15 callq 0x3a290 movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx je 0x68546 movq (%r12), %rdx movq 0x8(%r12), %rcx movq %rsp, %rsi movq %r15, %rdi callq 0x21416 testl %eax, %eax jne 0x68546 movq (%rsp), %r12 cmpq $0x7fffffff, %r12 # imm = 0x7FFFFFFF jbe 0x6856f leaq 0x20c0c(%rip), %rsi # 0x89148 movq %r15, %rdi xorl %eax, %eax callq 0x1acb3 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1801e pushq $0x6 popq %rbx xorl %r14d, %r14d movq %r14, %rax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0x1, %r12 je 0x6855a movq 0x4(%r14), %rcx movl %ecx, %ebp andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF je 0x6855a movl %ecx, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF imulq %r12, %rax cmpq $0x3fffffff, %rax # imm = 0x3FFFFFFF jbe 0x6859f leaq 0x1d321(%rip), %rsi # 0x858be jmp 0x6853c movl %ebp, %edx imull %r12d, %edx shrl $0x1f, %ecx leaq 0x8(%rsp), %rsi movq %r15, %rdi callq 0x2ca47 testl %eax, %eax jne 0x68546 cmpl $0x1, %ebp jne 0x685cc testb $-0x80, 0x7(%r14) jne 0x685ea movzbl 0x18(%r14), %esi jmp 0x685ef leaq 0x8(%rsp), %r13 testl %r12d, %r12d jle 0x685fc decl %r12d movq %r13, %rdi movq %r14, %rsi xorl %edx, %edx movl %ebp, %ecx callq 0x39dad jmp 0x685d1 movzwl 0x18(%r14), %esi leaq 0x8(%rsp), %rdi movl %r12d, %edx callq 0x697c3 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1801e leaq 0x8(%rsp), %rdi callq 0x2cad4 movq %rax, %r14 movq %rdx, %rbx jmp 0x6855a
js_string_repeat: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, r8 mov r15, rdi call JS_ToStringCheckObject mov r14, rax mov rbx, rdx cmp ebx, 6 jz short loc_68546 mov rdx, [r12] mov rcx, [r12+8] mov rsi, rsp mov rdi, r15 call JS_ToInt64Sat test eax, eax jnz short loc_68546 mov r12, [rsp+58h+var_58] cmp r12, 7FFFFFFFh jbe short loc_6856F lea rsi, aInvalidRepeatC; "invalid repeat count" loc_6853C: mov rdi, r15 xor eax, eax call JS_ThrowRangeError loc_68546: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue push 6 pop rbx xor r14d, r14d loc_6855A: mov rax, r14 mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6856F: cmp r12, 1 jz short loc_6855A mov rcx, [r14+4] mov ebp, ecx and ebp, 7FFFFFFFh jz short loc_6855A mov eax, ecx and eax, 7FFFFFFFh imul rax, r12 cmp rax, 3FFFFFFFh jbe short loc_6859F lea rsi, aInvalidStringL; "invalid string length" jmp short loc_6853C loc_6859F: mov edx, ebp imul edx, r12d shr ecx, 1Fh lea rsi, [rsp+58h+var_50] mov rdi, r15 call string_buffer_init2 test eax, eax jnz short loc_68546 cmp ebp, 1 jnz short loc_685CC test byte ptr [r14+7], 80h jnz short loc_685EA movzx esi, byte ptr [r14+18h] jmp short loc_685EF loc_685CC: lea r13, [rsp+58h+var_50] loc_685D1: test r12d, r12d jle short loc_685FC dec r12d mov rdi, r13 mov rsi, r14 xor edx, edx mov ecx, ebp call string_buffer_concat jmp short loc_685D1 loc_685EA: movzx esi, word ptr [r14+18h] loc_685EF: lea rdi, [rsp+58h+var_50] mov edx, r12d call string_buffer_fill loc_685FC: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue lea rdi, [rsp+58h+var_50] call string_buffer_end mov r14, rax mov rbx, rdx jmp loc_6855A
long long js_string_repeat( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v15; // r14 long long v16; // rdx long long v17; // rbx long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 int v24; // r12d const char *v25; // rsi unsigned int v27; // ebp long long v28; // rsi unsigned long long v29; // [rsp+0h] [rbp-58h] BYREF long long v30[10]; // [rsp+8h] [rbp-50h] BYREF v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = v16; if ( (_DWORD)v16 == 6 || (unsigned int)JS_ToInt64Sat(a1, (long long)&v29, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) ) goto LABEL_6; v24 = v29; if ( v29 > 0x7FFFFFFF ) { v25 = "invalid repeat count"; LABEL_5: JS_ThrowRangeError(a1, (long long)v25, v18, v19, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14, v29); LABEL_6: JS_FreeValue(a1, v15, v17); return 0LL; } if ( v29 != 1 ) { v19 = *(_QWORD *)(v15 + 4); v27 = v19 & 0x7FFFFFFF; if ( (v19 & 0x7FFFFFFF) != 0 ) { if ( v29 * (v19 & 0x7FFFFFFF) > 0x3FFFFFFF ) { v25 = "invalid string length"; goto LABEL_5; } if ( (unsigned int)string_buffer_init2(a1, (long long)v30, (unsigned int)v29 * v27, (unsigned int)v19 >> 31) ) goto LABEL_6; if ( v27 == 1 ) { if ( *(char *)(v15 + 7) < 0 ) v28 = *(unsigned __int16 *)(v15 + 24); else v28 = *(unsigned __int8 *)(v15 + 24); string_buffer_fill(v30, v28, (unsigned int)v24); } else { while ( v24 > 0 ) { --v24; string_buffer_concat((long long)v30, v15, 0, v27); } } JS_FreeValue(a1, v15, v17); return string_buffer_end(v30); } } return v15; }
js_string_repeat: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,R8 MOV R15,RDI CALL 0x0013a290 MOV R14,RAX MOV RBX,RDX CMP EBX,0x6 JZ 0x00168546 MOV RDX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] MOV RSI,RSP MOV RDI,R15 CALL 0x00121416 TEST EAX,EAX JNZ 0x00168546 MOV R12,qword ptr [RSP] CMP R12,0x7fffffff JBE 0x0016856f LEA RSI,[0x189148] LAB_0016853c: MOV RDI,R15 XOR EAX,EAX CALL 0x0011acb3 LAB_00168546: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011801e PUSH 0x6 POP RBX XOR R14D,R14D LAB_0016855a: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016856f: CMP R12,0x1 JZ 0x0016855a MOV RCX,qword ptr [R14 + 0x4] MOV EBP,ECX AND EBP,0x7fffffff JZ 0x0016855a MOV EAX,ECX AND EAX,0x7fffffff IMUL RAX,R12 CMP RAX,0x3fffffff JBE 0x0016859f LEA RSI,[0x1858be] JMP 0x0016853c LAB_0016859f: MOV EDX,EBP IMUL EDX,R12D SHR ECX,0x1f LEA RSI,[RSP + 0x8] MOV RDI,R15 CALL 0x0012ca47 TEST EAX,EAX JNZ 0x00168546 CMP EBP,0x1 JNZ 0x001685cc TEST byte ptr [R14 + 0x7],0x80 JNZ 0x001685ea MOVZX ESI,byte ptr [R14 + 0x18] JMP 0x001685ef LAB_001685cc: LEA R13,[RSP + 0x8] LAB_001685d1: TEST R12D,R12D JLE 0x001685fc DEC R12D MOV RDI,R13 MOV RSI,R14 XOR EDX,EDX MOV ECX,EBP CALL 0x00139dad JMP 0x001685d1 LAB_001685ea: MOVZX ESI,word ptr [R14 + 0x18] LAB_001685ef: LEA RDI,[RSP + 0x8] MOV EDX,R12D CALL 0x001697c3 LAB_001685fc: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011801e LEA RDI,[RSP + 0x8] CALL 0x0012cad4 MOV R14,RAX MOV RBX,RDX JMP 0x0016855a
int1 [16] js_string_repeat(int8 param_1) { ulong uVar1; int iVar2; long lVar3; uint uVar4; ushort uVar5; char *pcVar6; int8 *in_R8; int1 auVar7 [16]; ulong local_58; int1 local_50 [32]; auVar7 = JS_ToStringCheckObject(); lVar3 = auVar7._0_8_; if ((auVar7._8_4_ != 6) && (iVar2 = JS_ToInt64Sat(param_1,&local_58,*in_R8,in_R8[1]), iVar2 == 0)) { if (local_58 < 0x80000000) { if (local_58 == 1) { return auVar7; } uVar1 = *(ulong *)(lVar3 + 4); uVar4 = (uint)uVar1 & 0x7fffffff; if ((uVar1 & 0x7fffffff) == 0) { return auVar7; } if (((uint)uVar1 & 0x7fffffff) * local_58 < 0x40000000) { iVar2 = string_buffer_init2(param_1,local_50,uVar4 * (int)local_58,uVar1 >> 0x1f & 1); if (iVar2 == 0) { if (uVar4 == 1) { if ((*(byte *)(lVar3 + 7) & 0x80) == 0) { uVar5 = (ushort)*(byte *)(lVar3 + 0x18); } else { uVar5 = *(ushort *)(lVar3 + 0x18); } string_buffer_fill(local_50,uVar5,local_58 & 0xffffffff); } else { for (; 0 < (int)local_58; local_58 = (ulong)((int)local_58 - 1)) { string_buffer_concat(local_50,lVar3,0,uVar4); } } JS_FreeValue(param_1,lVar3,auVar7._8_8_); auVar7 = string_buffer_end(local_50); return auVar7; } goto LAB_00168546; } pcVar6 = "invalid string length"; } else { pcVar6 = "invalid repeat count"; } JS_ThrowRangeError(param_1,pcVar6); } LAB_00168546: JS_FreeValue(param_1,lVar3,auVar7._8_8_); return ZEXT816(6) << 0x40; }
2,869
get_all_kv_cache_types[abi:cxx11]()
monkey531[P]llama/common/arg.cpp
static std::string get_all_kv_cache_types() { std::ostringstream msg; for (const auto & type : kv_cache_types) { msg << ggml_type_name(type) << (&type == &kv_cache_types.back() ? "" : ", "); } return msg.str(); }
O3
cpp
get_all_kv_cache_types[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x188, %rsp # imm = 0x188 movq %rdi, 0x8(%rsp) leaq 0x10(%rsp), %rdi callq 0x1bda0 movq 0xde9c4(%rip), %r12 # 0x130f10 movq 0xde9c5(%rip), %r13 # 0x130f18 cmpq %r13, %r12 je 0x525e1 leaq 0x9ca79(%rip), %rbp # 0xeefdc leaq 0xa04e2(%rip), %rbx # 0xf2a4c leaq 0x10(%rsp), %r14 movl (%r12), %edi callq 0x1b9a0 movq %rax, %r15 testq %rax, %rax je 0x52598 movq %r15, %rdi callq 0x1b440 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x1bbc0 jmp 0x525b4 movq 0x10(%rsp), %rax movq -0x18(%rax), %rax leaq (%rsp,%rax), %rdi addq $0x10, %rdi movl 0x20(%rdi), %esi orl $0x1, %esi callq 0x1c190 movq 0xde95d(%rip), %rax # 0x130f18 addq $-0x4, %rax xorl %edx, %edx cmpq %rax, %r12 setne %dl movq %rbx, %rsi cmoveq %rbp, %rsi addl %edx, %edx movq %r14, %rdi callq 0x1bbc0 addq $0x4, %r12 cmpq %r13, %r12 jne 0x5256f leaq 0x18(%rsp), %rsi movq 0x8(%rsp), %rdi callq 0x1c020 movq 0xdd971(%rip), %rsi # 0x12ff68 leaq 0x10(%rsp), %rdi callq 0x1b560 leaq 0x80(%rsp), %rdi callq 0x1b300 addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x52622 movq %rax, %rbx movq 0xdd93c(%rip), %rsi # 0x12ff68 leaq 0x10(%rsp), %rdi callq 0x1b560 leaq 0x80(%rsp), %rdi callq 0x1b300 movq %rbx, %rdi callq 0x1c250
_ZL22get_all_kv_cache_typesB5cxx11v: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 188h mov [rsp+1B8h+var_1B0], rdi lea rdi, [rsp+1B8h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov r12, cs:_ZL14kv_cache_types; kv_cache_types mov r13, cs:qword_130F18 cmp r12, r13 jz loc_525E1 lea rbp, aErrorWhileHand_0+34h; "" lea rbx, aZuD+6; ", " lea r14, [rsp+1B8h+var_1A8] loc_5256F: mov edi, [r12] call _ggml_type_name mov r15, rax test rax, rax jz short loc_52598 mov rdi, r15 call _strlen mov rdi, r14 mov rsi, r15 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_525B4 loc_52598: mov rax, [rsp+1B8h+var_1A8] mov rax, [rax-18h] lea rdi, [rsp+rax+1B8h+var_1B8] add rdi, 10h mov esi, [rdi+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_525B4: mov rax, cs:qword_130F18 add rax, 0FFFFFFFFFFFFFFFCh xor edx, edx cmp r12, rax setnz dl mov rsi, rbx cmovz rsi, rbp add edx, edx mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add r12, 4 cmp r12, r13 jnz short loc_5256F loc_525E1: lea rsi, [rsp+1B8h+var_1A0] mov rdi, [rsp+1B8h+var_1B0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1B8h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1B8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_52622: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_78]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
void get_all_kv_cache_types[abi:cxx11](long long a1) { unsigned int *v1; // r12 long long i; // r13 long long v3; // rax long long v4; // r15 long long v5; // rax char *v6; // rsi long long v7; // [rsp+10h] [rbp-1A8h] BYREF _BYTE v8[104]; // [rsp+18h] [rbp-1A0h] BYREF _BYTE v9[312]; // [rsp+80h] [rbp-138h] BYREF std::ostringstream::basic_ostringstream(&v7); v1 = (unsigned int *)kv_cache_types; for ( i = qword_130F18; v1 != (unsigned int *)i; ++v1 ) { v3 = ggml_type_name(*v1); v4 = v3; if ( v3 ) { v5 = strlen(v3); std::__ostream_insert<char,std::char_traits<char>>(&v7, v4, v5); } else { std::ios::clear(&v8[*(_QWORD *)(v7 - 24) - 8], *(_DWORD *)&v8[*(_QWORD *)(v7 - 24) + 24] | 1u); } v6 = ", "; if ( v1 == (unsigned int *)(qword_130F18 - 4) ) v6 = ""; std::__ostream_insert<char,std::char_traits<char>>( &v7, v6, 2 * (unsigned int)(v1 != (unsigned int *)(qword_130F18 - 4))); } std::stringbuf::str(a1, v8); std::ostringstream::~ostringstream(&v7, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v9); }
get_all_kv_cache_types[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x188 MOV qword ptr [RSP + 0x8],RDI LEA RDI,[RSP + 0x10] CALL 0x0011bda0 MOV R12,qword ptr [0x00230f10] MOV R13,qword ptr [0x00230f18] CMP R12,R13 JZ 0x001525e1 LEA RBP,[0x1eefdc] LEA RBX,[0x1f2a4c] LEA R14,[RSP + 0x10] LAB_0015256f: MOV EDI,dword ptr [R12] LAB_00152573: CALL 0x0011b9a0 MOV R15,RAX TEST RAX,RAX JZ 0x00152598 MOV RDI,R15 CALL 0x0011b440 MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x0011bbc0 JMP 0x001525b4 LAB_00152598: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[RSP + RAX*0x1] ADD RDI,0x10 MOV ESI,dword ptr [RDI + 0x20] OR ESI,0x1 CALL 0x0011c190 LAB_001525b4: MOV RAX,qword ptr [0x00230f18] ADD RAX,-0x4 XOR EDX,EDX CMP R12,RAX SETNZ DL MOV RSI,RBX CMOVZ RSI,RBP ADD EDX,EDX MOV RDI,R14 CALL 0x0011bbc0 ADD R12,0x4 CMP R12,R13 JNZ 0x0015256f LAB_001525e1: LEA RSI,[RSP + 0x18] LAB_001525e6: MOV RDI,qword ptr [RSP + 0x8] CALL 0x0011c020 LAB_001525f0: MOV RSI,qword ptr [0x0022ff68] LEA RDI,[RSP + 0x10] CALL 0x0011b560 LEA RDI,[RSP + 0x80] CALL 0x0011b300 ADD RSP,0x188 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* get_all_kv_cache_types[abi:cxx11]() */ void get_all_kv_cache_types_abi_cxx11_(void) { int4 *puVar1; char *pcVar2; size_t sVar3; int4 *puVar4; long local_1a8 [4]; uint auStack_188 [20]; ios_base local_138 [264]; std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8); puVar1 = DAT_00230f18; if (kv_cache_types != DAT_00230f18) { puVar4 = kv_cache_types; do { /* try { // try from 00152573 to 001525d7 has its CatchHandler @ 00152622 */ pcVar2 = (char *)ggml_type_name(*puVar4); if (pcVar2 == (char *)0x0) { std::ios::clear((long)local_1a8 + *(long *)(local_1a8[0] + -0x18), *(uint *)((long)auStack_188 + *(long *)(local_1a8[0] + -0x18)) | 1); } else { sVar3 = strlen(pcVar2); std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,pcVar2,sVar3); } pcVar2 = ", "; if (puVar4 == DAT_00230f18 + -1) { pcVar2 = ""; } std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,pcVar2,(ulong)((uint)(puVar4 != DAT_00230f18 + -1) * 2)); puVar4 = puVar4 + 1; } while (puVar4 != puVar1); } /* try { // try from 001525e6 to 001525ef has its CatchHandler @ 00152620 */ std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8); std::ios_base::~ios_base(local_138); return; }
2,870
LefDefParser::lefiLayer::lefiLayer()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
lefiLayer::lefiLayer() : name_(NULL), nameSize_(0), type_(NULL), typeSize_(0), layerType_(NULL), hasPitch_(0), hasMask_(0), hasOffset_(0), hasWidth_(0), hasArea_(0), hasSpacing_(0), hasDiagPitch_(0), hasDiagWidth_(0), hasDiagSpacing_(0), hasSpacingName_(NULL), hasSpacingLayerStack_(NULL), hasSpacingAdjacent_(NULL), hasSpacingRange_(NULL), hasSpacingUseLengthThreshold_(NULL), hasSpacingLengthThreshold_(NULL), hasSpacingCenterToCenter_(NULL), hasSpacingParallelOverlap_(NULL), hasSpacingCutArea_(NULL), hasSpacingEndOfLine_(NULL), hasSpacingParellelEdge_(NULL), hasSpacingTwoEdges_(NULL), hasSpacingAdjacentExcept_(NULL), hasSpacingSamenet_(NULL), hasSpacingSamenetPGonly_(NULL), hasArraySpacing_(0), hasDirection_(0), hasResistance_(0), hasCapacitance_(0), hasHeight_(0), hasWireExtension_(0), hasThickness_(0), hasShrinkage_(0), hasCapMultiplier_(0), hasEdgeCap_(0), hasAntennaArea_(0), hasAntennaLength_(0), hasCurrentDensityPoint_(0), currentDensity_(0.0), pitchX_(0.0), pitchY_(0.0), offsetX_(0.0), offsetY_(0.0), diagPitchX_(0.0), diagPitchY_(0.0), diagWidth_(0.0), diagSpacing_(0.0), width_(0.0), area_(0.0), wireExtension_(0.0), numSpacings_(0), spacingsAllocated_(0), maskNumber_(0), spacing_(NULL), spacingAdjacentCuts_(NULL), spacingAdjacentWithin_(NULL), spacingCutArea_(NULL), rangeMin_(NULL), rangeMax_(NULL), rangeInfluence_(NULL), rangeInfluenceRangeMin_(NULL), rangeInfluenceRangeMax_(NULL), rangeRangeMin_(NULL), rangeRangeMax_(NULL), lengthThreshold_(NULL), lengthThresholdRangeMin_(NULL), lengthThresholdRangeMax_(NULL), numMinimumcut_(0), minimumcutAllocated_(0), minimumcut_(NULL), minimumcutWidth_(NULL), hasMinimumcutWithin_(NULL), minimumcutWithin_(NULL), hasMinimumcutConnection_(NULL), hasMinimumcutNumCuts_(NULL), minimumcutLength_(NULL), minimumcutDistance_(NULL), maxwidth_(0.0), minwidth_(0.0), numMinenclosedarea_(0), minenclosedareaAllocated_(0), minenclosedarea_(NULL), minenclosedareaWidth_(NULL), protrusionWidth1_(0.0), protrusionLength_(0.0), protrusionWidth2_(0.0), numMinstep_(0), numMinstepAlloc_(0), minstep_(NULL), minstepLengthsum_(NULL), minstepMaxEdges_(NULL), minstepMinAdjLength_(NULL), minstepMinBetLength_(NULL), minstepXSameCorners_(NULL), direction_(NULL), resistance_(0.0), capacitance_(0.0), height_(0.0), thickness_(0.0), shrinkage_(0.0), capMultiplier_(0.0), edgeCap_(0.0), antennaArea_(0.0), antennaLength_(0.0), numCurrentPoints_(0), currentPointsAllocated_(0), currentWidths_(NULL), current_(NULL), numCapacitancePoints_(0), capacitancePointsAllocated_(0), capacitanceWidths_(NULL), capacitances_(NULL), numResistancePoints_(0), resistancePointsAllocated_(0), resistanceWidths_(NULL), resistances_(NULL), numProps_(0), propsAllocated_(0), dvalues_(NULL), types_(NULL), numAccurrents_(0), accurrentAllocated_(0), accurrents_(NULL), numDccurrents_(0), dccurrentAllocated_(0), dccurrents_(NULL), numNums_(0), numAllocated_(0), nums_(NULL), hasAntennaAreaRatio_(0), hasAntennaDiffAreaRatio_(0), hasAntennaDiffAreaRatioPWL_(0), hasAntennaCumAreaRatio_(0), hasAntennaCumDiffAreaRatio_(0), hasAntennaCumDiffAreaRatioPWL_(0), hasAntennaAreaFactor_(0), hasAntennaAreaFactorDUO_(0), hasAntennaSideAreaRatio_(0), hasAntennaDiffSideAreaRatio_(0), hasAntennaDiffSideAreaRatioPWL_(0), hasAntennaCumSideAreaRatio_(0), hasAntennaCumDiffSideAreaRatio_(0), hasAntennaCumDiffSideAreaRatioPWL_(0), hasAntennaSideAreaFactor_(0), hasAntennaSideAreaFactorDUO_(0), currentAntennaModel_(0), numAntennaModel_(0), antennaModelAllocated_(0), antennaModel_(NULL), hasSlotWireWidth_(0), hasSlotWireLength_(0), hasSlotWidth_(0), hasSlotLength_(0), hasMaxAdjacentSlotSpacing_(0), hasMaxCoaxialSlotSpacing_(0), hasMaxEdgeSlotSpacing_(0), hasSplitWireWidth_(0), hasMinimumDensity_(0), hasMaximumDensity_(0), hasDensityCheckWindow_(0), hasDensityCheckStep_(0), hasFillActiveSpacing_(0), hasTwoWidthPRL_(0), slotWireWidth_(0.0), slotWireLength_(0.0), slotWidth_(0.0), slotLength_(0.0), maxAdjacentSlotSpacing_(0.0), maxCoaxialSlotSpacing_(0.0), maxEdgeSlotSpacing_(0.0), splitWireWidth_(0.0), minimumDensity_(0.0), maximumDensity_(0.0), densityCheckWindowLength_(0.0), densityCheckWindowWidth_(0.0), densityCheckStep_(0.0), fillActiveSpacing_(0.0), numSpacingTable_(0), spacingTableAllocated_(0), spacingTable_(NULL), numEnclosure_(0), enclosureAllocated_(0), overhang1_(NULL), overhang2_(NULL), encminWidth_(NULL), cutWithin_(NULL), minLength_(NULL), numPreferEnclosure_(0), preferEnclosureAllocated_(0), preferOverhang1_(NULL), preferOverhang2_(NULL), preferMinWidth_(NULL), resPerCut_(0.0), diagMinEdgeLength_(0.0), numMinSize_(0), minSizeWidth_(NULL), minSizeLength_(NULL), eolWidth_(NULL), eolWithin_(NULL), parSpace_(NULL), parWithin_(NULL), maxArea_(0.0), hasLongArray_(0), viaWidth_(0.0), cutSpacing_(0.0), numArrayCuts_(0), arrayCutsAllocated_(0), arrayCuts_(NULL), arraySpacings_(NULL), hasSpacingTableOrtho_(0), spacingTableOrtho_(NULL), notchLength_(NULL), endOfNotchWidth_(NULL), minNotchSpacing_(NULL), eonotchLength_(NULL) { Init(); }
O3
cpp
LefDefParser::lefiLayer::lefiLayer(): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx xorl %r13d, %r13d movq %r13, (%rdi) movl %r13d, 0x8(%rdi) movq %r13, 0x10(%rdi) movl %r13d, 0x18(%rdi) addq $0x50, %rdi movq %r13, 0x170(%rbx) leaq 0x180(%rbx), %r12 leaq 0x290(%rbx), %r15 leaq 0x368(%rbx), %r14 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x3c(%rbx) movl $0xac, %edx xorl %esi, %esi callq 0x2110 xorps %xmm0, %xmm0 movups %xmm0, 0x100(%rbx) movups %xmm0, 0x110(%rbx) movups %xmm0, 0x120(%rbx) movups %xmm0, 0x130(%rbx) movups %xmm0, 0x140(%rbx) movups %xmm0, 0x150(%rbx) movups %xmm0, 0x15c(%rbx) movl $0x98, %edx movq %r12, %rdi xorl %esi, %esi callq 0x2110 xorps %xmm0, %xmm0 movups %xmm0, 0x220(%rbx) movups %xmm0, 0x230(%rbx) movups %xmm0, 0x240(%rbx) movups %xmm0, 0x250(%rbx) movups %xmm0, 0x260(%rbx) movups %xmm0, 0x270(%rbx) movq %r13, 0x280(%rbx) movl $0xc8, %edx movq %r15, %rdi xorl %esi, %esi callq 0x2110 movl $0x158, %edx # imm = 0x158 movq %r14, %rdi xorl %esi, %esi callq 0x2110 xorps %xmm0, %xmm0 movups %xmm0, 0x4c8(%rbx) movups %xmm0, 0x4d8(%rbx) movups %xmm0, 0x4e8(%rbx) movups %xmm0, 0x500(%rbx) movups %xmm0, 0x510(%rbx) movups %xmm0, 0x51c(%rbx) movups %xmm0, 0x530(%rbx) movups %xmm0, 0x540(%rbx) movups %xmm0, 0x550(%rbx) movups %xmm0, 0x55c(%rbx) movups %xmm0, 0x570(%rbx) movups %xmm0, 0x580(%rbx) movups %xmm0, 0x58c(%rbx) movups %xmm0, 0x5a0(%rbx) movups %xmm0, 0x5b0(%rbx) movq %r13, 0x5c0(%rbx) movq %rbx, %rdi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x1759a
_ZN12LefDefParser9lefiLayerC2Ev: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi xor r13d, r13d mov [rdi], r13 mov [rdi+8], r13d mov [rdi+10h], r13 mov [rdi+18h], r13d add rdi, 50h ; 'P' mov [rbx+170h], r13 lea r12, [rbx+180h] lea r15, [rbx+290h] lea r14, [rbx+368h] xorps xmm0, xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+3Ch], xmm0 mov edx, 0ACh xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [rbx+100h], xmm0 movups xmmword ptr [rbx+110h], xmm0 movups xmmword ptr [rbx+120h], xmm0 movups xmmword ptr [rbx+130h], xmm0 movups xmmword ptr [rbx+140h], xmm0 movups xmmword ptr [rbx+150h], xmm0 movups xmmword ptr [rbx+15Ch], xmm0 mov edx, 98h mov rdi, r12 xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [rbx+220h], xmm0 movups xmmword ptr [rbx+230h], xmm0 movups xmmword ptr [rbx+240h], xmm0 movups xmmword ptr [rbx+250h], xmm0 movups xmmword ptr [rbx+260h], xmm0 movups xmmword ptr [rbx+270h], xmm0 mov [rbx+280h], r13 mov edx, 0C8h mov rdi, r15 xor esi, esi call _memset mov edx, 158h mov rdi, r14 xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [rbx+4C8h], xmm0 movups xmmword ptr [rbx+4D8h], xmm0 movups xmmword ptr [rbx+4E8h], xmm0 movups xmmword ptr [rbx+500h], xmm0 movups xmmword ptr [rbx+510h], xmm0 movups xmmword ptr [rbx+51Ch], xmm0 movups xmmword ptr [rbx+530h], xmm0 movups xmmword ptr [rbx+540h], xmm0 movups xmmword ptr [rbx+550h], xmm0 movups xmmword ptr [rbx+55Ch], xmm0 movups xmmword ptr [rbx+570h], xmm0 movups xmmword ptr [rbx+580h], xmm0 movups xmmword ptr [rbx+58Ch], xmm0 movups xmmword ptr [rbx+5A0h], xmm0 movups xmmword ptr [rbx+5B0h], xmm0 mov [rbx+5C0h], r13 mov rdi, rbx; this pop rbx pop r12 pop r13 pop r14 pop r15 jmp $+5; LefDefParser::lefiLayer::Init(void)
long long LefDefParser::lefiLayer::lefiLayer(LefDefParser::lefiLayer *this) { *(_QWORD *)this = 0LL; *((_DWORD *)this + 2) = 0; *((_QWORD *)this + 2) = 0LL; *((_DWORD *)this + 6) = 0; *((_QWORD *)this + 46) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *(_OWORD *)((char *)this + 60) = 0LL; memset((char *)this + 80, 0LL, 172LL); *((_OWORD *)this + 16) = 0LL; *((_OWORD *)this + 17) = 0LL; *((_OWORD *)this + 18) = 0LL; *((_OWORD *)this + 19) = 0LL; *((_OWORD *)this + 20) = 0LL; *((_OWORD *)this + 21) = 0LL; *(_OWORD *)((char *)this + 348) = 0LL; memset((char *)this + 384, 0LL, 152LL); *((_OWORD *)this + 34) = 0LL; *((_OWORD *)this + 35) = 0LL; *((_OWORD *)this + 36) = 0LL; *((_OWORD *)this + 37) = 0LL; *((_OWORD *)this + 38) = 0LL; *((_OWORD *)this + 39) = 0LL; *((_QWORD *)this + 80) = 0LL; memset((char *)this + 656, 0LL, 200LL); memset((char *)this + 872, 0LL, 344LL); *(_OWORD *)((char *)this + 1224) = 0LL; *(_OWORD *)((char *)this + 1240) = 0LL; *(_OWORD *)((char *)this + 1256) = 0LL; *((_OWORD *)this + 80) = 0LL; *((_OWORD *)this + 81) = 0LL; *(_OWORD *)((char *)this + 1308) = 0LL; *((_OWORD *)this + 83) = 0LL; *((_OWORD *)this + 84) = 0LL; *((_OWORD *)this + 85) = 0LL; *(_OWORD *)((char *)this + 1372) = 0LL; *((_OWORD *)this + 87) = 0LL; *((_OWORD *)this + 88) = 0LL; *(_OWORD *)((char *)this + 1420) = 0LL; *((_OWORD *)this + 90) = 0LL; *((_OWORD *)this + 91) = 0LL; *((_QWORD *)this + 184) = 0LL; return LefDefParser::lefiLayer::Init(this); }
lefiLayer: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI XOR R13D,R13D MOV qword ptr [RDI],R13 MOV dword ptr [RDI + 0x8],R13D MOV qword ptr [RDI + 0x10],R13 MOV dword ptr [RDI + 0x18],R13D ADD RDI,0x50 MOV qword ptr [RBX + 0x170],R13 LEA R12,[RBX + 0x180] LEA R15,[RBX + 0x290] LEA R14,[RBX + 0x368] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x3c],XMM0 MOV EDX,0xac XOR ESI,ESI CALL 0x00102110 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x100],XMM0 MOVUPS xmmword ptr [RBX + 0x110],XMM0 MOVUPS xmmword ptr [RBX + 0x120],XMM0 MOVUPS xmmword ptr [RBX + 0x130],XMM0 MOVUPS xmmword ptr [RBX + 0x140],XMM0 MOVUPS xmmword ptr [RBX + 0x150],XMM0 MOVUPS xmmword ptr [RBX + 0x15c],XMM0 MOV EDX,0x98 MOV RDI,R12 XOR ESI,ESI CALL 0x00102110 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x220],XMM0 MOVUPS xmmword ptr [RBX + 0x230],XMM0 MOVUPS xmmword ptr [RBX + 0x240],XMM0 MOVUPS xmmword ptr [RBX + 0x250],XMM0 MOVUPS xmmword ptr [RBX + 0x260],XMM0 MOVUPS xmmword ptr [RBX + 0x270],XMM0 MOV qword ptr [RBX + 0x280],R13 MOV EDX,0xc8 MOV RDI,R15 XOR ESI,ESI CALL 0x00102110 MOV EDX,0x158 MOV RDI,R14 XOR ESI,ESI CALL 0x00102110 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x4c8],XMM0 MOVUPS xmmword ptr [RBX + 0x4d8],XMM0 MOVUPS xmmword ptr [RBX + 0x4e8],XMM0 MOVUPS xmmword ptr [RBX + 0x500],XMM0 MOVUPS xmmword ptr [RBX + 0x510],XMM0 MOVUPS xmmword ptr [RBX + 0x51c],XMM0 MOVUPS xmmword ptr [RBX + 0x530],XMM0 MOVUPS xmmword ptr [RBX + 0x540],XMM0 MOVUPS xmmword ptr [RBX + 0x550],XMM0 MOVUPS xmmword ptr [RBX + 0x55c],XMM0 MOVUPS xmmword ptr [RBX + 0x570],XMM0 MOVUPS xmmword ptr [RBX + 0x580],XMM0 MOVUPS xmmword ptr [RBX + 0x58c],XMM0 MOVUPS xmmword ptr [RBX + 0x5a0],XMM0 MOVUPS xmmword ptr [RBX + 0x5b0],XMM0 MOV qword ptr [RBX + 0x5c0],R13 MOV RDI,RBX POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x0011759a
/* LefDefParser::lefiLayer::lefiLayer() */ void __thiscall LefDefParser::lefiLayer::lefiLayer(lefiLayer *this) { *(int8 *)this = 0; *(int4 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int4 *)(this + 0x18) = 0; *(int8 *)(this + 0x170) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x3c) = 0; *(int8 *)(this + 0x44) = 0; memset(this + 0x50,0,0xac); *(int8 *)(this + 0x100) = 0; *(int8 *)(this + 0x108) = 0; *(int8 *)(this + 0x110) = 0; *(int8 *)(this + 0x118) = 0; *(int8 *)(this + 0x120) = 0; *(int8 *)(this + 0x128) = 0; *(int8 *)(this + 0x130) = 0; *(int8 *)(this + 0x138) = 0; *(int8 *)(this + 0x140) = 0; *(int8 *)(this + 0x148) = 0; *(int8 *)(this + 0x150) = 0; *(int8 *)(this + 0x158) = 0; *(int8 *)(this + 0x15c) = 0; *(int8 *)(this + 0x164) = 0; memset(this + 0x180,0,0x98); *(int8 *)(this + 0x220) = 0; *(int8 *)(this + 0x228) = 0; *(int8 *)(this + 0x230) = 0; *(int8 *)(this + 0x238) = 0; *(int8 *)(this + 0x240) = 0; *(int8 *)(this + 0x248) = 0; *(int8 *)(this + 0x250) = 0; *(int8 *)(this + 600) = 0; *(int8 *)(this + 0x260) = 0; *(int8 *)(this + 0x268) = 0; *(int8 *)(this + 0x270) = 0; *(int8 *)(this + 0x278) = 0; *(int8 *)(this + 0x280) = 0; memset(this + 0x290,0,200); memset(this + 0x368,0,0x158); *(int8 *)(this + 0x4c8) = 0; *(int8 *)(this + 0x4d0) = 0; *(int8 *)(this + 0x4d8) = 0; *(int8 *)(this + 0x4e0) = 0; *(int8 *)(this + 0x4e8) = 0; *(int8 *)(this + 0x4f0) = 0; *(int8 *)(this + 0x500) = 0; *(int8 *)(this + 0x508) = 0; *(int8 *)(this + 0x510) = 0; *(int8 *)(this + 0x518) = 0; *(int8 *)(this + 0x51c) = 0; *(int8 *)(this + 0x524) = 0; *(int8 *)(this + 0x530) = 0; *(int8 *)(this + 0x538) = 0; *(int8 *)(this + 0x540) = 0; *(int8 *)(this + 0x548) = 0; *(int8 *)(this + 0x550) = 0; *(int8 *)(this + 0x558) = 0; *(int8 *)(this + 0x55c) = 0; *(int8 *)(this + 0x564) = 0; *(int8 *)(this + 0x570) = 0; *(int8 *)(this + 0x578) = 0; *(int8 *)(this + 0x580) = 0; *(int8 *)(this + 0x588) = 0; *(int8 *)(this + 0x58c) = 0; *(int8 *)(this + 0x594) = 0; *(int8 *)(this + 0x5a0) = 0; *(int8 *)(this + 0x5a8) = 0; *(int8 *)(this + 0x5b0) = 0; *(int8 *)(this + 0x5b8) = 0; *(int8 *)(this + 0x5c0) = 0; Init(); return; }
2,871
add_star_export_entry
bluesky950520[P]quickjs/quickjs.c
static int add_star_export_entry(JSContext *ctx, JSModuleDef *m, int req_module_idx) { JSStarExportEntry *se; if (js_resize_array(ctx, (void **)&m->star_export_entries, sizeof(JSStarExportEntry), &m->star_export_entries_size, m->star_export_entries_count + 1)) return -1; se = &m->star_export_entries[m->star_export_entries_count++]; se->req_module_idx = req_module_idx; return 0; }
O1
c
add_star_export_entry: pushq %r14 pushq %rbx pushq %rax movl %edx, %ebx movq %rsi, %r14 movl 0x40(%rsi), %r8d cmpl %r8d, 0x44(%rsi) jle 0x709e2 movq 0x38(%r14), %rax movslq 0x40(%r14), %rcx leal 0x1(%rcx), %edx movl %edx, 0x40(%r14) movl %ebx, (%rax,%rcx,4) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x38(%r14), %rsi leaq 0x44(%r14), %rcx incl %r8d movl $0x4, %edx callq 0x4754b movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x709da jmp 0x709c6
add_star_export_entry: push r14 push rbx push rax mov ebx, edx mov r14, rsi mov r8d, [rsi+40h] cmp [rsi+44h], r8d jle short loc_709E2 loc_709C6: mov rax, [r14+38h] movsxd rcx, dword ptr [r14+40h] lea edx, [rcx+1] mov [r14+40h], edx mov [rax+rcx*4], ebx xor eax, eax loc_709DA: add rsp, 8 pop rbx pop r14 retn loc_709E2: lea rsi, [r14+38h] lea rcx, [r14+44h] inc r8d mov edx, 4 call js_realloc_array mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_709DA jmp short loc_709C6
long long add_star_export_entry(long long a1, long long a2, int a3) { int v4; // r8d long long v5; // rax long long v6; // rcx long long result; // rax int v8; // ecx v4 = *(_DWORD *)(a2 + 64); if ( *(_DWORD *)(a2 + 68) > v4 || (v8 = js_realloc_array(a1, (long long *)(a2 + 56), 4u, (_DWORD *)(a2 + 68), v4 + 1), result = 0xFFFFFFFFLL, !v8) ) { v5 = *(_QWORD *)(a2 + 56); v6 = *(int *)(a2 + 64); *(_DWORD *)(a2 + 64) = v6 + 1; *(_DWORD *)(v5 + 4 * v6) = a3; return 0LL; } return result; }
add_star_export_entry: PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDX MOV R14,RSI MOV R8D,dword ptr [RSI + 0x40] CMP dword ptr [RSI + 0x44],R8D JLE 0x001709e2 LAB_001709c6: MOV RAX,qword ptr [R14 + 0x38] MOVSXD RCX,dword ptr [R14 + 0x40] LEA EDX,[RCX + 0x1] MOV dword ptr [R14 + 0x40],EDX MOV dword ptr [RAX + RCX*0x4],EBX XOR EAX,EAX LAB_001709da: ADD RSP,0x8 POP RBX POP R14 RET LAB_001709e2: LEA RSI,[R14 + 0x38] LEA RCX,[R14 + 0x44] INC R8D MOV EDX,0x4 CALL 0x0014754b MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x001709da JMP 0x001709c6
int8 add_star_export_entry(int8 param_1,long param_2,int4 param_3) { int iVar1; if ((*(int *)(param_2 + 0x44) <= *(int *)(param_2 + 0x40)) && (iVar1 = js_realloc_array(param_1,param_2 + 0x38,4,param_2 + 0x44,*(int *)(param_2 + 0x40) + 1) , iVar1 != 0)) { return 0xffffffff; } iVar1 = *(int *)(param_2 + 0x40); *(int *)(param_2 + 0x40) = iVar1 + 1; *(int4 *)(*(long *)(param_2 + 0x38) + (long)iVar1 * 4) = param_3; return 0; }
2,872
cpu_get_num_math()
monkey531[P]llama/common/common.cpp
int32_t cpu_get_num_math() { #if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__) int n_cpu = sysconf(_SC_NPROCESSORS_ONLN); if (n_cpu < 1) { return cpu_get_num_physical_cores(); } if (is_hybrid_cpu()) { cpu_set_t affinity; if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) { int result = cpu_count_math_cpus(n_cpu); pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity); if (result > 0) { return result; } } } #endif return cpu_get_num_physical_cores(); }
O2
cpp
cpu_get_num_math(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 pushq $0x54 popq %rdi callq 0x235e0 movq %rax, %rbx testl %ebx, %ebx jle 0x52fc1 pushq $0x7 popq %rax xorl %ecx, %ecx movq %rbx, %rsi cpuid xchgq %rbx, %rsi testw %dx, %dx jns 0x52fa6 callq 0x237d0 movq %rax, %r14 leaq 0x88(%rsp), %rdx movl $0x80, %esi movq %rax, %rdi callq 0x23fb0 testl %eax, %eax je 0x52fd7 callq 0x52d90 movl %eax, %ebp movl %ebp, %eax addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x52d90 xorl %ebp, %ebp movq %rsp, %r15 pushq $0x1a popq %r12 xorl %r13d, %r13d cmpl %ebx, %r13d jge 0x53072 xorps %xmm0, %xmm0 movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) cmpl $0x3ff, %r13d # imm = 0x3FF ja 0x53032 pushq $0x1 popq %rax movl %r13d, %ecx shlq %cl, %rax movl %r13d, %ecx shrl $0x6, %ecx orq %rax, (%rsp,%rcx,8) movl $0x80, %esi movq %r14, %rdi movq %r15, %rdx callq 0x23f40 testl %eax, %eax jne 0x5306f movl %r12d, %eax xorl %ecx, %ecx movq %rbx, %rsi cpuid xchgq %rbx, %rsi andl $0xff000000, %eax # imm = 0xFF000000 xorl %ecx, %ecx cmpl $0x20000000, %eax # imm = 0x20000000 setne %cl addl %ecx, %ebp addl %ecx, %r13d incl %r13d jmp 0x52fe3 pushq $-0x1 popq %rbp leaq 0x88(%rsp), %rdx movl $0x80, %esi movq %r14, %rdi callq 0x23f40 testl %ebp, %ebp jg 0x52fad jmp 0x52fa6
_Z16cpu_get_num_mathv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h push 54h ; 'T' pop rdi call _sysconf mov rbx, rax test ebx, ebx jle short loc_52FC1 push 7 pop rax xor ecx, ecx mov rsi, rbx cpuid xchg rsi, rbx test dx, dx jns short loc_52FA6 call _pthread_self mov r14, rax lea rdx, [rsp+138h+var_B0] mov esi, 80h mov rdi, rax call _pthread_getaffinity_np test eax, eax jz short loc_52FD7 loc_52FA6: call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void) mov ebp, eax loc_52FAD: mov eax, ebp add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_52FC1: add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void) loc_52FD7: xor ebp, ebp mov r15, rsp push 1Ah pop r12 xor r13d, r13d loc_52FE3: cmp r13d, ebx jge loc_53072 xorps xmm0, xmm0 movaps [rsp+138h+var_C8], xmm0 movaps [rsp+138h+var_D8], xmm0 movaps [rsp+138h+var_E8], xmm0 movaps [rsp+138h+var_F8], xmm0 movaps [rsp+138h+var_108], xmm0 movaps [rsp+138h+var_118], xmm0 movaps [rsp+138h+var_128], xmm0 movaps [rsp+138h+var_138], xmm0 cmp r13d, 3FFh ja short loc_53032 push 1 pop rax mov ecx, r13d shl rax, cl mov ecx, r13d shr ecx, 6 or qword ptr [rsp+rcx*8+138h+var_138], rax loc_53032: mov esi, 80h mov rdi, r14 mov rdx, r15 call _pthread_setaffinity_np test eax, eax jnz short loc_5306F mov eax, r12d xor ecx, ecx mov rsi, rbx cpuid xchg rsi, rbx and eax, 0FF000000h xor ecx, ecx cmp eax, 20000000h setnz cl add ebp, ecx add r13d, ecx inc r13d jmp loc_52FE3 loc_5306F: push 0FFFFFFFFFFFFFFFFh pop rbp loc_53072: lea rdx, [rsp+138h+var_B0] mov esi, 80h mov rdi, r14 call _pthread_setaffinity_np test ebp, ebp jg loc_52FAD jmp loc_52FA6
long long cpu_get_num_math(void) { std::thread *v0; // rdi long long v1; // rbx long long v3; // rsi long long v8; // rbx long long v9; // rsi long long v10; // rt0 long long v11; // r14 long long v12; // rcx long long v13; // r8 long long v14; // r9 int v15; // ebp unsigned int i; // r13d long long v19; // rsi __int128 v24; // [rsp+0h] [rbp-138h] BYREF __int128 v25; // [rsp+10h] [rbp-128h] __int128 v26; // [rsp+20h] [rbp-118h] __int128 v27; // [rsp+30h] [rbp-108h] __int128 v28; // [rsp+40h] [rbp-F8h] __int128 v29; // [rsp+50h] [rbp-E8h] __int128 v30; // [rsp+60h] [rbp-D8h] __int128 v31; // [rsp+70h] [rbp-C8h] _BYTE v32[176]; // [rsp+88h] [rbp-B0h] BYREF v0 = (std::thread *)(off_50 + 4); v1 = sysconf(84LL); if ( (int)v1 <= 0 ) return cpu_get_num_physical_cores((std::thread *)((char *)off_50 + 4)); _RAX = 7LL; v3 = v1; __asm { cpuid } v10 = v3; v9 = _RBX; v8 = v10; if ( (_RDX & 0x8000u) == 0LL ) return (unsigned int)cpu_get_num_physical_cores(v0); v11 = pthread_self(84LL, v9, _RDX, _RCX); v0 = (std::thread *)v11; if ( (unsigned int)pthread_getaffinity_np(v11, 128LL, v32) ) return (unsigned int)cpu_get_num_physical_cores(v0); v15 = 0; for ( i = 0; (int)i < (int)v8; i += v12 + 1 ) { v31 = 0LL; v30 = 0LL; v29 = 0LL; v28 = 0LL; v27 = 0LL; v26 = 0LL; v25 = 0LL; v24 = 0LL; if ( i <= 0x3FF ) *((_QWORD *)&v24 + (i >> 6)) |= 1LL << i; if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)(v11, 128LL, &v24) ) { v15 = -1; break; } _RAX = 26LL; v19 = v8; __asm { cpuid } v8 = v19; v12 = (_RAX & 0xFF000000) != 0x20000000; v15 += v12; } v0 = (std::thread *)v11; pthread_setaffinity_np( v11, 128LL, v32, v12, v13, v14, v24, *((_QWORD *)&v24 + 1), v25, *((_QWORD *)&v25 + 1), v26, *((_QWORD *)&v26 + 1), v27, *((_QWORD *)&v27 + 1), v28, *((_QWORD *)&v28 + 1), v29, *((_QWORD *)&v29 + 1), v30, *((_QWORD *)&v30 + 1), v31, *((_QWORD *)&v31 + 1)); if ( v15 <= 0 ) return (unsigned int)cpu_get_num_physical_cores(v0); return (unsigned int)v15; }
cpu_get_num_math: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 PUSH 0x54 POP RDI CALL 0x001235e0 MOV RBX,RAX TEST EBX,EBX JLE 0x00152fc1 PUSH 0x7 POP RAX XOR ECX,ECX MOV RSI,RBX CPUID XCHG RBX,RSI TEST DX,DX JNS 0x00152fa6 CALL 0x001237d0 MOV R14,RAX LEA RDX,[RSP + 0x88] MOV ESI,0x80 MOV RDI,RAX CALL 0x00123fb0 TEST EAX,EAX JZ 0x00152fd7 LAB_00152fa6: CALL 0x00152d90 MOV EBP,EAX LAB_00152fad: MOV EAX,EBP ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00152fc1: ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00152d90 LAB_00152fd7: XOR EBP,EBP MOV R15,RSP PUSH 0x1a POP R12 XOR R13D,R13D LAB_00152fe3: CMP R13D,EBX JGE 0x00153072 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 CMP R13D,0x3ff JA 0x00153032 PUSH 0x1 POP RAX MOV ECX,R13D SHL RAX,CL MOV ECX,R13D SHR ECX,0x6 OR qword ptr [RSP + RCX*0x8],RAX LAB_00153032: MOV ESI,0x80 MOV RDI,R14 MOV RDX,R15 CALL 0x00123f40 TEST EAX,EAX JNZ 0x0015306f MOV EAX,R12D XOR ECX,ECX MOV RSI,RBX CPUID XCHG RBX,RSI AND EAX,0xff000000 XOR ECX,ECX CMP EAX,0x20000000 SETNZ CL ADD EBP,ECX ADD R13D,ECX INC R13D JMP 0x00152fe3 LAB_0015306f: PUSH -0x1 POP RBP LAB_00153072: LEA RDX,[RSP + 0x88] MOV ESI,0x80 MOV RDI,R14 CALL 0x00123f40 TEST EBP,EBP JG 0x00152fad JMP 0x00152fa6
/* WARNING: Removing unreachable block (ram,0x0015304e) */ /* WARNING: Removing unreachable block (ram,0x00152f7b) */ /* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cpu_get_num_math() */ ulong cpu_get_num_math(void) { long lVar1; uint *puVar2; uint uVar3; int iVar4; uint uVar5; long lVar6; pthread_t __th; ulong uVar7; uint uVar8; cpu_set_t local_138; cpu_set_t local_b0; lVar6 = sysconf(0x54); if ((int)lVar6 < 1) { uVar7 = cpu_get_num_physical_cores(); return uVar7; } lVar1 = cpuid_Extended_Feature_Enumeration_info(7); if ((short)*(int4 *)(lVar1 + 8) < 0) { __th = pthread_self(); iVar4 = pthread_getaffinity_np(__th,0x80,&local_b0); if (iVar4 == 0) { uVar5 = 0; for (uVar8 = 0; (int)uVar8 < (int)lVar6; uVar8 = uVar8 + uVar3 + 1) { local_138.__bits[0xe] = 0; local_138.__bits[0xf] = 0; local_138.__bits[0xc] = 0; local_138.__bits[0xd] = 0; local_138.__bits[10] = 0; local_138.__bits[0xb] = 0; local_138.__bits[8] = 0; local_138.__bits[9] = 0; local_138.__bits[6] = 0; local_138.__bits[7] = 0; local_138.__bits[4] = 0; local_138.__bits[5] = 0; local_138.__bits[2] = 0; local_138.__bits[3] = 0; local_138.__bits[0] = 0; local_138.__bits[1] = 0; if (uVar8 < 0x400) { local_138.__bits[uVar8 >> 6] = local_138.__bits[uVar8 >> 6] | 1L << ((byte)uVar8 & 0x3f); } iVar4 = pthread_setaffinity_np(__th,0x80,&local_138); if (iVar4 != 0) { uVar5 = 0xffffffff; break; } puVar2 = (uint *)cpuid(0x1a); uVar3 = (uint)((*puVar2 & 0xff000000) != 0x20000000); uVar5 = uVar5 + uVar3; } pthread_setaffinity_np(__th,0x80,&local_b0); if (0 < (int)uVar5) goto LAB_00152fad; } } uVar5 = cpu_get_num_physical_cores(); LAB_00152fad: return (ulong)uVar5; }
2,873
maria_rtree_find_first
eloqsql/storage/maria/ma_rt_index.c
int maria_rtree_find_first(MARIA_HA *info, MARIA_KEY *key, uint32 search_flag) { my_off_t root; uint nod_cmp_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; /* At the moment index can only properly handle the MBR_INTERSECT, so we use it for all sorts of queries. TODO: better searsh for CONTAINS/WITHIN. */ search_flag= nod_cmp_flag= MBR_INTERSECT; if ((root= info->s->state.key_root[keyinfo->key_nr]) == HA_OFFSET_ERROR) { my_errno= HA_ERR_END_OF_FILE; return -1; } /* Save searched key, include data pointer. The data pointer is required if the search_flag contains MBR_DATA. (minimum bounding rectangle) */ memcpy(info->first_mbr_key, key->data, key->data_length + key->ref_length); info->last_rkey_length= key->data_length; info->maria_rtree_recursion_depth= -1; info->keyread_buff_used= 1; /* TODO better search for CONTAINS/WITHIN. nod_cmp_flag= ((search_flag & (MBR_EQUAL | MBR_WITHIN)) ? MBR_WITHIN : MBR_INTERSECT); */ return maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root, 0); }
O3
c
maria_rtree_find_first: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq 0x8(%rsi), %rbx movq (%rdi), %rax movq 0x118(%rax), %rax movzbl 0xa5(%rbx), %ecx movq (%rax,%rcx,8), %r12 cmpq $-0x1, %r12 je 0x5cd36 movq %rsi, %r15 movq %rdi, %r14 movq 0x398(%rdi), %rdi movq (%rsi), %rsi movl 0x14(%r15), %edx addl 0x10(%r15), %edx callq 0x29080 movl 0x10(%r15), %eax movl %eax, 0x630(%r14) movl $0xffffffff, 0x6f0(%r14) # imm = 0xFFFFFFFF movb $0x1, 0x685(%r14) movq %r14, %rdi movq %rbx, %rsi movq %r12, %rdx xorl %ecx, %ecx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x5cd4f callq 0xa319a movl $0x89, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
maria_rtree_find_first: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, [rsi+8] mov rax, [rdi] mov rax, [rax+118h] movzx ecx, byte ptr [rbx+0A5h] mov r12, [rax+rcx*8] cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_5CD36 mov r15, rsi mov r14, rdi mov rdi, [rdi+398h] mov rsi, [rsi] mov edx, [r15+14h] add edx, [r15+10h] call _memcpy mov eax, [r15+10h] mov [r14+630h], eax mov dword ptr [r14+6F0h], 0FFFFFFFFh mov byte ptr [r14+685h], 1 mov rdi, r14 mov rsi, rbx mov rdx, r12 xor ecx, ecx pop rbx pop r12 pop r14 pop r15 pop rbp jmp short maria_rtree_find_req loc_5CD36: call _my_thread_var mov dword ptr [rax], 89h mov eax, 0FFFFFFFFh pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long maria_rtree_find_first(long long a1, long long a2) { long long v2; // rbx long long v3; // r12 v2 = *(_QWORD *)(a2 + 8); v3 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 280LL) + 8LL * *(unsigned __int8 *)(v2 + 165)); if ( v3 == -1 ) { *(_DWORD *)my_thread_var(a1) = 137; return 0xFFFFFFFFLL; } else { memcpy(*(_QWORD *)(a1 + 920), *(_QWORD *)a2, (unsigned int)(*(_DWORD *)(a2 + 16) + *(_DWORD *)(a2 + 20))); *(_DWORD *)(a1 + 1584) = *(_DWORD *)(a2 + 16); *(_DWORD *)(a1 + 1776) = -1; *(_BYTE *)(a1 + 1669) = 1; return maria_rtree_find_req(a1, v2, v3, 0LL); } }
maria_rtree_find_first: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,qword ptr [RSI + 0x8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x118] MOVZX ECX,byte ptr [RBX + 0xa5] MOV R12,qword ptr [RAX + RCX*0x8] CMP R12,-0x1 JZ 0x0015cd36 MOV R15,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x398] MOV RSI,qword ptr [RSI] MOV EDX,dword ptr [R15 + 0x14] ADD EDX,dword ptr [R15 + 0x10] CALL 0x00129080 MOV EAX,dword ptr [R15 + 0x10] MOV dword ptr [R14 + 0x630],EAX MOV dword ptr [R14 + 0x6f0],0xffffffff MOV byte ptr [R14 + 0x685],0x1 MOV RDI,R14 MOV RSI,RBX MOV RDX,R12 XOR ECX,ECX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0015cd4f LAB_0015cd36: CALL 0x001a319a MOV dword ptr [RAX],0x89 MOV EAX,0xffffffff POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 maria_rtree_find_first(long *param_1,int8 *param_2) { long lVar1; long lVar2; int8 uVar3; int4 *puVar4; lVar1 = param_2[1]; lVar2 = *(long *)(*(long *)(*param_1 + 0x118) + (ulong)*(byte *)(lVar1 + 0xa5) * 8); if (lVar2 != -1) { memcpy((void *)param_1[0x73],(void *)*param_2, (ulong)(uint)(*(int *)((long)param_2 + 0x14) + *(int *)(param_2 + 2))); *(int4 *)(param_1 + 0xc6) = *(int4 *)(param_2 + 2); *(int4 *)(param_1 + 0xde) = 0xffffffff; *(int1 *)((long)param_1 + 0x685) = 1; uVar3 = maria_rtree_find_req(param_1,lVar1,lVar2,0); return uVar3; } puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x89; return 0xffffffff; }
2,874
void ImPlot::PlotShaded<unsigned int>(char const*, unsigned int const*, unsigned int const*, unsigned int const*, int, int, int, int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp
void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags, int offset, int stride) { GetterXY<IndexerIdx<T>,IndexerIdx<T>> getter1(IndexerIdx<T>(xs,count,offset,stride),IndexerIdx<T>(ys1,count,offset,stride),count); GetterXY<IndexerIdx<T>,IndexerIdx<T>> getter2(IndexerIdx<T>(xs,count,offset,stride),IndexerIdx<T>(ys2,count,offset,stride),count); PlotShadedEx(label_id, getter1, getter2, flags); }
O1
cpp
void ImPlot::PlotShaded<unsigned int>(char const*, unsigned int const*, unsigned int const*, unsigned int const*, int, int, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movq %rdx, %r11 movl 0xa0(%rsp), %r10d xorl %ebp, %ebp movl $0x0, %r14d testl %r8d, %r8d je 0xd4b95 movl %r10d, %eax cltd idivl %r8d leal (%rdx,%r8), %eax cltd idivl %r8d movl %edx, %r14d movl 0xa8(%rsp), %r15d testl %r8d, %r8d je 0xd4bb3 movl %r10d, %eax cltd idivl %r8d leal (%rdx,%r8), %eax cltd idivl %r8d movl %edx, %ebp xorl %ebx, %ebx movq %rsi, 0x8(%rsp) movl %r8d, 0x10(%rsp) movl %r14d, 0x14(%rsp) movl %r15d, 0x18(%rsp) movq %r11, 0x20(%rsp) movl %r8d, 0x28(%rsp) movl %ebp, 0x2c(%rsp) movl %r15d, 0x30(%rsp) movl %r8d, 0x38(%rsp) movl $0x0, %r11d testl %r8d, %r8d je 0xd4bfe movl %r10d, %eax cltd idivl %r8d leal (%rdx,%r8), %eax cltd idivl %r8d movl %edx, %r11d testl %r8d, %r8d je 0xd4c14 movl %r10d, %eax cltd idivl %r8d leal (%rdx,%r8), %eax cltd idivl %r8d movl %edx, %ebx leaq 0x40(%rsp), %rdx movq %rsi, (%rdx) movl %r8d, 0x8(%rdx) movl %r11d, 0xc(%rdx) movl %r15d, 0x10(%rdx) movq %rcx, 0x18(%rdx) movl %r8d, 0x20(%rdx) movl %ebx, 0x24(%rdx) movl %r15d, 0x28(%rdx) movl %r8d, 0x30(%rdx) leaq 0x8(%rsp), %rsi movl %r9d, %ecx callq 0xd4c53 addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN6ImPlot10PlotShadedIxEEvPKcPKT_S5_S5_iiii: push rbp push r15 push r14 push rbx sub rsp, 78h mov r11, rdx mov r10d, [rsp+98h+arg_0] xor ebp, ebp mov r14d, 0 test r8d, r8d jz short loc_D4B95 mov eax, r10d cdq idiv r8d lea eax, [rdx+r8] cdq idiv r8d mov r14d, edx loc_D4B95: mov r15d, [rsp+98h+arg_8] test r8d, r8d jz short loc_D4BB3 mov eax, r10d cdq idiv r8d lea eax, [rdx+r8] cdq idiv r8d mov ebp, edx loc_D4BB3: xor ebx, ebx mov [rsp+98h+var_90], rsi mov [rsp+98h+var_88], r8d mov [rsp+98h+var_84], r14d mov [rsp+98h+var_80], r15d mov [rsp+98h+var_78], r11 mov [rsp+98h+var_70], r8d mov [rsp+98h+var_6C], ebp mov [rsp+98h+var_68], r15d mov [rsp+98h+var_60], r8d mov r11d, 0 test r8d, r8d jz short loc_D4BFE mov eax, r10d cdq idiv r8d lea eax, [rdx+r8] cdq idiv r8d mov r11d, edx loc_D4BFE: test r8d, r8d jz short loc_D4C14 mov eax, r10d cdq idiv r8d lea eax, [rdx+r8] cdq idiv r8d mov ebx, edx loc_D4C14: lea rdx, [rsp+98h+var_58] mov [rdx], rsi mov [rdx+8], r8d mov [rdx+0Ch], r11d mov [rdx+10h], r15d mov [rdx+18h], rcx mov [rdx+20h], r8d mov [rdx+24h], ebx mov [rdx+28h], r15d mov [rdx+30h], r8d lea rsi, [rsp+98h+var_90] mov ecx, r9d call _ZN6ImPlot12PlotShadedExINS_8GetterXYINS_10IndexerIdxIxEES3_EES4_EEvPKcRKT_RKT0_i; ImPlot::PlotShadedEx<ImPlot::GetterXY<ImPlot::IndexerIdx<long long>,ImPlot::IndexerIdx<long long>>,ImPlot::GetterXY<ImPlot::IndexerIdx<long long>,ImPlot::IndexerIdx<long long>>>(char const*,ImPlot::GetterXY<ImPlot::IndexerIdx<long long>,ImPlot::IndexerIdx<long long>> const&,ImPlot::GetterXY<ImPlot::IndexerIdx<long long>,ImPlot::IndexerIdx<long long>> const&,int) add rsp, 78h pop rbx pop r14 pop r15 pop rbp retn
long long ImPlot::PlotShaded<long long>( long long a1, long long a2, long long a3, long long a4, int a5, unsigned int a6, int a7, int a8) { int v8; // ebp int v9; // r14d int v10; // ebx int v11; // r11d long long v13; // [rsp+8h] [rbp-90h] BYREF int v14; // [rsp+10h] [rbp-88h] int v15; // [rsp+14h] [rbp-84h] int v16; // [rsp+18h] [rbp-80h] long long v17; // [rsp+20h] [rbp-78h] int v18; // [rsp+28h] [rbp-70h] int v19; // [rsp+2Ch] [rbp-6Ch] int v20; // [rsp+30h] [rbp-68h] int v21; // [rsp+38h] [rbp-60h] long long v22; // [rsp+40h] [rbp-58h] BYREF int v23; // [rsp+48h] [rbp-50h] int v24; // [rsp+4Ch] [rbp-4Ch] int v25; // [rsp+50h] [rbp-48h] long long v26; // [rsp+58h] [rbp-40h] int v27; // [rsp+60h] [rbp-38h] int v28; // [rsp+64h] [rbp-34h] int v29; // [rsp+68h] [rbp-30h] int v30; // [rsp+70h] [rbp-28h] v8 = 0; v9 = 0; if ( a5 ) { v9 = (a7 % a5 + a5) % a5; v8 = v9; } v10 = 0; v13 = a2; v14 = a5; v15 = v9; v16 = a8; v17 = a3; v18 = a5; v19 = v8; v20 = a8; v21 = a5; v11 = 0; if ( a5 ) { v11 = (a7 % a5 + a5) % a5; v10 = v11; } v22 = a2; v23 = a5; v24 = v11; v25 = a8; v26 = a4; v27 = a5; v28 = v10; v29 = a8; v30 = a5; return ImPlot::PlotShadedEx<ImPlot::GetterXY<ImPlot::IndexerIdx<long long>,ImPlot::IndexerIdx<long long>>,ImPlot::GetterXY<ImPlot::IndexerIdx<long long>,ImPlot::IndexerIdx<long long>>>( a1, &v13, &v22, a6); }
PlotShaded<long_long>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x78 MOV R11,RDX MOV R10D,dword ptr [RSP + 0xa0] XOR EBP,EBP MOV R14D,0x0 TEST R8D,R8D JZ 0x001d4b95 MOV EAX,R10D CDQ IDIV R8D LEA EAX,[RDX + R8*0x1] CDQ IDIV R8D MOV R14D,EDX LAB_001d4b95: MOV R15D,dword ptr [RSP + 0xa8] TEST R8D,R8D JZ 0x001d4bb3 MOV EAX,R10D CDQ IDIV R8D LEA EAX,[RDX + R8*0x1] CDQ IDIV R8D MOV EBP,EDX LAB_001d4bb3: XOR EBX,EBX MOV qword ptr [RSP + 0x8],RSI MOV dword ptr [RSP + 0x10],R8D MOV dword ptr [RSP + 0x14],R14D MOV dword ptr [RSP + 0x18],R15D MOV qword ptr [RSP + 0x20],R11 MOV dword ptr [RSP + 0x28],R8D MOV dword ptr [RSP + 0x2c],EBP MOV dword ptr [RSP + 0x30],R15D MOV dword ptr [RSP + 0x38],R8D MOV R11D,0x0 TEST R8D,R8D JZ 0x001d4bfe MOV EAX,R10D CDQ IDIV R8D LEA EAX,[RDX + R8*0x1] CDQ IDIV R8D MOV R11D,EDX LAB_001d4bfe: TEST R8D,R8D JZ 0x001d4c14 MOV EAX,R10D CDQ IDIV R8D LEA EAX,[RDX + R8*0x1] CDQ IDIV R8D MOV EBX,EDX LAB_001d4c14: LEA RDX,[RSP + 0x40] MOV qword ptr [RDX],RSI MOV dword ptr [RDX + 0x8],R8D MOV dword ptr [RDX + 0xc],R11D MOV dword ptr [RDX + 0x10],R15D MOV qword ptr [RDX + 0x18],RCX MOV dword ptr [RDX + 0x20],R8D MOV dword ptr [RDX + 0x24],EBX MOV dword ptr [RDX + 0x28],R15D MOV dword ptr [RDX + 0x30],R8D LEA RSI,[RSP + 0x8] MOV ECX,R9D CALL 0x001d4c53 ADD RSP,0x78 POP RBX POP R14 POP R15 POP RBP RET
/* void ImPlot::PlotShaded<long long>(char const*, long long const*, long long const*, long long const*, int, int, int, int) */ void ImPlot::PlotShaded<long_long> (char *param_1,longlong *param_2,longlong *param_3,longlong *param_4,int param_5, int param_6,int param_7,int param_8) { longlong *local_90; int local_88; int local_84; int local_80; longlong *local_78; int local_70; int local_6c; int local_68; int local_60; longlong *local_58; int local_50; int local_4c; int local_48; longlong *local_40; int local_38; int local_34; int local_30; int local_28; local_6c = 0; local_84 = 0; if (param_5 != 0) { local_84 = (param_7 % param_5 + param_5) % param_5; local_6c = (param_7 % param_5 + param_5) % param_5; } local_34 = 0; local_80 = param_8; local_68 = param_8; local_4c = 0; if (param_5 != 0) { local_4c = (param_7 % param_5 + param_5) % param_5; local_34 = (param_7 % param_5 + param_5) % param_5; } local_48 = param_8; local_30 = param_8; local_90 = param_2; local_88 = param_5; local_78 = param_3; local_70 = param_5; local_60 = param_5; local_58 = param_2; local_50 = param_5; local_40 = param_4; local_38 = param_5; local_28 = param_5; PlotShadedEx<ImPlot::GetterXY<ImPlot::IndexerIdx<long_long>,ImPlot::IndexerIdx<long_long>>,ImPlot::GetterXY<ImPlot::IndexerIdx<long_long>,ImPlot::IndexerIdx<long_long>>> (param_1,(GetterXY *)&local_90,(GetterXY *)&local_58,param_6); return; }
2,875
inline_mysql_file_pread
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_pread( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, my_off_t offset, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_pread(file, buffer, count, offset, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_pread(file, buffer, count, offset, flags); return result; }
O0
c
inline_mysql_file_pread: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x20798c(%rip), %rax # 0x2c8038 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x6, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xc07bf leaq 0x207942(%rip), %rax # 0x2c8038 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x10(%rbp), %r8 callq 0xfc0f0 movq %rax, -0x38(%rbp) movq 0x10(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xc076a cmpq $0x0, -0x38(%rbp) jne 0xc074f movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xc075a xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0xc075a movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xc0797 cmpq $-0x1, -0x38(%rbp) je 0xc077e movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xc0789 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0xc0789 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x20789a(%rip), %rax # 0x2c8038 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xc07e3 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x10(%rbp), %r8 callq 0xfc0f0 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq
inline_mysql_file_pread_7: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 6 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_C07BF lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8, [rbp+arg_0] call my_pread mov [rbp+var_38], rax mov rax, [rbp+arg_0] and rax, 6 cmp rax, 0 jz short loc_C076A cmp [rbp+var_38], 0 jnz short loc_C074F mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_C075A loc_C074F: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_C075A: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_C0797 loc_C076A: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_C077E mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_C0789 loc_C077E: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_C0789: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_C0797: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_C07E3 loc_C07BF: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8, [rbp+arg_0] call my_pread mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_C07E3: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_pread_7( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6, long long a7) { long long v8; // [rsp+0h] [rbp-A0h] long long v9; // [rsp+8h] [rbp-98h] _BYTE v10[72]; // [rsp+18h] [rbp-88h] BYREF long long v11; // [rsp+60h] [rbp-40h] long long v12; // [rsp+68h] [rbp-38h] long long v13; // [rsp+70h] [rbp-30h] long long v14; // [rsp+78h] [rbp-28h] long long v15; // [rsp+80h] [rbp-20h] unsigned int v16; // [rsp+88h] [rbp-18h] unsigned int v17; // [rsp+8Ch] [rbp-14h] long long v18; // [rsp+90h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; v13 = a6; v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v10, a3, 6LL); if ( v11 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v11, v14, v18, v17); v12 = my_pread(v16, v15, v14, v13, a7); if ( (a7 & 6) != 0 ) { if ( v12 ) v9 = 0LL; else v9 = v14; ((void ( *)(long long, long long))PSI_server[67])(v11, v9); } else { if ( v12 == -1 ) v8 = 0LL; else v8 = v12; ((void ( *)(long long, long long))PSI_server[67])(v11, v8); } return v12; } else { return my_pread(v16, v15, v14, v13, a7); } }
inline_mysql_file_pread: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c8038] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x6 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001c07bf LEA RAX,[0x3c8038] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x001fc0f0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x10] AND RAX,0x6 CMP RAX,0x0 JZ 0x001c076a CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001c074f MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x001c075a LAB_001c074f: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001c075a LAB_001c075a: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x001c0797 LAB_001c076a: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x001c077e MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001c0789 LAB_001c077e: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001c0789 LAB_001c0789: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001c0797: LEA RAX,[0x3c8038] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001c07e3 LAB_001c07bf: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x001fc0f0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001c07e3: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_pread (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,int8 param_6,ulong param_7) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; int8 local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6); if (local_48 == 0) { local_10 = my_pread(local_20,local_28,local_30,local_38,param_7); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_pread(local_20,local_28,local_30,local_38,param_7); if ((param_7 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
2,876
inline_mysql_file_pread
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_pread( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, my_off_t offset, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_pread(file, buffer, count, offset, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_pread(file, buffer, count, offset, flags); return result; }
O3
c
inline_mysql_file_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %rbx movq %rdx, %r14 movl %esi, %r15d movl %edi, %r13d leaq 0x3252c7(%rip), %rax # 0x38d070 movq (%rax), %rax leaq -0x70(%rbp), %rdi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x67deb movl $0x2, %r8d movl %r15d, %edi movq %r14, %rsi movq %rbx, %rdx xorl %ecx, %ecx callq 0xa6624 movq %rax, %r14 movq %r14, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r12 leaq 0x32527b(%rip), %rax # 0x38d070 movq (%rax), %rax leaq 0x77bda(%rip), %rdx # 0xdf9d9 movq %r12, %rdi movq %rbx, %rsi movl %r13d, %ecx callq *0x210(%rax) xorl %r13d, %r13d movl $0x2, %r8d movl %r15d, %edi movq %r14, %rsi movq %rbx, %rdx xorl %ecx, %ecx callq 0xa6624 movq %rax, %r14 testq %rax, %rax cmoveq %rbx, %r13 leaq 0x325238(%rip), %rax # 0x38d070 movq (%rax), %rax movq %r12, %rdi movq %r13, %rsi callq *0x218(%rax) jmp 0x67dd9
inline_mysql_file_pread_1: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rcx mov r14, rdx mov r15d, esi mov r13d, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_70] mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_67DEB mov r8d, 2 mov edi, r15d mov rsi, r14 mov rdx, rbx xor ecx, ecx call my_pread mov r14, rax loc_67DD9: mov rax, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_67DEB: mov r12, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov rsi, rbx mov ecx, r13d call qword ptr [rax+210h] xor r13d, r13d mov r8d, 2 mov edi, r15d mov rsi, r14 mov rdx, rbx xor ecx, ecx call my_pread mov r14, rax test rax, rax cmovz r13, rbx lea rax, PSI_server mov rax, [rax] mov rdi, r12 mov rsi, r13 call qword ptr [rax+218h] jmp short loc_67DD9
long long inline_mysql_file_pread_1(unsigned int a1, long long a2, long long a3, long long a4) { long long v6; // rax long long v7; // r14 long long v9; // r12 long long v10; // r13 _BYTE v11[112]; // [rsp+0h] [rbp-70h] BYREF v6 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v11, a2, 6LL); if ( !v6 ) return my_pread((unsigned int)a2, a3, a4, 0LL, 2LL); v9 = v6; ((void ( *)(long long, long long, const char *, _QWORD))PSI_server[66])( v6, a4, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", a1); v10 = 0LL; v7 = my_pread((unsigned int)a2, a3, a4, 0LL, 2LL); if ( !v7 ) v10 = a4; ((void ( *)(long long, long long))PSI_server[67])(v9, v10); return v7; }
inline_mysql_file_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RCX MOV R14,RDX MOV R15D,ESI MOV R13D,EDI LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x70] MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00167deb MOV R8D,0x2 MOV EDI,R15D MOV RSI,R14 MOV RDX,RBX XOR ECX,ECX CALL 0x001a6624 MOV R14,RAX LAB_00167dd9: MOV RAX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00167deb: MOV R12,RAX LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] LEA RDX,[0x1df9d9] MOV RDI,R12 MOV RSI,RBX MOV ECX,R13D CALL qword ptr [RAX + 0x210] XOR R13D,R13D MOV R8D,0x2 MOV EDI,R15D MOV RSI,R14 MOV RDX,RBX XOR ECX,ECX CALL 0x001a6624 MOV R14,RAX TEST RAX,RAX CMOVZ R13,RBX LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] MOV RDI,R12 MOV RSI,R13 CALL qword ptr [RAX + 0x218] JMP 0x00167dd9
long inline_mysql_file_pread(int4 param_1,ulong param_2,int8 param_3,int8 param_4) { long lVar1; long lVar2; int8 uVar3; int1 local_78 [72]; lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_2,6); if (lVar1 == 0) { lVar2 = my_pread(param_2 & 0xffffffff,param_3,param_4,0,2); } else { (**(code **)(PSI_server + 0x210)) (lVar1,param_4, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",param_1); lVar2 = my_pread(param_2 & 0xffffffff,param_3,param_4,0,2); uVar3 = 0; if (lVar2 == 0) { uVar3 = param_4; } (**(code **)(PSI_server + 0x218))(lVar1,uVar3); } return lVar2; }
2,877
mi_mempack_get_block_info
eloqsql/storage/myisam/mi_packrec.c
static uchar *_mi_mempack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, uchar *header) { header+= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); if (myisam->s->base.blobs) { header+= read_pack_length((uint) myisam->s->pack.version, header, &info->blob_len); /* mi_alloc_rec_buff sets my_errno on error */ if (!(mi_alloc_rec_buff(myisam, info->blob_len , rec_buff_p))) return 0; /* not enough memory */ bit_buff->blob_pos= (uchar*) *rec_buff_p; bit_buff->blob_end= (uchar*) *rec_buff_p + info->blob_len; } return header; }
O3
c
mi_mempack_get_block_info: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %r14 movzbl (%r8), %eax cmpq $0xfd, %rax ja 0x83bff movl $0x1, %ecx jmp 0x83c3a cmpl $0xfe, %eax jne 0x83c11 movzwl 0x1(%rbx), %eax movl $0x3, %ecx jmp 0x83c3a movq (%rdi), %rax cmpb $0x1, 0x244(%rax) jne 0x83c32 movzwl 0x1(%rbx), %ecx movzbl 0x3(%rbx), %eax shll $0x10, %eax orq %rcx, %rax movl $0x4, %ecx jmp 0x83c3a movl 0x1(%rbx), %eax movl $0x5, %ecx movq %rax, 0x18(%r15) addq %rcx, %rbx movq (%rdi), %rax cmpl $0x0, 0x188(%rax) je 0x83cc5 movzbl (%rbx), %esi cmpq $0xfd, %rsi ja 0x83c61 movl $0x1, %r13d jmp 0x83c9d cmpl $0xfe, %esi jne 0x83c75 movzwl 0x1(%rbx), %esi movl $0x3, %r13d jmp 0x83c9d cmpb $0x1, 0x244(%rax) jne 0x83c94 movzwl 0x1(%rbx), %eax movzbl 0x3(%rbx), %esi shll $0x10, %esi orq %rax, %rsi movl $0x4, %r13d jmp 0x83c9d movl 0x1(%rbx), %esi movl $0x5, %r13d movq %rsi, 0x30(%r15) movq %r12, %rdx callq 0x7fcfd testq %rax, %rax je 0x83cc3 addq %r13, %rbx movq (%r12), %rax movq %rax, 0x18(%r14) addq 0x30(%r15), %rax movq %rax, 0x20(%r14) jmp 0x83cc5 xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_mi_mempack_get_block_info: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r12, rcx mov r15, rdx mov r14, rsi movzx eax, byte ptr [r8] cmp rax, 0FDh ja short loc_83BFF mov ecx, 1 jmp short loc_83C3A loc_83BFF: cmp eax, 0FEh jnz short loc_83C11 movzx eax, word ptr [rbx+1] mov ecx, 3 jmp short loc_83C3A loc_83C11: mov rax, [rdi] cmp byte ptr [rax+244h], 1 jnz short loc_83C32 movzx ecx, word ptr [rbx+1] movzx eax, byte ptr [rbx+3] shl eax, 10h or rax, rcx mov ecx, 4 jmp short loc_83C3A loc_83C32: mov eax, [rbx+1] mov ecx, 5 loc_83C3A: mov [r15+18h], rax add rbx, rcx mov rax, [rdi] cmp dword ptr [rax+188h], 0 jz short loc_83CC5 movzx esi, byte ptr [rbx] cmp rsi, 0FDh ja short loc_83C61 mov r13d, 1 jmp short loc_83C9D loc_83C61: cmp esi, 0FEh jnz short loc_83C75 movzx esi, word ptr [rbx+1] mov r13d, 3 jmp short loc_83C9D loc_83C75: cmp byte ptr [rax+244h], 1 jnz short loc_83C94 movzx eax, word ptr [rbx+1] movzx esi, byte ptr [rbx+3] shl esi, 10h or rsi, rax mov r13d, 4 jmp short loc_83C9D loc_83C94: mov esi, [rbx+1] mov r13d, 5 loc_83C9D: mov [r15+30h], rsi mov rdx, r12 call mi_alloc_rec_buff test rax, rax jz short loc_83CC3 add rbx, r13 mov rax, [r12] mov [r14+18h], rax add rax, [r15+30h] mov [r14+20h], rax jmp short loc_83CC5 loc_83CC3: xor ebx, ebx loc_83CC5: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned __int8 * mi_mempack_get_block_info( long long *a1, long long a2, long long a3, long long *a4, unsigned __int8 *a5, long long a6) { unsigned long long v9; // rax long long v10; // rcx unsigned __int8 *v11; // rbx unsigned long long v12; // rsi long long v13; // r13 long long v14; // rax v9 = *a5; if ( v9 > 0xFD ) { if ( (_DWORD)v9 == 254 ) { v9 = *(unsigned __int16 *)(a5 + 1); v10 = 3LL; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v9 = *(unsigned __int16 *)(a5 + 1) | (unsigned long long)(a5[3] << 16); v10 = 4LL; } else { v9 = *(unsigned int *)(a5 + 1); v10 = 5LL; } } else { v10 = 1LL; } *(_QWORD *)(a3 + 24) = v9; v11 = &a5[v10]; if ( *(_DWORD *)(*a1 + 392) ) { v12 = *v11; if ( v12 > 0xFD ) { if ( (_DWORD)v12 == 254 ) { v12 = *(unsigned __int16 *)(v11 + 1); v13 = 3LL; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v12 = *(unsigned __int16 *)(v11 + 1) | (unsigned long long)(v11[3] << 16); v13 = 4LL; } else { v12 = *(unsigned int *)(v11 + 1); v13 = 5LL; } } else { v13 = 1LL; } *(_QWORD *)(a3 + 48) = v12; if ( mi_alloc_rec_buff(a1, v12, a4, v10, (long long)a5, a6) ) { v11 += v13; v14 = *a4; *(_QWORD *)(a2 + 24) = *a4; *(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + v14; } else { return 0LL; } } return v11; }
_mi_mempack_get_block_info: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R12,RCX MOV R15,RDX MOV R14,RSI MOVZX EAX,byte ptr [R8] CMP RAX,0xfd JA 0x00183bff MOV ECX,0x1 JMP 0x00183c3a LAB_00183bff: CMP EAX,0xfe JNZ 0x00183c11 MOVZX EAX,word ptr [RBX + 0x1] MOV ECX,0x3 JMP 0x00183c3a LAB_00183c11: MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x244],0x1 JNZ 0x00183c32 MOVZX ECX,word ptr [RBX + 0x1] MOVZX EAX,byte ptr [RBX + 0x3] SHL EAX,0x10 OR RAX,RCX MOV ECX,0x4 JMP 0x00183c3a LAB_00183c32: MOV EAX,dword ptr [RBX + 0x1] MOV ECX,0x5 LAB_00183c3a: MOV qword ptr [R15 + 0x18],RAX ADD RBX,RCX MOV RAX,qword ptr [RDI] CMP dword ptr [RAX + 0x188],0x0 JZ 0x00183cc5 MOVZX ESI,byte ptr [RBX] CMP RSI,0xfd JA 0x00183c61 MOV R13D,0x1 JMP 0x00183c9d LAB_00183c61: CMP ESI,0xfe JNZ 0x00183c75 MOVZX ESI,word ptr [RBX + 0x1] MOV R13D,0x3 JMP 0x00183c9d LAB_00183c75: CMP byte ptr [RAX + 0x244],0x1 JNZ 0x00183c94 MOVZX EAX,word ptr [RBX + 0x1] MOVZX ESI,byte ptr [RBX + 0x3] SHL ESI,0x10 OR RSI,RAX MOV R13D,0x4 JMP 0x00183c9d LAB_00183c94: MOV ESI,dword ptr [RBX + 0x1] MOV R13D,0x5 LAB_00183c9d: MOV qword ptr [R15 + 0x30],RSI MOV RDX,R12 CALL 0x0017fcfd TEST RAX,RAX JZ 0x00183cc3 ADD RBX,R13 MOV RAX,qword ptr [R12] MOV qword ptr [R14 + 0x18],RAX ADD RAX,qword ptr [R15 + 0x30] MOV qword ptr [R14 + 0x20],RAX JMP 0x00183cc5 LAB_00183cc3: XOR EBX,EBX LAB_00183cc5: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
byte * _mi_mempack_get_block_info (long *param_1,long param_2,long param_3,long *param_4,byte *param_5) { long lVar1; long lVar2; ulong uVar3; uVar3 = (ulong)*param_5; if (uVar3 < 0xfe) { lVar2 = 1; } else if (*param_5 == 0xfe) { uVar3 = (ulong)*(ushort *)(param_5 + 1); lVar2 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)*(uint3 *)(param_5 + 1); lVar2 = 4; } else { uVar3 = (ulong)*(uint *)(param_5 + 1); lVar2 = 5; } *(ulong *)(param_3 + 0x18) = uVar3; param_5 = param_5 + lVar2; if (*(int *)(*param_1 + 0x188) != 0) { uVar3 = (ulong)*param_5; if (uVar3 < 0xfe) { lVar2 = 1; } else if (*param_5 == 0xfe) { uVar3 = (ulong)*(ushort *)(param_5 + 1); lVar2 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)*(uint3 *)(param_5 + 1); lVar2 = 4; } else { uVar3 = (ulong)*(uint *)(param_5 + 1); lVar2 = 5; } *(ulong *)(param_3 + 0x30) = uVar3; lVar1 = mi_alloc_rec_buff(param_1,uVar3,param_4); if (lVar1 == 0) { param_5 = (byte *)0x0; } else { param_5 = param_5 + lVar2; lVar2 = *param_4; *(long *)(param_2 + 0x18) = lVar2; *(long *)(param_2 + 0x20) = lVar2 + *(long *)(param_3 + 0x30); } } return param_5; }
2,878
unreg_request
eloqsql/storage/maria/ma_pagecache.c
static void unreg_request(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, int at_end) { DBUG_ENTER("unreg_request"); DBUG_PRINT("enter", ("block %p (%u) status: %x requests: %u", block, PCBLOCK_NUMBER(pagecache, block), block->status, block->requests)); PCBLOCK_INFO(block); DBUG_ASSERT(block->requests > 0); if (! --block->requests) { my_bool hot; if (block->hits_left) block->hits_left--; hot= !block->hits_left && at_end && pagecache->warm_blocks > pagecache->min_warm_blocks; if (hot) { if (block->temperature == PCBLOCK_WARM) pagecache->warm_blocks--; block->temperature= PCBLOCK_HOT; KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %zu", pagecache->warm_blocks)); } link_block(pagecache, block, hot, (my_bool)at_end); block->last_hit_time= pagecache->time; pagecache->time++; block= pagecache->used_ins; /* Check if we should link a hot block to the warm block */ if (block && pagecache->time - block->last_hit_time > pagecache->age_threshold) { unlink_block(pagecache, block); link_block(pagecache, block, 0, 0); if (block->temperature != PCBLOCK_WARM) { pagecache->warm_blocks++; block->temperature= PCBLOCK_WARM; } KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %zu", pagecache->warm_blocks)); } } DBUG_VOID_RETURN; }
O0
c
unreg_request: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) jmp 0x3af45 jmp 0x3af47 jmp 0x3af49 jmp 0x3af4b jmp 0x3af4d movq -0x10(%rbp), %rcx movl 0x60(%rcx), %eax addl $-0x1, %eax movl %eax, 0x60(%rcx) cmpl $0x0, %eax jne 0x3b0a4 movq -0x10(%rbp), %rax cmpl $0x0, 0x80(%rax) je 0x3af83 movq -0x10(%rbp), %rax movl 0x80(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x80(%rax) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpl $0x0, 0x80(%rcx) movb %al, -0x16(%rbp) jne 0x3afb6 xorl %eax, %eax cmpl $0x0, -0x14(%rbp) movb %al, -0x16(%rbp) je 0x3afb6 movq -0x8(%rbp), %rax movq 0x60(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x8(%rcx), %rax seta %al movb %al, -0x16(%rbp) movb -0x16(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x15(%rbp) cmpb $0x0, -0x15(%rbp) je 0x3aff0 movq -0x10(%rbp), %rax cmpl $0x1, 0x78(%rax) jne 0x3afe1 movq -0x8(%rbp), %rax movq 0x60(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x60(%rax) movq -0x10(%rbp), %rax movl $0x2, 0x78(%rax) jmp 0x3afee jmp 0x3aff0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movb -0x15(%rbp), %cl movl -0x14(%rbp), %eax movsbl %cl, %edx movsbl %al, %ecx callq 0x3ef90 movq -0x8(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rax movq 0xc0(%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x3b0a2 movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq -0x10(%rbp), %rcx subq 0x40(%rcx), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jbe 0x3b0a2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x3e9d0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi xorl %ecx, %ecx movl %ecx, %edx callq 0x3ef90 movq -0x10(%rbp), %rax cmpl $0x1, 0x78(%rax) je 0x3b09c movq -0x8(%rbp), %rax movq 0x60(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x60(%rax) movq -0x10(%rbp), %rax movl $0x1, 0x78(%rax) jmp 0x3b09e jmp 0x3b0a0 jmp 0x3b0a2 jmp 0x3b0a4 jmp 0x3b0a6 jmp 0x3b0a8 addq $0x20, %rsp popq %rbp retq nop
unreg_request: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx jmp short $+2 loc_3AF45: jmp short $+2 loc_3AF47: jmp short $+2 loc_3AF49: jmp short $+2 loc_3AF4B: jmp short $+2 loc_3AF4D: mov rcx, [rbp+var_10] mov eax, [rcx+60h] add eax, 0FFFFFFFFh mov [rcx+60h], eax cmp eax, 0 jnz loc_3B0A4 mov rax, [rbp+var_10] cmp dword ptr [rax+80h], 0 jz short loc_3AF83 mov rax, [rbp+var_10] mov ecx, [rax+80h] add ecx, 0FFFFFFFFh mov [rax+80h], ecx loc_3AF83: mov rcx, [rbp+var_10] xor eax, eax cmp dword ptr [rcx+80h], 0 mov [rbp+var_16], al jnz short loc_3AFB6 xor eax, eax cmp [rbp+var_14], 0 mov [rbp+var_16], al jz short loc_3AFB6 mov rax, [rbp+var_8] mov rax, [rax+60h] mov rcx, [rbp+var_8] cmp rax, [rcx+8] setnbe al mov [rbp+var_16], al loc_3AFB6: mov al, [rbp+var_16] and al, 1 movzx eax, al mov [rbp+var_15], al cmp [rbp+var_15], 0 jz short loc_3AFF0 mov rax, [rbp+var_10] cmp dword ptr [rax+78h], 1 jnz short loc_3AFE1 mov rax, [rbp+var_8] mov rcx, [rax+60h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+60h], rcx loc_3AFE1: mov rax, [rbp+var_10] mov dword ptr [rax+78h], 2 jmp short $+2 loc_3AFEE: jmp short $+2 loc_3AFF0: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov cl, [rbp+var_15] mov eax, [rbp+var_14] movsx edx, cl movsx ecx, al call link_block mov rax, [rbp+var_8] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax+40h], rcx mov rax, [rbp+var_8] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx mov rax, [rbp+var_8] mov rax, [rax+0C0h] mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_3B0A2 mov rax, [rbp+var_8] mov rax, [rax+18h] mov rcx, [rbp+var_10] sub rax, [rcx+40h] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jbe short loc_3B0A2 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call unlink_block mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] xor ecx, ecx mov edx, ecx call link_block mov rax, [rbp+var_10] cmp dword ptr [rax+78h], 1 jz short loc_3B09C mov rax, [rbp+var_8] mov rcx, [rax+60h] add rcx, 1 mov [rax+60h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+78h], 1 loc_3B09C: jmp short $+2 loc_3B09E: jmp short $+2 loc_3B0A0: jmp short $+2 loc_3B0A2: jmp short $+2 loc_3B0A4: jmp short $+2 loc_3B0A6: jmp short $+2 loc_3B0A8: add rsp, 20h pop rbp retn
unsigned long long unreg_request(_QWORD *a1, long long a2, int a3) { unsigned long long result; // rax bool v4; // [rsp+Ah] [rbp-16h] unsigned long long v5; // [rsp+10h] [rbp-10h] result = (unsigned int)(*(_DWORD *)(a2 + 96) - 1); *(_DWORD *)(a2 + 96) = result; if ( !(_DWORD)result ) { if ( *(_DWORD *)(a2 + 128) ) --*(_DWORD *)(a2 + 128); v4 = 0; if ( !*(_DWORD *)(a2 + 128) ) { v4 = 0; if ( a3 ) v4 = a1[12] > a1[1]; } if ( v4 ) { if ( *(_DWORD *)(a2 + 120) == 1 ) --a1[12]; *(_DWORD *)(a2 + 120) = 2; } link_block(a1, a2, v4, (unsigned int)(char)a3); *(_QWORD *)(a2 + 64) = a1[3]++; result = a1[24]; v5 = result; if ( result ) { result = a1[3] - *(_QWORD *)(result + 64); if ( result > a1[2] ) { unlink_block(a1, v5); link_block(a1, v5, 0LL, 0LL); result = v5; if ( *(_DWORD *)(v5 + 120) != 1 ) { ++a1[12]; result = v5; *(_DWORD *)(v5 + 120) = 1; } } } } return result; }
unreg_request: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX JMP 0x0013af45 LAB_0013af45: JMP 0x0013af47 LAB_0013af47: JMP 0x0013af49 LAB_0013af49: JMP 0x0013af4b LAB_0013af4b: JMP 0x0013af4d LAB_0013af4d: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x60] ADD EAX,-0x1 MOV dword ptr [RCX + 0x60],EAX CMP EAX,0x0 JNZ 0x0013b0a4 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x80],0x0 JZ 0x0013af83 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x80] ADD ECX,-0x1 MOV dword ptr [RAX + 0x80],ECX LAB_0013af83: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP dword ptr [RCX + 0x80],0x0 MOV byte ptr [RBP + -0x16],AL JNZ 0x0013afb6 XOR EAX,EAX CMP dword ptr [RBP + -0x14],0x0 MOV byte ptr [RBP + -0x16],AL JZ 0x0013afb6 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x8] SETA AL MOV byte ptr [RBP + -0x16],AL LAB_0013afb6: MOV AL,byte ptr [RBP + -0x16] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x15],AL CMP byte ptr [RBP + -0x15],0x0 JZ 0x0013aff0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x78],0x1 JNZ 0x0013afe1 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x60] ADD RCX,-0x1 MOV qword ptr [RAX + 0x60],RCX LAB_0013afe1: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x78],0x2 JMP 0x0013afee LAB_0013afee: JMP 0x0013aff0 LAB_0013aff0: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV CL,byte ptr [RBP + -0x15] MOV EAX,dword ptr [RBP + -0x14] MOVSX EDX,CL MOVSX ECX,AL CALL 0x0013ef90 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xc0] MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013b0a2 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,qword ptr [RCX + 0x40] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JBE 0x0013b0a2 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0013e9d0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR ECX,ECX MOV EDX,ECX CALL 0x0013ef90 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x78],0x1 JZ 0x0013b09c MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x60] ADD RCX,0x1 MOV qword ptr [RAX + 0x60],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x78],0x1 LAB_0013b09c: JMP 0x0013b09e LAB_0013b09e: JMP 0x0013b0a0 LAB_0013b0a0: JMP 0x0013b0a2 LAB_0013b0a2: JMP 0x0013b0a4 LAB_0013b0a4: JMP 0x0013b0a6 LAB_0013b0a6: JMP 0x0013b0a8 LAB_0013b0a8: ADD RSP,0x20 POP RBP RET
void unreg_request(long param_1,long param_2,int param_3) { long lVar1; int iVar2; bool local_1e; iVar2 = *(int *)(param_2 + 0x60) + -1; *(int *)(param_2 + 0x60) = iVar2; if (iVar2 == 0) { if (*(int *)(param_2 + 0x80) != 0) { *(int *)(param_2 + 0x80) = *(int *)(param_2 + 0x80) + -1; } local_1e = false; if ((*(int *)(param_2 + 0x80) == 0) && (local_1e = false, param_3 != 0)) { local_1e = *(ulong *)(param_1 + 8) < *(ulong *)(param_1 + 0x60); } if (local_1e != false) { if (*(int *)(param_2 + 0x78) == 1) { *(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1; } *(int4 *)(param_2 + 0x78) = 2; } link_block(param_1,param_2,local_1e,(int)(char)param_3); *(int8 *)(param_2 + 0x40) = *(int8 *)(param_1 + 0x18); *(long *)(param_1 + 0x18) = *(long *)(param_1 + 0x18) + 1; lVar1 = *(long *)(param_1 + 0xc0); if ((lVar1 != 0) && (*(ulong *)(param_1 + 0x10) < (ulong)(*(long *)(param_1 + 0x18) - *(long *)(lVar1 + 0x40)))) { unlink_block(param_1,lVar1); link_block(param_1,lVar1,0); if (*(int *)(lVar1 + 0x78) != 1) { *(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + 1; *(int4 *)(lVar1 + 0x78) = 1; } } } return; }
2,879
js_sab_free
bluesky950520[P]quickjs/quickjs-libc.c
static void js_sab_free(void *opaque, void *ptr) { JSSABHeader *sab; int ref_count; sab = (JSSABHeader *)((uint8_t *)ptr - sizeof(JSSABHeader)); ref_count = atomic_add_int(&sab->ref_count, -1); assert(ref_count >= 0); if (ref_count == 0) { free(sab); } }
O0
c
js_sab_free: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x18(%rsp), %rax addq $-0x8, %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x16500 movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jne 0x10170 movq 0x10(%rsp), %rdi callq 0xe060 addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
js_sab_free: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+28h+var_18], rax mov rdi, [rsp+28h+var_18] mov esi, 0FFFFFFFFh call atomic_add_int mov [rsp+28h+var_1C], eax cmp [rsp+28h+var_1C], 0 jnz short loc_10170 mov rdi, [rsp+28h+var_18] call _free loc_10170: add rsp, 28h retn
long long js_sab_free(long long a1, long long a2) { long long result; // rax result = atomic_add_int(a2 - 8, 0xFFFFFFFFLL); if ( !(_DWORD)result ) return free(a2 - 8); return result; }
js_sab_free: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x18] ADD RAX,-0x8 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0xffffffff CALL 0x00116500 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JNZ 0x00110170 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0010e060 LAB_00110170: ADD RSP,0x28 RET
void js_sab_free(int8 param_1,long param_2) { int iVar1; iVar1 = atomic_add_int((void *)(param_2 + -8),0xffffffff); if (iVar1 == 0) { free((void *)(param_2 + -8)); } return; }
2,880
malloc
seiftnesse[P]memoryallocator/src/custom_alloc_core.c
void *_malloc(size_t size) { HEAP_LOG("Memory allocation request: %zu bytes\n", size); if (size == 0) { HEAP_LOG("Zero-size allocation requested, returning NULL\n"); return NULL; } // Try small allocation first for small sizes if (size <= SMALL_ALLOCATION_THRESHOLD) { void *ptr = allocate_small(size); if (ptr) { return ptr; } HEAP_LOG("Small allocation failed, falling back to regular allocation\n"); // If small allocation failed, fall back to regular allocation } EnsureHeapInitialized(); // Calculate required blocks including segment header and alignment int required_blocks = GetNumBlock(size + sizeof(segment_t) + ALIGNMENT); HEAP_LOG("Required blocks for allocation: %d (incl. overhead)\n", required_blocks); // Try last free segment first, then full search segment_t *it = last_free_segment ? SearchFree(last_free_segment, required_blocks) : NULL; if (!it) { HEAP_LOG("Last free segment not suitable, performing full search\n"); it = SearchFree(segments, required_blocks); } if (!it) { HEAP_LOG("Memory allocation failed: no suitable segment found for %zu bytes\n", size); return NULL; // No suitable memory found } // Mark segment as used it->is_free = 0; // Set debug tracking info it->allocation_id = next_allocation_id++; HEAP_LOG("Assigned allocation ID: %u to segment %p\n", it->allocation_id, it); // Split if we have enough extra space if (it->size > required_blocks + 1) { HEAP_LOG("Splitting segment: original size=%d, required=%d\n", it->size, required_blocks); segment_t *remaining = CutSegment(it, it->size - required_blocks); remaining->is_free = 1; last_free_segment = remaining; } else { // We're using the whole segment if (last_free_segment == it) { HEAP_LOG("Using entire last free segment, resetting last_free_segment\n"); last_free_segment = NULL; } } // Update allocation statistics update_stats_allocate(it->size * BLOCK_SIZE); // Update integrity metadata after allocation initialize_segment_integrity(it); // Return aligned user pointer void *result = SegmentToPtr(it); HEAP_LOG("Memory allocated: %p, size=%zu bytes, segment=%p\n", result, size, it); return result; }
O1
c
malloc: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x33e1 movq %rdi, %rbx cmpq $0x100, %rdi # imm = 0x100 ja 0x3341 movq %rbx, %rdi callq 0x37e4 testq %rax, %rax jne 0x33e3 cmpl $0x0, 0x4de8(%rip) # 0x8130 jne 0x3365 leaq 0x104def(%rip), %rdi # 0x108140 movl $0x4000000, %esi # imm = 0x4000000 callq 0x328c movl $0x1, 0x4dcb(%rip) # 0x8130 addq $0x40, %rbx movq %rbx, %rdi callq 0x3a7b movl %eax, %r14d movq 0x4dad(%rip), %rdi # 0x8128 testq %rdi, %rdi je 0x338d movl %r14d, %esi callq 0x3a1c movq %rax, %rbx jmp 0x338f xorl %ebx, %ebx testq %rbx, %rbx jne 0x33a6 movq 0x4d85(%rip), %rdi # 0x8120 movl %r14d, %esi callq 0x3a1c movq %rax, %rbx testq %rbx, %rbx je 0x33e1 movl $0x0, (%rbx) movl 0x4d49(%rip), %eax # 0x8100 leal 0x1(%rax), %ecx movl %ecx, 0x4d40(%rip) # 0x8100 movl %eax, 0x24(%rbx) movl 0x4(%rbx), %esi leal 0x1(%r14), %eax cmpl %eax, %esi jle 0x33eb subl %r14d, %esi movq %rbx, %rdi callq 0x3a96 movl $0x1, (%rax) jmp 0x33f6 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq cmpq %rbx, 0x4d36(%rip) # 0x8128 jne 0x33fd xorl %eax, %eax movq %rax, 0x4d2b(%rip) # 0x8128 movslq 0x4(%rbx), %rdi shlq $0xc, %rdi callq 0x415d movq %rbx, %rdi callq 0x3af7 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3bbc
_malloc: push r14 push rbx push rax test rdi, rdi jz loc_33E1 mov rbx, rdi cmp rdi, 100h ja short loc_3341 mov rdi, rbx call allocate_small test rax, rax jnz loc_33E3 loc_3341: cmp cs:heap_initialized, 0 jnz short loc_3365 lea rdi, memory mov esi, offset unk_4000000 call HeapInit mov cs:heap_initialized, 1 loc_3365: add rbx, 40h ; '@' mov rdi, rbx call GetNumBlock mov r14d, eax mov rdi, cs:last_free_segment test rdi, rdi jz short loc_338D mov esi, r14d call SearchFree mov rbx, rax jmp short loc_338F loc_338D: xor ebx, ebx loc_338F: test rbx, rbx jnz short loc_33A6 mov rdi, cs:segments mov esi, r14d call SearchFree mov rbx, rax loc_33A6: test rbx, rbx jz short loc_33E1 mov dword ptr [rbx], 0 mov eax, cs:next_allocation_id lea ecx, [rax+1] mov cs:next_allocation_id, ecx mov [rbx+24h], eax mov esi, [rbx+4] lea eax, [r14+1] cmp esi, eax jle short loc_33EB sub esi, r14d mov rdi, rbx call CutSegment mov dword ptr [rax], 1 jmp short loc_33F6 loc_33E1: xor eax, eax loc_33E3: add rsp, 8 pop rbx pop r14 retn loc_33EB: cmp cs:last_free_segment, rbx jnz short loc_33FD xor eax, eax loc_33F6: mov cs:last_free_segment, rax loc_33FD: movsxd rdi, dword ptr [rbx+4] shl rdi, 0Ch call update_stats_allocate mov rdi, rbx call initialize_segment_integrity mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp SegmentToPtr
long long malloc(unsigned long long a1) { long long result; // rax unsigned int NumBlock; // eax unsigned int v3; // r14d _DWORD *v4; // rbx int v5; // eax int v6; // esi _DWORD *v7; // rax if ( !a1 ) return 0LL; if ( a1 > 0x100 || (result = allocate_small(a1)) == 0 ) { if ( !heap_initialized ) { HeapInit((unsigned long long)&memory, (unsigned long long)&unk_4000000); heap_initialized = 1; } NumBlock = GetNumBlock(a1 + 64); v3 = NumBlock; if ( last_free_segment ) v4 = (_DWORD *)SearchFree(last_free_segment, NumBlock); else v4 = 0LL; if ( !v4 ) v4 = (_DWORD *)SearchFree(segments, v3); if ( v4 ) { *v4 = 0; v5 = next_allocation_id++; v4[9] = v5; v6 = v4[1]; if ( v6 <= (int)(v3 + 1) ) { if ( (_DWORD *)last_free_segment != v4 ) { LABEL_19: update_stats_allocate((long long)(int)v4[1] << 12); initialize_segment_integrity(v4); return SegmentToPtr(v4); } v7 = 0LL; } else { v7 = (_DWORD *)CutSegment(v4, v6 - v3); *v7 = 1; } last_free_segment = (long long)v7; goto LABEL_19; } return 0LL; } return result; }
_malloc: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x001033e1 MOV RBX,RDI CMP RDI,0x100 JA 0x00103341 MOV RDI,RBX CALL 0x001037e4 TEST RAX,RAX JNZ 0x001033e3 LAB_00103341: CMP dword ptr [0x00108130],0x0 JNZ 0x00103365 LEA RDI,[0x208140] MOV ESI,0x4000000 CALL 0x0010328c MOV dword ptr [0x00108130],0x1 LAB_00103365: ADD RBX,0x40 MOV RDI,RBX CALL 0x00103a7b MOV R14D,EAX MOV RDI,qword ptr [0x00108128] TEST RDI,RDI JZ 0x0010338d MOV ESI,R14D CALL 0x00103a1c MOV RBX,RAX JMP 0x0010338f LAB_0010338d: XOR EBX,EBX LAB_0010338f: TEST RBX,RBX JNZ 0x001033a6 MOV RDI,qword ptr [0x00108120] MOV ESI,R14D CALL 0x00103a1c MOV RBX,RAX LAB_001033a6: TEST RBX,RBX JZ 0x001033e1 MOV dword ptr [RBX],0x0 MOV EAX,dword ptr [0x00108100] LEA ECX,[RAX + 0x1] MOV dword ptr [0x00108100],ECX MOV dword ptr [RBX + 0x24],EAX MOV ESI,dword ptr [RBX + 0x4] LEA EAX,[R14 + 0x1] CMP ESI,EAX JLE 0x001033eb SUB ESI,R14D MOV RDI,RBX CALL 0x00103a96 MOV dword ptr [RAX],0x1 JMP 0x001033f6 LAB_001033e1: XOR EAX,EAX LAB_001033e3: ADD RSP,0x8 POP RBX POP R14 RET LAB_001033eb: CMP qword ptr [0x00108128],RBX JNZ 0x001033fd XOR EAX,EAX LAB_001033f6: MOV qword ptr [0x00108128],RAX LAB_001033fd: MOVSXD RDI,dword ptr [RBX + 0x4] SHL RDI,0xc CALL 0x0010415d MOV RDI,RBX CALL 0x00103af7 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00103bbc
void * _malloc(size_t __size) { int iVar1; int iVar2; void *pvVar3; int4 *puVar4; if (__size != 0) { if ((__size < 0x101) && (pvVar3 = (void *)allocate_small(__size), pvVar3 != (void *)0x0)) { return pvVar3; } if (heap_initialized == 0) { HeapInit(memory,0x4000000); heap_initialized = 1; } iVar2 = GetNumBlock(__size + 0x40); if (last_free_segment == (int4 *)0x0) { puVar4 = (int4 *)0x0; } else { puVar4 = (int4 *)SearchFree(last_free_segment,iVar2); } if (puVar4 == (int4 *)0x0) { puVar4 = (int4 *)SearchFree(segments,iVar2); } if (puVar4 != (int4 *)0x0) { *puVar4 = 0; iVar1 = next_allocation_id + 1; puVar4[9] = next_allocation_id; next_allocation_id = iVar1; if (iVar2 + 1 < (int)puVar4[1]) { last_free_segment = (int4 *)CutSegment(puVar4,puVar4[1] - iVar2); *last_free_segment = 1; } else if (last_free_segment == puVar4) { last_free_segment = (int4 *)0x0; } update_stats_allocate((long)(int)puVar4[1] << 0xc); initialize_segment_integrity(puVar4); pvVar3 = (void *)SegmentToPtr(puVar4); return pvVar3; } } return (void *)0x0; }
2,881
LefDefParser::lefwMacroForeign(char const*, double, double, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwMacroForeign(const char *name, double xl, double yl, int orient) { // optional if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_MACRO_START && lefwState != LEFW_MACRO) return LEFW_BAD_ORDER; if (!name || name == 0 || *name == 0) return LEFW_BAD_DATA; if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) " FOREIGN %s ", name); if (xl || yl) { encPrint(lefwFile, (char*) "%.11g %.11g ", xl, yl); if (orient >= 0 && orient <= 7) encPrint(lefwFile, (char*) "%s ", lefwOrient(orient)); } else if (orient > 0 && orient <= 7) { // assume user has 0, 0 pt encPrint(lefwFile, (char*) "%.11g %.11g ", xl, yl); encPrint(lefwFile, (char*) "%s ", lefwOrient(orient)); } encPrint(lefwFile, (char*) ";\n"); } else { fprintf(lefwFile, " FOREIGN %s ", name); if (xl || yl) { fprintf(lefwFile, "%.11g %.11g ", xl, yl); if (orient >= 0 && orient <= 7) fprintf(lefwFile, "%s ", lefwOrient(orient)); } else if (orient > 0 && orient <= 7) { // assume user has 0, 0 pt fprintf(lefwFile, "%.11g %.11g ", xl, yl); fprintf(lefwFile, "%s ", lefwOrient(orient)); } fprintf(lefwFile, ";\n"); } lefwLines++; lefwState = LEFW_MACRO; return LEFW_OK; }
O0
cpp
LefDefParser::lefwMacroForeign(char const*, double, double, int): subq $0x48, %rsp movq %rdi, 0x38(%rsp) movsd %xmm0, 0x30(%rsp) movsd %xmm1, 0x28(%rsp) movl %esi, 0x24(%rsp) leaq 0x144c0(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x1e953 movl $0x1, 0x44(%rsp) jmp 0x1ec2f leaq 0x146fa(%rip), %rax # 0x33054 cmpl $0x0, (%rax) jne 0x1e96c movl $0x2, 0x44(%rsp) jmp 0x1ec2f leaq 0x146dd(%rip), %rax # 0x33050 cmpl $0x9, (%rax) je 0x1e991 leaq 0x146d1(%rip), %rax # 0x33050 cmpl $0x21, (%rax) je 0x1e991 movl $0x2, 0x44(%rsp) jmp 0x1ec2f cmpq $0x0, 0x38(%rsp) je 0x1e9ae cmpq $0x0, 0x38(%rsp) je 0x1e9ae movq 0x38(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x1e9bb movl $0x3, 0x44(%rsp) jmp 0x1ec2f cmpl $0x0, 0x1472a(%rip) # 0x330ec je 0x1eaea leaq 0x14431(%rip), %rax # 0x32e00 movq (%rax), %rdi movq 0x38(%rsp), %rdx leaq 0xccfd(%rip), %rsi # 0x2b6db movb $0x0, %al callq 0x289b0 movsd 0x30(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0x1ea09 jp 0x1ea09 movsd 0x28(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0x1ea09 jp 0x1ea09 jmp 0x1ea6b leaq 0x143f0(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x30(%rsp), %xmm0 movsd 0x28(%rsp), %xmm1 leaq 0xd1f1(%rip), %rsi # 0x2bc17 movb $0x2, %al callq 0x289b0 cmpl $0x0, 0x24(%rsp) jl 0x1ea69 cmpl $0x7, 0x24(%rsp) jg 0x1ea69 leaq 0x143be(%rip), %rax # 0x32e00 movq (%rax), %rax movq %rax, 0x18(%rsp) movl 0x24(%rsp), %edi callq 0xbe30 movq 0x18(%rsp), %rdi movq %rax, %rdx leaq 0xba0d(%rip), %rsi # 0x2a46f movb $0x0, %al callq 0x289b0 jmp 0x1eacd cmpl $0x0, 0x24(%rsp) jle 0x1eacb cmpl $0x7, 0x24(%rsp) jg 0x1eacb leaq 0x14380(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x30(%rsp), %xmm0 movsd 0x28(%rsp), %xmm1 leaq 0xd181(%rip), %rsi # 0x2bc17 movb $0x2, %al callq 0x289b0 leaq 0x1435c(%rip), %rax # 0x32e00 movq (%rax), %rax movq %rax, 0x10(%rsp) movl 0x24(%rsp), %edi callq 0xbe30 movq 0x10(%rsp), %rdi movq %rax, %rdx leaq 0xb9ab(%rip), %rsi # 0x2a46f movb $0x0, %al callq 0x289b0 jmp 0x1eacd leaq 0x1432c(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0xb476(%rip), %rsi # 0x29f54 movb $0x0, %al callq 0x289b0 jmp 0x1ec05 leaq 0x1430f(%rip), %rax # 0x32e00 movq (%rax), %rdi movq 0x38(%rsp), %rdx leaq 0xcbdb(%rip), %rsi # 0x2b6db movb $0x0, %al callq 0x1100 movsd 0x30(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0x1eb2b jp 0x1eb2b movsd 0x28(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0x1eb2b jp 0x1eb2b jmp 0x1eb8d leaq 0x142ce(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x30(%rsp), %xmm0 movsd 0x28(%rsp), %xmm1 leaq 0xd0cf(%rip), %rsi # 0x2bc17 movb $0x2, %al callq 0x1100 cmpl $0x0, 0x24(%rsp) jl 0x1eb8b cmpl $0x7, 0x24(%rsp) jg 0x1eb8b leaq 0x1429c(%rip), %rax # 0x32e00 movq (%rax), %rax movq %rax, 0x8(%rsp) movl 0x24(%rsp), %edi callq 0xbe30 movq 0x8(%rsp), %rdi movq %rax, %rdx leaq 0xb8eb(%rip), %rsi # 0x2a46f movb $0x0, %al callq 0x1100 jmp 0x1ebed cmpl $0x0, 0x24(%rsp) jle 0x1ebeb cmpl $0x7, 0x24(%rsp) jg 0x1ebeb leaq 0x1425e(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x30(%rsp), %xmm0 movsd 0x28(%rsp), %xmm1 leaq 0xd05f(%rip), %rsi # 0x2bc17 movb $0x2, %al callq 0x1100 leaq 0x1423a(%rip), %rax # 0x32e00 movq (%rax), %rax movq %rax, (%rsp) movl 0x24(%rsp), %edi callq 0xbe30 movq (%rsp), %rdi movq %rax, %rdx leaq 0xb88b(%rip), %rsi # 0x2a46f movb $0x0, %al callq 0x1100 jmp 0x1ebed leaq 0x1420c(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0xb356(%rip), %rsi # 0x29f54 movb $0x0, %al callq 0x1100 leaq 0x14440(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x14434(%rip), %rax # 0x3304c movl %ecx, (%rax) leaq 0x1442f(%rip), %rax # 0x33050 movl $0x21, (%rax) movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopl (%rax,%rax)
_ZN12LefDefParser16lefwMacroForeignEPKcddi: sub rsp, 48h mov [rsp+48h+var_10], rdi movsd [rsp+48h+var_18], xmm0 movsd [rsp+48h+var_24+4], xmm1 mov dword ptr [rsp+48h+var_24], esi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_1E953 mov [rsp+48h+var_4], 1 jmp loc_1EC2F loc_1E953: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_1E96C mov [rsp+48h+var_4], 2 jmp loc_1EC2F loc_1E96C: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 9 jz short loc_1E991 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 21h ; '!' jz short loc_1E991 mov [rsp+48h+var_4], 2 jmp loc_1EC2F loc_1E991: cmp [rsp+48h+var_10], 0 jz short loc_1E9AE cmp [rsp+48h+var_10], 0 jz short loc_1E9AE mov rax, [rsp+48h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_1E9BB loc_1E9AE: mov [rsp+48h+var_4], 3 jmp loc_1EC2F loc_1E9BB: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz loc_1EAEA lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+48h+var_10] lea rsi, aForeignS+3; " FOREIGN %s " mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) movsd xmm0, [rsp+48h+var_18] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_1EA09 jp short loc_1EA09 movsd xmm0, [rsp+48h+var_24+4] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_1EA09 jp short loc_1EA09 jmp short loc_1EA6B loc_1EA09: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+48h+var_18] movsd xmm1, [rsp+48h+var_24+4] lea rsi, a11g11g+0Bh; int mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) cmp dword ptr [rsp+48h+var_24], 0 jl short loc_1EA69 cmp dword ptr [rsp+48h+var_24], 7 jg short loc_1EA69 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rax, [rax] mov [rsp+48h+var_30], rax mov edi, dword ptr [rsp+48h+var_24]; this call _ZN12LefDefParser10lefwOrientEi; LefDefParser::lefwOrient(int) mov rdi, [rsp+48h+var_30] mov rdx, rax lea rsi, aS+6; "%s " mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) loc_1EA69: jmp short loc_1EACD loc_1EA6B: cmp dword ptr [rsp+48h+var_24], 0 jle short loc_1EACB cmp dword ptr [rsp+48h+var_24], 7 jg short loc_1EACB lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+48h+var_18] movsd xmm1, [rsp+48h+var_24+4] lea rsi, a11g11g+0Bh; int mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rax, [rax] mov [rsp+48h+var_38], rax mov edi, dword ptr [rsp+48h+var_24]; this call _ZN12LefDefParser10lefwOrientEi; LefDefParser::lefwOrient(int) mov rdi, [rsp+48h+var_38] mov rdx, rax lea rsi, aS+6; "%s " mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) loc_1EACB: jmp short $+2 loc_1EACD: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp loc_1EC05 loc_1EAEA: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+48h+var_10] lea rsi, aForeignS+3; " FOREIGN %s " mov al, 0 call _fprintf movsd xmm0, [rsp+48h+var_18] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_1EB2B jp short loc_1EB2B movsd xmm0, [rsp+48h+var_24+4] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_1EB2B jp short loc_1EB2B jmp short loc_1EB8D loc_1EB2B: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+48h+var_18] movsd xmm1, [rsp+48h+var_24+4] lea rsi, a11g11g+0Bh; int mov al, 2 call _fprintf cmp dword ptr [rsp+48h+var_24], 0 jl short loc_1EB8B cmp dword ptr [rsp+48h+var_24], 7 jg short loc_1EB8B lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rax, [rax] mov [rsp+48h+var_40], rax mov edi, dword ptr [rsp+48h+var_24]; this call _ZN12LefDefParser10lefwOrientEi; LefDefParser::lefwOrient(int) mov rdi, [rsp+48h+var_40] mov rdx, rax lea rsi, aS+6; "%s " mov al, 0 call _fprintf loc_1EB8B: jmp short loc_1EBED loc_1EB8D: cmp dword ptr [rsp+48h+var_24], 0 jle short loc_1EBEB cmp dword ptr [rsp+48h+var_24], 7 jg short loc_1EBEB lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+48h+var_18] movsd xmm1, [rsp+48h+var_24+4] lea rsi, a11g11g+0Bh; int mov al, 2 call _fprintf lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rax, [rax] mov [rsp+48h+var_48], rax mov edi, dword ptr [rsp+48h+var_24]; this call _ZN12LefDefParser10lefwOrientEi; LefDefParser::lefwOrient(int) mov rdi, [rsp+48h+var_48] mov rdx, rax lea rsi, aS+6; "%s " mov al, 0 call _fprintf loc_1EBEB: jmp short $+2 loc_1EBED: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _fprintf loc_1EC05: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 21h ; '!' mov [rsp+48h+var_4], 0 loc_1EC2F: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long LefDefParser::lefwMacroForeign( LefDefParser *this, const char *a2, double a3, double a4, int a5, int a6, int a7, int a8) { int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d unsigned int v12; // eax int v13; // ecx int v14; // r8d int v15; // r9d unsigned int v16; // eax int v17; // ecx int v18; // r8d int v19; // r9d LefDefParser *v20; // rax LefDefParser *v21; // rax long long v23; // [rsp+0h] [rbp-48h] long long v24; // [rsp+8h] [rbp-40h] int v25; // [rsp+10h] [rbp-38h] int v26; // [rsp+18h] [rbp-30h] if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwState == 9 || LefDefParser::lefwState == 33 ) { if ( this && *(_BYTE *)this ) { if ( LefDefParser::lefwWriteEncrypt ) { LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" FOREIGN %s ", (_DWORD)this, a6, a7, a8); if ( a3 == 0.0 && a4 == 0.0 ) { if ( (int)a2 > 0 && (int)a2 <= 7 ) { LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%.11g %.11g ", v8, v9, v10, v11); v25 = LefDefParser::lefwFile; v16 = (unsigned int)LefDefParser::lefwOrient((LefDefParser *)(unsigned int)a2, "%.11g %.11g "); LefDefParser::encPrint(v25, (unsigned int)"%s ", v16, v17, v18, v19); } } else { LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%.11g %.11g ", v8, v9, v10, v11); if ( (unsigned int)a2 < 8 ) { v26 = LefDefParser::lefwFile; v12 = (unsigned int)LefDefParser::lefwOrient((LefDefParser *)(unsigned int)a2, "%.11g %.11g "); LefDefParser::encPrint(v26, (unsigned int)"%s ", v12, v13, v14, v15); } } LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v8, v9, v10, v11); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, " FOREIGN %s ", (const char *)this); if ( a3 == 0.0 && a4 == 0.0 ) { if ( (int)a2 > 0 && (int)a2 <= 7 ) { fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%.11g %.11g ", a3, a4); v23 = *(_QWORD *)&LefDefParser::lefwFile; v21 = LefDefParser::lefwOrient((LefDefParser *)(unsigned int)a2, "%.11g %.11g "); fprintf(v23, "%s ", (const char *)v21); } } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%.11g %.11g ", a3, a4); if ( (unsigned int)a2 < 8 ) { v24 = *(_QWORD *)&LefDefParser::lefwFile; v20 = LefDefParser::lefwOrient((LefDefParser *)(unsigned int)a2, "%.11g %.11g "); fprintf(v24, "%s ", (const char *)v20); } } fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n"); } ++LefDefParser::lefwLines; LefDefParser::lefwState = 33; return 0; } else { return 3; } } else { return 2; } } else { return 2; } } else { return 1; } }
lefwMacroForeign: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOVSD qword ptr [RSP + 0x30],XMM0 MOVSD qword ptr [RSP + 0x28],XMM1 MOV dword ptr [RSP + 0x24],ESI LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x0011e953 MOV dword ptr [RSP + 0x44],0x1 JMP 0x0011ec2f LAB_0011e953: LEA RAX,[0x133054] CMP dword ptr [RAX],0x0 JNZ 0x0011e96c MOV dword ptr [RSP + 0x44],0x2 JMP 0x0011ec2f LAB_0011e96c: LEA RAX,[0x133050] CMP dword ptr [RAX],0x9 JZ 0x0011e991 LEA RAX,[0x133050] CMP dword ptr [RAX],0x21 JZ 0x0011e991 MOV dword ptr [RSP + 0x44],0x2 JMP 0x0011ec2f LAB_0011e991: CMP qword ptr [RSP + 0x38],0x0 JZ 0x0011e9ae CMP qword ptr [RSP + 0x38],0x0 JZ 0x0011e9ae MOV RAX,qword ptr [RSP + 0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0011e9bb LAB_0011e9ae: MOV dword ptr [RSP + 0x44],0x3 JMP 0x0011ec2f LAB_0011e9bb: CMP dword ptr [0x001330ec],0x0 JZ 0x0011eaea LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x38] LEA RSI,[0x12b6db] MOV AL,0x0 CALL 0x001289b0 MOVSD XMM0,qword ptr [RSP + 0x30] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x0011ea09 JP 0x0011ea09 MOVSD XMM0,qword ptr [RSP + 0x28] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x0011ea09 JP 0x0011ea09 JMP 0x0011ea6b LAB_0011ea09: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x30] MOVSD XMM1,qword ptr [RSP + 0x28] LEA RSI,[0x12bc17] MOV AL,0x2 CALL 0x001289b0 CMP dword ptr [RSP + 0x24],0x0 JL 0x0011ea69 CMP dword ptr [RSP + 0x24],0x7 JG 0x0011ea69 LEA RAX,[0x132e00] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x18],RAX MOV EDI,dword ptr [RSP + 0x24] CALL 0x0010be30 MOV RDI,qword ptr [RSP + 0x18] MOV RDX,RAX LEA RSI,[0x12a46f] MOV AL,0x0 CALL 0x001289b0 LAB_0011ea69: JMP 0x0011eacd LAB_0011ea6b: CMP dword ptr [RSP + 0x24],0x0 JLE 0x0011eacb CMP dword ptr [RSP + 0x24],0x7 JG 0x0011eacb LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x30] MOVSD XMM1,qword ptr [RSP + 0x28] LEA RSI,[0x12bc17] MOV AL,0x2 CALL 0x001289b0 LEA RAX,[0x132e00] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x10],RAX MOV EDI,dword ptr [RSP + 0x24] CALL 0x0010be30 MOV RDI,qword ptr [RSP + 0x10] MOV RDX,RAX LEA RSI,[0x12a46f] MOV AL,0x0 CALL 0x001289b0 LAB_0011eacb: JMP 0x0011eacd LAB_0011eacd: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f54] MOV AL,0x0 CALL 0x001289b0 JMP 0x0011ec05 LAB_0011eaea: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x38] LEA RSI,[0x12b6db] MOV AL,0x0 CALL 0x00101100 MOVSD XMM0,qword ptr [RSP + 0x30] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x0011eb2b JP 0x0011eb2b MOVSD XMM0,qword ptr [RSP + 0x28] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x0011eb2b JP 0x0011eb2b JMP 0x0011eb8d LAB_0011eb2b: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x30] MOVSD XMM1,qword ptr [RSP + 0x28] LEA RSI,[0x12bc17] MOV AL,0x2 CALL 0x00101100 CMP dword ptr [RSP + 0x24],0x0 JL 0x0011eb8b CMP dword ptr [RSP + 0x24],0x7 JG 0x0011eb8b LEA RAX,[0x132e00] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0x24] CALL 0x0010be30 MOV RDI,qword ptr [RSP + 0x8] MOV RDX,RAX LEA RSI,[0x12a46f] MOV AL,0x0 CALL 0x00101100 LAB_0011eb8b: JMP 0x0011ebed LAB_0011eb8d: CMP dword ptr [RSP + 0x24],0x0 JLE 0x0011ebeb CMP dword ptr [RSP + 0x24],0x7 JG 0x0011ebeb LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x30] MOVSD XMM1,qword ptr [RSP + 0x28] LEA RSI,[0x12bc17] MOV AL,0x2 CALL 0x00101100 LEA RAX,[0x132e00] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP],RAX MOV EDI,dword ptr [RSP + 0x24] CALL 0x0010be30 MOV RDI,qword ptr [RSP] MOV RDX,RAX LEA RSI,[0x12a46f] MOV AL,0x0 CALL 0x00101100 LAB_0011ebeb: JMP 0x0011ebed LAB_0011ebed: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f54] MOV AL,0x0 CALL 0x00101100 LAB_0011ec05: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX LEA RAX,[0x133050] MOV dword ptr [RAX],0x21 MOV dword ptr [RSP + 0x44],0x0 LAB_0011ec2f: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
/* LefDefParser::lefwMacroForeign(char const*, double, double, int) */ int4 LefDefParser::lefwMacroForeign(char *param_1,double param_2,double param_3,int param_4) { _IO_FILE *p_Var1; FILE *pFVar2; int8 uVar3; int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if ((lefwState == 9) || (lefwState == 0x21)) { if (((param_1 == (char *)0x0) || (param_1 == (char *)0x0)) || (*param_1 == '\0')) { local_4 = 3; } else { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," FOREIGN %s ",param_1); if (((param_2 != 0.0) || (NAN(param_2))) || ((param_3 != 0.0 || (NAN(param_3))))) { fprintf(lefwFile,"%.11g %.11g ",param_2,param_3); pFVar2 = lefwFile; if ((-1 < param_4) && (param_4 < 8)) { uVar3 = lefwOrient(param_4); fprintf(pFVar2,"%s ",uVar3); } } else if ((0 < param_4) && (param_4 < 8)) { fprintf(lefwFile,"%.11g %.11g ",param_2,param_3); pFVar2 = lefwFile; uVar3 = lefwOrient(param_4); fprintf(pFVar2,"%s ",uVar3); } fprintf(lefwFile,";\n"); } else { encPrint(lefwFile," FOREIGN %s ",param_1); if ((((param_2 != 0.0) || (NAN(param_2))) || (param_3 != 0.0)) || (NAN(param_3))) { encPrint(lefwFile,"%.11g %.11g ",param_2,param_3); p_Var1 = lefwFile; if ((-1 < param_4) && (param_4 < 8)) { uVar3 = lefwOrient(param_4); encPrint(p_Var1,"%s ",uVar3); } } else if ((0 < param_4) && (param_4 < 8)) { encPrint(lefwFile,"%.11g %.11g ",param_2,param_3); p_Var1 = lefwFile; uVar3 = lefwOrient(param_4); encPrint(p_Var1,"%s ",uVar3); } encPrint(lefwFile,";\n"); } lefwLines = lefwLines + 1; lefwState = 0x21; local_4 = 0; } } else { local_4 = 2; } return local_4; }
2,882
ft_init_boolean_search
eloqsql/storage/myisam/ft_boolean_search.c
FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query, uint query_len, CHARSET_INFO *cs) { FTB *ftb; FTB_EXPR *ftbe; FTB_WORD *ftbw; if (!(ftb=(FTB *)my_malloc(mi_key_memory_FTB, sizeof(FTB), MYF(MY_WME)))) return 0; ftb->please= (struct _ft_vft *) & _ft_vft_boolean; ftb->state=UNINITIALIZED; ftb->info=info; ftb->keynr=keynr; ftb->charset=cs; DBUG_ASSERT(keynr==NO_SUCH_KEY || cs == info->s->keyinfo[keynr].seg->charset); ftb->with_scan=0; ftb->lastpos=HA_OFFSET_ERROR; bzero(& ftb->no_dupes, sizeof(TREE)); ftb->last_word= 0; init_alloc_root(mi_key_memory_FTB, &ftb->mem_root, 1024, 1024, MYF(0)); ftb->queue.max_elements= 0; if (!(ftbe=(FTB_EXPR *)alloc_root(&ftb->mem_root, sizeof(FTB_EXPR)))) goto err; ftbe->weight=1; ftbe->flags=FTB_FLAG_YES; ftbe->nos=1; ftbe->up=0; ftbe->max_docid= ftbe->ythresh= ftbe->yweaks= 0; ftbe->docid[0]=ftbe->docid[1]=HA_OFFSET_ERROR; ftbe->phrase= NULL; ftbe->document= 0; ftb->root=ftbe; if (unlikely(_ftb_parse_query(ftb, query, query_len, keynr == NO_SUCH_KEY ? &ft_default_parser : info->s->keyinfo[keynr].parser))) goto err; /* Hack: instead of init_queue, we'll use reinit queue to be able to alloc queue with alloc_root() */ if (! (ftb->queue.root= (uchar **)alloc_root(&ftb->mem_root, (ftb->queue.max_elements + 1) * sizeof(void *)))) goto err; reinit_queue(&ftb->queue, ftb->queue.max_elements, 0, 0, (int (*)(void*, uchar*, uchar*))FTB_WORD_cmp, 0, 0, 0); for (ftbw= ftb->last_word; ftbw; ftbw= ftbw->prev) queue_insert(&ftb->queue, (uchar *)ftbw); ftb->list=(FTB_WORD **)alloc_root(&ftb->mem_root, sizeof(FTB_WORD *)*ftb->queue.elements); memcpy(ftb->list, &queue_top(&ftb->queue), sizeof(FTB_WORD *)*ftb->queue.elements); my_qsort2(ftb->list, ftb->queue.elements, sizeof(FTB_WORD *), (qsort2_cmp)FTB_WORD_cmp_list, (void*)ftb->charset); if (ftb->queue.elements<2) ftb->with_scan &= ~FTB_FLAG_TRUNC; ftb->state=READY; return ftb; err: free_root(& ftb->mem_root, MYF(0)); my_free(ftb); return 0; }
O3
c
ft_init_boolean_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movl %ecx, -0x2c(%rbp) movq %rdx, -0x38(%rbp) movl %esi, %r13d movq %rdi, %r15 leaq 0xb8dd54(%rip), %r12 # 0xbff4bc movl (%r12), %edi movl $0x350, %esi # imm = 0x350 movl $0x10, %edx callq 0x9fd41 xorl %ecx, %ecx testq %rax, %rax je 0x7196f movq %rax, %rbx leaq 0x309ca8(%rip), %rax # 0x37b438 movq %rax, (%rbx) movl %ecx, 0x348(%rbx) movq %r15, 0x8(%rbx) movl %r13d, 0x340(%rbx) movq %r14, 0x10(%rbx) movb $0x0, 0x344(%rbx) movq $-0x1, 0x338(%rbx) leaq 0xa0(%rbx), %rdi movl $0x298, %edx # imm = 0x298 xorl %esi, %esi callq 0x292a0 movq $0x0, 0x28(%rbx) movl (%r12), %edi leaq 0x30(%rbx), %r14 movl $0x400, %edx # imm = 0x400 movl $0x400, %ecx # imm = 0x400 movq %r14, %rsi xorl %r8d, %r8d callq 0x9c930 xorl %eax, %eax movl %eax, 0x84(%rbx) movl $0x50, %esi movq %r14, %rdi callq 0x9ca87 testq %rax, %rax je 0x7195d movl $0x3f800000, 0x28(%rax) # imm = 0x3F800000 movl $0x2, 0x8(%rax) movl $0x1, 0x44(%rax) xorl %ecx, %ecx movq %rcx, (%rax) movq %rcx, 0x48(%rax) movq %rcx, 0x20(%rax) pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x10(%rax) pxor %xmm0, %xmm0 movdqu %xmm0, 0x30(%rax) movq %rax, 0x18(%rbx) cmpl $-0x1, %r13d je 0x71866 movq (%r15), %rax movq 0x218(%rax), %rax movl %r13d, %ecx imulq $0x70, %rcx, %rcx movq 0x38(%rax,%rcx), %r15 jmp 0x7186d leaq 0x313a93(%rip), %r15 # 0x385300 cmpl $0x0, 0x348(%rbx) jne 0x718fa movq 0x8(%rbx), %rdi movl 0x340(%rbx), %esi xorl %edx, %edx callq 0x73d09 testq %rax, %rax je 0x7195d leaq -0x58(%rbp), %rcx movq %rbx, (%rcx) movl $0x0, 0x18(%rcx) movq 0x18(%rbx), %rdx movq %rdx, 0x8(%rcx) movq $0x0, 0x10(%rcx) leaq 0xc93(%rip), %rdx # 0x7254c movq %rdx, (%rax) leaq 0xd1e(%rip), %rdx # 0x725e1 movq %rdx, 0x8(%rax) movq %rcx, 0x18(%rax) movq 0x10(%rbx), %rcx movq %rcx, 0x20(%rax) movq -0x38(%rbp), %rcx movq %rcx, 0x28(%rax) movl -0x2c(%rbp), %ecx movl %ecx, 0x30(%rax) movabsq $0x200000000, %rcx # imm = 0x200000000 movq %rcx, 0x34(%rax) movq %rax, %rdi callq *0x8(%r15) testl %eax, %eax jne 0x7195d movl 0x84(%rbx), %esi incl %esi shlq $0x3, %rsi movq %r14, %rdi callq 0x9ca87 movq %rax, 0x70(%rbx) testq %rax, %rax je 0x7195d movq %rbx, %r15 addq $0x70, %r15 movl 0x84(%rbx), %esi xorl %eax, %eax leaq 0xc1(%rip), %r8 # 0x719ee movq %r15, %rdi xorl %edx, %edx xorl %ecx, %ecx xorl %r9d, %r9d pushq %rax pushq %rax callq 0xa2073 addq $0x10, %rsp movq 0x28(%rbx), %r12 testq %r12, %r12 je 0x71973 movq %r15, %rdi movq %r12, %rsi callq 0xa2127 movq 0x38(%r12), %r12 jmp 0x71946 movq %r14, %rdi xorl %esi, %esi callq 0x9ccff movq %rbx, %rdi callq 0x9ff6e xorl %ebx, %ebx jmp 0x719dc movl 0x80(%rbx), %esi shlq $0x3, %rsi movq %r14, %rdi callq 0x9ca87 movq %rax, 0x20(%rbx) movq 0x70(%rbx), %rsi addq $0x8, %rsi movl 0x80(%rbx), %edx shlq $0x3, %rdx movq %rax, %rdi callq 0x29080 movq 0x10(%rbx), %r8 movq 0x20(%rbx), %rdi movl 0x80(%rbx), %esi leaq 0x72(%rip), %rcx # 0x71a2a movl $0x8, %edx callq 0x9bd1c cmpl $0x1, 0x80(%rbx) ja 0x719d2 andb $-0x2, 0x344(%rbx) movl $0x1, 0x348(%rbx) movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ft_init_boolean_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov [rbp+var_2C], ecx mov [rbp+var_38], rdx mov r13d, esi mov r15, rdi lea r12, mi_key_memory_FTB mov edi, [r12] mov esi, 350h mov edx, 10h call my_malloc xor ecx, ecx test rax, rax jz loc_7196F mov rbx, rax lea rax, _ft_vft_boolean mov [rbx], rax mov [rbx+348h], ecx mov [rbx+8], r15 mov [rbx+340h], r13d mov [rbx+10h], r14 mov byte ptr [rbx+344h], 0 mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh lea rdi, [rbx+0A0h] mov edx, 298h xor esi, esi call _memset mov qword ptr [rbx+28h], 0 mov edi, [r12] lea r14, [rbx+30h] mov edx, 400h mov ecx, 400h mov rsi, r14 xor r8d, r8d call init_alloc_root xor eax, eax mov [rbx+84h], eax mov esi, 50h ; 'P' mov rdi, r14 call alloc_root test rax, rax jz loc_7195D mov dword ptr [rax+28h], 3F800000h mov dword ptr [rax+8], 2 mov dword ptr [rax+44h], 1 xor ecx, ecx mov [rax], rcx mov [rax+48h], rcx mov [rax+20h], rcx pcmpeqd xmm0, xmm0 movdqu xmmword ptr [rax+10h], xmm0 pxor xmm0, xmm0 movdqu xmmword ptr [rax+30h], xmm0 mov [rbx+18h], rax cmp r13d, 0FFFFFFFFh jz short loc_71866 mov rax, [r15] mov rax, [rax+218h] mov ecx, r13d imul rcx, 70h ; 'p' mov r15, [rax+rcx+38h] jmp short loc_7186D loc_71866: lea r15, ft_default_parser loc_7186D: cmp dword ptr [rbx+348h], 0 jnz loc_718FA mov rdi, [rbx+8] mov esi, [rbx+340h] xor edx, edx call ftparser_call_initializer test rax, rax jz loc_7195D lea rcx, [rbp+var_58] mov [rcx], rbx mov dword ptr [rcx+18h], 0 mov rdx, [rbx+18h] mov [rcx+8], rdx mov qword ptr [rcx+10h], 0 lea rdx, ftb_parse_query_internal mov [rax], rdx lea rdx, ftb_query_add_word mov [rax+8], rdx mov [rax+18h], rcx mov rcx, [rbx+10h] mov [rax+20h], rcx mov rcx, [rbp+var_38] mov [rax+28h], rcx mov ecx, [rbp+var_2C] mov [rax+30h], ecx mov rcx, 200000000h mov [rax+34h], rcx mov rdi, rax call qword ptr [r15+8] test eax, eax jnz short loc_7195D loc_718FA: mov esi, [rbx+84h] inc esi shl rsi, 3 mov rdi, r14 call alloc_root mov [rbx+70h], rax test rax, rax jz short loc_7195D mov r15, rbx add r15, 70h ; 'p' mov esi, [rbx+84h] xor eax, eax lea r8, FTB_WORD_cmp mov rdi, r15 xor edx, edx xor ecx, ecx xor r9d, r9d push rax push rax call reinit_queue add rsp, 10h mov r12, [rbx+28h] loc_71946: test r12, r12 jz short loc_71973 mov rdi, r15 mov rsi, r12 call queue_insert mov r12, [r12+38h] jmp short loc_71946 loc_7195D: mov rdi, r14 xor esi, esi call free_root mov rdi, rbx call my_free loc_7196F: xor ebx, ebx jmp short loc_719DC loc_71973: mov esi, [rbx+80h] shl rsi, 3 mov rdi, r14 call alloc_root mov [rbx+20h], rax mov rsi, [rbx+70h] add rsi, 8 mov edx, [rbx+80h] shl rdx, 3 mov rdi, rax call _memcpy mov r8, [rbx+10h] mov rdi, [rbx+20h] mov esi, [rbx+80h] lea rcx, FTB_WORD_cmp_list mov edx, 8 call my_qsort2 cmp dword ptr [rbx+80h], 1 ja short loc_719D2 and byte ptr [rbx+344h], 0FEh loc_719D2: mov dword ptr [rbx+348h], 1 loc_719DC: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ft_init_boolean_search(long long a1, unsigned int a2, long long a3, int a4, long long a5) { long long v6; // rax long long v7; // rbx long long v8; // rax unsigned int ( **v9)(long long); // r15 long long v10; // rax long long v11; // rax long long i; // r12 long long v13; // rax _QWORD v15[3]; // [rsp+8h] [rbp-58h] BYREF int v16; // [rsp+20h] [rbp-40h] long long v17; // [rsp+28h] [rbp-38h] int v18; // [rsp+34h] [rbp-2Ch] v18 = a4; v17 = a3; v6 = my_malloc(mi_key_memory_FTB, 848LL, 16LL); if ( !v6 ) return 0LL; v7 = v6; *(_QWORD *)v6 = ft_vft_boolean; *(_DWORD *)(v6 + 840) = 0; *(_QWORD *)(v6 + 8) = a1; *(_DWORD *)(v6 + 832) = a2; *(_QWORD *)(v6 + 16) = a5; *(_BYTE *)(v6 + 836) = 0; *(_QWORD *)(v6 + 824) = -1LL; memset(v6 + 160, 0LL, 664LL); *(_QWORD *)(v7 + 40) = 0LL; init_alloc_root(mi_key_memory_FTB, v7 + 48, 1024LL, 1024LL, 0LL); *(_DWORD *)(v7 + 132) = 0; v8 = alloc_root(v7 + 48, 80LL); if ( !v8 ) goto LABEL_13; *(_DWORD *)(v8 + 40) = 1065353216; *(_DWORD *)(v8 + 8) = 2; *(_DWORD *)(v8 + 68) = 1; *(_QWORD *)v8 = 0LL; *(_QWORD *)(v8 + 72) = 0LL; *(_QWORD *)(v8 + 32) = 0LL; *(_OWORD *)(v8 + 16) = -1LL; *(_OWORD *)(v8 + 48) = 0LL; *(_QWORD *)(v7 + 24) = v8; v9 = a2 == -1 ? (unsigned int ( **)(long long))&ft_default_parser : *(unsigned int ( ***)(long long))(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * a2 + 56); if ( !*(_DWORD *)(v7 + 840) ) { v10 = ftparser_call_initializer(*(_QWORD *)(v7 + 8), *(unsigned int *)(v7 + 832), 0LL, 0.0); if ( !v10 ) goto LABEL_13; v15[0] = v7; v16 = 0; v15[1] = *(_QWORD *)(v7 + 24); v15[2] = 0LL; *(_QWORD *)v10 = ftb_parse_query_internal; *(_QWORD *)(v10 + 8) = ftb_query_add_word; *(_QWORD *)(v10 + 24) = v15; *(_QWORD *)(v10 + 32) = *(_QWORD *)(v7 + 16); *(_QWORD *)(v10 + 40) = v17; *(_DWORD *)(v10 + 48) = v18; *(_QWORD *)(v10 + 52) = 0x200000000LL; if ( v9[1](v10) ) goto LABEL_13; } v11 = alloc_root(v7 + 48, 8LL * (unsigned int)(*(_DWORD *)(v7 + 132) + 1)); *(_QWORD *)(v7 + 112) = v11; if ( !v11 ) { LABEL_13: free_root(v7 + 48, 0LL); my_free(v7); return 0LL; } reinit_queue(v7 + 112, *(_DWORD *)(v7 + 132), 0, 0, (unsigned int)FTB_WORD_cmp, 0, 0, 0); for ( i = *(_QWORD *)(v7 + 40); i; i = *(_QWORD *)(i + 56) ) queue_insert(v7 + 112, i); v13 = alloc_root(v7 + 48, 8LL * *(unsigned int *)(v7 + 128)); *(_QWORD *)(v7 + 32) = v13; memcpy(v13, *(_QWORD *)(v7 + 112) + 8LL, 8LL * *(unsigned int *)(v7 + 128)); my_qsort2(*(_QWORD *)(v7 + 32), *(unsigned int *)(v7 + 128), 8LL, FTB_WORD_cmp_list, *(_QWORD *)(v7 + 16)); if ( *(_DWORD *)(v7 + 128) <= 1u ) *(_BYTE *)(v7 + 836) &= ~1u; *(_DWORD *)(v7 + 840) = 1; return v7; }
ft_init_boolean_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV dword ptr [RBP + -0x2c],ECX MOV qword ptr [RBP + -0x38],RDX MOV R13D,ESI MOV R15,RDI LEA R12,[0xcff4bc] MOV EDI,dword ptr [R12] MOV ESI,0x350 MOV EDX,0x10 CALL 0x0019fd41 XOR ECX,ECX TEST RAX,RAX JZ 0x0017196f MOV RBX,RAX LEA RAX,[0x47b438] MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x348],ECX MOV qword ptr [RBX + 0x8],R15 MOV dword ptr [RBX + 0x340],R13D MOV qword ptr [RBX + 0x10],R14 MOV byte ptr [RBX + 0x344],0x0 MOV qword ptr [RBX + 0x338],-0x1 LEA RDI,[RBX + 0xa0] MOV EDX,0x298 XOR ESI,ESI CALL 0x001292a0 MOV qword ptr [RBX + 0x28],0x0 MOV EDI,dword ptr [R12] LEA R14,[RBX + 0x30] MOV EDX,0x400 MOV ECX,0x400 MOV RSI,R14 XOR R8D,R8D CALL 0x0019c930 XOR EAX,EAX MOV dword ptr [RBX + 0x84],EAX MOV ESI,0x50 MOV RDI,R14 CALL 0x0019ca87 TEST RAX,RAX JZ 0x0017195d MOV dword ptr [RAX + 0x28],0x3f800000 MOV dword ptr [RAX + 0x8],0x2 MOV dword ptr [RAX + 0x44],0x1 XOR ECX,ECX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x48],RCX MOV qword ptr [RAX + 0x20],RCX PCMPEQD XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x10],XMM0 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x30],XMM0 MOV qword ptr [RBX + 0x18],RAX CMP R13D,-0x1 JZ 0x00171866 MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,R13D IMUL RCX,RCX,0x70 MOV R15,qword ptr [RAX + RCX*0x1 + 0x38] JMP 0x0017186d LAB_00171866: LEA R15,[0x485300] LAB_0017186d: CMP dword ptr [RBX + 0x348],0x0 JNZ 0x001718fa MOV RDI,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RBX + 0x340] XOR EDX,EDX CALL 0x00173d09 TEST RAX,RAX JZ 0x0017195d LEA RCX,[RBP + -0x58] MOV qword ptr [RCX],RBX MOV dword ptr [RCX + 0x18],0x0 MOV RDX,qword ptr [RBX + 0x18] MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RCX + 0x10],0x0 LEA RDX,[0x17254c] MOV qword ptr [RAX],RDX LEA RDX,[0x1725e1] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x28],RCX MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + 0x30],ECX MOV RCX,0x200000000 MOV qword ptr [RAX + 0x34],RCX MOV RDI,RAX CALL qword ptr [R15 + 0x8] TEST EAX,EAX JNZ 0x0017195d LAB_001718fa: MOV ESI,dword ptr [RBX + 0x84] INC ESI SHL RSI,0x3 MOV RDI,R14 CALL 0x0019ca87 MOV qword ptr [RBX + 0x70],RAX TEST RAX,RAX JZ 0x0017195d MOV R15,RBX ADD R15,0x70 MOV ESI,dword ptr [RBX + 0x84] XOR EAX,EAX LEA R8,[0x1719ee] MOV RDI,R15 XOR EDX,EDX XOR ECX,ECX XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x001a2073 ADD RSP,0x10 MOV R12,qword ptr [RBX + 0x28] LAB_00171946: TEST R12,R12 JZ 0x00171973 MOV RDI,R15 MOV RSI,R12 CALL 0x001a2127 MOV R12,qword ptr [R12 + 0x38] JMP 0x00171946 LAB_0017195d: MOV RDI,R14 XOR ESI,ESI CALL 0x0019ccff MOV RDI,RBX CALL 0x0019ff6e LAB_0017196f: XOR EBX,EBX JMP 0x001719dc LAB_00171973: MOV ESI,dword ptr [RBX + 0x80] SHL RSI,0x3 MOV RDI,R14 CALL 0x0019ca87 MOV qword ptr [RBX + 0x20],RAX MOV RSI,qword ptr [RBX + 0x70] ADD RSI,0x8 MOV EDX,dword ptr [RBX + 0x80] SHL RDX,0x3 MOV RDI,RAX CALL 0x00129080 MOV R8,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBX + 0x20] MOV ESI,dword ptr [RBX + 0x80] LEA RCX,[0x171a2a] MOV EDX,0x8 CALL 0x0019bd1c CMP dword ptr [RBX + 0x80],0x1 JA 0x001719d2 AND byte ptr [RBX + 0x344],0xfe LAB_001719d2: MOV dword ptr [RBX + 0x348],0x1 LAB_001719dc: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * ft_init_boolean_search (long *param_1,uint param_2,int8 param_3,int4 param_4,int8 param_5) { int8 *puVar1; int iVar2; int8 *puVar3; int8 *puVar4; long lVar5; void *__dest; int1 *puVar6; int8 *local_60; int8 local_58; int8 local_50; int4 local_48; int8 local_40; int4 local_34; local_40 = param_3; local_34 = param_4; puVar3 = (int8 *)my_malloc(mi_key_memory_FTB,0x350,0x10); if (puVar3 == (int8 *)0x0) { return (int8 *)0x0; } *puVar3 = _ft_vft_boolean; *(int4 *)(puVar3 + 0x69) = 0; puVar3[1] = param_1; *(uint *)(puVar3 + 0x68) = param_2; puVar3[2] = param_5; *(int1 *)((long)puVar3 + 0x344) = 0; puVar3[0x67] = 0xffffffffffffffff; memset(puVar3 + 0x14,0,0x298); puVar3[5] = 0; puVar1 = puVar3 + 6; init_alloc_root(mi_key_memory_FTB,puVar1,0x400,0x400,0); *(int4 *)((long)puVar3 + 0x84) = 0; puVar4 = (int8 *)alloc_root(puVar1,0x50); if (puVar4 == (int8 *)0x0) goto LAB_0017195d; *(int4 *)(puVar4 + 5) = 0x3f800000; *(int4 *)(puVar4 + 1) = 2; *(int4 *)((long)puVar4 + 0x44) = 1; *puVar4 = 0; puVar4[9] = 0; puVar4[4] = 0; *(int4 *)(puVar4 + 2) = 0xffffffff; *(int4 *)((long)puVar4 + 0x14) = 0xffffffff; *(int4 *)(puVar4 + 3) = 0xffffffff; *(int4 *)((long)puVar4 + 0x1c) = 0xffffffff; *(int1 (*) [16])(puVar4 + 6) = (int1 [16])0x0; puVar3[3] = puVar4; if (param_2 == 0xffffffff) { puVar6 = ft_default_parser; } else { puVar6 = *(int1 **)(*(long *)(*param_1 + 0x218) + 0x38 + (ulong)param_2 * 0x70); } if (*(int *)(puVar3 + 0x69) == 0) { puVar4 = (int8 *)ftparser_call_initializer(puVar3[1],*(int4 *)(puVar3 + 0x68),0); if (puVar4 == (int8 *)0x0) goto LAB_0017195d; local_48 = 0; local_58 = puVar3[3]; local_50 = 0; *puVar4 = ftb_parse_query_internal; puVar4[1] = ftb_query_add_word; puVar4[3] = &local_60; puVar4[4] = puVar3[2]; puVar4[5] = local_40; *(int4 *)(puVar4 + 6) = local_34; *(int8 *)((long)puVar4 + 0x34) = 0x200000000; local_60 = puVar3; iVar2 = (**(code **)(puVar6 + 8))(puVar4); if (iVar2 != 0) goto LAB_0017195d; } lVar5 = alloc_root(puVar1,(ulong)(*(int *)((long)puVar3 + 0x84) + 1) << 3); puVar3[0xe] = lVar5; if (lVar5 != 0) { reinit_queue(puVar3 + 0xe,*(int4 *)((long)puVar3 + 0x84),0,0,FTB_WORD_cmp,0,0,0); for (lVar5 = puVar3[5]; lVar5 != 0; lVar5 = *(long *)(lVar5 + 0x38)) { queue_insert(puVar3 + 0xe,lVar5); } __dest = (void *)alloc_root(puVar1,(ulong)*(uint *)(puVar3 + 0x10) << 3); puVar3[4] = __dest; memcpy(__dest,(void *)(puVar3[0xe] + 8),(ulong)*(uint *)(puVar3 + 0x10) << 3); my_qsort2(puVar3[4],*(int4 *)(puVar3 + 0x10),8,FTB_WORD_cmp_list,puVar3[2]); if (*(uint *)(puVar3 + 0x10) < 2) { *(byte *)((long)puVar3 + 0x344) = *(byte *)((long)puVar3 + 0x344) & 0xfe; } *(int4 *)(puVar3 + 0x69) = 1; return puVar3; } LAB_0017195d: free_root(puVar1,0); my_free(puVar3); return (int8 *)0x0; }
2,883
minja::VariableExpr::~VariableExpr()
monkey531[P]llama/common/minja.hpp
VariableExpr(const Location & location, const std::string& n) : Expression(location), name(n) {}
O3
cpp
minja::VariableExpr::~VariableExpr(): pushq %rbx movq %rdi, %rbx leaq 0x6d2ad(%rip), %rax # 0xe7180 addq $0x10, %rax movq %rax, (%rdi) movq 0x20(%rdi), %rdi leaq 0x30(%rbx), %rax cmpq %rax, %rdi je 0x79ef2 movq (%rax), %rsi incq %rsi callq 0x197b0 leaq 0x6c96f(%rip), %rax # 0xe6868 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x79f0f popq %rbx jmp 0x33e7e popq %rbx retq nop
_ZN5minja12VariableExprD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+20h]; void * lea rax, [rbx+30h] cmp rdi, rax jz short loc_79EF2 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_79EF2: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_79F0F 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_79F0F: pop rbx retn
void minja::VariableExpr::~VariableExpr(minja::VariableExpr *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::VariableExpr + 2; v2 = (char *)*((_QWORD *)this + 4); if ( v2 != (char *)this + 48 ) operator delete(v2, *((_QWORD *)this + 6) + 1LL); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~VariableExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x1e7180] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x20] LEA RAX,[RBX + 0x30] CMP RDI,RAX JZ 0x00179ef2 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001197b0 LAB_00179ef2: LEA RAX,[0x1e6868] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x00179f0f POP RBX JMP 0x00133e7e LAB_00179f0f: POP RBX RET
/* minja::VariableExpr::~VariableExpr() */ void __thiscall minja::VariableExpr::~VariableExpr(VariableExpr *this) { *(int ***)this = &PTR_do_evaluate_001e7190; if (*(VariableExpr **)(this + 0x20) != this + 0x30) { operator_delete(*(VariableExpr **)(this + 0x20),*(long *)(this + 0x30) + 1); } *(int ***)this = &PTR___cxa_pure_virtual_001e6878; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); return; } return; }
2,884
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xa586b movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xa5855 movq %rbx, %rdi movq %r15, %rsi callq 0x191b0 testl %eax, %eax je 0xa584a addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0xa582b jmp 0xa584d movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0xa58c9 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x193b0 movq %rax, %rbx movq %r14, %rdi callq 0x5108e movq %rsp, %rdx movq %rax, (%rdx) leaq 0x179d5(%rip), %rsi # 0xbd262 leaq 0x20(%rsp), %rdi callq 0x7ec31 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x50e36 xorl %ebp, %ebp leaq 0x49a10(%rip), %rsi # 0xef2c8 leaq -0x46a1f(%rip), %rdx # 0x5eea0 movq %rbx, %rdi callq 0x19d60 jmp 0xa5942 movl $0x20, %edi callq 0x193b0 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x19350 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x25304 leaq 0x17994(%rip), %rsi # 0xbd292 leaq 0x17993(%rip), %rcx # 0xbd298 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x7f20e movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x7f586 xorl %ebp, %ebp leaq 0x49a7d(%rip), %rsi # 0xef3b0 leaq -0x46a9a(%rip), %rdx # 0x5eea0 movq %rbx, %rdi callq 0x19d60 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa5960 movq 0x30(%rsp), %rsi incq %rsi callq 0x197f0 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa59ab movq 0x10(%rsp), %rsi jmp 0xa59a3 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa59b5 movq 0x10(%rsp), %rsi incq %rsi callq 0x197f0 jmp 0xa59b5 jmp 0xa59b2 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa59ab movq 0x30(%rsp), %rsi incq %rsi callq 0x197f0 testb %bpl, %bpl jne 0xa59b5 jmp 0xa59bd movq %rax, %r14 movq %rbx, %rdi callq 0x195a0 movq %r14, %rdi callq 0x19dc0 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_A586B mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_A5855 loc_A582B: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_A584A add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_A582B jmp short loc_A584D loc_A584A: mov rax, rbx loc_A584D: mov rcx, [r14+8] mov rbx, [rcx+8] loc_A5855: cmp rax, rbx jz short loc_A58C9 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A586B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_A5942 loc_A58C9: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_A5942: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A5960 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A5960: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_A59AB mov rsi, [rsp+68h+var_58] jmp short loc_A59A3 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_A59B5 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A59B5 jmp short loc_A59B2 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A59AB mov rsi, [rsp+68h+var_38] loc_A59A3: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A59AB: test bpl, bpl jnz short loc_A59B5 jmp short loc_A59BD loc_A59B2: mov r14, rax loc_A59B5: mov rdi, rbx; void * call ___cxa_free_exception loc_A59BD: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax void *v9[2]; // [rsp+0h] [rbp-68h] BYREF long long v10; // [rsp+10h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v11, (long long)"cannot use at() with ", v9); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 304, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) goto LABEL_7; } v4 = v3; LABEL_7: v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } if ( v4 == v3 ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = &v10; v8 = strlen(a2); std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v11, (long long)"key '", v9, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v7, 403, v11); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001a586b MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001a5855 LAB_001a582b: MOV RDI,RBX MOV RSI,R15 CALL 0x001191b0 TEST EAX,EAX JZ 0x001a584a ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001a582b JMP 0x001a584d LAB_001a584a: MOV RAX,RBX LAB_001a584d: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_001a5855: CMP RAX,RBX JZ 0x001a58c9 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a586b: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX MOV RDI,R14 CALL 0x0015108e MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_001a5886: LEA RSI,[0x1bd262] LEA RDI,[RSP + 0x20] CALL 0x0017ec31 MOV BPL,0x1 LAB_001a589a: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00150e36 XOR EBP,EBP LEA RSI,[0x1ef2c8] LEA RDX,[0x15eea0] MOV RDI,RBX CALL 0x00119d60 LAB_001a58c9: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00119350 LEA RDX,[RAX + R15*0x1] LAB_001a58ec: MOV RDI,RSP MOV RSI,R15 CALL 0x00125304 LAB_001a58f7: LEA RSI,[0x1bd292] LEA RCX,[0x1bd298] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0017f20e MOV BPL,0x1 LAB_001a5915: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0017f586 XOR EBP,EBP LEA RSI,[0x1ef3b0] LEA RDX,[0x15eea0] MOV RDI,RBX CALL 0x00119d60
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001a5886 to 001a5896 has its CatchHandler @ 001a59b2 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 001a589a to 001a58c6 has its CatchHandler @ 001a598d */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001a58ec to 001a58f6 has its CatchHandler @ 001a598b */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001a58f7 to 001a5911 has its CatchHandler @ 001a5970 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001a5915 to 001a5941 has its CatchHandler @ 001a5942 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
2,885
configure_instr_class(PFS_instr_class*)
eloqsql/storage/perfschema/pfs_instr_class.cc
static void configure_instr_class(PFS_instr_class *entry) { uint match_length= 0; /* length of matching pattern */ // May be NULL in unit tests if (pfs_instr_config_array == NULL) return; PFS_instr_config **it= pfs_instr_config_array->front(); for ( ; it != pfs_instr_config_array->end(); it++) { PFS_instr_config* e= *it; /** Compare class name to all configuration entries. In case of multiple matches, the longer specification wins. For example, the pattern 'ABC/DEF/GHI=ON' has precedence over 'ABC/DEF/%=OFF' regardless of position within the configuration file or command line. Consecutive wildcards affect the count. */ if (!my_charset_latin1.wildcmp( entry->m_name, entry->m_name+entry->m_name_length, e->m_name, e->m_name+e->m_name_length, '\\', '?','%')) { if (e->m_name_length >= match_length) { entry->m_enabled= e->m_enabled; entry->m_timed= e->m_timed; match_length= MY_MAX(e->m_name_length, match_length); } } } }
O0
cpp
configure_instr_class(PFS_instr_class*): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) cmpq $0x0, 0x3cb1ad(%rip) # 0x40c578 jne 0x413d2 jmp 0x414d3 movq 0x3cb19f(%rip), %rdi # 0x40c578 callq 0x46040 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq 0x3cb187(%rip), %rdi # 0x40c578 callq 0x46060 movq %rax, %rcx movq -0x28(%rbp), %rax cmpq %rcx, %rax je 0x414d3 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rsi addq $0x14, %rsi movq -0x8(%rbp), %rdx addq $0x14, %rdx movq -0x8(%rbp), %rax movl 0x94(%rax), %eax addq %rax, %rdx movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x20(%rbp), %rax movq (%rax), %r8 movq -0x20(%rbp), %rax movl 0x8(%rax), %eax addq %rax, %r8 leaq 0x278e03(%rip), %rdi # 0x2ba250 movl $0x5c, %r9d movl $0x3f, (%rsp) movl $0x25, 0x8(%rsp) callq 0x46080 cmpl $0x0, %eax jne 0x414c0 movq -0x20(%rbp), %rax movl 0x8(%rax), %eax cmpl -0xc(%rbp), %eax jb 0x414be movq -0x20(%rbp), %rax movb 0xc(%rax), %cl movq -0x8(%rbp), %rax andb $0x1, %cl movb %cl, 0x4(%rax) movq -0x20(%rbp), %rax movb 0xd(%rax), %cl movq -0x8(%rbp), %rax andb $0x1, %cl movb %cl, 0x5(%rax) movq -0x20(%rbp), %rax movl 0x8(%rax), %eax cmpl -0xc(%rbp), %eax jbe 0x414b2 movq -0x20(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x2c(%rbp) jmp 0x414b8 movl -0xc(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0xc(%rbp) jmp 0x414c0 jmp 0x414c2 movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0x413e2 addq $0x40, %rsp popq %rbp retq nopl (%rax)
_ZL21configure_instr_classP15PFS_instr_class: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], 0 cmp cs:pfs_instr_config_array, 0 jnz short loc_413D2 jmp loc_414D3 loc_413D2: mov rdi, cs:pfs_instr_config_array call _ZN13Dynamic_arrayIP16PFS_instr_configE5frontEv; Dynamic_array<PFS_instr_config *>::front(void) mov [rbp+var_18], rax loc_413E2: mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rdi, cs:pfs_instr_config_array call _ZNK13Dynamic_arrayIP16PFS_instr_configE3endEv; Dynamic_array<PFS_instr_config *>::end(void) mov rcx, rax mov rax, [rbp+var_28] cmp rax, rcx jz loc_414D3 mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_20], rax mov rsi, [rbp+var_8] add rsi, 14h; char * mov rdx, [rbp+var_8] add rdx, 14h mov rax, [rbp+var_8] mov eax, [rax+94h] add rdx, rax; char * mov rax, [rbp+var_20] mov rcx, [rax]; char * mov rax, [rbp+var_20] mov r8, [rax] mov rax, [rbp+var_20] mov eax, [rax+8] add r8, rax; char * lea rdi, my_charset_latin1; this mov r9d, 5Ch ; '\'; int mov [rsp+40h+var_40], 3Fh ; '?'; int mov [rsp+40h+var_38], 25h ; '%'; int call _ZNK15charset_info_st7wildcmpEPKcS1_S1_S1_iii; charset_info_st::wildcmp(char const*,char const*,char const*,char const*,int,int,int) cmp eax, 0 jnz short loc_414C0 mov rax, [rbp+var_20] mov eax, [rax+8] cmp eax, [rbp+var_C] jb short loc_414BE mov rax, [rbp+var_20] mov cl, [rax+0Ch] mov rax, [rbp+var_8] and cl, 1 mov [rax+4], cl mov rax, [rbp+var_20] mov cl, [rax+0Dh] mov rax, [rbp+var_8] and cl, 1 mov [rax+5], cl mov rax, [rbp+var_20] mov eax, [rax+8] cmp eax, [rbp+var_C] jbe short loc_414B2 mov rax, [rbp+var_20] mov eax, [rax+8] mov [rbp+var_2C], eax jmp short loc_414B8 loc_414B2: mov eax, [rbp+var_C] mov [rbp+var_2C], eax loc_414B8: mov eax, [rbp+var_2C] mov [rbp+var_C], eax loc_414BE: jmp short $+2 loc_414C0: jmp short $+2 loc_414C2: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp loc_413E2 loc_414D3: add rsp, 40h pop rbp retn
void configure_instr_class(PFS_instr_class *a1) { unsigned int v1; // [rsp+14h] [rbp-2Ch] const char **v2; // [rsp+20h] [rbp-20h] const char ***i; // [rsp+28h] [rbp-18h] unsigned int v4; // [rsp+34h] [rbp-Ch] v4 = 0; if ( pfs_instr_config_array ) { for ( i = (const char ***)Dynamic_array<PFS_instr_config *>::front(pfs_instr_config_array); i != (const char ***)Dynamic_array<PFS_instr_config *>::end(pfs_instr_config_array); ++i ) { v2 = *i; if ( !(unsigned int)charset_info_st::wildcmp( (charset_info_st *)&my_charset_latin1, (const char *)a1 + 20, (const char *)a1 + *((unsigned int *)a1 + 37) + 20, **i, &(**i)[*((unsigned int *)*i + 2)], 92, 63, 37) && *((_DWORD *)v2 + 2) >= v4 ) { *((_BYTE *)a1 + 4) = *((_BYTE *)v2 + 12) & 1; *((_BYTE *)a1 + 5) = *((_BYTE *)v2 + 13) & 1; if ( *((_DWORD *)v2 + 2) <= v4 ) v1 = v4; else v1 = *((_DWORD *)v2 + 2); v4 = v1; } } } }
configure_instr_class: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 CMP qword ptr [0x0050c578],0x0 JNZ 0x001413d2 JMP 0x001414d3 LAB_001413d2: MOV RDI,qword ptr [0x0050c578] CALL 0x00146040 MOV qword ptr [RBP + -0x18],RAX LAB_001413e2: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [0x0050c578] CALL 0x00146060 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] CMP RAX,RCX JZ 0x001414d3 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x14 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x14 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x94] ADD RDX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] ADD R8,RAX LEA RDI,[0x3ba250] MOV R9D,0x5c MOV dword ptr [RSP],0x3f MOV dword ptr [RSP + 0x8],0x25 CALL 0x00146080 CMP EAX,0x0 JNZ 0x001414c0 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] CMP EAX,dword ptr [RBP + -0xc] JC 0x001414be MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x8] AND CL,0x1 MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX + 0xd] MOV RAX,qword ptr [RBP + -0x8] AND CL,0x1 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] CMP EAX,dword ptr [RBP + -0xc] JBE 0x001414b2 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x2c],EAX JMP 0x001414b8 LAB_001414b2: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x2c],EAX LAB_001414b8: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0xc],EAX LAB_001414be: JMP 0x001414c0 LAB_001414c0: JMP 0x001414c2 LAB_001414c2: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001413e2 LAB_001414d3: ADD RSP,0x40 POP RBP RET
/* configure_instr_class(PFS_instr_class*) */ void configure_instr_class(PFS_instr_class *param_1) { int iVar1; long *plVar2; uint local_34; long *local_20; uint local_14; local_14 = 0; if (pfs_instr_config_array != (Dynamic_array<PFS_instr_config*> *)0x0) { for (local_20 = (long *)Dynamic_array<PFS_instr_config*>::front(pfs_instr_config_array); plVar2 = (long *)Dynamic_array<PFS_instr_config*>::end(pfs_instr_config_array), local_20 != plVar2; local_20 = local_20 + 1) { plVar2 = (long *)*local_20; iVar1 = charset_info_st::wildcmp ((charset_info_st *)&my_charset_latin1,(char *)(param_1 + 0x14), (char *)(param_1 + (ulong)*(uint *)(param_1 + 0x94) + 0x14),(char *)*plVar2 ,(char *)(*plVar2 + (ulong)*(uint *)(plVar2 + 1)),0x5c,0x3f,0x25); if ((iVar1 == 0) && (local_14 <= *(uint *)(plVar2 + 1))) { param_1[4] = (PFS_instr_class)(*(byte *)((long)plVar2 + 0xc) & 1); param_1[5] = (PFS_instr_class)(*(byte *)((long)plVar2 + 0xd) & 1); if (local_14 < *(uint *)(plVar2 + 1)) { local_34 = *(uint *)(plVar2 + 1); } else { local_34 = local_14; } local_14 = local_34; } } } return; }
2,886
minja::Value::for_each(std::function<void (minja::Value&)> const&) const
monkey531[P]llama/common/minja.hpp
void for_each(const std::function<void(Value &)> & callback) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (auto& item : *array_) { callback(item); } } else if (object_) { for (auto & item : *object_) { Value key(item.first); callback(key); } } else if (is_string()) { for (char c : primitive_.get<std::string>()) { auto val = Value(std::string(1, c)); callback(val); } } else { throw std::runtime_error("Value is not iterable: " + dump()); } }
O0
cpp
minja::Value::for_each(std::function<void (minja::Value&)> const&) const: subq $0x1e8, %rsp # imm = 0x1E8 movq %rdi, 0x1e0(%rsp) movq %rsi, 0x1d8(%rsp) movq 0x1e0(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x113460 testb $0x1, %al jne 0x131caf jmp 0x131d0d movl $0x10, %edi callq 0x5a680 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x28(%rsp) leaq 0xdeb26(%rip), %rsi # 0x2107f1 callq 0x5a460 jmp 0x131cd2 movq 0x28(%rsp), %rdi movq 0x1702d2(%rip), %rsi # 0x2a1fb0 movq 0x170293(%rip), %rdx # 0x2a1f78 callq 0x5aae0 movq 0x28(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) callq 0x5af50 jmp 0x13216c movq 0x30(%rsp), %rdi addq $0x10, %rdi callq 0x1127c0 testb $0x1, %al jne 0x131d24 jmp 0x131dbd movq 0x30(%rsp), %rdi addq $0x10, %rdi callq 0x1135f0 movq %rax, 0x1c0(%rsp) movq 0x1c0(%rsp), %rdi callq 0x123230 movq %rax, 0x1b8(%rsp) movq 0x1c0(%rsp), %rdi callq 0x123050 movq %rax, 0x1b0(%rsp) leaq 0x1b8(%rsp), %rdi leaq 0x1b0(%rsp), %rsi callq 0x131060 testb $0x1, %al jne 0x131d7f jmp 0x131db8 leaq 0x1b8(%rsp), %rdi callq 0x123600 movq %rax, 0x1a8(%rsp) movq 0x1d8(%rsp), %rdi movq 0x1a8(%rsp), %rsi callq 0x1325a0 leaq 0x1b8(%rsp), %rdi callq 0x1313c0 jmp 0x131d64 jmp 0x132164 movq 0x30(%rsp), %rdi addq $0x20, %rdi callq 0x1127e0 testb $0x1, %al jne 0x131dd4 jmp 0x131ebc movq 0x30(%rsp), %rdi addq $0x20, %rdi callq 0x11e380 movq %rax, 0x1a0(%rsp) movq 0x1a0(%rsp), %rdi callq 0x113650 movq %rax, 0x198(%rsp) movq 0x1a0(%rsp), %rdi callq 0x1136c0 movq %rax, 0x190(%rsp) leaq 0x198(%rsp), %rdi leaq 0x190(%rsp), %rsi callq 0x113680 testb $0x1, %al jne 0x131e32 jmp 0x131eb7 leaq 0x198(%rsp), %rdi callq 0x121d30 movq %rax, 0x188(%rsp) movq 0x188(%rsp), %rsi leaq 0x138(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x11de60 movq 0x20(%rsp), %rsi movq 0x1d8(%rsp), %rdi callq 0x1325a0 jmp 0x131e75 leaq 0x138(%rsp), %rdi callq 0x1121c0 leaq 0x198(%rsp), %rdi callq 0x113a40 jmp 0x131e14 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) leaq 0x138(%rsp), %rdi callq 0x1121c0 jmp 0x13216c jmp 0x132162 movq 0x30(%rsp), %rdi callq 0x113a80 testb $0x1, %al jne 0x131ecf jmp 0x132080 movq 0x30(%rsp), %rsi addq $0x40, %rsi leaq 0x110(%rsp), %rdi callq 0x1146c0 leaq 0x110(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x130(%rsp), %rdi callq 0x5a850 movq %rax, 0x108(%rsp) movq 0x130(%rsp), %rdi callq 0x5a950 movq %rax, 0x100(%rsp) leaq 0x108(%rsp), %rdi leaq 0x100(%rsp), %rsi callq 0x920e0 testb $0x1, %al jne 0x131f4a leaq 0x110(%rsp), %rdi callq 0x5b528 jmp 0x13207b leaq 0x108(%rsp), %rdi callq 0x92120 movb (%rax), %al movb %al, 0xff(%rsp) movsbl 0xff(%rsp), %eax movl %eax, 0x14(%rsp) leaq 0x87(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x5b0b0 movl 0x14(%rsp), %edx movq 0x18(%rsp), %rcx leaq 0x88(%rsp), %rdi movl $0x1, %esi callq 0x894c0 jmp 0x131f9b leaq 0xa8(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0x119930 jmp 0x131fb2 leaq 0x88(%rsp), %rdi callq 0x5b528 leaq 0x87(%rsp), %rdi callq 0x5b500 movq 0x1d8(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0x1325a0 jmp 0x131fe3 leaq 0xa8(%rsp), %rdi callq 0x1121c0 leaq 0x108(%rsp), %rdi callq 0x92130 jmp 0x131f1f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) jmp 0x132039 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) leaq 0x88(%rsp), %rdi callq 0x5b528 leaq 0x87(%rsp), %rdi callq 0x5b500 jmp 0x132069 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) leaq 0xa8(%rsp), %rdi callq 0x1121c0 leaq 0x110(%rsp), %rdi callq 0x5b528 jmp 0x13216c jmp 0x132160 movb $0x1, 0x3f(%rsp) movl $0x10, %edi callq 0x5a680 movq 0x30(%rsp), %rsi movq %rax, 0x8(%rsp) leaq 0x40(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x1126f0 jmp 0x1320ac leaq 0xdf12e(%rip), %rsi # 0x2111e1 leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rdx callq 0xf6d00 jmp 0x1320c4 movq 0x8(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x5a4b0 jmp 0x1320d5 movq 0x8(%rsp), %rdi movb $0x0, 0x3f(%rsp) movq 0x16feca(%rip), %rsi # 0x2a1fb0 movq 0x16fe8b(%rip), %rdx # 0x2a1f78 callq 0x5aae0 jmp 0x132179 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) jmp 0x13214b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) jmp 0x132141 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) leaq 0x60(%rsp), %rdi callq 0x5b528 leaq 0x40(%rsp), %rdi callq 0x5b528 testb $0x1, 0x3f(%rsp) jne 0x132154 jmp 0x13215e movq 0x8(%rsp), %rdi callq 0x5af50 jmp 0x13216c jmp 0x132162 jmp 0x132164 addq $0x1e8, %rsp # imm = 0x1E8 retq movq 0x1d0(%rsp), %rdi callq 0x5aba0 nopl (%rax)
_ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE: sub rsp, 1E8h mov [rsp+1E8h+var_8], rdi mov [rsp+1E8h+var_10], rsi mov rdi, [rsp+1E8h+var_8]; this mov [rsp+1E8h+var_1B8], rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, 1 jnz short loc_131CAF jmp short loc_131D0D loc_131CAF: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+1E8h+var_1C0], rax lea rsi, aUndefinedValue; "Undefined value or reference" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_131CD2: mov rdi, [rsp+1E8h+var_1C0]; void * mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+1E8h+var_1C0]; void * mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax call ___cxa_free_exception jmp loc_13216C loc_131D0D: mov rdi, [rsp+1E8h+var_1B8] add rdi, 10h call _ZNKSt12__shared_ptrISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_131D24 jmp loc_131DBD loc_131D24: mov rdi, [rsp+1E8h+var_1B8] add rdi, 10h call _ZNKSt19__shared_ptr_accessISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov [rsp+1E8h+var_28], rax mov rdi, [rsp+1E8h+var_28] call _ZNSt6vectorIN5minja5ValueESaIS1_EE5beginEv; std::vector<minja::Value>::begin(void) mov [rsp+1E8h+var_30], rax mov rdi, [rsp+1E8h+var_28] call _ZNSt6vectorIN5minja5ValueESaIS1_EE3endEv; std::vector<minja::Value>::end(void) mov [rsp+1E8h+var_38], rax loc_131D64: lea rdi, [rsp+1E8h+var_30] lea rsi, [rsp+1E8h+var_38] call _ZN9__gnu_cxxneIPN5minja5ValueESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<minja::Value *,std::vector<minja::Value>>(__gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>> const&,__gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>> const&) test al, 1 jnz short loc_131D7F jmp short loc_131DB8 loc_131D7F: lea rdi, [rsp+1E8h+var_30] call _ZNK9__gnu_cxx17__normal_iteratorIPN5minja5ValueESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator*(void) mov [rsp+1E8h+var_40], rax mov rdi, [rsp+1E8h+var_10] mov rsi, [rsp+1E8h+var_40] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) lea rdi, [rsp+1E8h+var_30] call _ZN9__gnu_cxx17__normal_iteratorIPN5minja5ValueESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator++(void) jmp short loc_131D64 loc_131DB8: jmp loc_132164 loc_131DBD: mov rdi, [rsp+1E8h+var_1B8] add rdi, 20h ; ' ' call _ZNKSt12__shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_131DD4 jmp loc_131EBC loc_131DD4: mov rdi, [rsp+1E8h+var_1B8] add rdi, 20h ; ' ' call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov [rsp+1E8h+var_48], rax mov rdi, [rsp+1E8h+var_48] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void) mov [rsp+1E8h+var_50], rax mov rdi, [rsp+1E8h+var_48] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void) mov [rsp+1E8h+var_58], rax loc_131E14: lea rdi, [rsp+1E8h+var_50] lea rsi, [rsp+1E8h+var_58] call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&) test al, 1 jnz short loc_131E32 jmp loc_131EB7 loc_131E32: lea rdi, [rsp+1E8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator*(void) mov [rsp+1E8h+var_60], rax mov rsi, [rsp+1E8h+var_60] lea rdi, [rsp+1E8h+var_B0] mov [rsp+1E8h+var_1C8], rdi call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rsi, [rsp+1E8h+var_1C8] mov rdi, [rsp+1E8h+var_10] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) jmp short $+2 loc_131E75: lea rdi, [rsp+1E8h+var_B0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+1E8h+var_50] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void) jmp short loc_131E14 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax lea rdi, [rsp+1E8h+var_B0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp loc_13216C loc_131EB7: jmp loc_132162 loc_131EBC: mov rdi, [rsp+1E8h+var_1B8]; this call _ZNK5minja5Value9is_stringEv; minja::Value::is_string(void) test al, 1 jnz short loc_131ECF jmp loc_132080 loc_131ECF: mov rsi, [rsp+1E8h+var_1B8] add rsi, 40h ; '@'; __int64 lea rdi, [rsp+1E8h+var_D8]; void * call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3getIS9_S9_EEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS0_6detail12priority_tagILj4EEEEEEv lea rax, [rsp+1E8h+var_D8] mov [rsp+1E8h+var_B8], rax mov rdi, [rsp+1E8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+1E8h+var_E0], rax mov rdi, [rsp+1E8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+1E8h+var_E8], rax loc_131F1F: lea rdi, [rsp+1E8h+var_E0] lea rsi, [rsp+1E8h+var_E8] call _ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<char *,std::string>(__gnu_cxx::__normal_iterator<char *,std::string> const&,__gnu_cxx::__normal_iterator<char *,std::string> const&) test al, 1 jnz short loc_131F4A lea rdi, [rsp+1E8h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_13207B loc_131F4A: lea rdi, [rsp+1E8h+var_E0] call _ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char *,std::string>::operator*(void) mov al, [rax] mov [rsp+1E8h+var_E9], al movsx eax, [rsp+1E8h+var_E9] mov [rsp+1E8h+var_1D4], eax lea rdi, [rsp+1E8h+var_161] mov [rsp+1E8h+var_1D0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov edx, [rsp+1E8h+var_1D4] mov rcx, [rsp+1E8h+var_1D0] lea rdi, [rsp+1E8h+var_160] mov esi, 1 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&) jmp short $+2 loc_131F9B: lea rdi, [rsp+1E8h+var_140] lea rsi, [rsp+1E8h+var_160] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) jmp short $+2 loc_131FB2: lea rdi, [rsp+1E8h+var_160]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1E8h+var_161] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+1E8h+var_10] lea rsi, [rsp+1E8h+var_140] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) jmp short $+2 loc_131FE3: lea rdi, [rsp+1E8h+var_140]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+1E8h+var_E0] call _ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char *,std::string>::operator++(void) jmp loc_131F1F mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax jmp short loc_132039 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax lea rdi, [rsp+1E8h+var_160]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_132039: lea rdi, [rsp+1E8h+var_161] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_132069 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax lea rdi, [rsp+1E8h+var_140]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_132069: lea rdi, [rsp+1E8h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_13216C loc_13207B: jmp loc_132160 loc_132080: mov [rsp+1E8h+var_1A9], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+1E8h+var_1B8] mov [rsp+1E8h+var_1E0], rax lea rdi, [rsp+1E8h+var_1A8] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_1320AC: lea rsi, aValueIsNotIter; "Value is not iterable: " lea rdi, [rsp+1E8h+var_188] lea rdx, [rsp+1E8h+var_1A8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_1320C4: mov rdi, [rsp+1E8h+var_1E0] lea rsi, [rsp+1E8h+var_188] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_1320D5: mov rdi, [rsp+1E8h+var_1E0]; void * mov [rsp+1E8h+var_1A9], 0 mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_132179 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax jmp short loc_13214B mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax jmp short loc_132141 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax lea rdi, [rsp+1E8h+var_188]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_132141: lea rdi, [rsp+1E8h+var_1A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_13214B: test [rsp+1E8h+var_1A9], 1 jnz short loc_132154 jmp short loc_13215E loc_132154: mov rdi, [rsp+1E8h+var_1E0]; void * call ___cxa_free_exception loc_13215E: jmp short loc_13216C loc_132160: jmp short $+2 loc_132162: jmp short $+2 loc_132164: add rsp, 1E8h retn loc_13216C: mov rdi, [rsp+1E8h+var_18] call __Unwind_Resume loc_132179: nop dword ptr [rax+00000000h]
void minja::Value::for_each(minja::Value *a1, long long a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d void *v6; // [rsp+8h] [rbp-1E0h] char v7; // [rsp+14h] [rbp-1D4h] std::runtime_error *exception; // [rsp+28h] [rbp-1C0h] _BYTE v9[32]; // [rsp+40h] [rbp-1A8h] BYREF _BYTE v10[39]; // [rsp+60h] [rbp-188h] BYREF char v11; // [rsp+87h] [rbp-161h] BYREF _BYTE v12[32]; // [rsp+88h] [rbp-160h] BYREF _BYTE v13[87]; // [rsp+A8h] [rbp-140h] BYREF char v14; // [rsp+FFh] [rbp-E9h] long long v15; // [rsp+100h] [rbp-E8h] BYREF long long v16; // [rsp+108h] [rbp-E0h] BYREF _BYTE v17[32]; // [rsp+110h] [rbp-D8h] BYREF _BYTE *v18; // [rsp+130h] [rbp-B8h] _BYTE v19[80]; // [rsp+138h] [rbp-B0h] BYREF _BYTE *v20; // [rsp+188h] [rbp-60h] long long v21; // [rsp+190h] [rbp-58h] BYREF long long v22; // [rsp+198h] [rbp-50h] BYREF long long v23; // [rsp+1A0h] [rbp-48h] long long v24; // [rsp+1A8h] [rbp-40h] long long v25; // [rsp+1B0h] [rbp-38h] BYREF long long v26; // [rsp+1B8h] [rbp-30h] BYREF long long v27; // [rsp+1C0h] [rbp-28h] long long v28; // [rsp+1D8h] [rbp-10h] minja::Value *v29; // [rsp+1E0h] [rbp-8h] v29 = a1; v28 = a2; if ( (minja::Value::is_null(a1) & 1) != 0 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( std::__shared_ptr<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)a1 + 2) ) { v27 = std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*((long long)a1 + 16); v26 = std::vector<minja::Value>::begin(v27); v25 = std::vector<minja::Value>::end(v27); while ( __gnu_cxx::operator!=<minja::Value *,std::vector<minja::Value>>((long long)&v26, (long long)&v25) ) { v24 = __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator*((long long)&v26); std::function<void ()(minja::Value &)>::operator()(v28, v24); __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator++(&v26); } } else if ( std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)a1 + 4) ) { v23 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*((long long)a1 + 32); v22 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(v23); v21 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(v23); while ( __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>( (long long)&v22, (long long)&v21) ) { v20 = (_BYTE *)__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator*((long long)&v22); minja::Value::Value((long long)v19, v20); std::function<void ()(minja::Value &)>::operator()(v28, v19); minja::Value::~Value((minja::Value *)v19); __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&v22); } } else { if ( !minja::Value::is_string(a1) ) { v6 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v9, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v10, (long long)"Value is not iterable: ", (long long)v9); std::runtime_error::runtime_error(v6, v10); __cxa_throw( v6, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } 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>::get<std::string,std::string>( v17, (long long)a1 + 64, v2, v3, v4, v5); v18 = v17; v16 = std::string::begin(v17); v15 = std::string::end(v18); while ( __gnu_cxx::operator!=<char *,std::string>((long long)&v16, (long long)&v15) ) { v14 = *(_BYTE *)__gnu_cxx::__normal_iterator<char *,std::string>::operator*((long long)&v16); v7 = v14; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v12, 1LL, v7, (long long)&v11); minja::Value::Value((long long)v13, (long long)v12); std::string::~string(v12); std::allocator<char>::~allocator(&v11); std::function<void ()(minja::Value &)>::operator()(v28, v13); minja::Value::~Value((minja::Value *)v13); __gnu_cxx::__normal_iterator<char *,std::string>::operator++(&v16); } std::string::~string(v17); } }
2,887
minja::Value::for_each(std::function<void (minja::Value&)> const&) const
monkey531[P]llama/common/minja.hpp
void for_each(const std::function<void(Value &)> & callback) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (auto& item : *array_) { callback(item); } } else if (object_) { for (auto & item : *object_) { Value key(item.first); callback(key); } } else if (is_string()) { for (char c : primitive_.get<std::string>()) { auto val = Value(std::string(1, c)); callback(val); } } else { throw std::runtime_error("Value is not iterable: " + dump()); } }
O2
cpp
minja::Value::for_each(std::function<void (minja::Value&)> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %rbx movq %rdi, %r14 callq 0x633f6 testb %al, %al jne 0x6d62a movq 0x10(%r14), %rax testq %rax, %rax je 0x6d54e movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x6d618 movq %rbx, %rdi movq %r14, %rsi callq 0x6d768 addq $0x50, %r14 jmp 0x6d534 movq 0x20(%r14), %rax testq %rax, %rax je 0x6d590 movq (%rax), %r14 movq 0x8(%rax), %r12 leaq 0x48(%rsp), %r15 cmpq %r12, %r14 je 0x6d618 movq %r15, %rdi movq %r14, %rsi callq 0x67424 movq %rbx, %rdi movq %r15, %rsi callq 0x6d768 movq %r15, %rdi callq 0x62c1e addq $0x60, %r14 jmp 0x6d563 cmpb $0x3, 0x40(%r14) jne 0x6d65a addq $0x40, %r14 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x63ad6 movq (%r15), %r13 movq 0x8(%r15), %rbp xorl %r15d, %r15d leaq 0x28(%rsp), %r14 leaq 0x48(%rsp), %r12 cmpq %r15, %rbp je 0x6d60e movsbl (%r13,%r15), %edx leaq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq %r14, %rdi pushq $0x1 popq %rsi callq 0x23a20 movq %r12, %rdi movq %r14, %rsi callq 0x65bfc movq %r14, %rdi callq 0x241b8 movq %rbx, %rdi movq %r12, %rsi callq 0x6d768 movq %r12, %rdi callq 0x62c1e incq %r15 jmp 0x6d5c3 leaq 0x8(%rsp), %rdi callq 0x241b8 addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23450 movq %rax, %rbx leaq 0x456fe(%rip), %rsi # 0xb2d3a movq %rax, %rdi callq 0x23310 movq 0x8e9a5(%rip), %rsi # 0xfbff0 movq 0x8e906(%rip), %rdx # 0xfbf58 movq %rbx, %rdi callq 0x23ef0 pushq $0x10 popq %rdi callq 0x23450 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x62e0c leaq 0x460ac(%rip), %rsi # 0xb372a leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x58436 movb $0x1, %bpl leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x23e20 xorl %ebp, %ebp movq 0x8e94a(%rip), %rsi # 0xfbff0 movq 0x8e8ab(%rip), %rdx # 0xfbf58 movq %rbx, %rdi callq 0x23ef0 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x241b8 jmp 0x6d6ca movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x241b8 testb %bpl, %bpl jne 0x6d6e0 jmp 0x6d724 jmp 0x6d6dd movq %rax, %r14 movq %rbx, %rdi callq 0x23680 jmp 0x6d724 movq %rax, %r14 jmp 0x6d70b movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x241b8 jmp 0x6d70b movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x62c1e leaq 0x8(%rsp), %rdi callq 0x241b8 jmp 0x6d724 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x62c1e movq %r14, %rdi callq 0x23f80
_ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rsi mov r14, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz loc_6D62A mov rax, [r14+10h] test rax, rax jz short loc_6D54E mov r14, [rax] mov r15, [rax+8] loc_6D534: cmp r14, r15 jz loc_6D618 mov rdi, rbx mov rsi, r14 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) add r14, 50h ; 'P' jmp short loc_6D534 loc_6D54E: mov rax, [r14+20h] test rax, rax jz short loc_6D590 mov r14, [rax] mov r12, [rax+8] lea r15, [rsp+0C8h+var_80] loc_6D563: cmp r14, r12 jz loc_6D618 mov rdi, r15 mov rsi, r14 call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, rbx mov rsi, r15 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r14, 60h ; '`' jmp short loc_6D563 loc_6D590: cmp byte ptr [r14+40h], 3 jnz loc_6D65A add r14, 40h ; '@' lea r15, [rsp+0C8h+var_C0] mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE mov r13, [r15] mov rbp, [r15+8] xor r15d, r15d lea r14, [rsp+0C8h+var_A0] lea r12, [rsp+0C8h+var_80] loc_6D5C3: cmp rbp, r15 jz short loc_6D60E movsx edx, byte ptr [r13+r15+0] lea rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_A0], rax mov rdi, r14 push 1 pop rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, r12 mov rsi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r12 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() inc r15 jmp short loc_6D5C3 loc_6D60E: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_6D618: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6D62A: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_6D65A: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_C0] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotIter; "Value is not iterable: " lea rdi, [rsp+0C8h+var_80] lea rdx, [rsp+0C8h+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+0C8h+var_80] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+0C8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D6CA mov r14, rax mov bpl, 1 loc_6D6CA: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6D6E0 jmp short loc_6D724 jmp short $+2 loc_6D6DD: mov r14, rax loc_6D6E0: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_6D724 mov r14, rax jmp short loc_6D70B mov r14, rax lea rdi, [rsp+0C8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D70B mov r14, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6D70B: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D724 mov r14, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6D724: mov rdi, r14 call __Unwind_Resume
void minja::Value::for_each(long long a1, long long a2) { long long *v2; // rax long long v3; // r14 long long v4; // r15 unsigned __int8 **v5; // rax unsigned __int8 *v6; // r14 unsigned __int8 *v7; // r12 long long v8; // r13 long long v9; // rbp long long i; // r15 long long v11; // rdx std::runtime_error *exception; // rbx void *v13; // rbx _QWORD v14[4]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-A0h] BYREF char v16; // [rsp+38h] [rbp-90h] BYREF _OWORD v17[8]; // [rsp+48h] [rbp-80h] BYREF if ( minja::Value::is_null((minja::Value *)a1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v2 = *(long long **)(a1 + 16); if ( v2 ) { v3 = *v2; v4 = v2[1]; while ( v3 != v4 ) { std::function<void ()(minja::Value &)>::operator()(a2, v3); v3 += 80LL; } } else { v5 = *(unsigned __int8 ***)(a1 + 32); if ( v5 ) { v6 = *v5; v7 = v5[1]; while ( v6 != v7 ) { minja::Value::Value(v17, v6); std::function<void ()(minja::Value &)>::operator()(a2, v17); minja::Value::~Value((minja::Value *)v17); v6 += 96; } } else { if ( *(_BYTE *)(a1 + 64) != 3 ) { v13 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v14, a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v17, (long long)"Value is not iterable: ", (long long)v14); std::runtime_error::runtime_error(v13, v17); __cxa_throw( v13, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v14, a1 + 64); v8 = v14[0]; v9 = v14[1]; for ( i = 0LL; v9 != i; ++i ) { v11 = (unsigned int)*(char *)(v8 + i); v15[0] = &v16; std::string::_M_construct(v15, 1LL, v11); minja::Value::Value((long long)v17, (long long)v15); std::string::~string(v15); std::function<void ()(minja::Value &)>::operator()(a2, v17); minja::Value::~Value((minja::Value *)v17); } std::string::~string(v14); } } }
for_each: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RSI MOV R14,RDI CALL 0x001633f6 TEST AL,AL JNZ 0x0016d62a MOV RAX,qword ptr [R14 + 0x10] TEST RAX,RAX JZ 0x0016d54e MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_0016d534: CMP R14,R15 JZ 0x0016d618 MOV RDI,RBX MOV RSI,R14 CALL 0x0016d768 ADD R14,0x50 JMP 0x0016d534 LAB_0016d54e: MOV RAX,qword ptr [R14 + 0x20] TEST RAX,RAX JZ 0x0016d590 MOV R14,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x48] LAB_0016d563: CMP R14,R12 JZ 0x0016d618 MOV RDI,R15 MOV RSI,R14 CALL 0x00167424 LAB_0016d577: MOV RDI,RBX MOV RSI,R15 CALL 0x0016d768 LAB_0016d582: MOV RDI,R15 CALL 0x00162c1e ADD R14,0x60 JMP 0x0016d563 LAB_0016d590: CMP byte ptr [R14 + 0x40],0x3 JNZ 0x0016d65a ADD R14,0x40 LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 CALL 0x00163ad6 MOV R13,qword ptr [R15] MOV RBP,qword ptr [R15 + 0x8] XOR R15D,R15D LEA R14,[RSP + 0x28] LEA R12,[RSP + 0x48] LAB_0016d5c3: CMP RBP,R15 JZ 0x0016d60e MOVSX EDX,byte ptr [R13 + R15*0x1] LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX LAB_0016d5d8: MOV RDI,R14 PUSH 0x1 POP RSI CALL 0x00123a20 LAB_0016d5e3: MOV RDI,R12 MOV RSI,R14 CALL 0x00165bfc MOV RDI,R14 CALL 0x001241b8 LAB_0016d5f6: MOV RDI,RBX MOV RSI,R12 CALL 0x0016d768 LAB_0016d601: MOV RDI,R12 CALL 0x00162c1e INC R15 JMP 0x0016d5c3 LAB_0016d60e: LEA RDI,[RSP + 0x8] CALL 0x001241b8 LAB_0016d618: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016d62a: PUSH 0x10 POP RDI CALL 0x00123450 MOV RBX,RAX LAB_0016d635: LEA RSI,[0x1b2d3a] MOV RDI,RAX CALL 0x00123310 LAB_0016d644: MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,RBX CALL 0x00123ef0 LAB_0016d65a: PUSH 0x10 POP RDI CALL 0x00123450 MOV RBX,RAX LAB_0016d665: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00162e0c LAB_0016d677: LEA RSI,[0x1b372a] LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] CALL 0x00158436 MOV BPL,0x1 LAB_0016d690: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00123e20 XOR EBP,EBP MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,RBX CALL 0x00123ef0
/* minja::Value::for_each(std::function<void (minja::Value&)> const&) const */ void __thiscall minja::Value::for_each(Value *this,function *param_1) { int8 *puVar1; Value *pVVar2; basic_json *pbVar3; char cVar4; runtime_error *prVar5; Value *pVVar6; basic_json *pbVar7; long lVar8; string local_c0 [8]; long local_b8; int1 *local_a0 [2]; int1 local_90 [16]; Value local_80 [80]; cVar4 = is_null(this); if (cVar4 != '\0') { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d635 to 0016d643 has its CatchHandler @ 0016d6dd */ std::runtime_error::runtime_error(prVar5,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); } puVar1 = *(int8 **)(this + 0x10); if (puVar1 == (int8 *)0x0) { puVar1 = *(int8 **)(this + 0x20); if (puVar1 == (int8 *)0x0) { if (this[0x40] != (Value)0x3) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d665 to 0016d676 has its CatchHandler @ 0016d6db */ dump_abi_cxx11_((int)local_c0,SUB81(this,0)); /* try { // try from 0016d677 to 0016d68c has its CatchHandler @ 0016d6c4 */ std::operator+((char *)local_80,(string *)"Value is not iterable: "); /* try { // try from 0016d690 to 0016d6b4 has its CatchHandler @ 0016d6b5 */ std::runtime_error::runtime_error(prVar5,(string *)local_80); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); } _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_c0,this + 0x40); for (lVar8 = 0; local_b8 != lVar8; lVar8 = lVar8 + 1) { local_a0[0] = local_90; /* try { // try from 0016d5d8 to 0016d5e2 has its CatchHandler @ 0016d6ea */ std::__cxx11::string::_M_construct((ulong)local_a0,'\x01'); /* try { // try from 0016d5e3 to 0016d5ed has its CatchHandler @ 0016d6ef */ Value(local_80,(string *)local_a0); std::__cxx11::string::~string((string *)local_a0); /* try { // try from 0016d5f6 to 0016d600 has its CatchHandler @ 0016d6fe */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,local_80); ~Value(local_80); } std::__cxx11::string::~string(local_c0); } else { pbVar3 = (basic_json *)puVar1[1]; for (pbVar7 = (basic_json *)*puVar1; pbVar7 != pbVar3; pbVar7 = pbVar7 + 0x60) { Value(local_80,pbVar7); /* try { // try from 0016d577 to 0016d581 has its CatchHandler @ 0016d717 */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,local_80); ~Value(local_80); } } } else { pVVar2 = (Value *)puVar1[1]; for (pVVar6 = (Value *)*puVar1; pVVar6 != pVVar2; pVVar6 = pVVar6 + 0x50) { std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,pVVar6); } } return; }
2,888
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O0
c
my_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp leaq 0x379461(%rip), %rax # 0x3f5810 cmpb $0x0, (%rax) je 0x7c3bd movb $0x0, -0x1(%rbp) jmp 0x7c546 leaq 0x37944c(%rip), %rax # 0x3f5810 movb $0x1, (%rax) leaq 0x379446(%rip), %rax # 0x3f5814 movl (%rax), %ecx addl $0x1, %ecx leaq 0x37943a(%rip), %rax # 0x3f5814 movl %ecx, (%rax) leaq 0x1b7955(%rip), %rax # 0x233d38 movl $0x1b0, (%rax) # imm = 0x1B0 leaq 0x1b794c(%rip), %rax # 0x233d3c movl $0x1c0, (%rax) # imm = 0x1C0 leaq 0x3798eb(%rip), %rax # 0x3f5ce8 movq $0x0, (%rax) leaq 0x528bd(%rip), %rdi # 0xcecc8 callq 0x36760 movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x7c434 movq -0x10(%rbp), %rdi callq 0x7c550 orq $0x180, %rax # imm = 0x180 movl %eax, %ecx leaq 0x1b7906(%rip), %rax # 0x233d38 movl %ecx, (%rax) leaq 0x52893(%rip), %rdi # 0xcecce callq 0x36760 movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x7c464 movq -0x10(%rbp), %rdi callq 0x7c550 orq $0x1c0, %rax # imm = 0x1C0 movl %eax, %ecx leaq 0x1b78da(%rip), %rax # 0x233d3c movl %ecx, (%rax) callq 0x81f30 movq 0x1b3b80(%rip), %rax # 0x22fff0 movq (%rax), %rax movq %rax, 0x3793a6(%rip) # 0x3f5820 movq $0x0, 0x3793a3(%rip) # 0x3f5828 leaq 0x37938c(%rip), %rax # 0x3f5818 leaq 0x37938d(%rip), %rcx # 0x3f5820 movq %rcx, (%rax) leaq 0x37942b(%rip), %rax # 0x3f58c8 leaq 0x4ec97(%rip), %rcx # 0xcb13b movq %rcx, (%rax) leaq 0x379412(%rip), %rax # 0x3f58c0 cmpq $0x0, (%rax) je 0x7c4e2 leaq 0x379405(%rip), %rax # 0x3f58c0 movq (%rax), %rax movq %rax, -0x18(%rbp) leaq 0x3793f7(%rip), %rax # 0x3f58c0 movq (%rax), %rdi callq 0x755e0 movq -0x18(%rbp), %rcx addq %rax, %rcx leaq 0x3793e9(%rip), %rax # 0x3f58c8 movq %rcx, (%rax) callq 0x7f9a0 callq 0x7eda0 cmpb $0x0, %al je 0x7c4f6 movb $0x1, -0x1(%rbp) jmp 0x7c546 leaq 0x510c4(%rip), %rdi # 0xcd5c1 callq 0x36760 leaq 0x3793af(%rip), %rcx # 0x3f58b8 movq %rax, (%rcx) cmpq $0x0, %rax je 0x7c535 leaq 0x37939f(%rip), %rax # 0x3f58b8 movq (%rax), %rsi leaq 0x3795ad(%rip), %rdi # 0x3f5ad0 callq 0x76120 movq %rax, %rcx leaq 0x379386(%rip), %rax # 0x3f58b8 movq %rcx, (%rax) jmp 0x7c537 jmp 0x7c539 callq 0x83cf0 jmp 0x7c540 jmp 0x7c542 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nop
my_init: push rbp mov rbp, rsp sub rsp, 20h lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_7C3BD mov [rbp+var_1], 0 jmp loc_7C546 loc_7C3BD: lea rax, my_init_done mov byte ptr [rax], 1 lea rax, mysys_usage_id mov ecx, [rax] add ecx, 1 lea rax, mysys_usage_id mov [rax], ecx lea rax, my_umask mov dword ptr [rax], 1B0h lea rax, my_umask_dir mov dword ptr [rax], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv mov [rbp+var_10], rax cmp rax, 0 jz short loc_7C434 mov rdi, [rbp+var_10] call atoi_octal or rax, 180h mov ecx, eax lea rax, my_umask mov [rax], ecx loc_7C434: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv mov [rbp+var_10], rax cmp rax, 0 jz short loc_7C464 mov rdi, [rbp+var_10] call atoi_octal or rax, 1C0h mov ecx, eax lea rax, my_umask_dir mov [rax], ecx loc_7C464: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax mov cs:qword_3F5828, 0 lea rax, mysql_stdin lea rcx, instrumented_stdin mov [rax], rcx lea rax, my_progname_short lea rcx, aUnknown; "unknown" mov [rax], rcx lea rax, my_progname cmp qword ptr [rax], 0 jz short loc_7C4E2 lea rax, my_progname mov rax, [rax] mov [rbp+var_18], rax lea rax, my_progname mov rdi, [rax] call dirname_length mov rcx, [rbp+var_18] add rcx, rax lea rax, my_progname_short mov [rax], rcx loc_7C4E2: call my_mutex_init call my_thread_global_init cmp al, 0 jz short loc_7C4F6 mov [rbp+var_1], 1 jmp short loc_7C546 loc_7C4F6: lea rdi, aMariadbHome+8; "HOME" call _getenv lea rcx, home_dir mov [rcx], rax cmp rax, 0 jz short loc_7C535 lea rax, home_dir mov rsi, [rax] lea rdi, home_dir_buff call intern_filename mov rcx, rax lea rax, home_dir mov [rax], rcx loc_7C535: jmp short $+2 loc_7C537: jmp short $+2 loc_7C539: call my_time_init jmp short $+2 loc_7C540: jmp short $+2 loc_7C542: mov [rbp+var_1], 0 loc_7C546: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_init() { const char *v1; // [rsp+8h] [rbp-18h] long long v2; // [rsp+10h] [rbp-10h] long long v3; // [rsp+10h] [rbp-10h] if ( my_init_done ) return 0; my_init_done = 1; ++mysys_usage_id; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v2 = getenv("UMASK"); if ( v2 ) my_umask = atoi_octal(v2) | 0x180; v3 = getenv("UMASK_DIR"); if ( v3 ) my_umask_dir = atoi_octal(v3) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_3F5828 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; if ( my_progname ) { v1 = my_progname; my_progname_short = &v1[dirname_length(my_progname)]; } my_mutex_init(); if ( (unsigned __int8)my_thread_global_init() ) return 1; home_dir = (_BYTE *)getenv("HOME"); if ( home_dir ) home_dir = (_BYTE *)intern_filename((long long)&home_dir_buff, home_dir); my_time_init(); return 0; }
my_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 LEA RAX,[0x4f5810] CMP byte ptr [RAX],0x0 JZ 0x0017c3bd MOV byte ptr [RBP + -0x1],0x0 JMP 0x0017c546 LAB_0017c3bd: LEA RAX,[0x4f5810] MOV byte ptr [RAX],0x1 LEA RAX,[0x4f5814] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x4f5814] MOV dword ptr [RAX],ECX LEA RAX,[0x333d38] MOV dword ptr [RAX],0x1b0 LEA RAX,[0x333d3c] MOV dword ptr [RAX],0x1c0 LEA RAX,[0x4f5ce8] MOV qword ptr [RAX],0x0 LEA RDI,[0x1cecc8] CALL 0x00136760 MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x0017c434 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0017c550 OR RAX,0x180 MOV ECX,EAX LEA RAX,[0x333d38] MOV dword ptr [RAX],ECX LAB_0017c434: LEA RDI,[0x1cecce] CALL 0x00136760 MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x0017c464 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0017c550 OR RAX,0x1c0 MOV ECX,EAX LEA RAX,[0x333d3c] MOV dword ptr [RAX],ECX LAB_0017c464: CALL 0x00181f30 MOV RAX,qword ptr [0x0032fff0] MOV RAX,qword ptr [RAX] MOV qword ptr [0x004f5820],RAX MOV qword ptr [0x004f5828],0x0 LEA RAX,[0x4f5818] LEA RCX,[0x4f5820] MOV qword ptr [RAX],RCX LEA RAX,[0x4f58c8] LEA RCX,[0x1cb13b] MOV qword ptr [RAX],RCX LEA RAX,[0x4f58c0] CMP qword ptr [RAX],0x0 JZ 0x0017c4e2 LEA RAX,[0x4f58c0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LEA RAX,[0x4f58c0] MOV RDI,qword ptr [RAX] CALL 0x001755e0 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,RAX LEA RAX,[0x4f58c8] MOV qword ptr [RAX],RCX LAB_0017c4e2: CALL 0x0017f9a0 CALL 0x0017eda0 CMP AL,0x0 JZ 0x0017c4f6 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017c546 LAB_0017c4f6: LEA RDI,[0x1cd5c1] CALL 0x00136760 LEA RCX,[0x4f58b8] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x0017c535 LEA RAX,[0x4f58b8] MOV RSI,qword ptr [RAX] LEA RDI,[0x4f5ad0] CALL 0x00176120 MOV RCX,RAX LEA RAX,[0x4f58b8] MOV qword ptr [RAX],RCX LAB_0017c535: JMP 0x0017c537 LAB_0017c537: JMP 0x0017c539 LAB_0017c539: CALL 0x00183cf0 JMP 0x0017c540 LAB_0017c540: JMP 0x0017c542 LAB_0017c542: MOV byte ptr [RBP + -0x1],0x0 LAB_0017c546: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; int1 local_9; if (my_init_done == '\0') { my_init_done = '\x01'; mysys_usage_id = mysys_usage_id + 1; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_0032fff0; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar1 + lVar5); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 == '\0') { home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
2,889
mi_dpos
eloqsql/storage/myisam/mi_search.c
my_off_t _mi_dpos(MI_INFO *info, uint nod_flag, uchar *after_key) { my_off_t pos; after_key-=(nod_flag + info->s->rec_reflength); switch (info->s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: pos= (my_off_t) mi_uint8korr(after_key); break; case 7: pos= (my_off_t) mi_uint7korr(after_key); break; case 6: pos= (my_off_t) mi_uint6korr(after_key); break; case 5: pos= (my_off_t) mi_uint5korr(after_key); break; #else case 8: pos= (my_off_t) mi_uint4korr(after_key+4); break; case 7: pos= (my_off_t) mi_uint4korr(after_key+3); break; case 6: pos= (my_off_t) mi_uint4korr(after_key+2); break; case 5: pos= (my_off_t) mi_uint4korr(after_key+1); break; #endif case 4: pos= (my_off_t) mi_uint4korr(after_key); break; case 3: pos= (my_off_t) mi_uint3korr(after_key); break; case 2: pos= (my_off_t) mi_uint2korr(after_key); break; default: pos=0L; /* Shut compiler up */ } return (info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos : pos*info->s->base.pack_reclength; }
O3
c
mi_dpos: pushq %rbp movq %rsp, %rbp movq (%rdi), %rcx movl 0x338(%rcx), %edi leal -0x2(%rdi), %eax cmpl $0x6, %eax ja 0x856bf addl %esi, %edi negq %rdi leaq 0x5d772(%rip), %rsi # 0xe2df0 movslq (%rsi,%rax,4), %rax addq %rsi, %rax jmpq *%rax movzwl (%rdx,%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax jmp 0x85703 movl (%rdx,%rdi), %eax movzwl 0x4(%rdx,%rdi), %edx shlq $0x30, %rdx shlq $0x10, %rax jmp 0x856f7 movl (%rdx,%rdi), %eax bswapl %eax jmp 0x85703 movl (%rdx,%rdi), %eax movzbl 0x4(%rdx,%rdi), %edx shlq $0x38, %rdx shlq $0x18, %rax jmp 0x856f7 xorl %eax, %eax jmp 0x85703 movzwl 0x1(%rdx,%rdi), %eax rolw $0x8, %ax movzwl %ax, %esi movzbl (%rdx,%rdi), %eax shll $0x10, %eax orq %rsi, %rax jmp 0x85703 movl (%rdx,%rdi), %eax movzwl 0x4(%rdx,%rdi), %esi movzbl 0x6(%rdx,%rdi), %edx shlq $0x38, %rdx shlq $0x28, %rsi shlq $0x8, %rax orq %rsi, %rax orq %rdx, %rax jmp 0x85700 movq (%rdx,%rdi), %rax bswapq %rax testb $0x5, 0x318(%rcx) jne 0x85714 imulq 0x148(%rcx), %rax popq %rbp retq
_mi_dpos: push rbp mov rbp, rsp mov rcx, [rdi] mov edi, [rcx+338h] lea eax, [rdi-2]; switch 7 cases cmp eax, 6 ja short def_85685; jumptable 0000000000085685 default case add edi, esi neg rdi lea rsi, jpt_85685 movsxd rax, ds:(jpt_85685 - 0E2DF0h)[rsi+rax*4] add rax, rsi jmp rax; switch jump loc_85687: movzx eax, word ptr [rdx+rdi]; jumptable 0000000000085685 case 2 rol ax, 8 movzx eax, ax jmp short loc_85703 loc_85694: mov eax, [rdx+rdi]; jumptable 0000000000085685 case 6 movzx edx, word ptr [rdx+rdi+4] shl rdx, 30h shl rax, 10h jmp short loc_856F7 loc_856A6: mov eax, [rdx+rdi]; jumptable 0000000000085685 case 4 bswap eax jmp short loc_85703 loc_856AD: mov eax, [rdx+rdi]; jumptable 0000000000085685 case 5 movzx edx, byte ptr [rdx+rdi+4] shl rdx, 38h shl rax, 18h jmp short loc_856F7 def_85685: xor eax, eax; jumptable 0000000000085685 default case jmp short loc_85703 loc_856C3: movzx eax, word ptr [rdx+rdi+1]; jumptable 0000000000085685 case 3 rol ax, 8 movzx esi, ax movzx eax, byte ptr [rdx+rdi] shl eax, 10h or rax, rsi jmp short loc_85703 loc_856DB: mov eax, [rdx+rdi]; jumptable 0000000000085685 case 7 movzx esi, word ptr [rdx+rdi+4] movzx edx, byte ptr [rdx+rdi+6] shl rdx, 38h shl rsi, 28h shl rax, 8 or rax, rsi loc_856F7: or rax, rdx jmp short loc_85700 loc_856FC: mov rax, [rdx+rdi]; jumptable 0000000000085685 case 8 loc_85700: bswap rax loc_85703: test byte ptr [rcx+318h], 5 jnz short loc_85714 imul rax, [rcx+148h] loc_85714: pop rbp retn
unsigned long long mi_dpos(long long *a1, int a2, long long a3) { long long v3; // rcx int v4; // edi int v5; // eax long long v6; // rdi unsigned long long result; // rax long long v8; // rax unsigned long long v9; // rdx long long v10; // rax long long v11; // rax long long v12; // rax long long v13; // rsi unsigned long long v14; // rax v3 = *a1; v4 = *(_DWORD *)(*a1 + 824); v5 = v4 - 2; v6 = -(long long)(unsigned int)(a2 + v4); switch ( v5 ) { case 0: result = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + v6), 8); break; case 1: result = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + v6 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)(a3 + v6) << 16); break; case 2: result = _byteswap_ulong(*(_DWORD *)(a3 + v6)); break; case 3: v11 = *(unsigned int *)(a3 + v6); v9 = (unsigned long long)*(unsigned __int8 *)(a3 + v6 + 4) << 56; v10 = v11 << 24; goto LABEL_9; case 4: v8 = *(unsigned int *)(a3 + v6); v9 = (unsigned long long)*(unsigned __int16 *)(a3 + v6 + 4) << 48; v10 = v8 << 16; goto LABEL_9; case 5: v12 = *(unsigned int *)(a3 + v6); v13 = *(unsigned __int16 *)(a3 + v6 + 4); v9 = (unsigned long long)*(unsigned __int8 *)(a3 + v6 + 6) << 56; v10 = (v13 << 40) | (v12 << 8); LABEL_9: v14 = v9 | v10; goto LABEL_11; case 6: v14 = *(_QWORD *)(a3 + v6); LABEL_11: result = _byteswap_uint64(v14); break; default: result = 0LL; break; } if ( (*(_BYTE *)(v3 + 792) & 5) == 0 ) result *= *(_QWORD *)(v3 + 328); return result; }
_mi_dpos: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RDI] MOV EDI,dword ptr [RCX + 0x338] LEA EAX,[RDI + -0x2] CMP EAX,0x6 JA 0x001856bf ADD EDI,ESI NEG RDI LEA RSI,[0x1e2df0] MOVSXD RAX,dword ptr [RSI + RAX*0x4] ADD RAX,RSI switchD: JMP RAX caseD_2: MOVZX EAX,word ptr [RDX + RDI*0x1] ROL AX,0x8 MOVZX EAX,AX JMP 0x00185703 caseD_6: MOV EAX,dword ptr [RDX + RDI*0x1] MOVZX EDX,word ptr [RDX + RDI*0x1 + 0x4] SHL RDX,0x30 SHL RAX,0x10 JMP 0x001856f7 caseD_4: MOV EAX,dword ptr [RDX + RDI*0x1] BSWAP EAX JMP 0x00185703 caseD_5: MOV EAX,dword ptr [RDX + RDI*0x1] MOVZX EDX,byte ptr [RDX + RDI*0x1 + 0x4] SHL RDX,0x38 SHL RAX,0x18 JMP 0x001856f7 LAB_001856bf: XOR EAX,EAX JMP 0x00185703 caseD_3: MOVZX EAX,word ptr [RDX + RDI*0x1 + 0x1] ROL AX,0x8 MOVZX ESI,AX MOVZX EAX,byte ptr [RDX + RDI*0x1] SHL EAX,0x10 OR RAX,RSI JMP 0x00185703 caseD_7: MOV EAX,dword ptr [RDX + RDI*0x1] MOVZX ESI,word ptr [RDX + RDI*0x1 + 0x4] MOVZX EDX,byte ptr [RDX + RDI*0x1 + 0x6] SHL RDX,0x38 SHL RSI,0x28 SHL RAX,0x8 OR RAX,RSI LAB_001856f7: OR RAX,RDX JMP 0x00185700 caseD_8: MOV RAX,qword ptr [RDX + RDI*0x1] LAB_00185700: BSWAP RAX LAB_00185703: TEST byte ptr [RCX + 0x318],0x5 JNZ 0x00185714 IMUL RAX,qword ptr [RCX + 0x148] LAB_00185714: POP RBP RET
ulong _mi_dpos(long *param_1,int param_2,long param_3) { ushort uVar1; int iVar2; uint uVar3; long lVar4; ulong uVar5; ulong uVar6; long lVar7; lVar4 = *param_1; iVar2 = *(int *)(lVar4 + 0x338); if (6 < iVar2 - 2U) { uVar5 = 0; goto LAB_00185703; } lVar7 = -(ulong)(uint)(iVar2 + param_2); switch(iVar2) { case 2: uVar5 = (ulong)(ushort)(*(ushort *)(param_3 + lVar7) << 8 | *(ushort *)(param_3 + lVar7) >> 8); goto LAB_00185703; case 3: uVar1 = *(ushort *)(param_3 + 1 + lVar7); uVar5 = (ulong)CONCAT12(*(int1 *)(param_3 + lVar7),uVar1 << 8 | uVar1 >> 8); goto LAB_00185703; case 4: uVar3 = *(uint *)(param_3 + lVar7); uVar5 = (ulong)(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18) ; goto LAB_00185703; case 5: uVar6 = (ulong)*(byte *)(param_3 + 4 + lVar7) << 0x38; uVar5 = (ulong)*(uint *)(param_3 + lVar7) << 0x18; break; case 6: uVar6 = (ulong)*(ushort *)(param_3 + 4 + lVar7) << 0x30; uVar5 = (ulong)*(uint *)(param_3 + lVar7) << 0x10; break; case 7: uVar6 = (ulong)*(byte *)(param_3 + 6 + lVar7) << 0x38; uVar5 = (ulong)*(uint *)(param_3 + lVar7) << 8 | (ulong)*(ushort *)(param_3 + 4 + lVar7) << 0x28 ; break; case 8: uVar5 = *(ulong *)(param_3 + lVar7); goto LAB_00185700; } uVar5 = uVar5 | uVar6; LAB_00185700: uVar5 = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; LAB_00185703: if ((*(byte *)(lVar4 + 0x318) & 5) == 0) { uVar5 = uVar5 * *(long *)(lVar4 + 0x148); } return uVar5; }
2,890
ma_check_if_right_bitmap_type
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info, enum en_page_type page_type, pgcache_page_no_t page, uint *bitmap_pattern) { if ((*bitmap_pattern= _ma_bitmap_get_page_bits(info, &info->s->bitmap, page)) > 7) return 1; /* Couldn't read page */ switch (page_type) { case HEAD_PAGE: return *bitmap_pattern < 1 || *bitmap_pattern > 4; case TAIL_PAGE: return *bitmap_pattern < 5; case BLOB_PAGE: return *bitmap_pattern != 7; default: break; } DBUG_ASSERT(0); return 1; }
O0
c
ma_check_if_right_bitmap_type: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi addq $0xa10, %rsi # imm = 0xA10 movq -0x20(%rbp), %rdx callq 0x3cbd0 movq -0x28(%rbp), %rcx movl %eax, (%rcx) cmpl $0x7, %eax jbe 0x3da93 movb $0x1, -0x1(%rbp) jmp 0x3db0e movl -0x14(%rbp), %eax movl %eax, -0x2c(%rbp) subl $0x1, %eax je 0x3dab4 jmp 0x3daa0 movl -0x2c(%rbp), %eax subl $0x2, %eax je 0x3dadc jmp 0x3daaa movl -0x2c(%rbp), %eax subl $0x3, %eax je 0x3daf0 jmp 0x3db04 movq -0x28(%rbp), %rcx movb $0x1, %al cmpl $0x1, (%rcx) movb %al, -0x2d(%rbp) jb 0x3dacf movq -0x28(%rbp), %rax cmpl $0x4, (%rax) seta %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x3db0e movq -0x28(%rbp), %rax cmpl $0x5, (%rax) setb %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x3db0e movq -0x28(%rbp), %rax cmpl $0x7, (%rax) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x3db0e jmp 0x3db06 jmp 0x3db08 jmp 0x3db0a movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_check_if_right_bitmap_type: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax] add rsi, 0A10h mov rdx, [rbp+var_20] call _ma_bitmap_get_page_bits mov rcx, [rbp+var_28] mov [rcx], eax cmp eax, 7 jbe short loc_3DA93 mov [rbp+var_1], 1 jmp short loc_3DB0E loc_3DA93: mov eax, [rbp+var_14] mov [rbp+var_2C], eax sub eax, 1 jz short loc_3DAB4 jmp short $+2 loc_3DAA0: mov eax, [rbp+var_2C] sub eax, 2 jz short loc_3DADC jmp short $+2 loc_3DAAA: mov eax, [rbp+var_2C] sub eax, 3 jz short loc_3DAF0 jmp short loc_3DB04 loc_3DAB4: mov rcx, [rbp+var_28] mov al, 1 cmp dword ptr [rcx], 1 mov [rbp+var_2D], al jb short loc_3DACF mov rax, [rbp+var_28] cmp dword ptr [rax], 4 setnbe al mov [rbp+var_2D], al loc_3DACF: mov al, [rbp+var_2D] and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_3DB0E loc_3DADC: mov rax, [rbp+var_28] cmp dword ptr [rax], 5 setb al and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_3DB0E loc_3DAF0: mov rax, [rbp+var_28] cmp dword ptr [rax], 7 setnz al and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_3DB0E loc_3DB04: jmp short $+2 loc_3DB06: jmp short $+2 loc_3DB08: jmp short $+2 loc_3DB0A: mov [rbp+var_1], 1 loc_3DB0E: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char ma_check_if_right_bitmap_type(_QWORD *a1, int a2, long long a3, unsigned int *a4) { unsigned int page_bits; // eax bool v6; // [rsp+3h] [rbp-2Dh] page_bits = ma_bitmap_get_page_bits((long long)a1, *a1 + 2576LL, a3); *a4 = page_bits; if ( page_bits > 7 ) return 1; if ( a2 == 1 ) { v6 = 1; if ( *a4 ) return *a4 > 4; return v6; } else if ( a2 == 2 ) { return *a4 < 5; } else { return a2 != 3 || *a4 != 7; } }
_ma_check_if_right_bitmap_type: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] ADD RSI,0xa10 MOV RDX,qword ptr [RBP + -0x20] CALL 0x0013cbd0 MOV RCX,qword ptr [RBP + -0x28] MOV dword ptr [RCX],EAX CMP EAX,0x7 JBE 0x0013da93 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013db0e LAB_0013da93: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x2c],EAX SUB EAX,0x1 JZ 0x0013dab4 JMP 0x0013daa0 LAB_0013daa0: MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x2 JZ 0x0013dadc JMP 0x0013daaa LAB_0013daaa: MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x3 JZ 0x0013daf0 JMP 0x0013db04 LAB_0013dab4: MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x1 CMP dword ptr [RCX],0x1 MOV byte ptr [RBP + -0x2d],AL JC 0x0013dacf MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x4 SETA AL MOV byte ptr [RBP + -0x2d],AL LAB_0013dacf: MOV AL,byte ptr [RBP + -0x2d] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x0013db0e LAB_0013dadc: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x5 SETC AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x0013db0e LAB_0013daf0: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x7 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x0013db0e LAB_0013db04: JMP 0x0013db06 LAB_0013db06: JMP 0x0013db08 LAB_0013db08: JMP 0x0013db0a LAB_0013db0a: MOV byte ptr [RBP + -0x1],0x1 LAB_0013db0e: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
bool _ma_check_if_right_bitmap_type(long *param_1,int param_2,int8 param_3,uint *param_4) { uint uVar1; bool local_35; bool local_9; uVar1 = _ma_bitmap_get_page_bits(param_1,*param_1 + 0xa10,param_3); *param_4 = uVar1; if (uVar1 < 8) { if (param_2 == 1) { local_35 = true; if (*param_4 != 0) { local_35 = 4 < *param_4; } local_9 = local_35; } else if (param_2 == 2) { local_9 = *param_4 < 5; } else if (param_2 == 3) { local_9 = *param_4 != 7; } else { local_9 = true; } } else { local_9 = true; } return local_9; }
2,891
lo0bits
eloqsql/strings/dtoa.c
static int lo0bits(ULong *y) { register int k; register ULong x= *y; if (x & 7) { if (x & 1) return 0; if (x & 2) { *y= x >> 1; return 1; } *y= x >> 2; return 2; } k= 0; if (!(x & 0xffff)) { k= 16; x>>= 16; } if (!(x & 0xff)) { k+= 8; x>>= 8; } if (!(x & 0xf)) { k+= 4; x>>= 4; } if (!(x & 0x3)) { k+= 2; x>>= 2; } if (!(x & 1)) { k++; x>>= 1; if (!x) return 32; } *y= x; return k; }
O3
c
lo0bits: pushq %rbp movq %rsp, %rbp movl (%rdi), %ecx testb $0x7, %cl je 0xd54b6 xorl %eax, %eax testb $0x1, %cl jne 0xd551d testb $0x2, %cl jne 0xd5514 shrl $0x2, %ecx movl $0x2, %eax jmp 0xd551b movl %ecx, %eax shrl $0x10, %eax xorl %edx, %edx testl $0xfff8, %ecx # imm = 0xFFF8 cmovnel %ecx, %eax sete %dl shll $0x4, %edx leal 0x8(%rdx), %ecx movl %eax, %esi shrl $0x8, %esi testb %al, %al cmovnel %edx, %ecx cmovnel %eax, %esi leal 0x4(%rcx), %edx movl %esi, %r8d shrl $0x4, %r8d testb $0xf, %sil cmovnel %ecx, %edx cmovnel %esi, %r8d leal 0x2(%rdx), %eax movl %r8d, %ecx shrl $0x2, %ecx testb $0x3, %r8b cmovnel %edx, %eax cmovnel %r8d, %ecx testb $0x1, %cl jne 0xd551b testl %ecx, %ecx je 0xd551f incl %eax shrl %ecx jmp 0xd551b shrl %ecx movl $0x1, %eax movl %ecx, (%rdi) popq %rbp retq movl $0x20, %eax jmp 0xd551d
lo0bits: push rbp mov rbp, rsp mov ecx, [rdi] test cl, 7 jz short loc_D54B6 xor eax, eax test cl, 1 jnz short loc_D551D test cl, 2 jnz short loc_D5514 shr ecx, 2 mov eax, 2 jmp short loc_D551B loc_D54B6: mov eax, ecx shr eax, 10h xor edx, edx test ecx, 0FFF8h cmovnz eax, ecx setz dl shl edx, 4 lea ecx, [rdx+8] mov esi, eax shr esi, 8 test al, al cmovnz ecx, edx cmovnz esi, eax lea edx, [rcx+4] mov r8d, esi shr r8d, 4 test sil, 0Fh cmovnz edx, ecx cmovnz r8d, esi lea eax, [rdx+2] mov ecx, r8d shr ecx, 2 test r8b, 3 cmovnz eax, edx cmovnz ecx, r8d test cl, 1 jnz short loc_D551B test ecx, ecx jz short loc_D551F inc eax shr ecx, 1 jmp short loc_D551B loc_D5514: shr ecx, 1 mov eax, 1 loc_D551B: mov [rdi], ecx loc_D551D: pop rbp retn loc_D551F: mov eax, 20h ; ' ' jmp short loc_D551D
long long lo0bits(unsigned int *a1) { unsigned int v1; // ecx long long result; // rax unsigned int v3; // ecx unsigned int v4; // eax int v5; // edx int v6; // edx int v7; // ecx unsigned int v8; // esi unsigned int v9; // edx unsigned int v10; // r8d v1 = *a1; if ( (*a1 & 7) != 0 ) { result = 0LL; if ( (v1 & 1) != 0 ) return result; if ( (v1 & 2) != 0 ) { v3 = v1 >> 1; result = 1LL; } else { v3 = v1 >> 2; result = 2LL; } } else { v4 = HIWORD(v1); v5 = 0; if ( (v1 & 0xFFF8) != 0 ) v4 = *a1; LOBYTE(v5) = (*a1 & 0xFFF8) == 0; v6 = 16 * v5; v7 = v6 + 8; v8 = v4 >> 8; if ( (_BYTE)v4 ) { v7 = v6; v8 = v4; } v9 = v7 + 4; v10 = v8 >> 4; if ( (v8 & 0xF) != 0 ) { v9 = v7; v10 = v8; } result = v9 + 2; v3 = v10 >> 2; if ( (v10 & 3) != 0 ) { result = v9; v3 = v10; } if ( (v3 & 1) == 0 ) { if ( !v3 ) return 32LL; result = (unsigned int)(result + 1); v3 >>= 1; } } *a1 = v3; return result; }
lo0bits: PUSH RBP MOV RBP,RSP MOV ECX,dword ptr [RDI] TEST CL,0x7 JZ 0x001d54b6 XOR EAX,EAX TEST CL,0x1 JNZ 0x001d551d TEST CL,0x2 JNZ 0x001d5514 SHR ECX,0x2 MOV EAX,0x2 JMP 0x001d551b LAB_001d54b6: MOV EAX,ECX SHR EAX,0x10 XOR EDX,EDX TEST ECX,0xfff8 CMOVNZ EAX,ECX SETZ DL SHL EDX,0x4 LEA ECX,[RDX + 0x8] MOV ESI,EAX SHR ESI,0x8 TEST AL,AL CMOVNZ ECX,EDX CMOVNZ ESI,EAX LEA EDX,[RCX + 0x4] MOV R8D,ESI SHR R8D,0x4 TEST SIL,0xf CMOVNZ EDX,ECX CMOVNZ R8D,ESI LEA EAX,[RDX + 0x2] MOV ECX,R8D SHR ECX,0x2 TEST R8B,0x3 CMOVNZ EAX,EDX CMOVNZ ECX,R8D TEST CL,0x1 JNZ 0x001d551b TEST ECX,ECX JZ 0x001d551f INC EAX SHR ECX,0x1 JMP 0x001d551b LAB_001d5514: SHR ECX,0x1 MOV EAX,0x1 LAB_001d551b: MOV dword ptr [RDI],ECX LAB_001d551d: POP RBP RET LAB_001d551f: MOV EAX,0x20 JMP 0x001d551d
int lo0bits(uint *param_1) { uint uVar1; int iVar2; uint uVar3; int iVar4; bool bVar5; uVar3 = *param_1; if ((uVar3 & 7) == 0) { bVar5 = (uVar3 & 0xfff8) == 0; uVar1 = uVar3 >> 0x10; if (!bVar5) { uVar1 = uVar3; } iVar4 = (uint)bVar5 * 0x10; uVar3 = uVar1 >> 8; iVar2 = iVar4 + 8; if ((char)uVar1 != '\0') { uVar3 = uVar1; iVar2 = iVar4; } uVar1 = uVar3 >> 4; iVar4 = iVar2 + 4; if ((uVar3 & 0xf) != 0) { uVar1 = uVar3; iVar4 = iVar2; } uVar3 = uVar1 >> 2; iVar2 = iVar4 + 2; if ((uVar1 & 3) != 0) { uVar3 = uVar1; iVar2 = iVar4; } if ((uVar3 & 1) == 0) { if (uVar3 == 0) { return 0x20; } iVar2 = iVar2 + 1; uVar3 = uVar3 >> 1; } } else { if ((uVar3 & 1) != 0) { return 0; } if ((uVar3 & 2) == 0) { uVar3 = uVar3 >> 2; iVar2 = 2; } else { uVar3 = uVar3 >> 1; iVar2 = 1; } } *param_1 = uVar3; return iVar2; }
2,892
sp_compile(THD*, String*, unsigned long long, sp_package*, Stored_program_creation_ctx*)
eloqsql/sql/sp.cc
static sp_head *sp_compile(THD *thd, String *defstr, sql_mode_t sql_mode, sp_package *parent, Stored_program_creation_ctx *creation_ctx) { sp_head *sp; sql_mode_t old_sql_mode= thd->variables.sql_mode; ha_rows old_select_limit= thd->variables.select_limit; sp_rcontext *old_spcont= thd->spcont; Silence_deprecated_warning warning_handler; Parser_state parser_state; thd->variables.sql_mode= sql_mode; thd->variables.select_limit= HA_POS_ERROR; if (parser_state.init(thd, defstr->c_ptr_safe(), defstr->length())) { thd->variables.sql_mode= old_sql_mode; thd->variables.select_limit= old_select_limit; return NULL; } lex_start(thd); thd->lex->sphead= parent; thd->push_internal_handler(&warning_handler); thd->spcont= 0; if (parse_sql(thd, & parser_state, creation_ctx) || thd->lex == NULL) { sp= thd->lex->sphead; sp_head::destroy(sp); sp= 0; } else { sp= thd->lex->sphead; } thd->pop_internal_handler(); thd->spcont= old_spcont; thd->variables.sql_mode= old_sql_mode; thd->variables.select_limit= old_select_limit; if (sp != NULL) sp->init_psi_share(); return sp; }
O0
cpp
sp_compile(THD*, String*, unsigned long long, sp_package*, Stored_program_creation_ctx*): pushq %rbp movq %rsp, %rbp subq $0x1e0, %rsp # imm = 0x1E0 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 0x898(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x910(%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq 0x3fd8(%rax), %rax movq %rax, -0x50(%rbp) leaq -0x60(%rbp), %rdi callq 0xa6e200 leaq -0x1b8(%rbp), %rdi callq 0x4d2b80 jmp 0xa67723 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x898(%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x910(%rax) movq -0x10(%rbp), %rax movq %rax, -0x1d8(%rbp) movq -0x18(%rbp), %rdi addq $0x8, %rdi callq 0x49c9d0 movq %rax, -0x1d0(%rbp) jmp 0xa67762 movq -0x18(%rbp), %rdi addq $0x8, %rdi callq 0x4a84f0 movl %eax, -0x1dc(%rbp) jmp 0xa67777 movq -0x1d0(%rbp), %rdx movq -0x1d8(%rbp), %rsi movl -0x1dc(%rbp), %eax movl %eax, %eax movl %eax, %ecx leaq -0x1b8(%rbp), %rdi callq 0x4d2bd0 movb %al, -0x1dd(%rbp) jmp 0xa677a3 movb -0x1dd(%rbp), %al testb $0x1, %al jne 0xa677af jmp 0xa6781e movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x898(%rax) movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x910(%rax) movq $0x0, -0x8(%rbp) movl $0x1, -0x1c8(%rbp) jmp 0xa6792c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c0(%rbp) movl %eax, -0x1c4(%rbp) jmp 0xa6794e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c0(%rbp) movl %eax, -0x1c4(%rbp) leaq -0x1b8(%rbp), %rdi callq 0x4d2c50 jmp 0xa6794e movq -0x10(%rbp), %rdi callq 0x580950 jmp 0xa67829 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq %rcx, 0x1960(%rax) movq -0x10(%rbp), %rdi leaq -0x60(%rbp), %rsi callq 0x53fbc0 jmp 0xa6784b movq -0x10(%rbp), %rax movq $0x0, 0x3fd8(%rax) movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rdx leaq -0x1b8(%rbp), %rsi xorl %ecx, %ecx callq 0x5c78b0 movb %al, -0x1de(%rbp) jmp 0xa67878 movb -0x1de(%rbp), %al testb $0x1, %al jne 0xa6788f jmp 0xa67884 movq -0x10(%rbp), %rax cmpq $0x0, 0x58(%rax) jne 0xa678b7 movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq 0x1960(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi callq 0x4d52a0 jmp 0xa678ad movq $0x0, -0x38(%rbp) jmp 0xa678ca movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq 0x1960(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi callq 0x53fcd0 jmp 0xa678d5 movq -0x50(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x3fd8(%rax) movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x898(%rax) movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x910(%rax) cmpq $0x0, -0x38(%rbp) je 0xa6791a movq -0x38(%rbp), %rdi movq (%rdi), %rax movq 0x30(%rax), %rax callq *%rax jmp 0xa67918 jmp 0xa6791a movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movl $0x1, -0x1c8(%rbp) leaq -0x1b8(%rbp), %rdi callq 0x4d2c50 leaq -0x60(%rbp), %rdi callq 0xa6ddb0 movq -0x8(%rbp), %rax addq $0x1e0, %rsp # imm = 0x1E0 popq %rbp retq leaq -0x60(%rbp), %rdi callq 0xa6ddb0 movq -0x1c0(%rbp), %rdi callq 0x433ff0 nopw %cs:(%rax,%rax)
_ZL10sp_compileP3THDP6StringyP10sp_packageP27Stored_program_creation_ctx: push rbp mov rbp, rsp sub rsp, 1E0h 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 rax, [rax+898h] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+910h] mov [rbp+var_48], rax mov rax, [rbp+var_10] mov rax, [rax+3FD8h] mov [rbp+var_50], rax lea rdi, [rbp+var_60]; this call _ZN26Silence_deprecated_warningC2Ev; Silence_deprecated_warning::Silence_deprecated_warning(void) lea rdi, [rbp+var_1B8]; this call _ZN12Parser_stateC2Ev; Parser_state::Parser_state(void) jmp short $+2 loc_A67723: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+898h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+910h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] mov [rbp+var_1DC+4], rax mov rdi, [rbp+var_18] add rdi, 8; this call _ZN13Binary_string10c_ptr_safeEv; Binary_string::c_ptr_safe(void) mov [rbp+var_1D0], rax jmp short $+2 loc_A67762: mov rdi, [rbp+var_18] add rdi, 8; this call _ZNK13Binary_string6lengthEv; Binary_string::length(void) mov dword ptr [rbp+var_1DC], eax jmp short $+2 loc_A67777: mov rdx, [rbp+var_1D0]; char * mov rsi, [rbp+var_1DC+4]; THD * mov eax, dword ptr [rbp+var_1DC] mov eax, eax mov ecx, eax; unsigned __int64 lea rdi, [rbp+var_1B8]; this call _ZN12Parser_state4initEP3THDPcm; Parser_state::init(THD *,char *,ulong) mov [rbp+var_1DD], al jmp short $+2 loc_A677A3: mov al, [rbp+var_1DD] test al, 1 jnz short loc_A677AF jmp short loc_A6781E loc_A677AF: mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+898h], rcx mov rcx, [rbp+var_48] mov rax, [rbp+var_10] mov [rax+910h], rcx mov [rbp+var_8], 0 mov [rbp+var_1C8], 1 jmp loc_A6792C mov rcx, rax mov eax, edx mov [rbp+var_1C0], rcx mov [rbp+var_1C4], eax jmp loc_A6794E mov rcx, rax mov eax, edx mov [rbp+var_1C0], rcx mov [rbp+var_1C4], eax lea rdi, [rbp+var_1B8]; this call _ZN12Parser_stateD2Ev; Parser_state::~Parser_state() jmp loc_A6794E loc_A6781E: mov rdi, [rbp+var_10]; THD * call _Z9lex_startP3THD; lex_start(THD *) jmp short $+2 loc_A67829: mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov rax, [rax+58h] mov [rax+1960h], rcx mov rdi, [rbp+var_10]; this lea rsi, [rbp+var_60]; Internal_error_handler * call _ZN3THD21push_internal_handlerEP22Internal_error_handler; THD::push_internal_handler(Internal_error_handler *) jmp short $+2 loc_A6784B: mov rax, [rbp+var_10] mov qword ptr [rax+3FD8h], 0 mov rdi, [rbp+var_10]; THD * mov rdx, [rbp+var_30]; Object_creation_ctx * lea rsi, [rbp+var_1B8]; sp_head * xor ecx, ecx; bool call _Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctxb; parse_sql(THD *,Parser_state *,Object_creation_ctx *,bool) mov [rbp+var_1DE], al jmp short $+2 loc_A67878: mov al, [rbp+var_1DE] test al, 1 jnz short loc_A6788F jmp short $+2 loc_A67884: mov rax, [rbp+var_10] cmp qword ptr [rax+58h], 0 jnz short loc_A678B7 loc_A6788F: mov rax, [rbp+var_10] mov rax, [rax+58h] mov rax, [rax+1960h] mov [rbp+var_38], rax mov rdi, [rbp+var_38]; this call _ZN7sp_head7destroyEPS_; sp_head::destroy(sp_head*) jmp short $+2 loc_A678AD: mov [rbp+var_38], 0 jmp short loc_A678CA loc_A678B7: mov rax, [rbp+var_10] mov rax, [rax+58h] mov rax, [rax+1960h] mov [rbp+var_38], rax loc_A678CA: mov rdi, [rbp+var_10]; this call _ZN3THD20pop_internal_handlerEv; THD::pop_internal_handler(void) jmp short $+2 loc_A678D5: mov rcx, [rbp+var_50] mov rax, [rbp+var_10] mov [rax+3FD8h], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+898h], rcx mov rcx, [rbp+var_48] mov rax, [rbp+var_10] mov [rax+910h], rcx cmp [rbp+var_38], 0 jz short loc_A6791A mov rdi, [rbp+var_38] mov rax, [rdi] mov rax, [rax+30h] call rax jmp short $+2 loc_A67918: jmp short $+2 loc_A6791A: mov rax, [rbp+var_38] mov [rbp+var_8], rax mov [rbp+var_1C8], 1 loc_A6792C: lea rdi, [rbp+var_1B8]; this call _ZN12Parser_stateD2Ev; Parser_state::~Parser_state() lea rdi, [rbp+var_60]; this call _ZN26Silence_deprecated_warningD2Ev; Silence_deprecated_warning::~Silence_deprecated_warning() mov rax, [rbp+var_8] add rsp, 1E0h pop rbp retn loc_A6794E: lea rdi, [rbp+var_60]; this call _ZN26Silence_deprecated_warningD2Ev; Silence_deprecated_warning::~Silence_deprecated_warning() mov rdi, [rbp+var_1C0] call __Unwind_Resume
sp_head * sp_compile(THD *a1, String *a2, long long a3, sp_package *a4, Stored_program_creation_ctx *a5) { unsigned int v6; // [rsp+4h] [rbp-1DCh] THD *v7; // [rsp+8h] [rbp-1D8h] char *v8; // [rsp+10h] [rbp-1D0h] _BYTE v9[344]; // [rsp+28h] [rbp-1B8h] BYREF _BYTE v10[16]; // [rsp+180h] [rbp-60h] BYREF long long v11; // [rsp+190h] [rbp-50h] long long v12; // [rsp+198h] [rbp-48h] long long v13; // [rsp+1A0h] [rbp-40h] sp_head *v14; // [rsp+1A8h] [rbp-38h] Object_creation_ctx *v15; // [rsp+1B0h] [rbp-30h] sp_package *v16; // [rsp+1B8h] [rbp-28h] long long v17; // [rsp+1C0h] [rbp-20h] String *v18; // [rsp+1C8h] [rbp-18h] THD *v19; // [rsp+1D0h] [rbp-10h] sp_head *v20; // [rsp+1D8h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v13 = *((_QWORD *)a1 + 275); v12 = *((_QWORD *)a1 + 290); v11 = *((_QWORD *)a1 + 2043); Silence_deprecated_warning::Silence_deprecated_warning((Silence_deprecated_warning *)v10); Parser_state::Parser_state((Parser_state *)v9); *((_QWORD *)v19 + 275) = v17; *((_QWORD *)v19 + 290) = -1LL; v7 = v19; v8 = (char *)Binary_string::c_ptr_safe((String *)((char *)v18 + 8)); v6 = Binary_string::length((String *)((char *)v18 + 8)); if ( (Parser_state::init((Parser_state *)v9, v7, v8, v6) & 1) != 0 ) { *((_QWORD *)v19 + 275) = v13; *((_QWORD *)v19 + 290) = v12; v20 = 0LL; } else { lex_start((LEX **)v19); *(_QWORD *)(*((_QWORD *)v19 + 11) + 6496LL) = v16; THD::push_internal_handler(v19, (Internal_error_handler *)v10); *((_QWORD *)v19 + 2043) = 0LL; if ( (parse_sql((LEX **)v19, (Parser_state *)v9, v15, 0) & 1) == 0 && *((_QWORD *)v19 + 11) ) { v14 = *(sp_head **)(*((_QWORD *)v19 + 11) + 6496LL); } else { v14 = *(sp_head **)(*((_QWORD *)v19 + 11) + 6496LL); sp_head::destroy(v14, (sp_head *)v9); v14 = 0LL; } THD::pop_internal_handler(v19); *((_QWORD *)v19 + 2043) = v11; *((_QWORD *)v19 + 275) = v13; *((_QWORD *)v19 + 290) = v12; if ( v14 ) (*(void ( **)(sp_head *))(*(_QWORD *)v14 + 48LL))(v14); v20 = v14; } Parser_state::~Parser_state((Parser_state *)v9); Silence_deprecated_warning::~Silence_deprecated_warning((Silence_deprecated_warning *)v10); return v20; }
inline_mysql_set_stage: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x14feec0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x238] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX ADD RSP,0x20 POP RBP RET
/* inline_mysql_set_stage(unsigned int, char const*, int) */ void inline_mysql_set_stage(uint param_1,char *param_2,int param_3) { (**(code **)(PSI_server + 0x238))(param_1,param_2,param_3); return; }
2,893
set_dynamic
eloqsql/mysys/array.c
my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx) { if (idx >= array->elements) { if (idx >= array->max_element && allocate_dynamic(array, idx)) return TRUE; bzero((uchar*) (array->buffer+array->elements*array->size_of_element), (idx - array->elements)*array->size_of_element); array->elements=idx+1; } memcpy(array->buffer+(idx * array->size_of_element),element, (size_t) array->size_of_element); return FALSE; }
O3
c
set_dynamic: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %r14d movq %rsi, %rbx movq %rdi, %r15 movl 0x8(%rdi), %eax cmpl %edx, %eax ja 0x25da6 cmpl %r14d, 0xc(%r15) ja 0x25d83 movq %r15, %rdi movl %r14d, %esi callq 0x25dc9 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x25dbe movl 0x8(%r15), %eax movl 0x14(%r15), %ecx movl %r14d, %edx subl %eax, %edx imull %ecx, %edx movl %ecx, %edi imull %eax, %edi addq (%r15), %rdi xorl %esi, %esi callq 0x24160 leal 0x1(%r14), %eax movl %eax, 0x8(%r15) movl 0x14(%r15), %edx imull %edx, %r14d addq (%r15), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x24200 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
set_dynamic: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14d, edx mov rbx, rsi mov r15, rdi mov eax, [rdi+8] cmp eax, edx ja short loc_25DA6 cmp [r15+0Ch], r14d ja short loc_25D83 mov rdi, r15 mov esi, r14d call allocate_dynamic mov ecx, eax mov al, 1 test cl, cl jnz short loc_25DBE mov eax, [r15+8] loc_25D83: mov ecx, [r15+14h] mov edx, r14d sub edx, eax imul edx, ecx mov edi, ecx imul edi, eax add rdi, [r15] xor esi, esi call _memset lea eax, [r14+1] mov [r15+8], eax loc_25DA6: mov edx, [r15+14h] imul r14d, edx add r14, [r15] mov rdi, r14 mov rsi, rbx call _memcpy xor eax, eax loc_25DBE: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char set_dynamic(long long a1, long long a2, unsigned int a3) { unsigned int v4; // eax char dynamic; // cl char result; // al v4 = *(_DWORD *)(a1 + 8); if ( v4 <= a3 ) { if ( *(_DWORD *)(a1 + 12) <= a3 ) { dynamic = allocate_dynamic(a1, a3); result = 1; if ( dynamic ) return result; v4 = *(_DWORD *)(a1 + 8); } memset(*(_QWORD *)a1 + v4 * *(_DWORD *)(a1 + 20), 0LL, *(_DWORD *)(a1 + 20) * (a3 - v4)); *(_DWORD *)(a1 + 8) = a3 + 1; } memcpy(*(_QWORD *)a1 + *(_DWORD *)(a1 + 20) * a3, a2, *(unsigned int *)(a1 + 20)); return 0; }
set_dynamic: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,EDX MOV RBX,RSI MOV R15,RDI MOV EAX,dword ptr [RDI + 0x8] CMP EAX,EDX JA 0x00125da6 CMP dword ptr [R15 + 0xc],R14D JA 0x00125d83 MOV RDI,R15 MOV ESI,R14D CALL 0x00125dc9 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00125dbe MOV EAX,dword ptr [R15 + 0x8] LAB_00125d83: MOV ECX,dword ptr [R15 + 0x14] MOV EDX,R14D SUB EDX,EAX IMUL EDX,ECX MOV EDI,ECX IMUL EDI,EAX ADD RDI,qword ptr [R15] XOR ESI,ESI CALL 0x00124160 LEA EAX,[R14 + 0x1] MOV dword ptr [R15 + 0x8],EAX LAB_00125da6: MOV EDX,dword ptr [R15 + 0x14] IMUL R14D,EDX ADD R14,qword ptr [R15] MOV RDI,R14 MOV RSI,RBX CALL 0x00124200 XOR EAX,EAX LAB_00125dbe: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 set_dynamic(long *param_1,void *param_2,uint param_3) { char cVar1; uint uVar2; uVar2 = *(uint *)(param_1 + 1); if (uVar2 <= param_3) { if (*(uint *)((long)param_1 + 0xc) <= param_3) { cVar1 = allocate_dynamic(param_1); if (cVar1 != '\0') { return 1; } uVar2 = *(uint *)(param_1 + 1); } memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar2) + *param_1),0, (ulong)((param_3 - uVar2) * *(int *)((long)param_1 + 0x14))); *(uint *)(param_1 + 1) = param_3 + 1; } memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2, (ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
2,894
ftxui::yflex_grow(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/flex.cpp
Element yflex_grow(Element child) { return std::make_shared<Flex>(function_yflex_grow, std::move(child)); }
O2
cpp
ftxui::yflex_grow(std::shared_ptr<ftxui::Node>): pushq %rbx subq $0x10, %rsp movq %rsi, %rdx movq %rdi, %rbx leaq 0x2b(%rip), %rsi # 0x1e893 movq %rsp, %rdi callq 0x1e621 leaq 0x8(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x13452 movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
_ZN5ftxui10yflex_growESt10shared_ptrINS_4NodeEE: push rbx sub rsp, 10h mov rdx, rsi mov rbx, rdi lea rsi, _ZN5ftxui12_GLOBAL__N_119function_yflex_growERNS_11RequirementE; ftxui::`anonymous namespace'::function_yflex_grow(ftxui::Requirement &) mov rdi, rsp call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_14FlexEJRFvRNS0_11RequirementEESt10shared_ptrINS0_4NodeEEEES7_IT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::Flex,void (&)(ftxui::Requirement &),std::shared_ptr<ftxui::Node>>(void (&)(ftxui::Requirement &),std::shared_ptr<ftxui::Node> &&) lea rdi, [rsp+18h+var_10] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 10h pop rbx retn
_OWORD * ftxui::yflex_grow(_OWORD *a1, __int128 *a2) { __int128 v2; // xmm0 __int128 v4; // [rsp+0h] [rbp-18h] BYREF std::make_shared<ftxui::`anonymous namespace'::Flex,void (&)(ftxui::Requirement &),std::shared_ptr<ftxui::Node>>( &v4, (long long)ftxui::`anonymous namespace'::function_yflex_grow, a2); v2 = v4; *((_QWORD *)&v4 + 1) = 0LL; *a1 = v2; *(_QWORD *)&v4 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v4 + 1); return a1; }
yflex_grow: PUSH RBX SUB RSP,0x10 MOV RDX,RSI MOV RBX,RDI LEA RSI,[0x11e893] MOV RDI,RSP CALL 0x0011e621 LEA RDI,[RSP + 0x8] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x00113452 MOV RAX,RBX ADD RSP,0x10 POP RBX RET
/* ftxui::yflex_grow(std::shared_ptr<ftxui::Node>) */ int8 * ftxui::yflex_grow(int8 *param_1) { int8 uVar1; int8 local_18; int8 uStack_10; std:: make_shared<ftxui::(anonymous_namespace)::Flex,void(&)(ftxui::Requirement&),std::shared_ptr<ftxui::Node>> ((_func_void_Requirement_ptr *)&local_18, (shared_ptr *)(anonymous_namespace)::function_yflex_grow); uVar1 = uStack_10; uStack_10 = 0; *param_1 = local_18; param_1[1] = uVar1; local_18 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10); return param_1; }
2,895
ma_free_size_to_head_pattern
eloqsql/storage/maria/ma_bitmap.c
uint _ma_free_size_to_head_pattern(MARIA_FILE_BITMAP *bitmap, uint size) { if (size < bitmap->sizes[3]) return 4; if (size < bitmap->sizes[2]) return 3; if (size < bitmap->sizes[1]) return 2; return (size < bitmap->sizes[0]) ? 1 : 0; }
O0
c
ma_free_size_to_head_pattern: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x114(%rcx), %eax jae 0x5eee3 movl $0x4, -0x4(%rbp) jmp 0x5ef2f movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x110(%rcx), %eax jae 0x5eefb movl $0x3, -0x4(%rbp) jmp 0x5ef2f movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x10c(%rcx), %eax jae 0x5ef13 movl $0x2, -0x4(%rbp) jmp 0x5ef2f movl -0x14(%rbp), %edx movq -0x10(%rbp), %rax movl 0x108(%rax), %esi xorl %eax, %eax movl $0x1, %ecx cmpl %esi, %edx cmovbl %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_free_size_to_head_pattern: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+114h] jnb short loc_5EEE3 mov [rbp+var_4], 4 jmp short loc_5EF2F loc_5EEE3: mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+110h] jnb short loc_5EEFB mov [rbp+var_4], 3 jmp short loc_5EF2F loc_5EEFB: mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+10Ch] jnb short loc_5EF13 mov [rbp+var_4], 2 jmp short loc_5EF2F loc_5EF13: mov edx, [rbp+var_14] mov rax, [rbp+var_10] mov esi, [rax+108h] xor eax, eax mov ecx, 1 cmp edx, esi cmovb eax, ecx mov [rbp+var_4], eax loc_5EF2F: mov eax, [rbp+var_4] pop rbp retn
long long ma_free_size_to_head_pattern(_DWORD *a1, unsigned int a2) { if ( a2 >= a1[69] ) { if ( a2 >= a1[68] ) { if ( a2 >= a1[67] ) return a2 < a1[66]; else return 2; } else { return 3; } } else { return 4; } }
_ma_free_size_to_head_pattern: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x114] JNC 0x0015eee3 MOV dword ptr [RBP + -0x4],0x4 JMP 0x0015ef2f LAB_0015eee3: MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x110] JNC 0x0015eefb MOV dword ptr [RBP + -0x4],0x3 JMP 0x0015ef2f LAB_0015eefb: MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x10c] JNC 0x0015ef13 MOV dword ptr [RBP + -0x4],0x2 JMP 0x0015ef2f LAB_0015ef13: MOV EDX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x108] XOR EAX,EAX MOV ECX,0x1 CMP EDX,ESI CMOVC EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_0015ef2f: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int1 _ma_free_size_to_head_pattern(long param_1,uint param_2) { int1 uVar1; if (param_2 < *(uint *)(param_1 + 0x114)) { uVar1 = 4; } else if (param_2 < *(uint *)(param_1 + 0x110)) { uVar1 = 3; } else if (param_2 < *(uint *)(param_1 + 0x10c)) { uVar1 = 2; } else { uVar1 = param_2 < *(uint *)(param_1 + 0x108); } return uVar1; }
2,896
my_fill_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill) { if (fill < 0x80) my_fill_8bit(cs, str, length, fill); else my_fill_utf8mb3_mb(cs, str, length, fill); }
O3
c
my_fill_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpl $0x7f, %ecx jg 0x53fe9 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x5406d movq %rbx, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3e0af leaq (%rbx,%r15), %r14 movq 0xb8(%rdi), %rax movl %ecx, %esi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0xd8(%rax) movsbq %al, %r12 cmpq %r15, %r12 jle 0x54012 movq %rbx, %r13 jmp 0x54037 movsbq %al, %r15 movq %rbx, %r13 movq %rbx, %rdi leaq -0x3a(%rbp), %rsi movq %r15, %rdx callq 0x24250 addq %r12, %rbx addq %r12, %r13 leaq (%rbx,%r12), %rax cmpq %r14, %rax jbe 0x54019 cmpq %r14, %rbx jae 0x5404f subq %r13, %r14 movq %rbx, %rdi movl $0x20, %esi movq %r14, %rdx callq 0x24190 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x5406d addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24380
my_fill_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdx mov rbx, rsi mov rax, fs:28h mov [rbp+var_30], rax cmp ecx, 7Fh jg short loc_53FE9 mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_5406D mov rsi, rbx mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_fill_8bit loc_53FE9: lea r14, [rbx+r15] mov rax, [rdi+0B8h] mov esi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+0D8h] movsx r12, al cmp r12, r15 jle short loc_54012 mov r13, rbx jmp short loc_54037 loc_54012: movsx r15, al mov r13, rbx loc_54019: mov rdi, rbx lea rsi, [rbp+var_3A] mov rdx, r15 call _memcpy add rbx, r12 add r13, r12 lea rax, [rbx+r12] cmp rax, r14 jbe short loc_54019 loc_54037: cmp rbx, r14 jnb short loc_5404F sub r14, r13 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r14 call _memset loc_5404F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_5406D add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5406D: call ___stack_chk_fail
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4) { unsigned long long v5; // rbx unsigned long long v7; // r14 char v8; // al long long v9; // r12 long long v10; // r13 long long v11; // r15 _BYTE v12[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v13[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v13[0] = __readfsqword(0x28u); if ( a4 <= 127 ) return my_fill_8bit(a1, a2, a3, a4); v7 = a2 + a3; v8 = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, (unsigned int)a4, v12, v13); v9 = v8; if ( v8 <= a3 ) { v11 = v8; v10 = a2; do { memcpy(v5, v12, v11); v5 += v9; v10 += v9; } while ( v5 + v9 <= v7 ); } else { v10 = a2; } if ( v5 < v7 ) memset(v5, 32LL, v7 - v10); return __readfsqword(0x28u); }
my_fill_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDX MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP ECX,0x7f JG 0x00153fe9 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0015406d MOV RSI,RBX MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013e0af LAB_00153fe9: LEA R14,[RBX + R15*0x1] MOV RAX,qword ptr [RDI + 0xb8] MOV ESI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0xd8] MOVSX R12,AL CMP R12,R15 JLE 0x00154012 MOV R13,RBX JMP 0x00154037 LAB_00154012: MOVSX R15,AL MOV R13,RBX LAB_00154019: MOV RDI,RBX LEA RSI,[RBP + -0x3a] MOV RDX,R15 CALL 0x00124250 ADD RBX,R12 ADD R13,R12 LEA RAX,[RBX + R12*0x1] CMP RAX,R14 JBE 0x00154019 LAB_00154037: CMP RBX,R14 JNC 0x0015404f SUB R14,R13 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R14 CALL 0x00124190 LAB_0015404f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0015406d ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015406d: CALL 0x00124380
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4) { void *pvVar1; char cVar2; long lVar3; void *pvVar4; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_4 < 0x80) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { my_fill_8bit(param_1,param_2,param_3); return; } } else { pvVar1 = (void *)((long)param_2 + param_3); cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38); lVar3 = (long)cVar2; pvVar4 = param_2; if (lVar3 <= param_3) { do { memcpy(param_2,local_42,(long)cVar2); param_2 = (void *)((long)param_2 + lVar3); pvVar4 = (void *)((long)pvVar4 + lVar3); } while ((void *)((long)param_2 + lVar3) <= pvVar1); } if (param_2 < pvVar1) { memset(param_2,0x20,(long)pvVar1 - (long)pvVar4); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
2,897
sp_get_polygon_mbr
eloqsql/storage/myisam/sp_key.c
static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims, uchar byte_order, double *mbr) { uint n_linear_rings; uint n_points; n_linear_rings = uint4korr((*wkb)); (*wkb) += 4; for (; n_linear_rings > 0; --n_linear_rings) { n_points = uint4korr((*wkb)); (*wkb) += 4; for (; n_points > 0; --n_points) { /* Add next point to mbr */ if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } } return 0; }
O0
c
sp_get_polygon_mbr: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movb %al, -0x1d(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x2c(%rbp) jbe 0xf9d1e movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x30(%rbp) jbe 0xf9d11 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x1d(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0xf9d30 cmpl $0x0, %eax je 0xf9d04 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xf9d25 jmp 0xf9d06 movl -0x30(%rbp), %eax addl $-0x1, %eax movl %eax, -0x30(%rbp) jmp 0xf9cd6 jmp 0xf9d13 movl -0x2c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xf9cb6 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
sp_get_polygon_mbr_0: push rbp mov rbp, rsp sub rsp, 30h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_1D], al mov [rbp+var_28], r8 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_F9CB6: cmp [rbp+var_2C], 0 jbe short loc_F9D1E mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_F9CD6: cmp [rbp+var_30], 0 jbe short loc_F9D11 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_1D] mov r8, [rbp+var_28] movzx ecx, al call sp_add_point_to_mbr_0 cmp eax, 0 jz short loc_F9D04 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_F9D25 loc_F9D04: jmp short $+2 loc_F9D06: mov eax, [rbp+var_30] add eax, 0FFFFFFFFh mov [rbp+var_30], eax jmp short loc_F9CD6 loc_F9D11: jmp short $+2 loc_F9D13: mov eax, [rbp+var_2C] add eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp short loc_F9CB6 loc_F9D1E: mov [rbp+var_4], 0 loc_F9D25: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long sp_get_polygon_mbr_0(_DWORD **a1, long long a2, unsigned int a3, unsigned __int8 a4, long long a5) { int j; // [rsp+0h] [rbp-30h] int i; // [rsp+4h] [rbp-2Ch] for ( i = *(*a1)++; i; --i ) { for ( j = *(*a1)++; j; --j ) { if ( (unsigned int)sp_add_point_to_mbr_0(a1, a2, a3, a4, a5) ) return (unsigned int)-1; } } return 0; }
sp_get_polygon_mbr: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV byte ptr [RBP + -0x1d],AL MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_001f9cb6: CMP dword ptr [RBP + -0x2c],0x0 JBE 0x001f9d1e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_001f9cd6: CMP dword ptr [RBP + -0x30],0x0 JBE 0x001f9d11 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x1d] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x001f9d30 CMP EAX,0x0 JZ 0x001f9d04 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001f9d25 LAB_001f9d04: JMP 0x001f9d06 LAB_001f9d06: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,-0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001f9cd6 LAB_001f9d11: JMP 0x001f9d13 LAB_001f9d13: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001f9cb6 LAB_001f9d1e: MOV dword ptr [RBP + -0x4],0x0 LAB_001f9d25: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 sp_get_polygon_mbr(long *param_1,int8 param_2,int4 param_3,int1 param_4, int8 param_5) { int iVar1; int local_38; int local_34; local_34 = *(int *)*param_1; *param_1 = *param_1 + 4; do { if (local_34 == 0) { return 0; } local_38 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_38 != 0; local_38 = local_38 + -1) { iVar1 = sp_add_point_to_mbr(param_1,param_2,param_3,param_4,param_5); if (iVar1 != 0) { return 0xffffffff; } } local_34 = local_34 + -1; } while( true ); }
2,898
translog_free_link
eloqsql/storage/maria/ma_loghandler.c
static void translog_free_link(PAGECACHE_BLOCK_LINK *direct_link) { DBUG_ENTER("translog_free_link"); DBUG_PRINT("info", ("Direct link: %p", direct_link)); if (direct_link) pagecache_unlock_by_link(log_descriptor.pagecache, direct_link, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); DBUG_VOID_RETURN; }
O3
c
translog_free_link: testq %rdi, %rdi je 0x6af8f pushq %rbp movq %rsp, %rbp movq %rdi, %rsi movq 0x39dc6f(%rip), %rdi # 0x408be0 xorl %eax, %eax movl $0x5, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq %rax pushq %rax callq 0x70831 addq $0x10, %rsp popq %rbp retq
translog_free_link: test rdi, rdi jz short locret_6AF8F push rbp mov rbp, rsp mov rsi, rdi mov rdi, cs:log_descriptor xor eax, eax mov edx, 5 mov ecx, 3 xor r8d, r8d xor r9d, r9d push rax push rax call pagecache_unlock_by_link add rsp, 10h pop rbp locret_6AF8F: retn
long long translog_free_link(long long a1) { long long result; // rax if ( a1 ) return pagecache_unlock_by_link(log_descriptor[0], a1, 5, 3, 0, 0, 0LL, 0LL); return result; }
translog_free_link: TEST RDI,RDI JZ 0x0016af8f PUSH RBP MOV RBP,RSP MOV RSI,RDI MOV RDI,qword ptr [0x00508be0] XOR EAX,EAX MOV EDX,0x5 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x00170831 ADD RSP,0x10 POP RBP LAB_0016af8f: RET
void translog_free_link(long param_1) { if (param_1 != 0) { pagecache_unlock_by_link(log_descriptor,param_1,5,3,0,0,0,0); } return; }
2,899
minja::Parser::parseVarNames[abi:cxx11]()
monkey531[P]llama/common/minja.hpp
std::vector<std::string> parseVarNames() { static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)"); std::vector<std::string> group; if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names"); std::vector<std::string> varnames; std::istringstream iss(group[1]); std::string varname; while (std::getline(iss, varname, ',')) { varnames.push_back(strip(varname)); } return varnames; }
O2
cpp
minja::Parser::parseVarNames[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1e0, %rsp # imm = 0x1E0 movq %rsi, %r14 movq %rdi, %rbx leaq 0x85670(%rip), %rax # 0xdb1e0 movb (%rax), %al testb %al, %al je 0x55c76 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) leaq 0x85632(%rip), %rdx # 0xdb1c0 leaq 0x60(%rsp), %rdi pushq $0x1 popq %rcx movq %r14, %rsi callq 0x5549a movq %rsp, %r14 leaq 0x60(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x5fa26 movq (%r14), %r12 movq 0x8(%r14), %r14 movq %r15, %rdi callq 0x25650 cmpq %r14, %r12 je 0x55ccb andq $0x0, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq (%rsp), %rsi addq $0x20, %rsi leaq 0x60(%rsp), %rdi pushq $0x8 popq %rdx callq 0x21da0 leaq 0x30(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x60(%rsp), %r14 leaq 0x20(%rsp), %r15 pushq $0x2c popq %rbp leaq 0x40(%rsp), %r12 movq %r14, %rdi movq %r15, %rsi movl %ebp, %edx callq 0x21f30 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x55c47 movq %r12, %rdi movq %r15, %rsi callq 0x4d481 movq %rbx, %rdi movq %r12, %rsi callq 0x74334 movq %r12, %rdi callq 0x22078 jmp 0x55c0c leaq 0x20(%rsp), %rdi callq 0x22078 leaq 0x60(%rsp), %rdi callq 0x213c0 movq %rsp, %rdi callq 0x25650 movq %rbx, %rax addq $0x1e0, %rsp # imm = 0x1E0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x85563(%rip), %rdi # 0xdb1e0 callq 0x21ec0 testl %eax, %eax je 0x55b7a leaq 0x8552f(%rip), %rdi # 0xdb1c0 leaq 0x445da(%rip), %rsi # 0x9a272 pushq $0x10 popq %rdx callq 0x553f4 leaq -0x84d(%rip), %rdi # 0x5545a leaq 0x85512(%rip), %rsi # 0xdb1c0 leaq 0x84b93(%rip), %rdx # 0xda848 callq 0x216e0 leaq 0x8551f(%rip), %rdi # 0xdb1e0 callq 0x21520 jmp 0x55b7a pushq $0x10 popq %rdi callq 0x213f0 movq %rax, %rbx leaq 0x445c7(%rip), %rsi # 0x9a2a4 movq %rax, %rdi callq 0x212d0 movq 0x84304(%rip), %rsi # 0xd9ff0 movq 0x84275(%rip), %rdx # 0xd9f68 movq %rbx, %rdi callq 0x21de0 movq %rax, %r14 leaq 0x854db(%rip), %rdi # 0xdb1e0 callq 0x21510 jmp 0x55d5d jmp 0x55d20 movq %rax, %r14 movq %rbx, %rdi callq 0x215c0 jmp 0x55d55 movq %rax, %r14 jmp 0x55d4d movq %rax, %r14 jmp 0x55d55 movq %rax, %r14 leaq 0x40(%rsp), %rdi callq 0x22078 jmp 0x55d39 jmp 0x55d36 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x22078 leaq 0x60(%rsp), %rdi callq 0x213c0 movq %rbx, %rdi callq 0x25650 movq %rsp, %rdi callq 0x25650 movq %r14, %rdi callq 0x21e50
_ZN5minja6Parser13parseVarNamesB5cxx11Ev: push rbp push r15 push r14 push r12 push rbx sub rsp, 1E0h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex mov al, [rax] test al, al jz loc_55C76 loc_55B7A: xorps xmm0, xmm0 movaps [rsp+208h+var_208], xmm0 and [rsp+208h+var_1F8], 0 lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rdi, [rsp+208h+var_1A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov r14, rsp lea r15, [rsp+208h+var_1A8] mov rdi, r14 mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE14_M_move_assignEOS7_St17integral_constantIbLb1EE; std::vector<std::string>::_M_move_assign(std::vector<std::string>&&,std::integral_constant<bool,true>) mov r12, [r14] mov r14, [r14+8] mov rdi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() cmp r12, r14 jz loc_55CCB and qword ptr [rbx+10h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rsi, qword ptr [rsp+208h+var_208] add rsi, 20h ; ' ' lea rdi, [rsp+208h+var_1A8] push 8 pop rdx call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rax, [rsp+208h+var_1D8] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r14, [rsp+208h+var_1A8] lea r15, [rsp+208h+var_1E8] push 2Ch ; ',' pop rbp lea r12, [rsp+208h+var_1C8] loc_55C0C: mov rdi, r14 mov rsi, r15 mov edx, ebp call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_55C47 mov rdi, r12 mov rsi, r15 call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&) mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_55C0C loc_55C47: lea rdi, [rsp+208h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+208h+var_1A8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 1E0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_55C76: lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_55B7A lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"... push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_55B7A loc_55CCB: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpectedVariab; "Expected variable names" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_55D5D jmp short loc_55D20 mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_55D55 mov r14, rax jmp short loc_55D4D loc_55D20: mov r14, rax jmp short loc_55D55 mov r14, rax lea rdi, [rsp+208h+var_1C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_55D39 jmp short $+2 loc_55D36: mov r14, rax loc_55D39: lea rdi, [rsp+208h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+208h+var_1A8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_55D4D: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_55D55: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_55D5D: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2) { __int128 v2; // kr00_16 _QWORD *v3; // rax std::runtime_error *exception; // rbx __int128 v6; // [rsp+0h] [rbp-208h] BYREF long long v7; // [rsp+10h] [rbp-1F8h] _QWORD v8[2]; // [rsp+20h] [rbp-1E8h] BYREF char v9; // [rsp+30h] [rbp-1D8h] BYREF _QWORD v10[4]; // [rsp+40h] [rbp-1C8h] BYREF _BYTE v11[424]; // [rsp+60h] [rbp-1A8h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]); } v6 = 0LL; v7 = 0LL; minja::Parser::consumeTokenGroups( (long long)v11, a2, (int)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], 1u); std::vector<std::string>::_M_move_assign(&v6, v11); v2 = v6; std::vector<std::string>::~vector((long long)v11); if ( (_QWORD)v2 == *((_QWORD *)&v2 + 1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected variable names"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; std::istringstream::basic_istringstream(v11, v6 + 32, 8LL); v8[0] = &v9; v8[1] = 0LL; v9 = 0; while ( 1 ) { v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v11, v8, 44LL); if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 ) break; minja::strip(v10, (long long)v8); std::vector<std::string>::emplace_back<std::string>(a1, v10); std::string::~string(v10); } std::string::~string(v8); std::istringstream::~istringstream(v11); std::vector<std::string>::~vector((long long)&v6); return a1; }
parseVarNames[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1e0 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x1db1e0] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00155c76 LAB_00155b7a: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_00155b87: LEA RDX,[0x1db1c0] LEA RDI,[RSP + 0x60] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x0015549a MOV R14,RSP LEA R15,[RSP + 0x60] MOV RDI,R14 MOV RSI,R15 CALL 0x0015fa26 MOV R12,qword ptr [R14] MOV R14,qword ptr [R14 + 0x8] MOV RDI,R15 CALL 0x00125650 CMP R12,R14 JZ 0x00155ccb AND qword ptr [RBX + 0x10],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RSI,qword ptr [RSP] ADD RSI,0x20 LAB_00155bdc: LEA RDI,[RSP + 0x60] PUSH 0x8 POP RDX CALL 0x00121da0 LEA RAX,[RSP + 0x30] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R14,[RSP + 0x60] LEA R15,[RSP + 0x20] PUSH 0x2c POP RBP LEA R12,[RSP + 0x40] LAB_00155c0c: MOV RDI,R14 MOV RSI,R15 MOV EDX,EBP CALL 0x00121f30 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x00155c47 LAB_00155c27: MOV RDI,R12 MOV RSI,R15 CALL 0x0014d481 LAB_00155c32: MOV RDI,RBX MOV RSI,R12 CALL 0x00174334 MOV RDI,R12 CALL 0x00122078 JMP 0x00155c0c LAB_00155c47: LEA RDI,[RSP + 0x20] CALL 0x00122078 LEA RDI,[RSP + 0x60] CALL 0x001213c0 MOV RDI,RSP CALL 0x00125650 MOV RAX,RBX ADD RSP,0x1e0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00155c76: LEA RDI,[0x1db1e0] CALL 0x00121ec0 TEST EAX,EAX JZ 0x00155b7a LAB_00155c8a: LEA RDI,[0x1db1c0] LEA RSI,[0x19a272] PUSH 0x10 POP RDX CALL 0x001553f4 LAB_00155ca0: LEA RDI,[0x15545a] LEA RSI,[0x1db1c0] LEA RDX,[0x1da848] CALL 0x001216e0 LEA RDI,[0x1db1e0] CALL 0x00121520 JMP 0x00155b7a LAB_00155ccb: PUSH 0x10 POP RDI CALL 0x001213f0 MOV RBX,RAX LAB_00155cd6: LEA RSI,[0x19a2a4] MOV RDI,RAX CALL 0x001212d0 LAB_00155ce5: MOV RSI,qword ptr [0x001d9ff0] MOV RDX,qword ptr [0x001d9f68] MOV RDI,RBX CALL 0x00121de0
/* minja::Parser::parseVarNames[abi:cxx11]() */ void minja::Parser::parseVarNames_abi_cxx11_(void) { long lVar1; long lVar2; int iVar3; istream *piVar4; runtime_error *this; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI; long local_208; long lStack_200; int8 local_1f8; int1 *local_1e8; int8 local_1e0; int1 local_1d8 [16]; minja local_1c8 [32]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_1a8 [384]; if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 00155c8a to 00155c9f has its CatchHandler @ 00155cfb */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_, "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); } } local_208 = 0; lStack_200 = 0; local_1f8 = 0; /* try { // try from 00155b87 to 00155b9d has its CatchHandler @ 00155d20 */ consumeTokenGroups(local_1a8); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_move_assign (&local_208,local_1a8); lVar2 = lStack_200; lVar1 = local_208; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_1a8); if (lVar1 != lVar2) { *(int8 *)(in_RDI + 0x10) = 0; *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; /* try { // try from 00155bdc to 00155be8 has its CatchHandler @ 00155d1b */ std::__cxx11::istringstream::istringstream((istringstream *)local_1a8,local_208 + 0x20,8); local_1e8 = local_1d8; local_1e0 = 0; local_1d8[0] = 0; while( true ) { /* try { // try from 00155c0c to 00155c18 has its CatchHandler @ 00155d36 */ piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_1a8,(string *)&local_1e8,','); if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 00155c27 to 00155c31 has its CatchHandler @ 00155d34 */ strip(local_1c8,(string *)&local_1e8); /* try { // try from 00155c32 to 00155c3c has its CatchHandler @ 00155d25 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1c8); std::__cxx11::string::~string((string *)local_1c8); } std::__cxx11::string::~string((string *)&local_1e8); std::__cxx11::istringstream::~istringstream((istringstream *)local_1a8); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_208); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00155cd6 to 00155ce4 has its CatchHandler @ 00155d0e */ std::runtime_error::runtime_error(this,"Expected variable names"); /* try { // try from 00155ce5 to 00155cfa has its CatchHandler @ 00155d0c */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001d9ff0,PTR__runtime_error_001d9f68); }