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
58,200
add_private_class_field
bluesky950520[P]quickjs/quickjs.c
static int add_private_class_field(JSParseState *s, JSFunctionDef *fd, JSAtom name, JSVarKindEnum var_kind, BOOL is_static) { JSContext *ctx = s->ctx; JSVarDef *vd; int idx; idx = add_scope_var(ctx, fd, name, var_kind); if (idx < 0) return idx; vd = &fd->vars[idx]; vd->is_lexical = 1; vd->is_const = 1; vd->is_static_private = is_static; return idx; }
O1
c
add_private_class_field: pushq %r14 pushq %rbx pushq %rax movl %r8d, %ebx movq %rsi, %r14 movq (%rdi), %rdi callq 0x64643 testl %eax, %eax js 0x69a8f movq 0x90(%r14), %rcx movl %eax, %edx shlq $0x4, %rdx movl 0xc(%rcx,%rdx), %esi andl $0x1, %ebx andl $-0xc, %esi leal (%rsi,%rbx,8), %esi addl $0x3, %esi movl %esi, 0xc(%rcx,%rdx) addq $0x8, %rsp popq %rbx popq %r14 retq
add_private_class_field: push r14 push rbx push rax mov ebx, r8d mov r14, rsi mov rdi, [rdi] call add_scope_var test eax, eax js short loc_69A8F mov rcx, [r14+90h] mov edx, eax shl rdx, 4 mov esi, [rcx+rdx+0Ch] and ebx, 1 and esi, 0FFFFFFF4h lea esi, [rsi+rbx*8] add esi, 3 mov [rcx+rdx+0Ch], esi loc_69A8F: add rsp, 8 pop rbx pop r14 retn
long long add_private_class_field( long long *a1, long long a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // bl long long result; // rax v14 = a5; result = add_scope_var(*a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( (int)result >= 0 ) *(_DWORD *)(*(_QWORD *)(a2 + 144) + 16LL * (unsigned int)result + 12) = (*(_DWORD *)(*(_QWORD *)(a2 + 144) + 16LL * (unsigned int)result + 12) & 0xFFFFFFF4) + 8 * (v14 & 1) + 3; return result; }
add_private_class_field: PUSH R14 PUSH RBX PUSH RAX MOV EBX,R8D MOV R14,RSI MOV RDI,qword ptr [RDI] CALL 0x00164643 TEST EAX,EAX JS 0x00169a8f MOV RCX,qword ptr [R14 + 0x90] MOV EDX,EAX SHL RDX,0x4 MOV ESI,dword ptr [RCX + RDX*0x1 + 0xc] AND EBX,0x1 AND ESI,0xfffffff4 LEA ESI,[RSI + RBX*0x8] ADD ESI,0x3 MOV dword ptr [RCX + RDX*0x1 + 0xc],ESI LAB_00169a8f: ADD RSP,0x8 POP RBX POP R14 RET
void add_private_class_field (int8 *param_1,long param_2,int8 param_3,int8 param_4,uint param_5) { uint uVar1; uVar1 = add_scope_var(*param_1); if (-1 < (int)uVar1) { *(uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar1 * 0x10) = (*(uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar1 * 0x10) & 0xfffffff4) + (param_5 & 1) * 8 + 3; } return; }
58,201
add_private_class_field
bluesky950520[P]quickjs/quickjs.c
static int add_private_class_field(JSParseState *s, JSFunctionDef *fd, JSAtom name, JSVarKindEnum var_kind, BOOL is_static) { JSContext *ctx = s->ctx; JSVarDef *vd; int idx; idx = add_scope_var(ctx, fd, name, var_kind); if (idx < 0) return idx; vd = &fd->vars[idx]; vd->is_lexical = 1; vd->is_const = 1; vd->is_static_private = is_static; return idx; }
O3
c
add_private_class_field: pushq %r14 pushq %rbx pushq %rax movl %r8d, %ebx movq %rsi, %r14 callq 0x66e9c testl %eax, %eax js 0x6bc78 movq 0x90(%r14), %rcx movl %eax, %edx shlq $0x4, %rdx movl 0xc(%rcx,%rdx), %esi andl $0x1, %ebx andl $-0xc, %esi leal (%rsi,%rbx,8), %esi addl $0x3, %esi movl %esi, 0xc(%rcx,%rdx) addq $0x8, %rsp popq %rbx popq %r14 retq
add_private_class_field: push r14 push rbx push rax mov ebx, r8d mov r14, rsi call add_scope_var test eax, eax js short loc_6BC78 mov rcx, [r14+90h] mov edx, eax shl rdx, 4 mov esi, [rcx+rdx+0Ch] and ebx, 1 and esi, 0FFFFFFF4h lea esi, [rsi+rbx*8] add esi, 3 mov [rcx+rdx+0Ch], esi loc_6BC78: add rsp, 8 pop rbx pop r14 retn
long long add_private_class_field( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // bl long long result; // rax v14 = a5; result = add_scope_var(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( (int)result >= 0 ) *(_DWORD *)(*(_QWORD *)(a2 + 144) + 16LL * (unsigned int)result + 12) = (*(_DWORD *)(*(_QWORD *)(a2 + 144) + 16LL * (unsigned int)result + 12) & 0xFFFFFFF4) + 8 * (v14 & 1) + 3; return result; }
add_private_class_field: PUSH R14 PUSH RBX PUSH RAX MOV EBX,R8D MOV R14,RSI CALL 0x00166e9c TEST EAX,EAX JS 0x0016bc78 MOV RCX,qword ptr [R14 + 0x90] MOV EDX,EAX SHL RDX,0x4 MOV ESI,dword ptr [RCX + RDX*0x1 + 0xc] AND EBX,0x1 AND ESI,0xfffffff4 LEA ESI,[RSI + RBX*0x8] ADD ESI,0x3 MOV dword ptr [RCX + RDX*0x1 + 0xc],ESI LAB_0016bc78: ADD RSP,0x8 POP RBX POP R14 RET
void add_private_class_field (int8 param_1,long param_2,int8 param_3,int8 param_4,uint param_5) { uint uVar1; uVar1 = add_scope_var(); if (-1 < (int)uVar1) { *(uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar1 * 0x10) = (*(uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar1 * 0x10) & 0xfffffff4) + (param_5 & 1) * 8 + 3; } return; }
58,202
maria_page_crc_check_index
eloqsql/storage/maria/ma_pagecrc.c
my_bool maria_page_crc_check_index(int res, PAGECACHE_IO_HOOK_ARGS *args) { uchar *page= args->page; pgcache_page_no_t page_no= args->pageno; MARIA_SHARE *share= (MARIA_SHARE *)args->data; uint length= _ma_get_page_used(share, page); if (res) return 1; if (length > share->block_size - CRC_SIZE) { DBUG_PRINT("error", ("Wrong page length: %u", length)); my_errno= HA_ERR_WRONG_CRC; return 1; } return maria_page_crc_check(page, (uint32) page_no, share, MARIA_NO_CRC_NORMAL_PAGE, length); }
O0
c
maria_page_crc_check_index: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx movzbl -0x1(%rax,%rcx), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rdx movl 0x744(%rdx), %edx movzbl -0x2(%rcx,%rdx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0x2c(%rbp) cmpl $0x0, -0x8(%rbp) je 0x5ebc5 movb $0x1, -0x1(%rbp) jmp 0x5ec0f movl -0x2c(%rbp), %eax movq -0x28(%rbp), %rcx movl 0x7bc(%rcx), %ecx subl $0x4, %ecx cmpl %ecx, %eax jbe 0x5ebee jmp 0x5ebdb jmp 0x5ebdd callq 0xf7440 movl $0xb0, (%rax) movb $0x1, -0x1(%rbp) jmp 0x5ec0f movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movl %eax, %eax movl %eax, %esi movq -0x28(%rbp), %rdx movl -0x2c(%rbp), %r8d movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x5e7e0 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
maria_page_crc_check_index: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] movzx eax, byte ptr [rax+rcx-1] movzx eax, ax mov rcx, [rbp+var_18] mov rdx, [rbp+var_28] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx-2] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_2C], eax cmp [rbp+var_8], 0 jz short loc_5EBC5 mov [rbp+var_1], 1 jmp short loc_5EC0F loc_5EBC5: mov eax, [rbp+var_2C] mov rcx, [rbp+var_28] mov ecx, [rcx+7BCh] sub ecx, 4 cmp eax, ecx jbe short loc_5EBEE jmp short $+2 loc_5EBDB: jmp short $+2 loc_5EBDD: call _my_thread_var mov dword ptr [rax], 0B0h mov [rbp+var_1], 1 jmp short loc_5EC0F loc_5EBEE: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov eax, eax mov esi, eax mov rdx, [rbp+var_28] mov r8d, [rbp+var_2C] mov ecx, 0FFFFFFFFh call maria_page_crc_check mov [rbp+var_1], al loc_5EC0F: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
bool maria_page_crc_check_index(long long a1, const char *a2) { unsigned int v3; // [rsp+4h] [rbp-2Ch] long long v4; // [rsp+8h] [rbp-28h] v4 = *((_QWORD *)a2 + 2); v3 = _byteswap_ushort(*(_WORD *)(*(_QWORD *)a2 + *(unsigned int *)(v4 + 1860) - 2LL)); if ( (_DWORD)a1 ) return 1; if ( v3 <= *(_DWORD *)(v4 + 1980) - 4 ) return maria_page_crc_check(*(_BYTE **)a2, (const char *)(unsigned int)*((_QWORD *)a2 + 1), v4, -1, v3); *(_DWORD *)my_thread_var(a1, a2) = 176; return 1; }
maria_page_crc_check_index: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI 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 + 0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x8],0x0 JZ 0x0015ebc5 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015ec0f LAB_0015ebc5: MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x7bc] SUB ECX,0x4 CMP EAX,ECX JBE 0x0015ebee JMP 0x0015ebdb LAB_0015ebdb: JMP 0x0015ebdd LAB_0015ebdd: CALL 0x001f7440 MOV dword ptr [RAX],0xb0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015ec0f LAB_0015ebee: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV EAX,EAX MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x28] MOV R8D,dword ptr [RBP + -0x2c] MOV ECX,0xffffffff CALL 0x0015e7e0 MOV byte ptr [RBP + -0x1],AL LAB_0015ec0f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 maria_page_crc_check_index(int param_1,long *param_2) { long lVar1; long lVar2; uint uVar3; int4 *puVar4; int1 local_9; lVar1 = *param_2; lVar2 = param_2[2]; uVar3 = (uint)CONCAT11(*(int1 *)(lVar1 + -2 + (ulong)*(uint *)(lVar2 + 0x744)), *(int1 *)(lVar1 + -1 + (ulong)*(uint *)(lVar2 + 0x744))); if (param_1 == 0) { if (*(int *)(lVar2 + 0x7bc) - 4U < uVar3) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0xb0; local_9 = 1; } else { local_9 = maria_page_crc_check(lVar1,param_2[1] & 0xffffffff,lVar2,0xffffffff,uVar3); } } else { local_9 = 1; } return local_9; }
58,203
my_error_unregister_all
eloqsql/mysys/my_error.c
void my_error_unregister_all(void) { struct my_err_head *cursor, *saved_next; for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) { /* We need this ptr, but we're about to free its container, so save it. */ saved_next= cursor->meh_next; my_free(cursor); } my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ my_errmsgs_list= &my_errmsgs_globerrs; }
O0
c
my_error_unregister_all: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq 0x19cc61(%rip), %rax # 0x1d5f20 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x392e8 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rdi callq 0x2eb20 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x392c3 movq $0x0, 0x19cc2d(%rip) # 0x1d5f20 leaq 0x19cc26(%rip), %rax # 0x1d5f20 movq %rax, 0x19cc17(%rip) # 0x1d5f18 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
my_error_unregister_all: push rbp mov rbp, rsp sub rsp, 10h mov rax, cs:my_errmsgs_globerrs mov [rbp+var_8], rax loc_392C3: cmp [rbp+var_8], 0 jz short loc_392E8 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rdi, [rbp+var_8] call my_free mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_392C3 loc_392E8: mov cs:my_errmsgs_globerrs, 0 lea rax, my_errmsgs_globerrs mov cs:my_errmsgs_list, rax add rsp, 10h pop rbp retn
long long *my_error_unregister_all() { long long *result; // rax _QWORD *v1; // [rsp+0h] [rbp-10h] _QWORD *i; // [rsp+8h] [rbp-8h] for ( i = (_QWORD *)my_errmsgs_globerrs; i; i = v1 ) { v1 = (_QWORD *)*i; my_free((long long)i); } my_errmsgs_globerrs = 0LL; result = &my_errmsgs_globerrs; my_errmsgs_list = &my_errmsgs_globerrs; return result; }
my_error_unregister_all: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr [0x002d5f20] MOV qword ptr [RBP + -0x8],RAX LAB_001392c3: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001392e8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012eb20 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x001392c3 LAB_001392e8: MOV qword ptr [0x002d5f20],0x0 LEA RAX,[0x2d5f20] MOV qword ptr [0x002d5f18],RAX ADD RSP,0x10 POP RBP RET
void my_error_unregister_all(void) { int8 *puVar1; int8 *local_10; local_10 = my_errmsgs_globerrs; while (local_10 != (int8 *)0x0) { puVar1 = (int8 *)*local_10; my_free(local_10); local_10 = puVar1; } my_errmsgs_globerrs = (int8 *)0x0; my_errmsgs_list = (int *)&my_errmsgs_globerrs; return; }
58,204
my_error_unregister_all
eloqsql/mysys/my_error.c
void my_error_unregister_all(void) { struct my_err_head *cursor, *saved_next; for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) { /* We need this ptr, but we're about to free its container, so save it. */ saved_next= cursor->meh_next; my_free(cursor); } my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ my_errmsgs_list= &my_errmsgs_globerrs; }
O3
c
my_error_unregister_all: movq 0x2c3497(%rip), %rdi # 0x2f3ec0 testq %rdi, %rdi je 0x30a4a pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rbx callq 0x2afe6 movq %rbx, %rdi testq %rbx, %rbx jne 0x30a34 addq $0x8, %rsp popq %rbx popq %rbp movq $0x0, 0x2c346b(%rip) # 0x2f3ec0 leaq 0x2c3464(%rip), %rax # 0x2f3ec0 movq %rax, 0x2c3455(%rip) # 0x2f3eb8 retq
my_error_unregister_all: mov rdi, cs:my_errmsgs_globerrs test rdi, rdi jz short loc_30A4A push rbp mov rbp, rsp push rbx push rax loc_30A34: mov rbx, [rdi] call my_free mov rdi, rbx test rbx, rbx jnz short loc_30A34 add rsp, 8 pop rbx pop rbp loc_30A4A: mov cs:my_errmsgs_globerrs, 0 lea rax, my_errmsgs_globerrs mov cs:my_errmsgs_list, rax retn
long long *my_error_unregister_all() { _QWORD *v0; // rdi _QWORD *v1; // rbx long long *result; // rax v0 = (_QWORD *)my_errmsgs_globerrs; if ( my_errmsgs_globerrs ) { do { v1 = (_QWORD *)*v0; my_free((long long)v0); v0 = v1; } while ( v1 ); } my_errmsgs_globerrs = 0LL; result = &my_errmsgs_globerrs; my_errmsgs_list = &my_errmsgs_globerrs; return result; }
my_error_unregister_all: MOV RDI,qword ptr [0x003f3ec0] TEST RDI,RDI JZ 0x00130a4a PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LAB_00130a34: MOV RBX,qword ptr [RDI] CALL 0x0012afe6 MOV RDI,RBX TEST RBX,RBX JNZ 0x00130a34 ADD RSP,0x8 POP RBX POP RBP LAB_00130a4a: MOV qword ptr [0x003f3ec0],0x0 LEA RAX,[0x3f3ec0] MOV qword ptr [0x003f3eb8],RAX RET
void my_error_unregister_all(void) { long *plVar1; plVar1 = my_errmsgs_globerrs; if (my_errmsgs_globerrs != (long *)0x0) { do { plVar1 = (long *)*plVar1; my_free(); } while (plVar1 != (long *)0x0); } my_errmsgs_globerrs = (long *)0x0; my_errmsgs_list = (int *)&my_errmsgs_globerrs; return; }
58,205
inherit_charset_data
eloqsql/mysys/charset.c
static void inherit_charset_data(struct charset_info_st *cs, CHARSET_INFO *refcs) { if (!cs->to_upper) cs->to_upper= refcs->to_upper; if (!cs->to_lower) cs->to_lower= refcs->to_lower; if (!cs->m_ctype) cs->m_ctype= refcs->m_ctype; if (!cs->tab_to_uni) cs->tab_to_uni= refcs->tab_to_uni; }
O3
c
inherit_charset_data: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x50(%rdi) jne 0xb2c38 movq 0x50(%rsi), %rax movq %rax, 0x50(%rdi) cmpq $0x0, 0x48(%rdi) jne 0xb2c47 movq 0x48(%rsi), %rax movq %rax, 0x48(%rdi) cmpq $0x0, 0x40(%rdi) jne 0xb2c56 movq 0x40(%rsi), %rax movq %rax, 0x40(%rdi) cmpq $0x0, 0x68(%rdi) jne 0xb2c65 movq 0x68(%rsi), %rax movq %rax, 0x68(%rdi) popq %rbp retq nop
inherit_charset_data: push rbp mov rbp, rsp cmp qword ptr [rdi+50h], 0 jnz short loc_B2C38 mov rax, [rsi+50h] mov [rdi+50h], rax loc_B2C38: cmp qword ptr [rdi+48h], 0 jnz short loc_B2C47 mov rax, [rsi+48h] mov [rdi+48h], rax loc_B2C47: cmp qword ptr [rdi+40h], 0 jnz short loc_B2C56 mov rax, [rsi+40h] mov [rdi+40h], rax loc_B2C56: cmp qword ptr [rdi+68h], 0 jnz short loc_B2C65 mov rax, [rsi+68h] mov [rdi+68h], rax loc_B2C65: pop rbp retn
long long inherit_charset_data(_QWORD *a1, _QWORD *a2) { long long result; // rax if ( !a1[10] ) { result = a2[10]; a1[10] = result; } if ( !a1[9] ) { result = a2[9]; a1[9] = result; } if ( !a1[8] ) { result = a2[8]; a1[8] = result; } if ( !a1[13] ) { result = a2[13]; a1[13] = result; } return result; }
inherit_charset_data: PUSH RBP MOV RBP,RSP CMP qword ptr [RDI + 0x50],0x0 JNZ 0x001b2c38 MOV RAX,qword ptr [RSI + 0x50] MOV qword ptr [RDI + 0x50],RAX LAB_001b2c38: CMP qword ptr [RDI + 0x48],0x0 JNZ 0x001b2c47 MOV RAX,qword ptr [RSI + 0x48] MOV qword ptr [RDI + 0x48],RAX LAB_001b2c47: CMP qword ptr [RDI + 0x40],0x0 JNZ 0x001b2c56 MOV RAX,qword ptr [RSI + 0x40] MOV qword ptr [RDI + 0x40],RAX LAB_001b2c56: CMP qword ptr [RDI + 0x68],0x0 JNZ 0x001b2c65 MOV RAX,qword ptr [RSI + 0x68] MOV qword ptr [RDI + 0x68],RAX LAB_001b2c65: POP RBP RET
void inherit_charset_data(long param_1,long param_2) { if (*(long *)(param_1 + 0x50) == 0) { *(int8 *)(param_1 + 0x50) = *(int8 *)(param_2 + 0x50); } if (*(long *)(param_1 + 0x48) == 0) { *(int8 *)(param_1 + 0x48) = *(int8 *)(param_2 + 0x48); } if (*(long *)(param_1 + 0x40) == 0) { *(int8 *)(param_1 + 0x40) = *(int8 *)(param_2 + 0x40); } if (*(long *)(param_1 + 0x68) == 0) { *(int8 *)(param_1 + 0x68) = *(int8 *)(param_2 + 0x68); } return; }
58,206
write_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
static my_bool write_dynamic_record(MARIA_HA *info, const uchar *record, ulong reclength) { int flag; ulong length; my_off_t filepos; DBUG_ENTER("write_dynamic_record"); flag=0; /* Check if we have enough room for the new record. First we do simplified check to make usual case faster. Then we do more precise check for the space left. Though it still is not absolutely precise, as we always use MARIA_MAX_DYN_BLOCK_HEADER while it can be less in the most of the cases. */ if (unlikely(info->s->base.max_data_file_length - info->state->data_file_length < reclength + MARIA_MAX_DYN_BLOCK_HEADER)) { if (info->s->base.max_data_file_length - info->state->data_file_length + info->state->empty - info->state->del * MARIA_MAX_DYN_BLOCK_HEADER < reclength + MARIA_MAX_DYN_BLOCK_HEADER) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(1); } } do { if (_ma_find_writepos(info,reclength,&filepos,&length)) goto err; if (_ma_write_part_record(info,filepos,length, (info->append_insert_at_end ? HA_OFFSET_ERROR : info->s->state.dellink), (uchar**) &record,&reclength,&flag)) goto err; } while (reclength); DBUG_RETURN(0); err: DBUG_RETURN(1); }
O3
c
write_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq %rsi, -0x50(%rbp) movq %rdx, -0x38(%rbp) movl $0x0, -0x2c(%rbp) movq (%rdi), %rax movq 0x20(%rdi), %rsi movq 0x368(%rax), %rax subq 0x28(%rsi), %rax leaq 0x14(%rdx), %rcx cmpq %rcx, %rax jb 0x3ca0a leaq -0x48(%rbp), %r15 leaq -0x50(%rbp), %r12 leaq -0x38(%rbp), %r13 movq %rbx, %rdi movq %rdx, %rsi leaq -0x40(%rbp), %rdx movq %r15, %rcx callq 0x3f5a9 movb $0x1, %r14b testl %eax, %eax jne 0x3c9f8 movq $-0x1, %rcx cmpb $0x0, 0x681(%rbx) jne 0x3c9ca movq (%rbx), %rax movq 0xc8(%rax), %rcx movq -0x40(%rbp), %rsi movq -0x48(%rbp), %rdx leaq -0x2c(%rbp), %rax movq %rax, (%rsp) movq %rbx, %rdi movq %r12, %r8 movq %r13, %r9 callq 0x3d30e testl %eax, %eax jne 0x3c9f8 movq -0x38(%rbp), %rdx testq %rdx, %rdx jne 0x3c997 xorl %r14d, %r14d movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq 0x10(%rsi), %rax movq 0x8(%rsi), %rsi shlq $0x2, %rsi leaq (%rsi,%rsi,4), %rsi subq %rsi, %rax cmpq %rcx, %rax jae 0x3c98b callq 0xa1b22 movl $0x87, (%rax) movb $0x1, %r14b jmp 0x3c9f8
write_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi mov [rbp+var_50], rsi mov [rbp+var_38], rdx mov [rbp+var_2C], 0 mov rax, [rdi] mov rsi, [rdi+20h] mov rax, [rax+368h] sub rax, [rsi+28h] lea rcx, [rdx+14h] cmp rax, rcx jb short loc_3CA0A loc_3C98B: lea r15, [rbp+var_48] lea r12, [rbp+var_50] lea r13, [rbp+var_38] loc_3C997: mov rdi, rbx mov rsi, rdx lea rdx, [rbp+var_40] mov rcx, r15 call _ma_find_writepos mov r14b, 1 test eax, eax jnz short loc_3C9F8 mov rcx, 0FFFFFFFFFFFFFFFFh cmp byte ptr [rbx+681h], 0 jnz short loc_3C9CA mov rax, [rbx] mov rcx, [rax+0C8h] loc_3C9CA: mov rsi, [rbp+var_40] mov rdx, [rbp+var_48] lea rax, [rbp+var_2C] mov [rsp+60h+var_60], rax mov rdi, rbx mov r8, r12 mov r9, r13 call _ma_write_part_record test eax, eax jnz short loc_3C9F8 mov rdx, [rbp+var_38] test rdx, rdx jnz short loc_3C997 xor r14d, r14d loc_3C9F8: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3CA0A: add rax, [rsi+10h] mov rsi, [rsi+8] shl rsi, 2 lea rsi, [rsi+rsi*4] sub rax, rsi cmp rax, rcx jnb loc_3C98B call _my_thread_var mov dword ptr [rax], 87h mov r14b, 1 jmp short loc_3C9F8
long long write_dynamic_record(_BYTE *a1, long long a2, long long a3, long long a4, long long a5) { unsigned int v5; // r14d _QWORD *v6; // rsi unsigned long long v7; // rax unsigned long long v8; // rcx long long v9; // rcx unsigned long long v11; // rax long long v12; // rsi long long v13; // [rsp+10h] [rbp-50h] BYREF long long v14; // [rsp+18h] [rbp-48h] BYREF long long v15; // [rsp+20h] [rbp-40h] BYREF long long v16; // [rsp+28h] [rbp-38h] BYREF _DWORD v17[11]; // [rsp+34h] [rbp-2Ch] BYREF v13 = a2; v16 = a3; v17[0] = 0; v6 = (_QWORD *)*((_QWORD *)a1 + 4); v7 = *(_QWORD *)(*(_QWORD *)a1 + 872LL) - v6[5]; v8 = a3 + 20; if ( v7 >= a3 + 20 || (v11 = v6[2] + v7, v12 = 20LL * v6[1], v11 - v12 >= v8) ) { while ( 1 ) { LOBYTE(v5) = 1; if ( (unsigned int)ma_find_writepos(a1, a3, &v15, &v14) ) break; LODWORD(v9) = -1; if ( !a1[1665] ) v9 = *(_QWORD *)(*(_QWORD *)a1 + 200LL); if ( (unsigned int)ma_write_part_record( (_DWORD)a1, v15, v14, v9, (unsigned int)&v13, (unsigned int)&v16, (long long)v17) ) break; a3 = v16; if ( !v16 ) return 0; } } else { *(_DWORD *)my_thread_var(a1, v12, a3, v8, a5) = 135; LOBYTE(v5) = 1; } return v5; }
write_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV qword ptr [RBP + -0x50],RSI MOV qword ptr [RBP + -0x38],RDX MOV dword ptr [RBP + -0x2c],0x0 MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x20] MOV RAX,qword ptr [RAX + 0x368] SUB RAX,qword ptr [RSI + 0x28] LEA RCX,[RDX + 0x14] CMP RAX,RCX JC 0x0013ca0a LAB_0013c98b: LEA R15,[RBP + -0x48] LEA R12,[RBP + -0x50] LEA R13,[RBP + -0x38] LAB_0013c997: MOV RDI,RBX MOV RSI,RDX LEA RDX,[RBP + -0x40] MOV RCX,R15 CALL 0x0013f5a9 MOV R14B,0x1 TEST EAX,EAX JNZ 0x0013c9f8 MOV RCX,-0x1 CMP byte ptr [RBX + 0x681],0x0 JNZ 0x0013c9ca MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0xc8] LAB_0013c9ca: MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x2c] MOV qword ptr [RSP],RAX MOV RDI,RBX MOV R8,R12 MOV R9,R13 CALL 0x0013d30e TEST EAX,EAX JNZ 0x0013c9f8 MOV RDX,qword ptr [RBP + -0x38] TEST RDX,RDX JNZ 0x0013c997 XOR R14D,R14D LAB_0013c9f8: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013ca0a: ADD RAX,qword ptr [RSI + 0x10] MOV RSI,qword ptr [RSI + 0x8] SHL RSI,0x2 LEA RSI,[RSI + RSI*0x4] SUB RAX,RSI CMP RAX,RCX JNC 0x0013c98b CALL 0x001a1b22 MOV dword ptr [RAX],0x87 MOV R14B,0x1 JMP 0x0013c9f8
ulong write_dynamic_record(long *param_1,int8 param_2,long param_3) { long lVar1; int iVar2; ulong uVar3; int4 *puVar4; int8 uVar5; ulong unaff_R14; int8 local_58; int8 local_50; int8 local_48; long local_40; int4 local_34; local_34 = 0; lVar1 = param_1[4]; uVar3 = *(long *)(*param_1 + 0x368) - *(long *)(lVar1 + 0x28); local_58 = param_2; local_40 = param_3; if ((uVar3 < param_3 + 0x14U) && (uVar3 + *(long *)(lVar1 + 0x10) + *(long *)(lVar1 + 8) * -0x14 < param_3 + 0x14U)) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x87; unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); } else { do { iVar2 = _ma_find_writepos(param_1,local_40,&local_48,&local_50); unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); if (iVar2 != 0) goto LAB_0013c9f8; uVar5 = 0xffffffffffffffff; if (*(char *)((long)param_1 + 0x681) == '\0') { uVar5 = *(int8 *)(*param_1 + 200); } iVar2 = _ma_write_part_record(param_1,local_48,local_50,uVar5,&local_58,&local_40,&local_34); if (iVar2 != 0) goto LAB_0013c9f8; } while (local_40 != 0); unaff_R14 = 0; } LAB_0013c9f8: return unaff_R14 & 0xffffffff; }
58,207
my_snprintf_8bit
eloqsql/strings/ctype-simple.c
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n __attribute__((unused)), const char* fmt, ...) { va_list args; size_t result; va_start(args,fmt); result= my_vsnprintf(to, n, fmt, args); va_end(args); return result; }
O0
c
my_snprintf_8bit: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 testb %al, %al je 0x437be movaps %xmm0, -0xd0(%rbp) movaps %xmm1, -0xc0(%rbp) movaps %xmm2, -0xb0(%rbp) movaps %xmm3, -0xa0(%rbp) movaps %xmm4, -0x90(%rbp) movaps %xmm5, -0x80(%rbp) movaps %xmm6, -0x70(%rbp) movaps %xmm7, -0x60(%rbp) movq %r9, -0xd8(%rbp) movq %r8, -0xe0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq -0x100(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x30, -0x3c(%rbp) movl $0x20, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0x76980 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax addq $0x100, %rsp # imm = 0x100 popq %rbp retq nopw %cs:(%rax,%rax)
my_snprintf_8bit: push rbp mov rbp, rsp sub rsp, 100h test al, al jz short loc_437BE movaps [rbp+var_D0], xmm0 movaps [rbp+var_C0], xmm1 movaps [rbp+var_B0], xmm2 movaps [rbp+var_A0], xmm3 movaps [rbp+var_90], xmm4 movaps [rbp+var_80], xmm5 movaps [rbp+var_70], xmm6 movaps [rbp+var_60], xmm7 loc_437BE: mov [rbp+var_D8], r9 mov [rbp+var_E0], r8 mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rax, [rbp+var_100] mov [rbp+var_30], rax lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_3C], 30h ; '0' mov [rbp+var_40], 20h ; ' ' mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call my_vsnprintf mov [rbp+var_48], rax mov rax, [rbp+var_48] add rsp, 100h pop rbp retn
long long my_snprintf_8bit( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-100h] BYREF long long v17; // [rsp+20h] [rbp-E0h] long long v18; // [rsp+28h] [rbp-D8h] __m128 v19; // [rsp+30h] [rbp-D0h] __m128 v20; // [rsp+40h] [rbp-C0h] __m128 v21; // [rsp+50h] [rbp-B0h] __m128 v22; // [rsp+60h] [rbp-A0h] __m128 v23; // [rsp+70h] [rbp-90h] __m128 v24; // [rsp+80h] [rbp-80h] __m128 v25; // [rsp+90h] [rbp-70h] __m128 v26; // [rsp+A0h] [rbp-60h] _DWORD v27[2]; // [rsp+C0h] [rbp-40h] BYREF char *v28; // [rsp+C8h] [rbp-38h] char *v29; // [rsp+D0h] [rbp-30h] long long v30; // [rsp+E0h] [rbp-20h] long long v31; // [rsp+E8h] [rbp-18h] long long v32; // [rsp+F0h] [rbp-10h] long long v33; // [rsp+F8h] [rbp-8h] v19 = a7; v20 = a8; v21 = a9; v22 = a10; v23 = a11; v24 = a12; v25 = a13; v26 = a14; v18 = a6; v17 = a5; v33 = a1; v32 = a2; v31 = a3; v30 = a4; v29 = &v16; v28 = &a15; v27[1] = 48; v27[0] = 32; return my_vsnprintf(a2, a3, a4, v27); }
my_snprintf_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x100 TEST AL,AL JZ 0x001437be MOVAPS xmmword ptr [RBP + -0xd0],XMM0 MOVAPS xmmword ptr [RBP + -0xc0],XMM1 MOVAPS xmmword ptr [RBP + -0xb0],XMM2 MOVAPS xmmword ptr [RBP + -0xa0],XMM3 MOVAPS xmmword ptr [RBP + -0x90],XMM4 MOVAPS xmmword ptr [RBP + -0x80],XMM5 MOVAPS xmmword ptr [RBP + -0x70],XMM6 MOVAPS xmmword ptr [RBP + -0x60],XMM7 LAB_001437be: MOV qword ptr [RBP + -0xd8],R9 MOV qword ptr [RBP + -0xe0],R8 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[RBP + -0x100] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x30 MOV dword ptr [RBP + -0x40],0x20 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x00176980 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x100 POP RBP RET
int8 my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int8 uVar1; int1 local_108 [32]; int8 local_e8; int8 local_e0; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int8 local_28; int8 local_20; int8 local_18; int8 local_10; if (in_AL != '\0') { local_d8 = param_1; local_c8 = param_2; local_b8 = param_3; local_a8 = param_4; local_98 = param_5; local_88 = param_6; local_78 = param_7; local_68 = param_8; } local_38 = local_108; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; local_e8 = param_13; local_e0 = param_14; local_28 = param_12; local_20 = param_11; local_18 = param_10; local_10 = param_9; uVar1 = my_vsnprintf(param_10,param_11,param_12,&local_48); return uVar1; }
58,208
read_variable_length(unsigned char const*, unsigned long, unsigned long*, unsigned long*)
eloqsql/plugin/type_mysql_json/mysql_json.cc
static inline bool read_variable_length(const uchar *data, size_t data_length, size_t *length, size_t *num) { /* It takes five bytes to represent UINT_MAX32, which is the largest supported length, so don't look any further. Use data_length as max value to prevent segfault when reading a corrupted JSON document. */ const size_t MAX_BYTES= MY_MIN(data_length, 5); size_t len= 0; for (size_t i= 0; i < MAX_BYTES; i++) { /* Get the next 7 bits of the length. */ len|= (data[i] & 0x7f) << (7 * i); if ((data[i] & 0x80) == 0) { /* The length shouldn't exceed 32 bits. */ if (len > UINT_MAX32) return true; /* This was the last byte. Return successfully. */ *num= i + 1; *length= len; return false; } } /* No more available bytes. Return true to signal error. This implies a corrupted JSON document. */ return true; }
O0
cpp
read_variable_length(unsigned char const*, unsigned long, unsigned long*, unsigned long*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0x5, -0x18(%rbp) jae 0x10cb5 movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x10cc0 movl $0x5, %eax movq %rax, -0x48(%rbp) jmp 0x10cc0 movq -0x48(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x10d5c movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx movzbl (%rax,%rcx), %eax andl $0x7f, %eax imulq $0x7, -0x40(%rbp), %rcx shll %cl, %eax cltq orq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx movzbl (%rax,%rcx), %eax andl $0x80, %eax cmpl $0x0, %eax jne 0x10d49 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, -0x38(%rbp) jbe 0x10d29 movb $0x1, -0x1(%rbp) jmp 0x10d60 movq -0x40(%rbp), %rcx addq $0x1, %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) jmp 0x10d60 jmp 0x10d4b movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x10cd8 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al popq %rbp retq nopw (%rax,%rax)
_ZL20read_variable_lengthPKhmPmS1_: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_18], 5 jnb short loc_10CB5 mov rax, [rbp+var_18] mov [rbp+var_48], rax jmp short loc_10CC0 loc_10CB5: mov eax, 5 mov [rbp+var_48], rax jmp short $+2 loc_10CC0: mov rax, [rbp+var_48] mov [rbp+var_30], rax mov [rbp+var_38], 0 mov [rbp+var_40], 0 loc_10CD8: mov rax, [rbp+var_40] cmp rax, [rbp+var_30] jnb short loc_10D5C mov rax, [rbp+var_10] mov rcx, [rbp+var_40] movzx eax, byte ptr [rax+rcx] and eax, 7Fh imul rcx, [rbp+var_40], 7 shl eax, cl cdqe or rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rcx, [rbp+var_40] movzx eax, byte ptr [rax+rcx] and eax, 80h cmp eax, 0 jnz short loc_10D49 mov eax, 0FFFFFFFFh cmp [rbp+var_38], rax jbe short loc_10D29 mov [rbp+var_1], 1 jmp short loc_10D60 loc_10D29: mov rcx, [rbp+var_40] add rcx, 1 mov rax, [rbp+var_28] mov [rax], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov [rbp+var_1], 0 jmp short loc_10D60 loc_10D49: jmp short $+2 loc_10D4B: mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax jmp loc_10CD8 loc_10D5C: mov [rbp+var_1], 1 loc_10D60: mov al, [rbp+var_1] and al, 1 pop rbp retn
char read_variable_length( const unsigned __int8 *a1, unsigned long long a2, unsigned long long *a3, unsigned long long *a4) { unsigned long long v5; // [rsp+0h] [rbp-48h] unsigned long long i; // [rsp+8h] [rbp-40h] unsigned long long v7; // [rsp+10h] [rbp-38h] if ( a2 >= 5 ) v5 = 5LL; else v5 = a2; v7 = 0LL; for ( i = 0LL; ; ++i ) { if ( i >= v5 ) return 1; v7 |= (a1[i] & 0x7F) << (7 * i); if ( (a1[i] & 0x80) == 0 ) break; } if ( v7 > 0xFFFFFFFF ) return 1; *a4 = i + 1; *a3 = v7; return 0; }
read_variable_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x18],0x5 JNC 0x00110cb5 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX JMP 0x00110cc0 LAB_00110cb5: MOV EAX,0x5 MOV qword ptr [RBP + -0x48],RAX JMP 0x00110cc0 LAB_00110cc0: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],0x0 MOV qword ptr [RBP + -0x40],0x0 LAB_00110cd8: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00110d5c MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x7f IMUL RCX,qword ptr [RBP + -0x40],0x7 SHL EAX,CL CDQE OR RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x80 CMP EAX,0x0 JNZ 0x00110d49 MOV EAX,0xffffffff CMP qword ptr [RBP + -0x38],RAX JBE 0x00110d29 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110d60 LAB_00110d29: MOV RCX,qword ptr [RBP + -0x40] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 JMP 0x00110d60 LAB_00110d49: JMP 0x00110d4b LAB_00110d4b: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX JMP 0x00110cd8 LAB_00110d5c: MOV byte ptr [RBP + -0x1],0x1 LAB_00110d60: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 POP RBP RET
/* read_variable_length(unsigned char const*, unsigned long, unsigned long*, unsigned long*) */ int1 read_variable_length(uchar *param_1,ulong param_2,ulong *param_3,ulong *param_4) { ulong local_50; ulong local_48; ulong local_40; local_50 = param_2; if (4 < param_2) { local_50 = 5; } local_40 = 0; local_48 = 0; while( true ) { if (local_50 <= local_48) { return 1; } local_40 = (long)(int)((param_1[local_48] & 0x7f) << ((char)local_48 * '\a' & 0x1fU)) | local_40 ; if ((param_1[local_48] & 0x80) == 0) break; local_48 = local_48 + 1; } if (0xffffffff < local_40) { return 1; } *param_4 = local_48 + 1; *param_3 = local_40; return 0; }
58,209
mi_update_blob_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_update_blob_record(MI_INFO *info, my_off_t pos, const uchar *record) { uchar *rec_buff; int error; ulong reclength,extra; extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+ MI_DYN_DELETE_BLOCK_HEADER); reclength= (info->s->base.pack_reclength+ _mi_calc_total_blob_length(info,record)+ extra); if (!(rec_buff=(uchar*) my_alloca(reclength))) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(-1); } reclength=_mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), record); error=update_dynamic_record(info,pos, rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), reclength); my_afree(rec_buff); return(error); }
O0
c
mi_update_blob_record: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq $0x5c, -0x40(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xa8280 movq %rax, %rcx movq -0x48(%rbp), %rax addq %rcx, %rax addq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rsi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xf3210 movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0xa839a callq 0xf5a70 movl $0x80, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xa83e0 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi addq $0x18, %rsi movq -0x20(%rbp), %rdx callq 0xa72f0 movl %eax, %eax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx addq $0x18, %rdx movq -0x38(%rbp), %rcx callq 0xa7a20 movl %eax, -0x2c(%rbp) movq -0x28(%rbp), %rdi callq 0xf3590 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax)
_mi_update_blob_record: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_40], 5Ch ; '\' mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+148h] mov [rbp+var_48], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call _mi_calc_total_blob_length mov rcx, rax mov rax, [rbp+var_48] add rax, rcx add rax, [rbp+var_40] mov [rbp+var_38], rax mov rsi, [rbp+var_38] xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_28], rax cmp rax, 0 jnz short loc_A839A call _my_thread_var mov dword ptr [rax], 80h mov [rbp+var_4], 0FFFFFFFFh jmp short loc_A83E0 loc_A839A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] add rsi, 18h mov rdx, [rbp+var_20] call _mi_rec_pack mov eax, eax mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] add rdx, 18h mov rcx, [rbp+var_38] call update_dynamic_record_0 mov [rbp+var_2C], eax mov rdi, [rbp+var_28] call my_free mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_A83E0: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mi_update_blob_record(_QWORD *a1, long long a2, _BYTE *a3) { const char *v3; // rsi long long v5; // [rsp+8h] [rbp-48h] unsigned long long v6; // [rsp+18h] [rbp-38h] unsigned int updated; // [rsp+24h] [rbp-2Ch] long long v8; // [rsp+28h] [rbp-28h] v5 = *(_QWORD *)(*a1 + 328LL); v3 = (const char *)(mi_calc_total_blob_length(a1, (long long)a3) + v5 + 92); v8 = my_malloc(0LL, v3, 0LL); if ( v8 ) { v6 = (unsigned int)mi_rec_pack(a1, (_BYTE *)(v8 + 24), a3); updated = update_dynamic_record_0(a1, a2, v8 + 24, v6); my_free(v8); return updated; } else { *(_DWORD *)my_thread_var(0LL, v3) = 128; return (unsigned int)-1; } }
_mi_update_blob_record: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x40],0x5c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001a8280 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,RCX ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX MOV RSI,qword ptr [RBP + -0x38] XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001f3210 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x001a839a CALL 0x001f5a70 MOV dword ptr [RAX],0x80 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001a83e0 LAB_001a839a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x18 MOV RDX,qword ptr [RBP + -0x20] CALL 0x001a72f0 MOV EAX,EAX MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] ADD RDX,0x18 MOV RCX,qword ptr [RBP + -0x38] CALL 0x001a7a20 MOV dword ptr [RBP + -0x2c],EAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x001f3590 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_001a83e0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _mi_update_blob_record(long *param_1,int8 param_2,int8 param_3) { int4 uVar1; long lVar2; long lVar3; int4 *puVar4; int4 local_c; lVar3 = *(long *)(*param_1 + 0x148); lVar2 = _mi_calc_total_blob_length(param_1,param_3); lVar3 = my_malloc(0,lVar3 + lVar2 + 0x5c,0); if (lVar3 == 0) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x80; local_c = 0xffffffff; } else { uVar1 = _mi_rec_pack(param_1,lVar3 + 0x18,param_3); local_c = update_dynamic_record(param_1,param_2,lVar3 + 0x18,uVar1); my_free(lVar3); } return local_c; }
58,210
mi_check_index_tuple
eloqsql/storage/myisam/mi_key.c
check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record) { int need_unpack= TRUE; check_result_t res= CHECK_POS; if (info->index_cond_func) { if (mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } /* If we got an error, out-of-range condition, or ICP condition computed to FALSE - we don't need to check the Rowid Filter. */ if (res != CHECK_POS) return res; need_unpack= FALSE; } /* Check the Rowid Filter, if present */ if (mi_check_rowid_filter_is_active(info)) { /* Unpack the index tuple if we haven't done it already */ if (need_unpack && mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else { if ((res= info->rowid_filter_func(info->rowid_filter_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } } return res; }
O0
c
mi_check_index_tuple: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl $0x1, -0x24(%rbp) movl $0x1, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x340(%rax) je 0xaf4fe movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx callq 0xaf580 cmpl $0x0, %eax je 0xaf4ad movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF jmp 0xaf4e9 movq -0x10(%rbp), %rax movq 0x340(%rax), %rax movq -0x10(%rbp), %rcx movq 0x348(%rcx), %rdi callq *%rax movl %eax, -0x28(%rbp) cmpl $0x2, %eax jne 0xaf4e7 movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) callq 0xf5a70 movl $0x89, (%rax) jmp 0xaf4e9 cmpl $0x1, -0x28(%rbp) je 0xaf4f7 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xaf574 movl $0x0, -0x24(%rbp) movq -0x10(%rbp), %rdi callq 0xaf600 cmpl $0x0, %eax je 0xaf56e cmpl $0x0, -0x24(%rbp) je 0xaf530 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx callq 0xaf580 cmpl $0x0, %eax je 0xaf530 movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF jmp 0xaf56c movq -0x10(%rbp), %rax movq 0x350(%rax), %rax movq -0x10(%rbp), %rcx movq 0x360(%rcx), %rdi callq *%rax movl %eax, -0x28(%rbp) cmpl $0x2, %eax jne 0xaf56a movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) callq 0xf5a70 movl $0x89, (%rax) jmp 0xaf56c jmp 0xaf56e movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
mi_check_index_tuple: 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_24], 1 mov [rbp+var_28], 1 mov rax, [rbp+var_10] cmp qword ptr [rax+340h], 0 jz short loc_AF4FE mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] call mi_unpack_index_tuple cmp eax, 0 jz short loc_AF4AD mov [rbp+var_28], 0FFFFFFFFh jmp short loc_AF4E9 loc_AF4AD: mov rax, [rbp+var_10] mov rax, [rax+340h] mov rcx, [rbp+var_10] mov rdi, [rcx+348h] call rax mov [rbp+var_28], eax cmp eax, 2 jnz short loc_AF4E7 mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h loc_AF4E7: jmp short $+2 loc_AF4E9: cmp [rbp+var_28], 1 jz short loc_AF4F7 mov eax, [rbp+var_28] mov [rbp+var_4], eax jmp short loc_AF574 loc_AF4F7: mov [rbp+var_24], 0 loc_AF4FE: mov rdi, [rbp+var_10] call mi_check_rowid_filter_is_active cmp eax, 0 jz short loc_AF56E cmp [rbp+var_24], 0 jz short loc_AF530 mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] call mi_unpack_index_tuple cmp eax, 0 jz short loc_AF530 mov [rbp+var_28], 0FFFFFFFFh jmp short loc_AF56C loc_AF530: mov rax, [rbp+var_10] mov rax, [rax+350h] mov rcx, [rbp+var_10] mov rdi, [rcx+360h] call rax mov [rbp+var_28], eax cmp eax, 2 jnz short loc_AF56A mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h loc_AF56A: jmp short $+2 loc_AF56C: jmp short $+2 loc_AF56E: mov eax, [rbp+var_28] mov [rbp+var_4], eax loc_AF574: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mi_check_index_tuple(long long a1, const char *a2, long long a3) { long long v3; // rdi long long v4; // rdi unsigned int v6; // [rsp+8h] [rbp-28h] int v7; // [rsp+Ch] [rbp-24h] v7 = 1; v6 = 1; if ( *(_QWORD *)(a1 + 832) ) { a2 = (const char *)(unsigned int)a2; if ( (unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3) ) { v6 = -1; } else { v3 = *(_QWORD *)(a1 + 840); v6 = (*(long long ( **)(long long))(a1 + 832))(v3); if ( v6 == 2 ) { *(_QWORD *)(a1 + 368) = -1LL; *(_DWORD *)my_thread_var(v3, (const char *)(unsigned int)a2) = 137; } } if ( v6 != 1 ) return v6; v7 = 0; } if ( (unsigned int)mi_check_rowid_filter_is_active(a1) ) { if ( v7 && (a2 = (const char *)(unsigned int)a2, (unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3)) ) { return (unsigned int)-1; } else { v4 = *(_QWORD *)(a1 + 864); v6 = (*(long long ( **)(long long))(a1 + 848))(v4); if ( v6 == 2 ) { *(_QWORD *)(a1 + 368) = -1LL; *(_DWORD *)my_thread_var(v4, a2) = 137; } } } return v6; }
mi_check_index_tuple: 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 dword ptr [RBP + -0x24],0x1 MOV dword ptr [RBP + -0x28],0x1 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x340],0x0 JZ 0x001af4fe MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001af580 CMP EAX,0x0 JZ 0x001af4ad MOV dword ptr [RBP + -0x28],0xffffffff JMP 0x001af4e9 LAB_001af4ad: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x340] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x348] CALL RAX MOV dword ptr [RBP + -0x28],EAX CMP EAX,0x2 JNZ 0x001af4e7 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 CALL 0x001f5a70 MOV dword ptr [RAX],0x89 LAB_001af4e7: JMP 0x001af4e9 LAB_001af4e9: CMP dword ptr [RBP + -0x28],0x1 JZ 0x001af4f7 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX JMP 0x001af574 LAB_001af4f7: MOV dword ptr [RBP + -0x24],0x0 LAB_001af4fe: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001af600 CMP EAX,0x0 JZ 0x001af56e CMP dword ptr [RBP + -0x24],0x0 JZ 0x001af530 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001af580 CMP EAX,0x0 JZ 0x001af530 MOV dword ptr [RBP + -0x28],0xffffffff JMP 0x001af56c LAB_001af530: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x350] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x360] CALL RAX MOV dword ptr [RBP + -0x28],EAX CMP EAX,0x2 JNZ 0x001af56a MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 CALL 0x001f5a70 MOV dword ptr [RAX],0x89 LAB_001af56a: JMP 0x001af56c LAB_001af56c: JMP 0x001af56e LAB_001af56e: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX LAB_001af574: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int mi_check_index_tuple(long param_1,int4 param_2,int8 param_3) { bool bVar1; int iVar2; int4 *puVar3; int local_30; bVar1 = true; local_30 = 1; if (*(long *)(param_1 + 0x340) != 0) { iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3); if (iVar2 == 0) { local_30 = (**(code **)(param_1 + 0x340))(*(int8 *)(param_1 + 0x348)); if (local_30 == 2) { *(int8 *)(param_1 + 0x170) = 0xffffffffffffffff; puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; } } else { local_30 = -1; } if (local_30 != 1) { return local_30; } bVar1 = false; } iVar2 = mi_check_rowid_filter_is_active(param_1); if (iVar2 != 0) { if ((bVar1) && (iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3), iVar2 != 0)) { local_30 = -1; } else { local_30 = (**(code **)(param_1 + 0x350))(*(int8 *)(param_1 + 0x360)); if (local_30 == 2) { *(int8 *)(param_1 + 0x170) = 0xffffffffffffffff; puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; } } } return local_30; }
58,211
mi_check_index_tuple
eloqsql/storage/myisam/mi_key.c
check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record) { int need_unpack= TRUE; check_result_t res= CHECK_POS; if (info->index_cond_func) { if (mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } /* If we got an error, out-of-range condition, or ICP condition computed to FALSE - we don't need to check the Rowid Filter. */ if (res != CHECK_POS) return res; need_unpack= FALSE; } /* Check the Rowid Filter, if present */ if (mi_check_rowid_filter_is_active(info)) { /* Unpack the index tuple if we haven't done it already */ if (need_unpack && mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else { if ((res= info->rowid_filter_func(info->rowid_filter_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } } return res; }
O3
c
mi_check_index_tuple: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movl %esi, %r15d movq %rdi, %rbx movq 0x340(%rdi), %r13 testq %r13, %r13 je 0x7b73b movq %rbx, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x7b7be movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax jne 0x7b7ac movq 0x348(%rbx), %rdi callq *0x340(%rbx) cmpl $0x2, %eax je 0x7b771 movl %eax, %r12d cmpl $0x1, %eax jne 0x7b7ac movq 0x358(%rbx), %rax movl $0x1, %r12d testq %rax, %rax je 0x7b7ac movq 0x360(%rbx), %rdi callq *%rax testl %eax, %eax je 0x7b7ac testq %r13, %r13 je 0x7b794 movq 0x360(%rbx), %rdi callq *0x350(%rbx) cmpl $0x2, %eax jne 0x7b78f movq $-0x1, 0x170(%rbx) callq 0xa1672 movl $0x89, (%rax) movl $0x2, %r12d jmp 0x7b7ac movl %eax, %r12d jmp 0x7b7ac movq %rbx, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x7b7be movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax je 0x7b75f movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mi_check_index_tuple: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r15d, esi mov rbx, rdi mov r13, [rdi+340h] test r13, r13 jz short loc_7B73B mov rdi, rbx mov esi, r15d mov rdx, r14 call mi_unpack_index_tuple mov r12d, 0FFFFFFFFh test eax, eax jnz loc_7B7AC mov rdi, [rbx+348h] call qword ptr [rbx+340h] cmp eax, 2 jz short loc_7B771 mov r12d, eax cmp eax, 1 jnz short loc_7B7AC loc_7B73B: mov rax, [rbx+358h] mov r12d, 1 test rax, rax jz short loc_7B7AC mov rdi, [rbx+360h] call rax test eax, eax jz short loc_7B7AC test r13, r13 jz short loc_7B794 loc_7B75F: mov rdi, [rbx+360h] call qword ptr [rbx+350h] cmp eax, 2 jnz short loc_7B78F loc_7B771: mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h mov r12d, 2 jmp short loc_7B7AC loc_7B78F: mov r12d, eax jmp short loc_7B7AC loc_7B794: mov rdi, rbx mov esi, r15d mov rdx, r14 call mi_unpack_index_tuple mov r12d, 0FFFFFFFFh test eax, eax jz short loc_7B75F loc_7B7AC: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_check_index_tuple(long long a1, const char *a2, long long a3) { long long v5; // r13 unsigned int v6; // r12d long long v7; // rdi unsigned int v8; // eax unsigned int ( *v9)(_QWORD); // rax unsigned int v10; // eax v5 = *(_QWORD *)(a1 + 832); if ( v5 ) { a2 = (const char *)(unsigned int)a2; v6 = -1; if ( (unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3) ) return v6; v7 = *(_QWORD *)(a1 + 840); v8 = (*(long long ( **)(long long))(a1 + 832))(v7); if ( v8 == 2 ) { LABEL_9: *(_QWORD *)(a1 + 368) = -1LL; *(_DWORD *)my_thread_var(v7, a2) = 137; return 2; } v6 = v8; if ( v8 != 1 ) return v6; } v9 = *(unsigned int ( **)(_QWORD))(a1 + 856); v6 = 1; if ( v9 ) { if ( v9(*(_QWORD *)(a1 + 864)) ) { if ( v5 || (a2 = (const char *)(unsigned int)a2, v6 = -1, !(unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3)) ) { v7 = *(_QWORD *)(a1 + 864); v10 = (*(long long ( **)(long long))(a1 + 848))(v7); if ( v10 != 2 ) return v10; goto LABEL_9; } } } return v6; }
mi_check_index_tuple: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15D,ESI MOV RBX,RDI MOV R13,qword ptr [RDI + 0x340] TEST R13,R13 JZ 0x0017b73b MOV RDI,RBX MOV ESI,R15D MOV RDX,R14 CALL 0x0017b7be MOV R12D,0xffffffff TEST EAX,EAX JNZ 0x0017b7ac MOV RDI,qword ptr [RBX + 0x348] CALL qword ptr [RBX + 0x340] CMP EAX,0x2 JZ 0x0017b771 MOV R12D,EAX CMP EAX,0x1 JNZ 0x0017b7ac LAB_0017b73b: MOV RAX,qword ptr [RBX + 0x358] MOV R12D,0x1 TEST RAX,RAX JZ 0x0017b7ac MOV RDI,qword ptr [RBX + 0x360] CALL RAX TEST EAX,EAX JZ 0x0017b7ac TEST R13,R13 JZ 0x0017b794 LAB_0017b75f: MOV RDI,qword ptr [RBX + 0x360] CALL qword ptr [RBX + 0x350] CMP EAX,0x2 JNZ 0x0017b78f LAB_0017b771: MOV qword ptr [RBX + 0x170],-0x1 CALL 0x001a1672 MOV dword ptr [RAX],0x89 MOV R12D,0x2 JMP 0x0017b7ac LAB_0017b78f: MOV R12D,EAX JMP 0x0017b7ac LAB_0017b794: MOV RDI,RBX MOV ESI,R15D MOV RDX,R14 CALL 0x0017b7be MOV R12D,0xffffffff TEST EAX,EAX JZ 0x0017b75f LAB_0017b7ac: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int mi_check_index_tuple(long param_1,int4 param_2,int8 param_3) { long lVar1; int iVar2; int4 *puVar3; lVar1 = *(long *)(param_1 + 0x340); if (lVar1 != 0) { iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3); if (iVar2 != 0) { return -1; } iVar2 = (**(code **)(param_1 + 0x340))(*(int8 *)(param_1 + 0x348)); if (iVar2 == 2) goto LAB_0017b771; if (iVar2 != 1) { return iVar2; } } if (*(code **)(param_1 + 0x358) == (code *)0x0) { return 1; } iVar2 = (**(code **)(param_1 + 0x358))(*(int8 *)(param_1 + 0x360)); if (iVar2 == 0) { return 1; } if ((lVar1 == 0) && (iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3), iVar2 != 0)) { return -1; } iVar2 = (**(code **)(param_1 + 0x350))(*(int8 *)(param_1 + 0x360)); if (iVar2 != 2) { return iVar2; } LAB_0017b771: *(int8 *)(param_1 + 0x170) = 0xffffffffffffffff; puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; return 2; }
58,212
my_thread_destory_thr_mutex
eloqsql/mysys/my_thr_init.c
static void my_thread_destory_thr_mutex(struct st_my_thread_var *var) { mysql_mutex_destroy(&var->mutex); mysql_cond_destroy(&var->suspend); }
O3
c
my_thread_destory_thr_mutex: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x40(%rdi), %r14 movq 0x80(%rdi), %rdi testq %rdi, %rdi je 0x5e507 leaq 0x30e262(%rip), %rax # 0x36c758 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x80(%rbx) movq %r14, %rdi callq 0x2a360 movq 0x38(%rbx), %rdi testq %rdi, %rdi jne 0x5e528 addq $0x8, %rbx movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x2a5b0 leaq 0x30e229(%rip), %rax # 0x36c758 movq (%rax), %rax callq *0x68(%rax) movq $0x0, 0x38(%rbx) jmp 0x5e518
my_thread_destory_thr_mutex: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi lea r14, [rdi+40h] mov rdi, [rdi+80h] test rdi, rdi jz short loc_5E507 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+80h], 0 loc_5E507: mov rdi, r14 call _pthread_mutex_destroy mov rdi, [rbx+38h] test rdi, rdi jnz short loc_5E528 loc_5E518: add rbx, 8 mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_cond_destroy loc_5E528: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+68h] mov qword ptr [rbx+38h], 0 jmp short loc_5E518
long long my_thread_destory_thr_mutex(long long a1) { if ( *(_QWORD *)(a1 + 128) ) { (*((void (**)(void))PSI_server + 9))(); *(_QWORD *)(a1 + 128) = 0LL; } pthread_mutex_destroy(a1 + 64); if ( *(_QWORD *)(a1 + 56) ) { (*((void (**)(void))PSI_server + 13))(); *(_QWORD *)(a1 + 56) = 0LL; } return pthread_cond_destroy(a1 + 8); }
my_thread_destory_thr_mutex: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI LEA R14,[RDI + 0x40] MOV RDI,qword ptr [RDI + 0x80] TEST RDI,RDI JZ 0x0015e507 LEA RAX,[0x46c758] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x80],0x0 LAB_0015e507: MOV RDI,R14 CALL 0x0012a360 MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JNZ 0x0015e528 LAB_0015e518: ADD RBX,0x8 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x0012a5b0 LAB_0015e528: LEA RAX,[0x46c758] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0x38],0x0 JMP 0x0015e518
void my_thread_destory_thr_mutex(long param_1) { if (*(long *)(param_1 + 0x80) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(param_1 + 0x80) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x40)); if (*(long *)(param_1 + 0x38) != 0) { (**(code **)(PSI_server + 0x68))(); *(int8 *)(param_1 + 0x38) = 0; } pthread_cond_destroy((pthread_cond_t *)(param_1 + 8)); return; }
58,213
JS_WriteObjectAtoms
bluesky950520[P]quickjs/quickjs.c
static int JS_WriteObjectAtoms(BCWriterState *s) { JSRuntime *rt = s->ctx->rt; DynBuf dbuf1; int i, atoms_size; dbuf1 = s->dbuf; js_dbuf_init(s->ctx, &s->dbuf); bc_put_u8(s, BC_VERSION); bc_put_leb128(s, s->idx_to_atom_count); for(i = 0; i < s->idx_to_atom_count; i++) { JSAtom atom = s->idx_to_atom[i]; if (__JS_AtomIsConst(atom)) { bc_put_u8(s, 0 /* the type */); /* TODO(saghul): encoding for tagged integers and keyword-ish atoms could be more efficient. */ bc_put_u32(s, atom); } else { JSAtomStruct *p = rt->atom_array[atom]; uint8_t type = p->atom_type; assert(type != JS_ATOM_TYPE_PRIVATE); bc_put_u8(s, type); JS_WriteString(s, p); } } /* XXX: should check for OOM in above phase */ /* move the atoms at the start */ /* XXX: could just append dbuf1 data, but it uses more memory if dbuf1 is larger than dbuf */ atoms_size = s->dbuf.size; if (dbuf_realloc(&dbuf1, dbuf1.size + atoms_size)) goto fail; memmove(dbuf1.buf + atoms_size, dbuf1.buf, dbuf1.size); memcpy(dbuf1.buf, s->dbuf.buf, atoms_size); dbuf1.size += atoms_size; dbuf_free(&s->dbuf); s->dbuf = dbuf1; return 0; fail: dbuf_free(&dbuf1); return -1; }
O0
c
JS_WriteObjectAtoms: subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq 0x58(%rsp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rsi addq $0x8, %rsi leaq 0x20(%rsp), %rdi movl $0x30, %edx callq 0xe610 movq 0x58(%rsp), %rax movq (%rax), %rdi movq 0x58(%rsp), %rsi addq $0x8, %rsi callq 0x51520 movq 0x58(%rsp), %rdi movl $0x13, %esi callq 0x7de90 movq 0x58(%rsp), %rdi movq 0x58(%rsp), %rax movl 0x58(%rax), %esi callq 0x7ea20 movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax movq 0x58(%rsp), %rcx cmpl 0x58(%rcx), %eax jge 0x51d29 movq 0x58(%rsp), %rax movq 0x50(%rax), %rax movslq 0x1c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %edi callq 0x2e2f0 cmpl $0x0, %eax je 0x51cd2 movq 0x58(%rsp), %rdi xorl %esi, %esi callq 0x7de90 movq 0x58(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x803e0 jmp 0x51d17 movq 0x50(%rsp), %rax movq 0x68(%rax), %rax movl 0x14(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x4(%rax), %rax shrq $0x3e, %rax movb %al, 0x7(%rsp) movq 0x58(%rsp), %rdi movzbl 0x7(%rsp), %esi callq 0x7de90 movq 0x58(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x7df40 jmp 0x51d19 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x51c81 movq 0x58(%rsp), %rax movq 0x10(%rax), %rax movl %eax, 0x18(%rsp) movq 0x28(%rsp), %rsi movslq 0x18(%rsp), %rax addq %rax, %rsi leaq 0x20(%rsp), %rdi callq 0x246e0 cmpl $0x0, %eax je 0x51d54 jmp 0x51dc7 movq 0x20(%rsp), %rdi movslq 0x18(%rsp), %rax addq %rax, %rdi movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0xe770 movq 0x20(%rsp), %rdi movq 0x58(%rsp), %rax movq 0x8(%rax), %rsi movslq 0x18(%rsp), %rdx callq 0xe610 movslq 0x18(%rsp), %rax addq 0x28(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x58(%rsp), %rdi addq $0x8, %rdi callq 0x24c20 movq 0x58(%rsp), %rdi addq $0x8, %rdi leaq 0x20(%rsp), %rsi movl $0x30, %edx callq 0xe610 movl $0x0, 0x64(%rsp) jmp 0x51dd9 leaq 0x20(%rsp), %rdi callq 0x24c20 movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
JS_WriteObjectAtoms: sub rsp, 68h mov [rsp+68h+var_10], rdi mov rax, [rsp+68h+var_10] mov rax, [rax] mov rax, [rax+18h] mov [rsp+68h+var_18], rax mov rsi, [rsp+68h+var_10] add rsi, 8 lea rdi, [rsp+68h+var_48] mov edx, 30h ; '0' call _memcpy mov rax, [rsp+68h+var_10] mov rdi, [rax] mov rsi, [rsp+68h+var_10] add rsi, 8 call js_dbuf_init mov rdi, [rsp+68h+var_10] mov esi, 13h call bc_put_u8 mov rdi, [rsp+68h+var_10] mov rax, [rsp+68h+var_10] mov esi, [rax+58h] call bc_put_leb128 mov [rsp+68h+var_4C], 0 loc_51C81: mov eax, [rsp+68h+var_4C] mov rcx, [rsp+68h+var_10] cmp eax, [rcx+58h] jge loc_51D29 mov rax, [rsp+68h+var_10] mov rax, [rax+50h] movsxd rcx, [rsp+68h+var_4C] mov eax, [rax+rcx*4] mov [rsp+68h+var_54], eax mov edi, [rsp+68h+var_54] call __JS_AtomIsConst cmp eax, 0 jz short loc_51CD2 mov rdi, [rsp+68h+var_10] xor esi, esi call bc_put_u8 mov rdi, [rsp+68h+var_10] mov esi, [rsp+68h+var_54] call bc_put_u32 jmp short loc_51D17 loc_51CD2: mov rax, [rsp+68h+var_18] mov rax, [rax+68h] mov ecx, [rsp+68h+var_54] mov rax, [rax+rcx*8] mov [rsp+68h+var_60], rax mov rax, [rsp+68h+var_60] mov rax, [rax+4] shr rax, 3Eh mov [rsp+68h+var_61], al mov rdi, [rsp+68h+var_10] movzx esi, [rsp+68h+var_61] call bc_put_u8 mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_60] call JS_WriteString loc_51D17: jmp short $+2 loc_51D19: mov eax, [rsp+68h+var_4C] add eax, 1 mov [rsp+68h+var_4C], eax jmp loc_51C81 loc_51D29: mov rax, [rsp+68h+var_10] mov rax, [rax+10h] mov [rsp+68h+var_50], eax mov rsi, [rsp+68h+var_40] movsxd rax, [rsp+68h+var_50] add rsi, rax lea rdi, [rsp+68h+var_48] call dbuf_realloc cmp eax, 0 jz short loc_51D54 jmp short loc_51DC7 loc_51D54: mov rdi, [rsp+68h+var_48] movsxd rax, [rsp+68h+var_50] add rdi, rax mov rsi, [rsp+68h+var_48] mov rdx, [rsp+68h+var_40] call _memmove mov rdi, [rsp+68h+var_48] mov rax, [rsp+68h+var_10] mov rsi, [rax+8] movsxd rdx, [rsp+68h+var_50] call _memcpy movsxd rax, [rsp+68h+var_50] add rax, [rsp+68h+var_40] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_10] add rdi, 8 call dbuf_free mov rdi, [rsp+68h+var_10] add rdi, 8 lea rsi, [rsp+68h+var_48] mov edx, 30h ; '0' call _memcpy mov [rsp+68h+var_4], 0 jmp short loc_51DD9 loc_51DC7: lea rdi, [rsp+68h+var_48] call dbuf_free mov [rsp+68h+var_4], 0FFFFFFFFh loc_51DD9: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long JS_WriteObjectAtoms(long long a1) { long long v2; // [rsp+8h] [rbp-60h] unsigned int v3; // [rsp+14h] [rbp-54h] int v4; // [rsp+18h] [rbp-50h] int i; // [rsp+1Ch] [rbp-4Ch] long long v6; // [rsp+20h] [rbp-48h] BYREF long long v7; // [rsp+28h] [rbp-40h] long long v8; // [rsp+50h] [rbp-18h] long long v9; // [rsp+58h] [rbp-10h] v9 = a1; v8 = *(_QWORD *)(*(_QWORD *)a1 + 24LL); memcpy(&v6, a1 + 8, 48LL); js_dbuf_init(*(_QWORD *)v9, v9 + 8); bc_put_u8(v9, 19LL); bc_put_leb128(v9, *(unsigned int *)(v9 + 88)); for ( i = 0; i < *(_DWORD *)(v9 + 88); ++i ) { v3 = *(_DWORD *)(*(_QWORD *)(v9 + 80) + 4LL * i); if ( _JS_AtomIsConst(v3) ) { bc_put_u8(v9, 0LL); bc_put_u32(v9, v3); } else { v2 = *(_QWORD *)(*(_QWORD *)(v8 + 104) + 8LL * v3); bc_put_u8(v9, *(_QWORD *)(v2 + 4) >> 62); JS_WriteString(v9, v2); } } v4 = *(_QWORD *)(v9 + 16); if ( (unsigned int)dbuf_realloc((long long)&v6, v4 + v7) ) { dbuf_free((long long)&v6); return (unsigned int)-1; } else { memmove(v4 + v6, v6, v7); memcpy(v6, *(_QWORD *)(v9 + 8), v4); v7 += v4; dbuf_free(v9 + 8); memcpy(v9 + 8, &v6, 48LL); return 0; } }
JS_WriteObjectAtoms: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x50],RAX MOV RSI,qword ptr [RSP + 0x58] ADD RSI,0x8 LEA RDI,[RSP + 0x20] MOV EDX,0x30 CALL 0x0010e610 MOV RAX,qword ptr [RSP + 0x58] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x58] ADD RSI,0x8 CALL 0x00151520 MOV RDI,qword ptr [RSP + 0x58] MOV ESI,0x13 CALL 0x0017de90 MOV RDI,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x58] MOV ESI,dword ptr [RAX + 0x58] CALL 0x0017ea20 MOV dword ptr [RSP + 0x1c],0x0 LAB_00151c81: MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x58] CMP EAX,dword ptr [RCX + 0x58] JGE 0x00151d29 MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x50] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x14],EAX MOV EDI,dword ptr [RSP + 0x14] CALL 0x0012e2f0 CMP EAX,0x0 JZ 0x00151cd2 MOV RDI,qword ptr [RSP + 0x58] XOR ESI,ESI CALL 0x0017de90 MOV RDI,qword ptr [RSP + 0x58] MOV ESI,dword ptr [RSP + 0x14] CALL 0x001803e0 JMP 0x00151d17 LAB_00151cd2: MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + 0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x3e MOV byte ptr [RSP + 0x7],AL MOV RDI,qword ptr [RSP + 0x58] MOVZX ESI,byte ptr [RSP + 0x7] CALL 0x0017de90 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0017df40 LAB_00151d17: JMP 0x00151d19 LAB_00151d19: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00151c81 LAB_00151d29: MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x10] MOV dword ptr [RSP + 0x18],EAX MOV RSI,qword ptr [RSP + 0x28] MOVSXD RAX,dword ptr [RSP + 0x18] ADD RSI,RAX LEA RDI,[RSP + 0x20] CALL 0x001246e0 CMP EAX,0x0 JZ 0x00151d54 JMP 0x00151dc7 LAB_00151d54: MOV RDI,qword ptr [RSP + 0x20] MOVSXD RAX,dword ptr [RSP + 0x18] ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] CALL 0x0010e770 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RAX + 0x8] MOVSXD RDX,dword ptr [RSP + 0x18] CALL 0x0010e610 MOVSXD RAX,dword ptr [RSP + 0x18] ADD RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x8 CALL 0x00124c20 MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x8 LEA RSI,[RSP + 0x20] MOV EDX,0x30 CALL 0x0010e610 MOV dword ptr [RSP + 0x64],0x0 JMP 0x00151dd9 LAB_00151dc7: LEA RDI,[RSP + 0x20] CALL 0x00124c20 MOV dword ptr [RSP + 0x64],0xffffffff LAB_00151dd9: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
int4 JS_WriteObjectAtoms(long *param_1) { uint uVar1; long lVar2; int iVar3; int iVar4; int local_4c; void *local_48; size_t local_40; long local_18; long *local_10; int4 local_4; local_18 = *(long *)(*param_1 + 0x18); local_10 = param_1; memcpy(&local_48,param_1 + 1,0x30); js_dbuf_init(*local_10,local_10 + 1); bc_put_u8(local_10,0x13); bc_put_leb128(local_10,(int)local_10[0xb]); for (local_4c = 0; local_4c < (int)local_10[0xb]; local_4c = local_4c + 1) { uVar1 = *(uint *)(local_10[10] + (long)local_4c * 4); iVar3 = __JS_AtomIsConst(uVar1); if (iVar3 == 0) { lVar2 = *(long *)(*(long *)(local_18 + 0x68) + (ulong)uVar1 * 8); bc_put_u8(local_10,(byte)((ulong)*(int8 *)(lVar2 + 4) >> 0x3e)); JS_WriteString(local_10,lVar2); } else { bc_put_u8(local_10,0); bc_put_u32(local_10); } } iVar3 = (int)local_10[2]; iVar4 = dbuf_realloc(&local_48,local_40 + (long)iVar3); if (iVar4 == 0) { memmove((void *)((long)local_48 + (long)iVar3),local_48,local_40); memcpy(local_48,(void *)local_10[1],(long)iVar3); local_40 = (long)iVar3 + local_40; dbuf_free(local_10 + 1); memcpy(local_10 + 1,&local_48,0x30); local_4 = 0; } else { dbuf_free(&local_48); local_4 = 0xffffffff; } return local_4; }
58,214
mujoco::GlobalTable<mjpPlugin_>::GetAtSlotUnsafe(int, int)
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_global_table.h
const T* GetAtSlotUnsafe(int slot, int nslot) { if (slot < 0 || slot >= nslot) { return nullptr; } TableBlock<T>* block = &first_block_; // iterate over blocks in the global table until the local index is less than the block size int local_idx = slot; while (local_idx >= TableBlock<T>::kBlockSize) { local_idx -= TableBlock<T>::kBlockSize; block = block->next; if (!block) { return nullptr; } } // local_idx is now a valid index into the current block T* obj = &(block->objects[local_idx]); // check if obj has been initialized if (obj && ObjectKey(*obj).empty()) { return nullptr; } return obj; }
O0
c
mujoco::GlobalTable<mjpPlugin_>::GetAtSlotUnsafe(int, int): subq $0x58, %rsp movq %rdi, 0x48(%rsp) movl %esi, 0x44(%rsp) movl %edx, 0x40(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x10(%rsp) cmpl $0x0, 0x44(%rsp) jl 0xe7a1c movl 0x44(%rsp), %eax cmpl 0x40(%rsp), %eax jl 0xe7a2a movq $0x0, 0x50(%rsp) jmp 0xe7adc movq 0x10(%rsp), %rax movq %rax, 0x38(%rsp) movl 0x44(%rsp), %eax movl %eax, 0x34(%rsp) cmpl $0xf, 0x34(%rsp) jl 0xe7a74 movl 0x34(%rsp), %eax subl $0xf, %eax movl %eax, 0x34(%rsp) movq 0x38(%rsp), %rax movq 0x960(%rax), %rax movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0xe7a72 movq $0x0, 0x50(%rsp) jmp 0xe7adc jmp 0xe7a3c movq 0x38(%rsp), %rax movslq 0x34(%rsp), %rcx imulq $0xa0, %rcx, %rcx addq %rcx, %rax movq %rax, 0x28(%rsp) xorl %eax, %eax cmpq $0x0, 0x28(%rsp) movb %al, 0xf(%rsp) je 0xe7abd movq 0x28(%rsp), %rdi callq 0xe6930 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) leaq 0x18(%rsp), %rdi callq 0xea240 movb %al, 0xf(%rsp) movb 0xf(%rsp), %al testb $0x1, %al jne 0xe7ac7 jmp 0xe7ad2 movq $0x0, 0x50(%rsp) jmp 0xe7adc movq 0x28(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_ZN6mujoco11GlobalTableI10mjpPlugin_E15GetAtSlotUnsafeEii: sub rsp, 58h mov [rsp+58h+var_10], rdi mov [rsp+58h+var_14], esi mov [rsp+58h+var_18], edx mov rax, [rsp+58h+var_10] mov [rsp+58h+var_48], rax cmp [rsp+58h+var_14], 0 jl short loc_E7A1C mov eax, [rsp+58h+var_14] cmp eax, [rsp+58h+var_18] jl short loc_E7A2A loc_E7A1C: mov [rsp+58h+var_8], 0 jmp loc_E7ADC loc_E7A2A: mov rax, [rsp+58h+var_48] mov [rsp+58h+var_20], rax mov eax, [rsp+58h+var_14] mov [rsp+58h+var_24], eax loc_E7A3C: cmp [rsp+58h+var_24], 0Fh jl short loc_E7A74 mov eax, [rsp+58h+var_24] sub eax, 0Fh mov [rsp+58h+var_24], eax mov rax, [rsp+58h+var_20] mov rax, [rax+960h] mov [rsp+58h+var_20], rax cmp [rsp+58h+var_20], 0 jnz short loc_E7A72 mov [rsp+58h+var_8], 0 jmp short loc_E7ADC loc_E7A72: jmp short loc_E7A3C loc_E7A74: mov rax, [rsp+58h+var_20] movsxd rcx, [rsp+58h+var_24] imul rcx, 0A0h add rax, rcx mov [rsp+58h+var_30], rax xor eax, eax cmp [rsp+58h+var_30], 0 mov [rsp+58h+var_49], al jz short loc_E7ABD mov rdi, [rsp+58h+var_30] call _ZN6mujoco11GlobalTableI10mjpPlugin_E9ObjectKeyERKS1_; mujoco::GlobalTable<mjpPlugin_>::ObjectKey(mjpPlugin_ const&) mov [rsp+58h+var_40], rax mov [rsp+58h+var_38], rdx lea rdi, [rsp+58h+var_40] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void) mov [rsp+58h+var_49], al loc_E7ABD: mov al, [rsp+58h+var_49] test al, 1 jnz short loc_E7AC7 jmp short loc_E7AD2 loc_E7AC7: mov [rsp+58h+var_8], 0 jmp short loc_E7ADC loc_E7AD2: mov rax, [rsp+58h+var_30] mov [rsp+58h+var_8], rax loc_E7ADC: mov rax, [rsp+58h+var_8] add rsp, 58h retn
_anonymous_namespace_ ** mujoco::GlobalTable<mjpPlugin_>::GetAtSlotUnsafe(long long a1, const char *a2, int a3) { long long v3; // rdx char v5; // [rsp+Fh] [rbp-49h] _QWORD v6[2]; // [rsp+18h] [rbp-40h] BYREF _anonymous_namespace_ **v7; // [rsp+28h] [rbp-30h] int v8; // [rsp+34h] [rbp-24h] long long v9; // [rsp+38h] [rbp-20h] int v10; // [rsp+40h] [rbp-18h] int v11; // [rsp+44h] [rbp-14h] long long v12; // [rsp+48h] [rbp-10h] v12 = a1; v11 = (int)a2; v10 = a3; if ( (int)a2 < 0 || v11 >= v10 ) return 0LL; v9 = a1; v8 = v11; while ( v8 >= 15 ) { v8 -= 15; v9 = *(_QWORD *)(v9 + 2400); if ( !v9 ) return 0LL; } v7 = (_anonymous_namespace_ **)(160LL * v8 + v9); v5 = 0; if ( v7 ) { v6[0] = mujoco::GlobalTable<mjpPlugin_>::ObjectKey(v7, a2); v6[1] = v3; v5 = std::string_view::empty(v6); } if ( (v5 & 1) != 0 ) return 0LL; else return v7; }
GetAtSlotUnsafe: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDI MOV dword ptr [RSP + 0x44],ESI MOV dword ptr [RSP + 0x40],EDX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x10],RAX CMP dword ptr [RSP + 0x44],0x0 JL 0x001e7a1c MOV EAX,dword ptr [RSP + 0x44] CMP EAX,dword ptr [RSP + 0x40] JL 0x001e7a2a LAB_001e7a1c: MOV qword ptr [RSP + 0x50],0x0 JMP 0x001e7adc LAB_001e7a2a: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x38],RAX MOV EAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + 0x34],EAX LAB_001e7a3c: CMP dword ptr [RSP + 0x34],0xf JL 0x001e7a74 MOV EAX,dword ptr [RSP + 0x34] SUB EAX,0xf MOV dword ptr [RSP + 0x34],EAX MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x960] MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x001e7a72 MOV qword ptr [RSP + 0x50],0x0 JMP 0x001e7adc LAB_001e7a72: JMP 0x001e7a3c LAB_001e7a74: MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x34] IMUL RCX,RCX,0xa0 ADD RAX,RCX MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX CMP qword ptr [RSP + 0x28],0x0 MOV byte ptr [RSP + 0xf],AL JZ 0x001e7abd MOV RDI,qword ptr [RSP + 0x28] CALL 0x001e6930 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX LEA RDI,[RSP + 0x18] CALL 0x001ea240 MOV byte ptr [RSP + 0xf],AL LAB_001e7abd: MOV AL,byte ptr [RSP + 0xf] TEST AL,0x1 JNZ 0x001e7ac7 JMP 0x001e7ad2 LAB_001e7ac7: MOV qword ptr [RSP + 0x50],0x0 JMP 0x001e7adc LAB_001e7ad2: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x50],RAX LAB_001e7adc: MOV RAX,qword ptr [RSP + 0x50] ADD RSP,0x58 RET
/* mujoco::GlobalTable<mjpPlugin_>::GetAtSlotUnsafe(int, int) */ mjpPlugin_ * __thiscall mujoco::GlobalTable<mjpPlugin_>::GetAtSlotUnsafe (GlobalTable<mjpPlugin_> *this,int param_1,int param_2) { int4 extraout_EDX; int4 extraout_var; byte local_49; int8 local_40; int8 local_38; mjpPlugin_ *local_30; int local_24; GlobalTable<mjpPlugin_> *local_20; int local_18; int local_14; GlobalTable<mjpPlugin_> *local_10; if ((-1 < param_1) && (local_24 = param_1, local_20 = this, param_1 < param_2)) { do { if (local_24 < 0xf) { local_30 = (mjpPlugin_ *)(local_20 + (long)local_24 * 0xa0); local_49 = 0; if (local_30 != (mjpPlugin_ *)0x0) { local_18 = param_2; local_14 = param_1; local_10 = this; local_40 = ObjectKey(local_30); local_38 = CONCAT44(extraout_var,extraout_EDX); local_49 = std::basic_string_view<char,std::char_traits<char>>::empty ((basic_string_view<char,std::char_traits<char>> *)&local_40); } if ((local_49 & 1) != 0) { return (mjpPlugin_ *)0x0; } return local_30; } local_24 = local_24 + -0xf; local_20 = *(GlobalTable<mjpPlugin_> **)(local_20 + 0x960); } while (local_20 != (GlobalTable<mjpPlugin_> *)0x0); } return (mjpPlugin_ *)0x0; }
58,215
test_connect
eloqsql/libmariadb/unittest/libmariadb/my_test.h
MYSQL *test_connect(struct my_tests_st *test) { MYSQL *mysql; int i= 0, rc; int timeout= 10; my_bool truncation_report= 1; if (!(mysql = mysql_init(NULL))) { BAIL_OUT("Not enough memory available - mysql_init failed"); } mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, &truncation_report); mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, &timeout); if (plugindir) mysql_options(mysql, MYSQL_PLUGIN_DIR, plugindir); /* option handling */ if (test && test->options) { while (test->options[i].option) { if (mysql_options(mysql, test->options[i].option, test->options[i].value)) { diag("Couldn't set option %d. Error (%d) %s", test->options[i].option, mysql_errno(mysql), mysql_error(mysql)); mysql_close(mysql); return(NULL); } i++; } } if (!(my_test_connect(mysql, hostname, username, password, schema, port, socketname, (test) ? test->connect_flags:0))) { diag("Couldn't establish connection to server %s. Error (%d): %s", hostname, mysql_errno(mysql), mysql_error(mysql)); mysql_close(mysql); return(NULL); } /* Clear sql_mode when establishing a new connection. */ rc= mysql_query(mysql, "SET sql_mode=''"); if (rc) { diag("Error (%d): %s (%d) in %s line %d", rc, mysql_error(mysql), mysql_errno(mysql), __FILE__, __LINE__); return(NULL); } return(mysql); }
O3
c
test_connect: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movl $0xa, -0x20(%rbp) movb $0x1, -0x19(%rbp) xorl %edi, %edi callq 0x18b71 testq %rax, %rax je 0x141cf movq %rax, %rbx leaq -0x19(%rbp), %rdx movq %rax, %rdi movl $0x13, %esi callq 0x1cddd leaq -0x20(%rbp), %rdx movq %rbx, %rdi xorl %esi, %esi callq 0x1cddd movq 0x37ec1(%rip), %rdx # 0x4bf28 testq %rdx, %rdx je 0x14079 movq %rbx, %rdi movl $0x16, %esi callq 0x1cddd testq %r14, %r14 je 0x140c0 movq 0x20(%r14), %rax testq %rax, %rax je 0x140ba movl (%rax), %esi testl %esi, %esi je 0x140ba movl $0x10, %r15d movq 0x8(%rax), %rdx movq %rbx, %rdi callq 0x1cddd testl %eax, %eax jne 0x14184 movq 0x20(%r14), %rax movl (%rax,%r15), %esi addq %r15, %rax addq $0x10, %r15 testl %esi, %esi jne 0x14093 movq 0x18(%r14), %rax jmp 0x140c2 xorl %eax, %eax movq 0x37e27(%rip), %rsi # 0x4bef0 movq 0x37e28(%rip), %rdx # 0x4bef8 movq 0x37e29(%rip), %rcx # 0x4bf00 movq 0x37e2a(%rip), %r8 # 0x4bf08 movl 0x37e2b(%rip), %r9d # 0x4bf10 movq %rbx, %rdi pushq %rax pushq 0x37e29(%rip) # 0x4bf18 callq 0x141dd addq $0x10, %rsp testq %rax, %rax je 0x14151 leaq 0x2219d(%rip), %rsi # 0x362a1 movq %rbx, %rdi callq 0x1ae55 testl %eax, %eax je 0x141c1 movl %eax, %r14d movq %rbx, %rdi callq 0x1cece movq %rax, %r15 movq %rbx, %rdi callq 0x1ceb9 leaq 0x2201c(%rip), %rdi # 0x3614d leaq 0x21ef8(%rip), %r8 # 0x36030 xorl %ebx, %ebx movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x22a, %r9d # imm = 0x22A xorl %eax, %eax callq 0x1574b jmp 0x141c1 movq 0x37d98(%rip), %r14 # 0x4bef0 movq %rbx, %rdi callq 0x1ceb9 movl %eax, %r15d movq %rbx, %rdi callq 0x1cece leaq 0x220f4(%rip), %rdi # 0x36266 movq %r14, %rsi movl %r15d, %edx movq %rax, %rcx xorl %eax, %eax callq 0x1574b jmp 0x141b7 movq 0x20(%r14), %rax movl -0x10(%rax,%r15), %r14d movq %rbx, %rdi callq 0x1ceb9 movl %eax, %r15d movq %rbx, %rdi callq 0x1cece leaq 0x22099(%rip), %rdi # 0x36240 movl %r14d, %esi movl %r15d, %edx movq %rax, %rcx xorl %eax, %eax callq 0x1574b movq %rbx, %rdi callq 0x1a8c8 xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x2203a(%rip), %rdi # 0x36210 xorl %eax, %eax callq 0x15694
test_connect: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdi mov [rbp+var_20], 0Ah mov [rbp+var_19], 1 xor edi, edi call mysql_init test rax, rax jz loc_141CF mov rbx, rax lea rdx, [rbp+var_19] mov rdi, rax mov esi, 13h call mysql_options lea rdx, [rbp+var_20] mov rdi, rbx xor esi, esi call mysql_options mov rdx, cs:plugindir test rdx, rdx jz short loc_14079 mov rdi, rbx mov esi, 16h call mysql_options loc_14079: test r14, r14 jz short loc_140C0 mov rax, [r14+20h] test rax, rax jz short loc_140BA mov esi, [rax] test esi, esi jz short loc_140BA mov r15d, 10h loc_14093: mov rdx, [rax+8] mov rdi, rbx call mysql_options test eax, eax jnz loc_14184 mov rax, [r14+20h] mov esi, [rax+r15] add rax, r15 add r15, 10h test esi, esi jnz short loc_14093 loc_140BA: mov rax, [r14+18h] jmp short loc_140C2 loc_140C0: xor eax, eax loc_140C2: mov rsi, cs:hostname mov rdx, cs:username mov rcx, cs:password mov r8, cs:schema mov r9d, cs:port mov rdi, rbx push rax push cs:socketname call my_test_connect add rsp, 10h test rax, rax jz short loc_14151 lea rsi, aSetSqlMode; "SET sql_mode=''" mov rdi, rbx call mysql_query test eax, eax jz loc_141C1 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... xor ebx, ebx mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 22Ah xor eax, eax call diag jmp short loc_141C1 loc_14151: mov r14, cs:hostname mov rdi, rbx call mysql_errno mov r15d, eax mov rdi, rbx call mysql_error lea rdi, aCouldnTEstabli; "Couldn't establish connection to server"... mov rsi, r14 mov edx, r15d mov rcx, rax xor eax, eax call diag jmp short loc_141B7 loc_14184: mov rax, [r14+20h] mov r14d, [rax+r15-10h] mov rdi, rbx call mysql_errno mov r15d, eax mov rdi, rbx call mysql_error lea rdi, aCouldnTSetOpti; "Couldn't set option %d. Error (%d) %s" mov esi, r14d mov edx, r15d mov rcx, rax xor eax, eax call diag loc_141B7: mov rdi, rbx call mysql_close xor ebx, ebx loc_141C1: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_141CF: lea rdi, aNotEnoughMemor; "Not enough memory available - mysql_ini"... xor eax, eax call BAIL_OUT
long long test_connect(long long a1, int a2) { long long v2; // rax long long v3; // rax int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rbx unsigned int *v9; // rax long long v10; // rsi long long v11; // r15 long long v12; // rax long long v13; // rax int v14; // eax int v15; // r14d int v16; // r15d int v17; // eax int v18; // r14d int v19; // r15d int v20; // eax int v21; // r8d int v22; // r9d int v23; // r14d int v24; // r15d int v25; // eax int v26; // r8d int v27; // r9d int v29; // [rsp+0h] [rbp-20h] BYREF int v30; // [rsp+4h] [rbp-1Ch] BYREF v30 = HIDWORD(v2); v29 = 10; HIBYTE(v30) = 1; v3 = mysql_init(0LL); if ( !v3 ) BAIL_OUT((unsigned int)"Not enough memory available - mysql_init failed", a2, v4, v5, v6, v7, v29); v8 = v3; mysql_options(v3, 19LL, (char *)&v30 + 3); mysql_options(v8, 0LL, &v29); if ( plugindir ) mysql_options(v8, 22LL, plugindir); if ( a1 ) { v9 = *(unsigned int **)(a1 + 32); if ( v9 ) { v10 = *v9; if ( (_DWORD)v10 ) { v11 = 16LL; while ( !(unsigned int)mysql_options(v8, v10, *((_QWORD *)v9 + 1)) ) { v12 = *(_QWORD *)(a1 + 32); v10 = *(unsigned int *)(v12 + v11); v9 = (unsigned int *)(v11 + v12); v11 += 16LL; if ( !(_DWORD)v10 ) goto LABEL_10; } v23 = *(_DWORD *)(*(_QWORD *)(a1 + 32) + v11 - 16); v24 = mysql_errno(v8); v25 = mysql_error(v8); diag((unsigned int)"Couldn't set option %d. Error (%d) %s", v23, v24, v25, v26, v27); goto LABEL_17; } } LABEL_10: v13 = *(_QWORD *)(a1 + 24); } else { v13 = 0LL; } if ( !my_test_connect(v8, hostname, username, password, schema, port, socketname, v13) ) { v18 = hostname; v19 = mysql_errno(v8); v20 = mysql_error(v8); diag((unsigned int)"Couldn't establish connection to server %s. Error (%d): %s", v18, v19, v20, v21, v22); LABEL_17: mysql_close(v8); return 0LL; } v14 = mysql_query(v8, "SET sql_mode=''"); if ( v14 ) { v15 = v14; v16 = mysql_error(v8); v17 = mysql_errno(v8); v8 = 0LL; diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v15, v16, v17, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", 554); } return v8; }
test_connect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV dword ptr [RBP + -0x20],0xa MOV byte ptr [RBP + -0x19],0x1 XOR EDI,EDI CALL 0x00118b71 TEST RAX,RAX JZ 0x001141cf MOV RBX,RAX LEA RDX,[RBP + -0x19] MOV RDI,RAX MOV ESI,0x13 CALL 0x0011cddd LEA RDX,[RBP + -0x20] MOV RDI,RBX XOR ESI,ESI CALL 0x0011cddd MOV RDX,qword ptr [0x0014bf28] TEST RDX,RDX JZ 0x00114079 MOV RDI,RBX MOV ESI,0x16 CALL 0x0011cddd LAB_00114079: TEST R14,R14 JZ 0x001140c0 MOV RAX,qword ptr [R14 + 0x20] TEST RAX,RAX JZ 0x001140ba MOV ESI,dword ptr [RAX] TEST ESI,ESI JZ 0x001140ba MOV R15D,0x10 LAB_00114093: MOV RDX,qword ptr [RAX + 0x8] MOV RDI,RBX CALL 0x0011cddd TEST EAX,EAX JNZ 0x00114184 MOV RAX,qword ptr [R14 + 0x20] MOV ESI,dword ptr [RAX + R15*0x1] ADD RAX,R15 ADD R15,0x10 TEST ESI,ESI JNZ 0x00114093 LAB_001140ba: MOV RAX,qword ptr [R14 + 0x18] JMP 0x001140c2 LAB_001140c0: XOR EAX,EAX LAB_001140c2: MOV RSI,qword ptr [0x0014bef0] MOV RDX,qword ptr [0x0014bef8] MOV RCX,qword ptr [0x0014bf00] MOV R8,qword ptr [0x0014bf08] MOV R9D,dword ptr [0x0014bf10] MOV RDI,RBX PUSH RAX PUSH qword ptr [0x0014bf18] CALL 0x001141dd ADD RSP,0x10 TEST RAX,RAX JZ 0x00114151 LEA RSI,[0x1362a1] MOV RDI,RBX CALL 0x0011ae55 TEST EAX,EAX JZ 0x001141c1 MOV R14D,EAX MOV RDI,RBX CALL 0x0011cece MOV R15,RAX MOV RDI,RBX CALL 0x0011ceb9 LEA RDI,[0x13614d] LEA R8,[0x136030] XOR EBX,EBX MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x22a XOR EAX,EAX CALL 0x0011574b JMP 0x001141c1 LAB_00114151: MOV R14,qword ptr [0x0014bef0] MOV RDI,RBX CALL 0x0011ceb9 MOV R15D,EAX MOV RDI,RBX CALL 0x0011cece LEA RDI,[0x136266] MOV RSI,R14 MOV EDX,R15D MOV RCX,RAX XOR EAX,EAX CALL 0x0011574b JMP 0x001141b7 LAB_00114184: MOV RAX,qword ptr [R14 + 0x20] MOV R14D,dword ptr [RAX + R15*0x1 + -0x10] MOV RDI,RBX CALL 0x0011ceb9 MOV R15D,EAX MOV RDI,RBX CALL 0x0011cece LEA RDI,[0x136240] MOV ESI,R14D MOV EDX,R15D MOV RCX,RAX XOR EAX,EAX CALL 0x0011574b LAB_001141b7: MOV RDI,RBX CALL 0x0011a8c8 XOR EBX,EBX LAB_001141c1: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001141cf: LEA RDI,[0x136210] XOR EAX,EAX CALL 0x00115694
long test_connect(long param_1) { int iVar1; int4 uVar2; int4 uVar3; int8 in_RAX; long lVar4; int *piVar5; int8 uVar6; int8 uVar7; long lVar8; int4 local_28; int4 uStack_24; _local_28 = CONCAT44((int)((ulong)in_RAX >> 0x20),10); _local_28 = CONCAT17(1,_local_28); lVar4 = mysql_init(0); if (lVar4 == 0) { /* WARNING: Subroutine does not return */ BAIL_OUT("Not enough memory available - mysql_init failed"); } mysql_options(lVar4,0x13,(long)&uStack_24 + 3); mysql_options(lVar4,0,&local_28); if (plugindir != 0) { mysql_options(lVar4,0x16); } if (param_1 == 0) { uVar6 = 0; } else { piVar5 = *(int **)(param_1 + 0x20); if ((piVar5 != (int *)0x0) && (iVar1 = *piVar5, iVar1 != 0)) { lVar8 = 0x10; do { iVar1 = mysql_options(lVar4,iVar1,*(int8 *)(piVar5 + 2)); if (iVar1 != 0) { uVar2 = *(int4 *)(*(long *)(param_1 + 0x20) + -0x10 + lVar8); uVar3 = mysql_errno(lVar4); uVar6 = mysql_error(lVar4); diag("Couldn\'t set option %d. Error (%d) %s",uVar2,uVar3,uVar6); goto LAB_001141b7; } iVar1 = *(int *)(*(long *)(param_1 + 0x20) + lVar8); piVar5 = (int *)(*(long *)(param_1 + 0x20) + lVar8); lVar8 = lVar8 + 0x10; } while (iVar1 != 0); } uVar6 = *(int8 *)(param_1 + 0x18); } lVar8 = my_test_connect(lVar4,hostname,username,password,schema,port,socketname,uVar6); uVar6 = hostname; if (lVar8 == 0) { uVar2 = mysql_errno(lVar4); uVar7 = mysql_error(lVar4); diag("Couldn\'t establish connection to server %s. Error (%d): %s",uVar6,uVar2,uVar7); LAB_001141b7: mysql_close(lVar4); lVar4 = 0; } else { iVar1 = mysql_query(lVar4,"SET sql_mode=\'\'"); if (iVar1 != 0) { uVar6 = mysql_error(lVar4); uVar2 = mysql_errno(lVar4); lVar4 = 0; diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar6,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x22a ); } } return lVar4; }
58,216
ma_ck_write_tree
eloqsql/storage/maria/ma_write.c
static my_bool _ma_ck_write_tree(register MARIA_HA *info, MARIA_KEY *key) { my_bool error; uint keynr= key->keyinfo->key_nr; DBUG_ENTER("_ma_ck_write_tree"); /* Store ref_length as this is always constant */ info->bulk_insert_ref_length= key->ref_length; error= tree_insert(&info->bulk_insert[keynr], key->data, key->data_length + key->ref_length, info->bulk_insert[keynr].custom_arg) == 0; DBUG_RETURN(error); }
O0
c
ma_ck_write_tree: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movzbl 0xa5(%rax), %eax movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x14(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x640(%rax) movq -0x8(%rbp), %rax movq 0x310(%rax), %rdi movl -0x18(%rbp), %eax imulq $0x298, %rax, %rax # imm = 0x298 addq %rax, %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x10(%rax), %edx movq -0x10(%rbp), %rax addl 0x14(%rax), %edx movq -0x8(%rbp), %rax movq 0x310(%rax), %rax movl -0x18(%rbp), %ecx imulq $0x298, %rcx, %rcx # imm = 0x298 addq %rcx, %rax movq 0x230(%rax), %rcx callq 0x126bf0 cmpq $0x0, %rax sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x11(%rbp) movb -0x11(%rbp), %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_ck_write_tree: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+8] movzx eax, byte ptr [rax+0A5h] mov [rbp+var_18], eax mov rax, [rbp+var_10] mov ecx, [rax+14h] mov rax, [rbp+var_8] mov [rax+640h], ecx mov rax, [rbp+var_8] mov rdi, [rax+310h] mov eax, [rbp+var_18] imul rax, 298h add rdi, rax mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov edx, [rax+10h] mov rax, [rbp+var_10] add edx, [rax+14h] mov rax, [rbp+var_8] mov rax, [rax+310h] mov ecx, [rbp+var_18] imul rcx, 298h add rax, rcx mov rcx, [rax+230h] call tree_insert cmp rax, 0 setz al and al, 1 movzx eax, al mov [rbp+var_11], al mov al, [rbp+var_11] mov [rbp+var_19], al mov al, [rbp+var_19] add rsp, 20h pop rbp retn
_BOOL8 ma_ck_write_tree(long long a1, long long a2) { unsigned int v3; // [rsp+8h] [rbp-18h] v3 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL); *(_DWORD *)(a1 + 1600) = *(_DWORD *)(a2 + 20); return tree_insert( 664LL * v3 + *(_QWORD *)(a1 + 784), *(_QWORD *)a2, (unsigned int)(*(_DWORD *)(a2 + 20) + *(_DWORD *)(a2 + 16)), *(_QWORD *)(664LL * v3 + *(_QWORD *)(a1 + 784) + 560)) == 0; }
_ma_ck_write_tree: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0xa5] MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x640],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x310] MOV EAX,dword ptr [RBP + -0x18] IMUL RAX,RAX,0x298 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] ADD EDX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x310] MOV ECX,dword ptr [RBP + -0x18] IMUL RCX,RCX,0x298 ADD RAX,RCX MOV RCX,qword ptr [RAX + 0x230] CALL 0x00226bf0 CMP RAX,0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x11],AL MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x19],AL MOV AL,byte ptr [RBP + -0x19] ADD RSP,0x20 POP RBP RET
bool _ma_ck_write_tree(long param_1,int8 *param_2) { byte bVar1; long lVar2; bVar1 = *(byte *)(param_2[1] + 0xa5); *(int4 *)(param_1 + 0x640) = *(int4 *)((long)param_2 + 0x14); lVar2 = tree_insert(*(long *)(param_1 + 0x310) + (ulong)(uint)bVar1 * 0x298,*param_2, *(int *)(param_2 + 2) + *(int *)((long)param_2 + 0x14), *(int8 *) (*(long *)(param_1 + 0x310) + (ulong)(uint)bVar1 * 0x298 + 0x230)); return lVar2 == 0; }
58,217
write_hook_for_redo
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_redo(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info __attribute__ ((unused)), LSN *lsn, void *hook_arg __attribute__ ((unused))) { /* Users of dummy_transaction_object must keep this TRN clean as it is used by many threads (like those manipulating non-transactional tables). It might be dangerous if one user sets rec_lsn or some other member and it is picked up by another user (like putting this rec_lsn into a page of a non-transactional table); it's safer if all members stay 0. So non-transactional log records (REPAIR, CREATE, RENAME, DROP) should not call this hook; we trust them but verify ;) */ DBUG_ASSERT(trn->trid != 0); /* If the hook stays so simple, it would be faster to pass !trn->rec_lsn ? trn->rec_lsn : some_dummy_lsn to translog_write_record(), like Monty did in his original code, and not have a hook. For now we keep it like this. */ if (trn->rec_lsn == 0) trn->rec_lsn= *lsn; return 0; }
O3
c
write_hook_for_redo: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x90(%rsi) jne 0x5e724 movq (%rcx), %rax movq %rax, 0x90(%rsi) xorl %eax, %eax popq %rbp retq
write_hook_for_redo: push rbp mov rbp, rsp cmp qword ptr [rsi+90h], 0 jnz short loc_5E724 mov rax, [rcx] mov [rsi+90h], rax loc_5E724: xor eax, eax pop rbp retn
long long write_hook_for_redo(long long a1, long long a2, long long a3, _QWORD *a4) { if ( !*(_QWORD *)(a2 + 144) ) *(_QWORD *)(a2 + 144) = *a4; return 0LL; }
write_hook_for_redo: PUSH RBP MOV RBP,RSP CMP qword ptr [RSI + 0x90],0x0 JNZ 0x0015e724 MOV RAX,qword ptr [RCX] MOV qword ptr [RSI + 0x90],RAX LAB_0015e724: XOR EAX,EAX POP RBP RET
int8 write_hook_for_redo(int8 param_1,long param_2,int8 param_3,int8 *param_4) { if (*(long *)(param_2 + 0x90) == 0) { *(int8 *)(param_2 + 0x90) = *param_4; } return 0; }
58,218
httplib::detail::set_nonblocking(int, bool)
hkr04[P]cpp-mcp/common/httplib.h
inline void set_nonblocking(socket_t sock, bool nonblocking) { #ifdef _WIN32 auto flags = nonblocking ? 1UL : 0UL; ioctlsocket(sock, FIONBIO, &flags); #else auto flags = fcntl(sock, F_GETFL, 0); fcntl(sock, F_SETFL, nonblocking ? (flags | O_NONBLOCK) : (flags & (~O_NONBLOCK))); #endif }
O0
c
httplib::detail::set_nonblocking(int, bool): subq $0x18, %rsp movb %sil, %al movl %edi, 0x14(%rsp) andb $0x1, %al movb %al, 0x13(%rsp) movl 0x14(%rsp), %edi movl $0x3, %esi xorl %edx, %edx movb $0x0, %al callq 0xc4e0 movl %eax, 0xc(%rsp) movl 0x14(%rsp), %eax movl %eax, 0x8(%rsp) testb $0x1, 0x13(%rsp) je 0x6e065 movl 0xc(%rsp), %eax orl $0x800, %eax # imm = 0x800 movl %eax, 0x4(%rsp) jmp 0x6e072 movl 0xc(%rsp), %eax andl $0xfffff7ff, %eax # imm = 0xFFFFF7FF movl %eax, 0x4(%rsp) movl 0x8(%rsp), %edi movl 0x4(%rsp), %edx movl $0x4, %esi movb $0x0, %al callq 0xc4e0 addq $0x18, %rsp retq nopl (%rax,%rax)
_ZN7httplib6detail15set_nonblockingEib: sub rsp, 18h mov al, sil mov [rsp+18h+var_4], edi and al, 1 mov [rsp+18h+var_5], al mov edi, [rsp+18h+var_4] mov esi, 3 xor edx, edx mov al, 0 call _fcntl mov [rsp+18h+var_C], eax mov eax, [rsp+18h+var_4] mov [rsp+18h+var_10], eax test [rsp+18h+var_5], 1 jz short loc_6E065 mov eax, [rsp+18h+var_C] or eax, 800h mov [rsp+18h+var_14], eax jmp short loc_6E072 loc_6E065: mov eax, [rsp+18h+var_C] and eax, 0FFFFF7FFh mov [rsp+18h+var_14], eax loc_6E072: mov edi, [rsp+18h+var_10] mov edx, [rsp+18h+var_14] mov esi, 4 mov al, 0 call _fcntl add rsp, 18h retn
long long httplib::detail::set_nonblocking(httplib::detail *this, char a2) { unsigned int v3; // [rsp+4h] [rbp-14h] int v4; // [rsp+Ch] [rbp-Ch] v4 = fcntl((unsigned int)this, 3LL, 0LL); if ( (a2 & 1) != 0 ) v3 = v4 | 0x800; else v3 = v4 & 0xFFFFF7FF; return fcntl((unsigned int)this, 4LL, v3); }
set_nonblocking: SUB RSP,0x18 MOV AL,SIL MOV dword ptr [RSP + 0x14],EDI AND AL,0x1 MOV byte ptr [RSP + 0x13],AL MOV EDI,dword ptr [RSP + 0x14] MOV ESI,0x3 XOR EDX,EDX MOV AL,0x0 CALL 0x0010c4e0 MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x8],EAX TEST byte ptr [RSP + 0x13],0x1 JZ 0x0016e065 MOV EAX,dword ptr [RSP + 0xc] OR EAX,0x800 MOV dword ptr [RSP + 0x4],EAX JMP 0x0016e072 LAB_0016e065: MOV EAX,dword ptr [RSP + 0xc] AND EAX,0xfffff7ff MOV dword ptr [RSP + 0x4],EAX LAB_0016e072: MOV EDI,dword ptr [RSP + 0x8] MOV EDX,dword ptr [RSP + 0x4] MOV ESI,0x4 MOV AL,0x0 CALL 0x0010c4e0 ADD RSP,0x18 RET
/* httplib::detail::set_nonblocking(int, bool) */ void httplib::detail::set_nonblocking(int param_1,bool param_2) { int4 local_14; local_14 = fcntl(param_1,3,0); if (param_2) { local_14 = local_14 | 0x800; } else { local_14 = local_14 & 0xfffff7ff; } fcntl(param_1,4,(ulong)local_14); return; }
58,219
rlLoadShaderProgram
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
unsigned int rlLoadShaderProgram(unsigned int vShaderId, unsigned int fShaderId) { unsigned int program = 0; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) GLint success = 0; program = glCreateProgram(); glAttachShader(program, vShaderId); glAttachShader(program, fShaderId); // NOTE: Default attribute shader locations must be Bound before linking glBindAttribLocation(program, RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION, RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION); glBindAttribLocation(program, RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD, RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD); glBindAttribLocation(program, RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL, RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL); glBindAttribLocation(program, RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR, RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR); glBindAttribLocation(program, RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT, RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT); glBindAttribLocation(program, RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2, RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2); #ifdef RL_SUPPORT_MESH_GPU_SKINNING glBindAttribLocation(program, RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS, RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS); glBindAttribLocation(program, RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS, RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS); #endif // NOTE: If some attrib name is no found on the shader, it locations becomes -1 glLinkProgram(program); // NOTE: All uniform variables are intitialised to 0 when a program links glGetProgramiv(program, GL_LINK_STATUS, &success); if (success == GL_FALSE) { TRACELOG(RL_LOG_WARNING, "SHADER: [ID %i] Failed to link shader program", program); int maxLength = 0; glGetProgramiv(program, GL_INFO_LOG_LENGTH, &maxLength); if (maxLength > 0) { int length = 0; char *log = (char *)RL_CALLOC(maxLength, sizeof(char)); glGetProgramInfoLog(program, maxLength, &length, log); TRACELOG(RL_LOG_WARNING, "SHADER: [ID %i] Link error: %s", program, log); RL_FREE(log); } glDeleteProgram(program); program = 0; } else { // Get the size of compiled shader program (not available on OpenGL ES 2.0) // NOTE: If GL_LINK_STATUS is GL_FALSE, program binary length is zero //GLint binarySize = 0; //glGetProgramiv(id, GL_PROGRAM_BINARY_LENGTH, &binarySize); TRACELOG(RL_LOG_INFO, "SHADER: [ID %i] Program shader loaded successfully", program); } #endif return program; }
O0
c
rlLoadShaderProgram: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl $0x0, -0x10(%rbp) callq *0x161386(%rip) # 0x218678 movl %eax, -0xc(%rbp) movq 0x160f94(%rip), %rax # 0x218290 movl -0xc(%rbp), %edi movl -0x4(%rbp), %esi callq *%rax movq 0x160f85(%rip), %rax # 0x218290 movl -0xc(%rbp), %edi movl -0x8(%rbp), %esi callq *%rax movq 0x160fa6(%rip), %rax # 0x2182c0 movl -0xc(%rbp), %edi xorl %esi, %esi leaq 0xfdcd5(%rip), %rdx # 0x1b4ffb callq *%rax movq 0x160f91(%rip), %rax # 0x2182c0 movl -0xc(%rbp), %edi movl $0x1, %esi leaq 0xfdccc(%rip), %rdx # 0x1b500a callq *%rax movq 0x160f79(%rip), %rax # 0x2182c0 movl -0xc(%rbp), %edi movl $0x2, %esi leaq 0xfdcc3(%rip), %rdx # 0x1b5019 callq *%rax movq 0x160f61(%rip), %rax # 0x2182c0 movl -0xc(%rbp), %edi movl $0x3, %esi leaq 0xfdcb8(%rip), %rdx # 0x1b5026 callq *%rax movq 0x160f49(%rip), %rax # 0x2182c0 movl -0xc(%rbp), %edi movl $0x4, %esi leaq 0xfdcac(%rip), %rdx # 0x1b5032 callq *%rax movq 0x160f31(%rip), %rax # 0x2182c0 movl -0xc(%rbp), %edi movl $0x5, %esi leaq 0xfdca2(%rip), %rdx # 0x1b5040 callq *%rax movq 0x160f19(%rip), %rax # 0x2182c0 movl -0xc(%rbp), %edi movl $0x7, %esi leaq 0xfdc9a(%rip), %rdx # 0x1b5050 callq *%rax movq 0x160f01(%rip), %rax # 0x2182c0 movl -0xc(%rbp), %edi movl $0x8, %esi leaq 0xfdc90(%rip), %rdx # 0x1b505e callq *%rax movq 0x161d89(%rip), %rax # 0x219160 movl -0xc(%rbp), %edi callq *%rax movq 0x1619bd(%rip), %rax # 0x218da0 movl -0xc(%rbp), %edi movl $0x8b82, %esi # imm = 0x8B82 leaq -0x10(%rbp), %rdx callq *%rax cmpl $0x0, -0x10(%rbp) jne 0xb749b movl -0xc(%rbp), %edx movl $0x4, %edi leaq 0xfdc66(%rip), %rsi # 0x1b5070 movb $0x0, %al callq 0x182c40 movl $0x0, -0x14(%rbp) movq 0x161981(%rip), %rax # 0x218da0 movl -0xc(%rbp), %edi movl $0x8b84, %esi # imm = 0x8B84 leaq -0x14(%rbp), %rdx callq *%rax cmpl $0x0, -0x14(%rbp) jle 0xb7486 movl $0x0, -0x18(%rbp) movslq -0x14(%rbp), %rdi movl $0x1, %esi callq 0xa340 movq %rax, -0x20(%rbp) movq 0x1618e5(%rip), %rax # 0x218d38 movl -0xc(%rbp), %edi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x18(%rbp), %rdx callq *%rax movl -0xc(%rbp), %edx movq -0x20(%rbp), %rcx movl $0x4, %edi leaq 0xfdc28(%rip), %rsi # 0x1b509e movb $0x0, %al callq 0x182c40 movq -0x20(%rbp), %rdi callq 0xa640 movq 0x1612b3(%rip), %rax # 0x218740 movl -0xc(%rbp), %edi callq *%rax movl $0x0, -0xc(%rbp) jmp 0xb74b1 movl -0xc(%rbp), %edx movl $0x3, %edi leaq 0xfdc13(%rip), %rsi # 0x1b50bd movb $0x0, %al callq 0x182c40 movl -0xc(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
rlLoadShaderProgram: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_8], esi mov [rbp+var_C], 0 mov [rbp+var_10], 0 call cs:glad_glCreateProgram mov [rbp+var_C], eax mov rax, cs:glad_glAttachShader mov edi, [rbp+var_C] mov esi, [rbp+var_4] call rax ; glad_glAttachShader mov rax, cs:glad_glAttachShader mov edi, [rbp+var_C] mov esi, [rbp+var_8] call rax ; glad_glAttachShader mov rax, cs:glad_glBindAttribLocation mov edi, [rbp+var_C] xor esi, esi lea rdx, aVertexposition; "vertexPosition" call rax ; glad_glBindAttribLocation mov rax, cs:glad_glBindAttribLocation mov edi, [rbp+var_C] mov esi, 1 lea rdx, aVertextexcoord; "vertexTexCoord" call rax ; glad_glBindAttribLocation mov rax, cs:glad_glBindAttribLocation mov edi, [rbp+var_C] mov esi, 2 lea rdx, aVertexnormal; "vertexNormal" call rax ; glad_glBindAttribLocation mov rax, cs:glad_glBindAttribLocation mov edi, [rbp+var_C] mov esi, 3 lea rdx, aVertexcolor; "vertexColor" call rax ; glad_glBindAttribLocation mov rax, cs:glad_glBindAttribLocation mov edi, [rbp+var_C] mov esi, 4 lea rdx, aVertextangent; "vertexTangent" call rax ; glad_glBindAttribLocation mov rax, cs:glad_glBindAttribLocation mov edi, [rbp+var_C] mov esi, 5 lea rdx, aVertextexcoord_0; "vertexTexCoord2" call rax ; glad_glBindAttribLocation mov rax, cs:glad_glBindAttribLocation mov edi, [rbp+var_C] mov esi, 7 lea rdx, aVertexboneids; "vertexBoneIds" call rax ; glad_glBindAttribLocation mov rax, cs:glad_glBindAttribLocation mov edi, [rbp+var_C] mov esi, 8 lea rdx, aVertexboneweig; "vertexBoneWeights" call rax ; glad_glBindAttribLocation mov rax, cs:glad_glLinkProgram mov edi, [rbp+var_C] call rax ; glad_glLinkProgram mov rax, cs:glad_glGetProgramiv mov edi, [rbp+var_C] mov esi, 8B82h lea rdx, [rbp+var_10] call rax ; glad_glGetProgramiv cmp [rbp+var_10], 0 jnz loc_B749B mov edx, [rbp+var_C] mov edi, 4 lea rsi, aShaderIdIFaile_2; "SHADER: [ID %i] Failed to link shader p"... mov al, 0 call TraceLog mov [rbp+var_14], 0 mov rax, cs:glad_glGetProgramiv mov edi, [rbp+var_C] mov esi, 8B84h lea rdx, [rbp+var_14] call rax ; glad_glGetProgramiv cmp [rbp+var_14], 0 jle short loc_B7486 mov [rbp+var_18], 0 movsxd rdi, [rbp+var_14] mov esi, 1 call _calloc mov [rbp+var_20], rax mov rax, cs:glad_glGetProgramInfoLog mov edi, [rbp+var_C] mov esi, [rbp+var_14] mov rcx, [rbp+var_20] lea rdx, [rbp+var_18] call rax ; glad_glGetProgramInfoLog mov edx, [rbp+var_C] mov rcx, [rbp+var_20] mov edi, 4 lea rsi, aShaderIdILinkE; "SHADER: [ID %i] Link error: %s" mov al, 0 call TraceLog mov rdi, [rbp+var_20] call _free loc_B7486: mov rax, cs:glad_glDeleteProgram mov edi, [rbp+var_C] call rax ; glad_glDeleteProgram mov [rbp+var_C], 0 jmp short loc_B74B1 loc_B749B: mov edx, [rbp+var_C] mov edi, 3 lea rsi, aShaderIdIProgr; "SHADER: [ID %i] Program shader loaded s"... mov al, 0 call TraceLog loc_B74B1: mov eax, [rbp+var_C] add rsp, 20h pop rbp retn
long long rlLoadShaderProgram(unsigned int a1, unsigned int a2) { int v2; // ecx int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d long long v8; // [rsp+0h] [rbp-20h] int v9; // [rsp+8h] [rbp-18h] BYREF int v10; // [rsp+Ch] [rbp-14h] BYREF int v11; // [rsp+10h] [rbp-10h] BYREF unsigned int Program; // [rsp+14h] [rbp-Ch] unsigned int v13; // [rsp+18h] [rbp-8h] unsigned int v14; // [rsp+1Ch] [rbp-4h] v14 = a1; v13 = a2; v11 = 0; Program = glad_glCreateProgram(); glad_glAttachShader(Program, a1); glad_glAttachShader(Program, a2); glad_glBindAttribLocation(Program, 0LL, "vertexPosition"); glad_glBindAttribLocation(Program, 1LL, "vertexTexCoord"); glad_glBindAttribLocation(Program, 2LL, "vertexNormal"); glad_glBindAttribLocation(Program, 3LL, "vertexColor"); glad_glBindAttribLocation(Program, 4LL, "vertexTangent"); glad_glBindAttribLocation(Program, 5LL, "vertexTexCoord2"); glad_glBindAttribLocation(Program, 7LL, "vertexBoneIds"); glad_glBindAttribLocation(Program, 8LL, "vertexBoneWeights"); glad_glLinkProgram(Program); glad_glGetProgramiv(Program, 35714LL, &v11); if ( v11 ) { TraceLog(3, (unsigned int)"SHADER: [ID %i] Program shader loaded successfully", Program, v2, v3, v4); } else { TraceLog(4, (unsigned int)"SHADER: [ID %i] Failed to link shader program", Program, v2, v3, v4); v10 = 0; glad_glGetProgramiv(Program, 35716LL, &v10); if ( v10 > 0 ) { v9 = 0; v8 = calloc(v10, 1LL); glad_glGetProgramInfoLog(Program, (unsigned int)v10, &v9, v8); TraceLog(4, (unsigned int)"SHADER: [ID %i] Link error: %s", Program, v8, v5, v6); free(v8); } glad_glDeleteProgram(Program); return 0; } return Program; }
rlLoadShaderProgram: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x10],0x0 CALL qword ptr [0x00318678] MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [0x00318290] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,dword ptr [RBP + -0x4] CALL RAX MOV RAX,qword ptr [0x00318290] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,dword ptr [RBP + -0x8] CALL RAX MOV RAX,qword ptr [0x003182c0] MOV EDI,dword ptr [RBP + -0xc] XOR ESI,ESI LEA RDX,[0x2b4ffb] CALL RAX MOV RAX,qword ptr [0x003182c0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x1 LEA RDX,[0x2b500a] CALL RAX MOV RAX,qword ptr [0x003182c0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x2 LEA RDX,[0x2b5019] CALL RAX MOV RAX,qword ptr [0x003182c0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x3 LEA RDX,[0x2b5026] CALL RAX MOV RAX,qword ptr [0x003182c0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x4 LEA RDX,[0x2b5032] CALL RAX MOV RAX,qword ptr [0x003182c0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x5 LEA RDX,[0x2b5040] CALL RAX MOV RAX,qword ptr [0x003182c0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x7 LEA RDX,[0x2b5050] CALL RAX MOV RAX,qword ptr [0x003182c0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x8 LEA RDX,[0x2b505e] CALL RAX MOV RAX,qword ptr [0x00319160] MOV EDI,dword ptr [RBP + -0xc] CALL RAX MOV RAX,qword ptr [0x00318da0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x8b82 LEA RDX,[RBP + -0x10] CALL RAX CMP dword ptr [RBP + -0x10],0x0 JNZ 0x001b749b MOV EDX,dword ptr [RBP + -0xc] MOV EDI,0x4 LEA RSI,[0x2b5070] MOV AL,0x0 CALL 0x00282c40 MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [0x00318da0] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x8b84 LEA RDX,[RBP + -0x14] CALL RAX CMP dword ptr [RBP + -0x14],0x0 JLE 0x001b7486 MOV dword ptr [RBP + -0x18],0x0 MOVSXD RDI,dword ptr [RBP + -0x14] MOV ESI,0x1 CALL 0x0010a340 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [0x00318d38] MOV EDI,dword ptr [RBP + -0xc] MOV ESI,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] LEA RDX,[RBP + -0x18] CALL RAX MOV EDX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x20] MOV EDI,0x4 LEA RSI,[0x2b509e] MOV AL,0x0 CALL 0x00282c40 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0010a640 LAB_001b7486: MOV RAX,qword ptr [0x00318740] MOV EDI,dword ptr [RBP + -0xc] CALL RAX MOV dword ptr [RBP + -0xc],0x0 JMP 0x001b74b1 LAB_001b749b: MOV EDX,dword ptr [RBP + -0xc] MOV EDI,0x3 LEA RSI,[0x2b50bd] MOV AL,0x0 CALL 0x00282c40 LAB_001b74b1: MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x20 POP RBP RET
int4 rlLoadShaderProgram(int4 param_1,int4 param_2) { void *__ptr; int4 local_20; int local_1c; int local_18; int4 local_14; int4 local_10; int4 local_c; local_14 = 0; local_18 = 0; local_10 = param_2; local_c = param_1; local_14 = (*glad_glCreateProgram)(); (*glad_glAttachShader)(local_14,local_c); (*glad_glAttachShader)(local_14,local_10); (*glad_glBindAttribLocation)(local_14,0,"vertexPosition"); (*glad_glBindAttribLocation)(local_14,1,"vertexTexCoord"); (*glad_glBindAttribLocation)(local_14,2,"vertexNormal"); (*glad_glBindAttribLocation)(local_14,3,"vertexColor"); (*glad_glBindAttribLocation)(local_14,4,"vertexTangent"); (*glad_glBindAttribLocation)(local_14,5,"vertexTexCoord2"); (*glad_glBindAttribLocation)(local_14,7,"vertexBoneIds"); (*glad_glBindAttribLocation)(local_14,8,"vertexBoneWeights"); (*glad_glLinkProgram)(local_14); (*glad_glGetProgramiv)(local_14,0x8b82,&local_18); if (local_18 == 0) { TraceLog(4,"SHADER: [ID %i] Failed to link shader program",local_14); local_1c = 0; (*glad_glGetProgramiv)(local_14,0x8b84,&local_1c); if (0 < local_1c) { local_20 = 0; __ptr = calloc((long)local_1c,1); (*glad_glGetProgramInfoLog)(local_14,local_1c,&local_20,__ptr); TraceLog(4,"SHADER: [ID %i] Link error: %s",local_14,__ptr); free(__ptr); } (*glad_glDeleteProgram)(local_14); local_14 = 0; } else { TraceLog(3,"SHADER: [ID %i] Program shader loaded successfully",local_14); } return local_14; }
58,220
mariadb_server_version_id
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t mariadb_server_version_id(MYSQL *mysql) { size_t major, minor, patch; char *p; if (!(p = mysql->server_version)) { return 0; } major = strtol(p, &p, 10); p += 1; /* consume the dot */ minor = strtol(p, &p, 10); p += 1; /* consume the dot */ patch = strtol(p, &p, 10); return (major * 10000L + (unsigned long)(minor * 100L + patch)); }
O0
c
mariadb_server_version_id: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x2d0(%rax), %rax movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x446db movq $0x0, -0x8(%rbp) jmp 0x4474d movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x36890 movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x36890 movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x36890 movq %rax, -0x28(%rbp) imulq $0x2710, -0x18(%rbp), %rax # imm = 0x2710 imulq $0x64, -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mariadb_server_version_id: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+2D0h] mov [rbp+var_30], rax cmp rax, 0 jnz short loc_446DB mov [rbp+var_8], 0 jmp short loc_4474D loc_446DB: mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_18], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_28], rax imul rax, [rbp+var_18], 2710h imul rcx, [rbp+var_20], 64h ; 'd' add rcx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax loc_4474D: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long mariadb_server_version_id(long long a1) { long long v2; // [rsp+0h] [rbp-30h] BYREF long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] long long v6; // [rsp+20h] [rbp-10h] v6 = a1; v2 = *(_QWORD *)(a1 + 720); if ( !v2 ) return 0LL; v5 = strtol(v2, &v2, 10LL); ++v2; v4 = strtol(v2, &v2, 10LL); ++v2; v3 = strtol(v2, &v2, 10LL); return v3 + 100 * v4 + 10000 * v5; }
mariadb_server_version_id: 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 + 0x2d0] MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x001446db MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014474d LAB_001446db: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00136890 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00136890 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00136890 MOV qword ptr [RBP + -0x28],RAX IMUL RAX,qword ptr [RBP + -0x18],0x2710 IMUL RCX,qword ptr [RBP + -0x20],0x64 ADD RCX,qword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_0014474d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long mariadb_server_version_id(long param_1) { long lVar1; char *local_38 [2]; long local_28; long local_20; long local_18; long local_10; local_38[0] = *(char **)(param_1 + 0x2d0); if (local_38[0] == (char *)0x0) { local_10 = 0; } else { local_18 = param_1; local_20 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; local_28 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; lVar1 = strtol(local_38[0],local_38,10); local_10 = local_20 * 10000 + local_28 * 100 + lVar1; } return local_10; }
58,221
copy_not_changed_fields
eloqsql/storage/maria/ma_blockrec.c
void copy_not_changed_fields(MARIA_HA *info, MY_BITMAP *changed_fields, uchar *to, uchar *from) { MARIA_COLUMNDEF *column, *end_column; uchar *bitmap= (uchar*) changed_fields->bitmap; MARIA_SHARE *share= info->s; uint bit= 1; for (column= share->columndef, end_column= column+ share->base.fields; column < end_column; column++) { if (!(*bitmap & bit)) { uint field_length= column->length; if (column->type == FIELD_VARCHAR) { if (column->fill_length == 1) field_length= (uint) from[column->offset] + 1; else field_length= uint2korr(from + column->offset) + 2; } memcpy(to + column->offset, from + column->offset, field_length); } if ((bit= (bit << 1)) == 256) { bitmap++; bit= 1; } } }
O0
c
copy_not_changed_fields: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movl $0x1, -0x44(%rbp) movq -0x40(%rbp), %rax movq 0x588(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x3c8(%rcx), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x51314 movq -0x38(%rbp), %rax movzbl (%rax), %eax andl -0x44(%rbp), %eax cmpl $0x0, %eax jne 0x512df movq -0x28(%rbp), %rax movzwl 0x8(%rax), %eax movl %eax, -0x48(%rbp) movq -0x28(%rbp), %rax cmpl $0x8, (%rax) jne 0x512b9 movq -0x28(%rbp), %rax movzwl 0xc(%rax), %eax cmpl $0x1, %eax jne 0x512a2 movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx movl 0x4(%rcx), %ecx movzbl (%rax,%rcx), %eax addl $0x1, %eax movl %eax, -0x48(%rbp) jmp 0x512b7 movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx movl 0x4(%rcx), %ecx movzwl (%rax,%rcx), %eax addl $0x2, %eax movl %eax, -0x48(%rbp) jmp 0x512b9 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rax movl 0x4(%rax), %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rax movl 0x4(%rax), %eax addq %rax, %rsi movl -0x48(%rbp), %eax movl %eax, %edx callq 0x29090 movl -0x44(%rbp), %eax shll %eax movl %eax, -0x44(%rbp) cmpl $0x100, %eax # imm = 0x100 jne 0x51301 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movl $0x1, -0x44(%rbp) jmp 0x51303 movq -0x28(%rbp), %rax addq $0x38, %rax movq %rax, -0x28(%rbp) jmp 0x5124d addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
copy_not_changed_fields: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_40], rax mov [rbp+var_44], 1 mov rax, [rbp+var_40] mov rax, [rax+588h] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_40] mov ecx, [rcx+3C8h] imul rcx, 38h ; '8' add rax, rcx mov [rbp+var_30], rax loc_5124D: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb loc_51314 mov rax, [rbp+var_38] movzx eax, byte ptr [rax] and eax, [rbp+var_44] cmp eax, 0 jnz short loc_512DF mov rax, [rbp+var_28] movzx eax, word ptr [rax+8] mov [rbp+var_48], eax mov rax, [rbp+var_28] cmp dword ptr [rax], 8 jnz short loc_512B9 mov rax, [rbp+var_28] movzx eax, word ptr [rax+0Ch] cmp eax, 1 jnz short loc_512A2 mov rax, [rbp+var_20] mov rcx, [rbp+var_28] mov ecx, [rcx+4] movzx eax, byte ptr [rax+rcx] add eax, 1 mov [rbp+var_48], eax jmp short loc_512B7 loc_512A2: mov rax, [rbp+var_20] mov rcx, [rbp+var_28] mov ecx, [rcx+4] movzx eax, word ptr [rax+rcx] add eax, 2 mov [rbp+var_48], eax loc_512B7: jmp short $+2 loc_512B9: mov rdi, [rbp+var_18] mov rax, [rbp+var_28] mov eax, [rax+4] add rdi, rax mov rsi, [rbp+var_20] mov rax, [rbp+var_28] mov eax, [rax+4] add rsi, rax mov eax, [rbp+var_48] mov edx, eax call _memcpy loc_512DF: mov eax, [rbp+var_44] shl eax, 1 mov [rbp+var_44], eax cmp eax, 100h jnz short loc_51301 mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax mov [rbp+var_44], 1 loc_51301: jmp short $+2 loc_51303: mov rax, [rbp+var_28] add rax, 38h ; '8' mov [rbp+var_28], rax jmp loc_5124D loc_51314: add rsp, 50h pop rbp retn
unsigned long long copy_not_changed_fields(long long a1, _BYTE **a2, long long a3, long long a4) { unsigned long long result; // rax int v5; // eax unsigned int v6; // [rsp+8h] [rbp-48h] int v7; // [rsp+Ch] [rbp-44h] _BYTE *v8; // [rsp+18h] [rbp-38h] unsigned long long v9; // [rsp+20h] [rbp-30h] unsigned long long v10; // [rsp+28h] [rbp-28h] v8 = *a2; v7 = 1; v10 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL); v9 = 56LL * *(unsigned int *)(*(_QWORD *)a1 + 968LL) + v10; while ( 1 ) { result = v10; if ( v10 >= v9 ) break; if ( ((unsigned __int8)v7 & *v8) == 0 ) { v6 = *(unsigned __int16 *)(v10 + 8); if ( *(_DWORD *)v10 == 8 ) { if ( *(_WORD *)(v10 + 12) == 1 ) v5 = *(unsigned __int8 *)(a4 + *(unsigned int *)(v10 + 4)) + 1; else v5 = *(unsigned __int16 *)(a4 + *(unsigned int *)(v10 + 4)) + 2; v6 = v5; } memcpy(*(unsigned int *)(v10 + 4) + a3, *(unsigned int *)(v10 + 4) + a4, v6); } v7 *= 2; if ( v7 == 256 ) { ++v8; v7 = 1; } v10 += 56LL; } return result; }
copy_not_changed_fields: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x44],0x1 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x588] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0x3c8] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_0015124d: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00151314 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] AND EAX,dword ptr [RBP + -0x44] CMP EAX,0x0 JNZ 0x001512df MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x8] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x8 JNZ 0x001512b9 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0xc] CMP EAX,0x1 JNZ 0x001512a2 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x4] MOVZX EAX,byte ptr [RAX + RCX*0x1] ADD EAX,0x1 MOV dword ptr [RBP + -0x48],EAX JMP 0x001512b7 LAB_001512a2: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x4] MOVZX EAX,word ptr [RAX + RCX*0x1] ADD EAX,0x2 MOV dword ptr [RBP + -0x48],EAX LAB_001512b7: JMP 0x001512b9 LAB_001512b9: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x4] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x4] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x48] MOV EDX,EAX CALL 0x00129090 LAB_001512df: MOV EAX,dword ptr [RBP + -0x44] SHL EAX,0x1 MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x100 JNZ 0x00151301 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x44],0x1 LAB_00151301: JMP 0x00151303 LAB_00151303: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x38 MOV qword ptr [RBP + -0x28],RAX JMP 0x0015124d LAB_00151314: ADD RSP,0x50 POP RBP RET
void copy_not_changed_fields(long *param_1,int8 *param_2,long param_3,long param_4) { int *piVar1; uint local_50; uint local_4c; byte *local_40; int *local_30; local_40 = (byte *)*param_2; local_4c = 1; local_30 = *(int **)(*param_1 + 0x588); piVar1 = local_30 + (ulong)*(uint *)(*param_1 + 0x3c8) * 0xe; for (; local_30 < piVar1; local_30 = local_30 + 0xe) { if ((*local_40 & local_4c) == 0) { local_50 = (uint)*(ushort *)(local_30 + 2); if (*local_30 == 8) { if ((short)local_30[3] == 1) { local_50 = *(byte *)(param_4 + (ulong)(uint)local_30[1]) + 1; } else { local_50 = *(ushort *)(param_4 + (ulong)(uint)local_30[1]) + 2; } } memcpy((void *)(param_3 + (ulong)(uint)local_30[1]), (void *)(param_4 + (ulong)(uint)local_30[1]),(ulong)local_50); } local_4c = local_4c << 1; if (local_4c == 0x100) { local_40 = local_40 + 1; local_4c = 1; } } return; }
58,222
create_new_data_handle
eloqsql/storage/maria/ma_check.c
static my_bool create_new_data_handle(MARIA_SORT_PARAM *param, File new_file) { MARIA_SORT_INFO *sort_info= param->sort_info; MARIA_HA *info= sort_info->info; MARIA_HA *new_info; DBUG_ENTER("create_new_data_handle"); if (!(sort_info->new_info= maria_open(info->s->open_file_name.str, O_RDWR, HA_OPEN_COPY | HA_OPEN_FOR_REPAIR | HA_OPEN_INTERNAL_TABLE, 0))) DBUG_RETURN(1); new_info= sort_info->new_info; _ma_bitmap_set_pagecache_callbacks(&new_info->s->bitmap.file, new_info->s); _ma_set_data_pagecache_callbacks(&new_info->dfile, new_info->s); change_data_file_descriptor(new_info, new_file); maria_lock_database(new_info, F_EXTRA_LCK); if ((sort_info->param->testflag & T_UNPACK) && info->s->data_file_type == COMPRESSED_RECORD) { (*new_info->s->once_end)(new_info->s); (*new_info->s->end)(new_info); restore_data_file_type(new_info->s); _ma_setup_functions(new_info->s); if ((*new_info->s->once_init)(new_info->s, new_file) || (*new_info->s->init)(new_info)) DBUG_RETURN(1); } _ma_reset_status(new_info); if (_ma_initialize_data_file(new_info->s, new_file)) DBUG_RETURN(1); /* Take into account any bitmap page created above: */ param->filepos= new_info->s->state.state.data_file_length; /* Use new virtual functions for key generation */ info->s->keypos_to_recpos= new_info->s->keypos_to_recpos; info->s->recpos_to_keypos= new_info->s->recpos_to_keypos; DBUG_RETURN(0); }
O3
c
create_new_data_handle: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %r12d movq %rdi, -0x30(%rbp) movq 0x380(%rdi), %rbx movq 0x80(%rbx), %r13 movq (%r13), %rax movq 0x5e0(%rax), %rdi movl $0x2, %esi movl $0x320, %edx # imm = 0x320 xorl %ecx, %ecx callq 0x56e1b movq %rax, 0x88(%rbx) movb $0x1, %r14b testq %rax, %rax je 0x79f7c movq %rax, %r15 movq (%rax), %rsi leaq 0xa50(%rsi), %rdi callq 0x3c8a9 movq %r15, %rdi addq $0x470, %rdi # imm = 0x470 movq (%r15), %rsi callq 0x5b25f movq %r15, %rdi movl %r12d, %esi callq 0x7bcf8 movq %r15, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x62b84 movq 0x90(%rbx), %rax testb $0x4, 0xb13(%rax) je 0x79f26 movq (%r13), %rax cmpl $0x2, 0x7d0(%rax) jne 0x79f26 movq (%r15), %rdi callq *0x630(%rdi) movq (%r15), %rax movq %r15, %rdi callq *0x640(%rax) movq (%r15), %rdi callq 0x7be61 movq (%r15), %rdi callq 0x5a123 movq (%r15), %rdi movl %r12d, %esi callq *0x628(%rdi) testb %al, %al jne 0x79f7c movq (%r15), %rax movq %r15, %rdi callq *0x638(%rax) testb %al, %al jne 0x79f7c movq %r15, %rdi callq 0x40545 movq (%r15), %rdi movl %r12d, %esi callq 0x73297 testl %eax, %eax jne 0x79f7c movq (%r15), %rax movq 0x40(%rax), %rax movq -0x30(%rbp), %rcx movq %rax, 0x628(%rcx) movq (%r15), %rax movq 0x6c8(%rax), %rax movq (%r13), %rcx movq %rax, 0x6c8(%rcx) movq (%r15), %rax movq 0x6d0(%rax), %rax movq (%r13), %rcx movq %rax, 0x6d0(%rcx) xorl %r14d, %r14d movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
create_new_data_handle: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, esi mov [rbp+var_30], rdi mov rbx, [rdi+380h] mov r13, [rbx+80h] mov rax, [r13+0] mov rdi, [rax+5E0h] mov esi, 2 mov edx, 320h xor ecx, ecx call maria_open mov [rbx+88h], rax mov r14b, 1 test rax, rax jz loc_79F7C mov r15, rax mov rsi, [rax] lea rdi, [rsi+0A50h] call _ma_bitmap_set_pagecache_callbacks mov rdi, r15 add rdi, 470h mov rsi, [r15] call _ma_set_data_pagecache_callbacks mov rdi, r15 mov esi, r12d call change_data_file_descriptor mov rdi, r15 mov esi, 0FFFFFFFFh call maria_lock_database mov rax, [rbx+90h] test byte ptr [rax+0B13h], 4 jz short loc_79F26 mov rax, [r13+0] cmp dword ptr [rax+7D0h], 2 jnz short loc_79F26 mov rdi, [r15] call qword ptr [rdi+630h] mov rax, [r15] mov rdi, r15 call qword ptr [rax+640h] mov rdi, [r15] call restore_data_file_type mov rdi, [r15] call _ma_setup_functions mov rdi, [r15] mov esi, r12d call qword ptr [rdi+628h] test al, al jnz short loc_79F7C mov rax, [r15] mov rdi, r15 call qword ptr [rax+638h] test al, al jnz short loc_79F7C loc_79F26: mov rdi, r15 call _ma_reset_status mov rdi, [r15] mov esi, r12d call _ma_initialize_data_file test eax, eax jnz short loc_79F7C mov rax, [r15] mov rax, [rax+40h] mov rcx, [rbp+var_30] mov [rcx+628h], rax mov rax, [r15] mov rax, [rax+6C8h] mov rcx, [r13+0] mov [rcx+6C8h], rax mov rax, [r15] mov rax, [rax+6D0h] mov rcx, [r13+0] mov [rcx+6D0h], rax xor r14d, r14d loc_79F7C: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long create_new_data_handle(long long a1, unsigned int a2) { unsigned int v2; // r14d _QWORD *v3; // rbx long long v4; // r13 long long *v5; // rax long long *v6; // r15 v3 = *(_QWORD **)(a1 + 896); v4 = v3[16]; v5 = (long long *)maria_open(*(_QWORD *)(*(_QWORD *)v4 + 1504LL), 2, 800, 0LL); v3[17] = v5; LOBYTE(v2) = 1; if ( v5 ) { v6 = v5; ma_bitmap_set_pagecache_callbacks((_QWORD *)(*v5 + 2640), *v5); ma_set_data_pagecache_callbacks(v6 + 142, *v6); change_data_file_descriptor(v6, a2); maria_lock_database((long long)v6, -1); if ( (*(_BYTE *)(v3[18] + 2835LL) & 4) == 0 || *(_DWORD *)(*(_QWORD *)v4 + 2000LL) != 2 || ((*(void (**)(void))(*v6 + 1584))(), (*(void ( **)(long long *))(*v6 + 1600))(v6), restore_data_file_type(*v6), ma_setup_functions(*v6), !(*(unsigned __int8 ( **)(long long, _QWORD))(*v6 + 1576))(*v6, a2)) && !(*(unsigned __int8 ( **)(long long *))(*v6 + 1592))(v6) ) { ma_reset_status(v6); if ( !(unsigned int)ma_initialize_data_file(*v6, a2) ) { *(_QWORD *)(a1 + 1576) = *(_QWORD *)(*v6 + 64); *(_QWORD *)(*(_QWORD *)v4 + 1736LL) = *(_QWORD *)(*v6 + 1736); *(_QWORD *)(*(_QWORD *)v4 + 1744LL) = *(_QWORD *)(*v6 + 1744); return 0; } } } return v2; }
create_new_data_handle: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,ESI MOV qword ptr [RBP + -0x30],RDI MOV RBX,qword ptr [RDI + 0x380] MOV R13,qword ptr [RBX + 0x80] MOV RAX,qword ptr [R13] MOV RDI,qword ptr [RAX + 0x5e0] MOV ESI,0x2 MOV EDX,0x320 XOR ECX,ECX CALL 0x00156e1b MOV qword ptr [RBX + 0x88],RAX MOV R14B,0x1 TEST RAX,RAX JZ 0x00179f7c MOV R15,RAX MOV RSI,qword ptr [RAX] LEA RDI,[RSI + 0xa50] CALL 0x0013c8a9 MOV RDI,R15 ADD RDI,0x470 MOV RSI,qword ptr [R15] CALL 0x0015b25f MOV RDI,R15 MOV ESI,R12D CALL 0x0017bcf8 MOV RDI,R15 MOV ESI,0xffffffff CALL 0x00162b84 MOV RAX,qword ptr [RBX + 0x90] TEST byte ptr [RAX + 0xb13],0x4 JZ 0x00179f26 MOV RAX,qword ptr [R13] CMP dword ptr [RAX + 0x7d0],0x2 JNZ 0x00179f26 MOV RDI,qword ptr [R15] CALL qword ptr [RDI + 0x630] MOV RAX,qword ptr [R15] MOV RDI,R15 CALL qword ptr [RAX + 0x640] MOV RDI,qword ptr [R15] CALL 0x0017be61 MOV RDI,qword ptr [R15] CALL 0x0015a123 MOV RDI,qword ptr [R15] MOV ESI,R12D CALL qword ptr [RDI + 0x628] TEST AL,AL JNZ 0x00179f7c MOV RAX,qword ptr [R15] MOV RDI,R15 CALL qword ptr [RAX + 0x638] TEST AL,AL JNZ 0x00179f7c LAB_00179f26: MOV RDI,R15 CALL 0x00140545 MOV RDI,qword ptr [R15] MOV ESI,R12D CALL 0x00173297 TEST EAX,EAX JNZ 0x00179f7c MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RCX + 0x628],RAX MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + 0x6c8] MOV RCX,qword ptr [R13] MOV qword ptr [RCX + 0x6c8],RAX MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + 0x6d0] MOV RCX,qword ptr [R13] MOV qword ptr [RCX + 0x6d0],RAX XOR R14D,R14D LAB_00179f7c: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong create_new_data_handle(long param_1,int4 param_2) { long lVar1; long *plVar2; char cVar3; int iVar4; long *plVar5; int8 unaff_R14; ulong uVar6; lVar1 = *(long *)(param_1 + 0x380); plVar2 = *(long **)(lVar1 + 0x80); plVar5 = (long *)maria_open(*(int8 *)(*plVar2 + 0x5e0),2,800,0); *(long **)(lVar1 + 0x88) = plVar5; uVar6 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); if (plVar5 == (long *)0x0) goto LAB_00179f7c; _ma_bitmap_set_pagecache_callbacks(*plVar5 + 0xa50); _ma_set_data_pagecache_callbacks(plVar5 + 0x8e,*plVar5); change_data_file_descriptor(plVar5,param_2); maria_lock_database(plVar5,0xffffffff); if (((*(byte *)(*(long *)(lVar1 + 0x90) + 0xb13) & 4) != 0) && (*(int *)(*plVar2 + 2000) == 2)) { (**(code **)(*plVar5 + 0x630))(); (**(code **)(*plVar5 + 0x640))(plVar5); restore_data_file_type(*plVar5); _ma_setup_functions(*plVar5); cVar3 = (**(code **)(*plVar5 + 0x628))(*plVar5,param_2); if (cVar3 != '\0') goto LAB_00179f7c; cVar3 = (**(code **)(*plVar5 + 0x638))(plVar5); if (cVar3 != '\0') goto LAB_00179f7c; } _ma_reset_status(plVar5); iVar4 = _ma_initialize_data_file(*plVar5,param_2); if (iVar4 == 0) { *(int8 *)(param_1 + 0x628) = *(int8 *)(*plVar5 + 0x40); *(int8 *)(*plVar2 + 0x6c8) = *(int8 *)(*plVar5 + 0x6c8); *(int8 *)(*plVar2 + 0x6d0) = *(int8 *)(*plVar5 + 0x6d0); uVar6 = 0; } LAB_00179f7c: return uVar6 & 0xffffffff; }
58,223
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int)
monkey531[P]llama/common/json.hpp
inline char* append_exponent(char* buf, int e) { JSON_ASSERT(e > -1000); JSON_ASSERT(e < 1000); if (e < 0) { e = -e; *buf++ = '-'; } else { *buf++ = '+'; } auto k = static_cast<std::uint32_t>(e); if (k < 10) { // Always print at least two digits in the exponent. // This is for compatibility with printf("%g"). *buf++ = '0'; *buf++ = static_cast<char>('0' + k); } else if (k < 100) { *buf++ = static_cast<char>('0' + k / 10); k %= 10; *buf++ = static_cast<char>('0' + k); } else { *buf++ = static_cast<char>('0' + k / 100); k %= 100; *buf++ = static_cast<char>('0' + k / 10); k %= 10; *buf++ = static_cast<char>('0' + k); } return buf; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int): pushq %rax cmpl $0xfffffc18, %esi # imm = 0xFFFFFC18 jle 0x7b0b8 cmpl $0x3e8, %esi # imm = 0x3E8 jge 0x7b0d4 movl %esi, %ecx shrl $0x1f, %ecx addb %cl, %cl addb $0x2b, %cl movl %esi, %eax negl %eax cmovsl %esi, %eax movb %cl, (%rdi) cmpl $0x9, %eax ja 0x7b066 leaq 0x2(%rdi), %rdx movb $0x30, 0x1(%rdi) jmp 0x7b081 cmpl $0x63, %eax ja 0x7b085 movzbl %al, %eax movb $0xa, %cl divb %cl movl %eax, %ecx movzbl %ah, %eax orb $0x30, %cl leaq 0x2(%rdi), %rdx movb %cl, 0x1(%rdi) pushq $0x3 jmp 0x7b0ab movw $0x64, %cx xorl %edx, %edx divw %cx addb $0x30, %al movb %al, 0x1(%rdi) movzbl %dl, %eax movb $0xa, %cl divb %cl movl %eax, %ecx movzbl %ah, %eax orb $0x30, %cl leaq 0x3(%rdi), %rdx movb %cl, 0x2(%rdi) pushq $0x4 popq %rcx orb $0x30, %al addq %rcx, %rdi movb %al, (%rdx) movq %rdi, %rax popq %rcx retq leaq 0x22c0c(%rip), %rdi # 0x9dccb leaq 0x1f4c3(%rip), %rdx # 0x9a589 leaq 0x25a04(%rip), %rcx # 0xa0ad1 movl $0x45ae, %esi # imm = 0x45AE jmp 0x7b0ee leaq 0x22bf0(%rip), %rdi # 0x9dccb leaq 0x1f4a7(%rip), %rdx # 0x9a589 leaq 0x259f2(%rip), %rcx # 0xa0adb movl $0x45af, %esi # imm = 0x45AF xorl %eax, %eax callq 0x22ce0 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl15append_exponentEPci: push rax cmp esi, 0FFFFFC18h jle loc_7B0B8 cmp esi, 3E8h jge loc_7B0D4 mov ecx, esi shr ecx, 1Fh add cl, cl add cl, 2Bh ; '+' mov eax, esi neg eax cmovs eax, esi mov [rdi], cl cmp eax, 9 ja short loc_7B066 lea rdx, [rdi+2] mov byte ptr [rdi+1], 30h ; '0' jmp short loc_7B081 loc_7B066: cmp eax, 63h ; 'c' ja short loc_7B085 movzx eax, al mov cl, 0Ah div cl mov ecx, eax movzx eax, ah or cl, 30h lea rdx, [rdi+2] mov [rdi+1], cl loc_7B081: push 3 jmp short loc_7B0AB loc_7B085: mov cx, 64h ; 'd' xor edx, edx div cx add al, 30h ; '0' mov [rdi+1], al movzx eax, dl mov cl, 0Ah div cl mov ecx, eax movzx eax, ah or cl, 30h lea rdx, [rdi+3] mov [rdi+2], cl push 4 loc_7B0AB: pop rcx or al, 30h add rdi, rcx mov [rdx], al mov rax, rdi pop rcx retn loc_7B0B8: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1000; "e > -1000" mov esi, 45AEh jmp short loc_7B0EE loc_7B0D4: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1000_0; "e < 1000" mov esi, 45AFh loc_7B0EE: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, char *a2) { unsigned int v2; // eax _BYTE *v3; // rdx char v4; // cl char v5; // cl long long v7; // [rsp-10h] [rbp-10h] if ( (int)a2 <= -1000 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17838LL, "GGML_ASSERT(%s) failed", "e > -1000"); } else { if ( (int)a2 < 1000 ) { v2 = -(int)a2; if ( (int)a2 > 0 ) v2 = (unsigned int)a2; *(_BYTE *)this = 2 * ((int)a2 < 0) + 43; if ( v2 > 9 ) { if ( v2 > 0x63 ) { *((_BYTE *)this + 1) = (unsigned __int16)v2 / 0x64u + 48; v5 = (unsigned __int16)v2 % 0x64u / 0xA; LOBYTE(v2) = (unsigned __int16)v2 % 0x64u % 0xA; v3 = (char *)this + 3; *((_BYTE *)this + 2) = v5 | 0x30; v7 = 4LL; goto LABEL_11; } v4 = (unsigned __int8)v2 / 0xAu; LOBYTE(v2) = (unsigned __int8)v2 % 0xAu; v3 = (char *)this + 2; *((_BYTE *)this + 1) = v4 | 0x30; } else { v3 = (char *)this + 2; *((_BYTE *)this + 1) = 48; } v7 = 3LL; LABEL_11: *v3 = v2 | 0x30; return (long long)this + v7; } ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17839LL, "GGML_ASSERT(%s) failed", "e < 1000"); } return nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)3>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); }
append_exponent: PUSH RAX CMP ESI,0xfffffc18 JLE 0x0017b0b8 CMP ESI,0x3e8 JGE 0x0017b0d4 MOV ECX,ESI SHR ECX,0x1f ADD CL,CL ADD CL,0x2b MOV EAX,ESI NEG EAX CMOVS EAX,ESI MOV byte ptr [RDI],CL CMP EAX,0x9 JA 0x0017b066 LEA RDX,[RDI + 0x2] MOV byte ptr [RDI + 0x1],0x30 JMP 0x0017b081 LAB_0017b066: CMP EAX,0x63 JA 0x0017b085 MOVZX EAX,AL MOV CL,0xa DIV CL MOV ECX,EAX MOVZX EAX,AH OR CL,0x30 LEA RDX,[RDI + 0x2] MOV byte ptr [RDI + 0x1],CL LAB_0017b081: PUSH 0x3 JMP 0x0017b0ab LAB_0017b085: MOV CX,0x64 XOR EDX,EDX DIV CX ADD AL,0x30 MOV byte ptr [RDI + 0x1],AL MOVZX EAX,DL MOV CL,0xa DIV CL MOV ECX,EAX MOVZX EAX,AH OR CL,0x30 LEA RDX,[RDI + 0x3] MOV byte ptr [RDI + 0x2],CL PUSH 0x4 LAB_0017b0ab: POP RCX OR AL,0x30 ADD RDI,RCX MOV byte ptr [RDX],AL MOV RAX,RDI POP RCX RET LAB_0017b0b8: LEA RDI,[0x19dccb] LEA RDX,[0x19a589] LEA RCX,[0x1a0ad1] MOV ESI,0x45ae JMP 0x0017b0ee LAB_0017b0d4: LEA RDI,[0x19dccb] LEA RDX,[0x19a589] LEA RCX,[0x1a0adb] MOV ESI,0x45af LAB_0017b0ee: XOR EAX,EAX CALL 0x00122ce0
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int) */ char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char *param_1,int param_2) { byte bVar2; uint uVar1; char *pcVar3; ushort uVar4; byte *pbVar5; int8 uVar6; long lStack_10; if (param_2 < -999) { pcVar3 = "e > -1000"; uVar6 = 0x45ae; LAB_0017b0ee: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar3); } if (999 < param_2) { pcVar3 = "e < 1000"; uVar6 = 0x45af; goto LAB_0017b0ee; } uVar1 = -param_2; if (0 < param_2) { uVar1 = param_2; } *param_1 = (char)(param_2 >> 0x1f) * -2 + '+'; if (uVar1 < 10) { param_1[1] = '0'; } else { if (99 < uVar1) { uVar4 = (ushort)((uVar1 & 0xffff) % 100); param_1[1] = (char)((uVar1 & 0xffff) / 100) + '0'; bVar2 = (byte)(uVar4 % 10); pbVar5 = (byte *)(param_1 + 3); param_1[2] = (byte)(uVar4 / 10) | 0x30; lStack_10 = 4; goto LAB_0017b0ab; } uVar4 = (ushort)uVar1 & 0xff; uVar1 = (uint)(byte)(uVar4 % 10); param_1[1] = (byte)(uVar4 / 10) | 0x30; } pbVar5 = (byte *)(param_1 + 2); bVar2 = (byte)uVar1; lStack_10 = 3; LAB_0017b0ab: *pbVar5 = bVar2 | 0x30; return param_1 + lStack_10; }
58,224
mysql_session_track_get_next@libmariadbclient_18
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_session_track_get_next(MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length) { MYSQL_LEX_STRING *str; if (!mysql->extension->session_state[type].current) return 1; str= (MYSQL_LEX_STRING *)mysql->extension->session_state[type].current->data; mysql->extension->session_state[type].current= mysql->extension->session_state[type].current->next; *data= str->str ? str->str : NULL; *length= str->str ? str->length : 0; return 0; }
O0
c
mysql_session_track_get_next@libmariadbclient_18: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0x14(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpq $0x0, 0x8(%rax) jne 0x2a2bf movl $0x1, -0x4(%rbp) jmp 0x2a37e movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0x14(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0x14(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0x14(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rax movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax cmpq $0x0, (%rax) je 0x2a339 movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x2a341 xorl %eax, %eax movq %rax, -0x38(%rbp) jmp 0x2a341 movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rax cmpq $0x0, (%rax) je 0x2a364 movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) jmp 0x2a36c xorl %eax, %eax movq %rax, -0x40(%rbp) jmp 0x2a36c movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
mysql_session_track_get_next@libmariadbclient_18: push rbp; Alternative name is 'mysql_session_track_get_next' mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax+4F0h] add rax, 8 mov ecx, [rbp+var_14] shl rcx, 4 add rax, rcx cmp qword ptr [rax+8], 0 jnz short loc_2A2BF mov [rbp+var_4], 1 jmp loc_2A37E loc_2A2BF: mov rax, [rbp+var_10] mov rax, [rax+4F0h] add rax, 8 mov ecx, [rbp+var_14] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov rax, [rax+10h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+4F0h] add rax, 8 mov ecx, [rbp+var_14] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov rcx, [rax+8] mov rax, [rbp+var_10] mov rax, [rax+4F0h] add rax, 8 mov edx, [rbp+var_14] shl rdx, 4 add rax, rdx mov [rax+8], rcx mov rax, [rbp+var_30] cmp qword ptr [rax], 0 jz short loc_2A339 mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_38], rax jmp short loc_2A341 loc_2A339: xor eax, eax mov [rbp+var_38], rax jmp short $+2 loc_2A341: mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_30] cmp qword ptr [rax], 0 jz short loc_2A364 mov rax, [rbp+var_30] mov rax, [rax+8] mov [rbp+var_40], rax jmp short loc_2A36C loc_2A364: xor eax, eax mov [rbp+var_40], rax jmp short $+2 loc_2A36C: mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov [rax], rcx mov [rbp+var_4], 0 loc_2A37E: mov eax, [rbp+var_4] pop rbp retn
long long mysql_session_track_get_next_libmariadbclient_18( long long a1, unsigned int a2, _QWORD *a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-40h] long long v6; // [rsp+8h] [rbp-38h] long long *v7; // [rsp+10h] [rbp-30h] if ( *(_QWORD *)(16LL * a2 + *(_QWORD *)(a1 + 1264) + 8LL + 8) ) { v7 = *(long long **)(*(_QWORD *)(16LL * a2 + *(_QWORD *)(a1 + 1264) + 8LL + 8) + 16LL); *(_QWORD *)(16LL * a2 + *(_QWORD *)(a1 + 1264) + 8LL + 8) = *(_QWORD *)(*(_QWORD *)(16LL * a2 + *(_QWORD *)(a1 + 1264) + 8LL + 8) + 8LL); if ( *v7 ) v6 = *v7; else v6 = 0LL; *a3 = v6; if ( *v7 ) v5 = v7[1]; else v5 = 0LL; *a4 = v5; return 0; } else { return 1; } }
mysql_session_track_get_next: PUSH RBP MOV RBP,RSP 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 RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV ECX,dword ptr [RBP + -0x14] SHL RCX,0x4 ADD RAX,RCX CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0012a2bf MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012a37e LAB_0012a2bf: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV ECX,dword ptr [RBP + -0x14] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV ECX,dword ptr [RBP + -0x14] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV EDX,dword ptr [RBP + -0x14] SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX],0x0 JZ 0x0012a339 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x0012a341 LAB_0012a339: XOR EAX,EAX MOV qword ptr [RBP + -0x38],RAX JMP 0x0012a341 LAB_0012a341: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX],0x0 JZ 0x0012a364 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX JMP 0x0012a36c LAB_0012a364: XOR EAX,EAX MOV qword ptr [RBP + -0x40],RAX JMP 0x0012a36c LAB_0012a36c: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x0 LAB_0012a37e: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mysql_session_track_get_next(long param_1,uint param_2,long *param_3,long *param_4) { long *plVar1; long local_48; long local_40; int4 local_c; if (*(long *)(*(long *)(param_1 + 0x4f0) + (ulong)param_2 * 0x10 + 0x10) == 0) { local_c = 1; } else { plVar1 = *(long **)(*(long *)(*(long *)(param_1 + 0x4f0) + (ulong)param_2 * 0x10 + 0x10) + 0x10) ; *(int8 *)(*(long *)(param_1 + 0x4f0) + (ulong)param_2 * 0x10 + 0x10) = *(int8 *)(*(long *)(*(long *)(param_1 + 0x4f0) + (ulong)param_2 * 0x10 + 0x10) + 8); if (*plVar1 == 0) { local_40 = 0; } else { local_40 = *plVar1; } *param_3 = local_40; if (*plVar1 == 0) { local_48 = 0; } else { local_48 = plVar1[1]; } *param_4 = local_48; local_c = 0; } return local_c; }
58,225
unlink_deleted_block
eloqsql/storage/maria/ma_dynrec.c
static my_bool unlink_deleted_block(MARIA_HA *info, MARIA_BLOCK_INFO *block_info) { DBUG_ENTER("unlink_deleted_block"); if (block_info->filepos == info->s->state.dellink) { /* First deleted block; We can just use this ! */ info->s->state.dellink=block_info->next_filepos; } else { MARIA_BLOCK_INFO tmp; tmp.second_read=0; /* Unlink block from the previous block */ if (!(_ma_get_block_info(info, &tmp, info->dfile.file, block_info->prev_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+4,block_info->next_filepos); if (info->s->file_write(info, tmp.header+4,8, block_info->prev_filepos+4, MYF(MY_NABP))) DBUG_RETURN(1); /* Unlink block from next block */ if (block_info->next_filepos != HA_OFFSET_ERROR) { if (!(_ma_get_block_info(info, &tmp, info->dfile.file, block_info->next_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+12,block_info->prev_filepos); if (info->s->file_write(info, tmp.header+12,8, block_info->next_filepos+12, MYF(MY_NABP))) DBUG_RETURN(1); } } /* We now have one less deleted block */ info->state->del--; info->state->empty-= block_info->block_len; info->s->state.split--; /* If this was a block that we where accessing through table scan (maria_rrnd() or maria_scan(), then ensure that we skip over this block when doing next maria_rrnd() or maria_scan(). */ if (info->cur_row.nextpos == block_info->filepos) info->cur_row.nextpos+= block_info->block_len; DBUG_RETURN(0); }
O0
c
unlink_deleted_block: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq -0x78(%rbp), %rax movq 0x38(%rax), %rax movq -0x70(%rbp), %rcx movq (%rcx), %rcx cmpq 0xc8(%rcx), %rax jne 0x3fee3 movq -0x78(%rbp), %rax movq 0x40(%rax), %rcx movq -0x70(%rbp), %rax movq (%rax), %rax movq %rcx, 0xc8(%rax) jmp 0x4012f movl $0x0, -0x10(%rbp) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x78(%rbp), %rax movq 0x48(%rax), %rcx leaq -0x60(%rbp), %rsi callq 0x3f460 andl $0x4, %eax cmpl $0x0, %eax jne 0x3ff1c jmp 0x3ff13 movb $0x1, -0x61(%rbp) jmp 0x401ac movq -0x78(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x80(%rbp) movq -0x78(%rbp), %rax movq 0x40(%rax), %rax shrq $0x20, %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movb %al, -0x59(%rbp) movq -0x90(%rbp), %rax shrq $0x8, %rax movb %al, -0x5a(%rbp) movq -0x90(%rbp), %rax shrq $0x10, %rax movb %al, -0x5b(%rbp) movq -0x90(%rbp), %rax shrq $0x18, %rax movb %al, -0x5c(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movb %al, -0x55(%rbp) movq -0x98(%rbp), %rax shrq $0x8, %rax movb %al, -0x56(%rbp) movq -0x98(%rbp), %rax shrq $0x10, %rax movb %al, -0x57(%rbp) movq -0x98(%rbp), %rax shrq $0x18, %rax movb %al, -0x58(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x70(%rbp), %rdi leaq -0x60(%rbp), %rsi addq $0x4, %rsi movq -0x78(%rbp), %rcx movq 0x48(%rcx), %rcx addq $0x4, %rcx movl $0x8, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x40000 jmp 0x3fff7 movb $0x1, -0x61(%rbp) jmp 0x401ac movq -0x78(%rbp), %rax cmpq $-0x1, 0x40(%rax) je 0x4012d movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x78(%rbp), %rax movq 0x40(%rax), %rcx leaq -0x60(%rbp), %rsi callq 0x3f460 andl $0x4, %eax cmpl $0x0, %eax jne 0x40041 jmp 0x40038 movb $0x1, -0x61(%rbp) jmp 0x401ac movq -0x78(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0xa0(%rbp) movq -0x78(%rbp), %rax movq 0x48(%rax), %rax shrq $0x20, %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0xb0(%rbp) movq -0xb0(%rbp), %rax movb %al, -0x51(%rbp) movq -0xb0(%rbp), %rax shrq $0x8, %rax movb %al, -0x52(%rbp) movq -0xb0(%rbp), %rax shrq $0x10, %rax movb %al, -0x53(%rbp) movq -0xb0(%rbp), %rax shrq $0x18, %rax movb %al, -0x54(%rbp) movq -0xa0(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rax movb %al, -0x4d(%rbp) movq -0xb8(%rbp), %rax shrq $0x8, %rax movb %al, -0x4e(%rbp) movq -0xb8(%rbp), %rax shrq $0x10, %rax movb %al, -0x4f(%rbp) movq -0xb8(%rbp), %rax shrq $0x18, %rax movb %al, -0x50(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x70(%rbp), %rdi leaq -0x60(%rbp), %rsi addq $0xc, %rsi movq -0x78(%rbp), %rcx movq 0x40(%rcx), %rcx addq $0xc, %rcx movl $0x8, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x4012b jmp 0x40122 movb $0x1, -0x61(%rbp) jmp 0x401ac jmp 0x4012d jmp 0x4012f movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x8(%rax) movq -0x78(%rbp), %rax movq 0x28(%rax), %rdx movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x10(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x10(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0xc0(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0xc0(%rax) movq -0x70(%rbp), %rax movq 0xa0(%rax), %rax movq -0x78(%rbp), %rcx cmpq 0x38(%rcx), %rax jne 0x401a6 movq -0x78(%rbp), %rax movq 0x28(%rax), %rcx movq -0x70(%rbp), %rax addq 0xa0(%rax), %rcx movq %rcx, 0xa0(%rax) jmp 0x401a8 movb $0x0, -0x61(%rbp) movb -0x61(%rbp), %al movb %al, -0xb9(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x401d6 movb -0xb9(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x2a270 nopl (%rax,%rax)
unlink_deleted_block: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov rax, [rbp+var_78] mov rax, [rax+38h] mov rcx, [rbp+var_70] mov rcx, [rcx] cmp rax, [rcx+0C8h] jnz short loc_3FEE3 mov rax, [rbp+var_78] mov rcx, [rax+40h] mov rax, [rbp+var_70] mov rax, [rax] mov [rax+0C8h], rcx jmp loc_4012F loc_3FEE3: mov [rbp+var_10], 0 mov rdi, [rbp+var_70] mov rax, [rbp+var_70] mov edx, [rax+480h] mov rax, [rbp+var_78] mov rcx, [rax+48h] lea rsi, [rbp+var_60] call _ma_get_block_info and eax, 4 cmp eax, 0 jnz short loc_3FF1C jmp short $+2 loc_3FF13: mov [rbp+var_61], 1 jmp loc_401AC loc_3FF1C: mov rax, [rbp+var_78] mov rax, [rax+40h] mov [rbp+var_80], rax mov rax, [rbp+var_78] mov rax, [rax+40h] shr rax, 20h mov [rbp+var_88], rax mov rax, [rbp+var_88] mov [rbp+var_90], rax mov rax, [rbp+var_90] mov [rbp+var_59], al mov rax, [rbp+var_90] shr rax, 8 mov [rbp+var_5A], al mov rax, [rbp+var_90] shr rax, 10h mov [rbp+var_5B], al mov rax, [rbp+var_90] shr rax, 18h mov [rbp+var_5C], al mov rax, [rbp+var_80] mov [rbp+var_98], rax mov rax, [rbp+var_98] mov [rbp+var_55], al mov rax, [rbp+var_98] shr rax, 8 mov [rbp+var_56], al mov rax, [rbp+var_98] shr rax, 10h mov [rbp+var_57], al mov rax, [rbp+var_98] shr rax, 18h mov [rbp+var_58], al mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_70] lea rsi, [rbp+var_60] add rsi, 4 mov rcx, [rbp+var_78] mov rcx, [rcx+48h] add rcx, 4 mov edx, 8 mov r8d, 4 call rax cmp rax, 0 jz short loc_40000 jmp short $+2 loc_3FFF7: mov [rbp+var_61], 1 jmp loc_401AC loc_40000: mov rax, [rbp+var_78] cmp qword ptr [rax+40h], 0FFFFFFFFFFFFFFFFh jz loc_4012D mov rdi, [rbp+var_70] mov rax, [rbp+var_70] mov edx, [rax+480h] mov rax, [rbp+var_78] mov rcx, [rax+40h] lea rsi, [rbp+var_60] call _ma_get_block_info and eax, 4 cmp eax, 0 jnz short loc_40041 jmp short $+2 loc_40038: mov [rbp+var_61], 1 jmp loc_401AC loc_40041: mov rax, [rbp+var_78] mov rax, [rax+48h] mov [rbp+var_A0], rax mov rax, [rbp+var_78] mov rax, [rax+48h] shr rax, 20h mov [rbp+var_A8], rax mov rax, [rbp+var_A8] mov [rbp+var_B0], rax mov rax, [rbp+var_B0] mov [rbp+var_51], al mov rax, [rbp+var_B0] shr rax, 8 mov [rbp+var_52], al mov rax, [rbp+var_B0] shr rax, 10h mov [rbp+var_53], al mov rax, [rbp+var_B0] shr rax, 18h mov [rbp+var_54], al mov rax, [rbp+var_A0] mov [rbp+var_B8], rax mov rax, [rbp+var_B8] mov [rbp+var_4D], al mov rax, [rbp+var_B8] shr rax, 8 mov [rbp+var_4E], al mov rax, [rbp+var_B8] shr rax, 10h mov [rbp+var_4F], al mov rax, [rbp+var_B8] shr rax, 18h mov [rbp+var_50], al mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_70] lea rsi, [rbp+var_60] add rsi, 0Ch mov rcx, [rbp+var_78] mov rcx, [rcx+40h] add rcx, 0Ch mov edx, 8 mov r8d, 4 call rax cmp rax, 0 jz short loc_4012B jmp short $+2 loc_40122: mov [rbp+var_61], 1 jmp loc_401AC loc_4012B: jmp short $+2 loc_4012D: jmp short $+2 loc_4012F: mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+8], rcx mov rax, [rbp+var_78] mov rdx, [rax+28h] mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+10h] sub rcx, rdx mov [rax+10h], rcx mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+0C0h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+0C0h], rcx mov rax, [rbp+var_70] mov rax, [rax+0A0h] mov rcx, [rbp+var_78] cmp rax, [rcx+38h] jnz short loc_401A6 mov rax, [rbp+var_78] mov rcx, [rax+28h] mov rax, [rbp+var_70] add rcx, [rax+0A0h] mov [rax+0A0h], rcx loc_401A6: jmp short $+2 loc_401A8: mov [rbp+var_61], 0 loc_401AC: mov al, [rbp+var_61] mov [rbp+var_B9], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_401D6 mov al, [rbp+var_B9] add rsp, 0C0h pop rbp retn loc_401D6: call ___stack_chk_fail
char unlink_deleted_block(_QWORD *a1, _QWORD *a2, long long a3, long long a4, long long a5, int a6) { long long v6; // r8 int v7; // r9d long long v9; // [rsp+20h] [rbp-A0h] long long v10; // [rsp+40h] [rbp-80h] unsigned __int8 v12[4]; // [rsp+60h] [rbp-60h] BYREF _BYTE v13[8]; // [rsp+64h] [rbp-5Ch] BYREF _BYTE v14[68]; // [rsp+6Ch] [rbp-54h] BYREF int v15; // [rsp+B0h] [rbp-10h] unsigned long long v16; // [rsp+B8h] [rbp-8h] v16 = __readfsqword(0x28u); if ( a2[7] == *(_QWORD *)(*a1 + 200LL) ) { *(_QWORD *)(*a1 + 200LL) = a2[8]; } else { v15 = 0; if ( (ma_get_block_info((long long)a1, v12, *((unsigned int *)a1 + 288), a2[9], a5, a6) & 4) == 0 ) return 1; v10 = a2[8]; v13[2] = BYTE5(v10); v13[3] = BYTE4(v10); v13[0] = HIBYTE(v10); v13[1] = BYTE6(v10); v13[6] = BYTE1(v10); v13[7] = v10; v13[4] = BYTE3(v10); v13[5] = BYTE2(v10); if ( (*(long long ( **)(_QWORD *, _BYTE *, long long, long long, long long))(*a1 + 1768LL))( a1, v13, 8LL, a2[9] + 4LL, 4LL) ) { return 1; } if ( a2[8] != -1LL ) { if ( (ma_get_block_info((long long)a1, v12, *((unsigned int *)a1 + 288), a2[8], v6, v7) & 4) == 0 ) return 1; v9 = a2[9]; v14[2] = BYTE5(v9); v14[3] = BYTE4(v9); v14[0] = HIBYTE(v9); v14[1] = BYTE6(v9); v14[6] = BYTE1(v9); v14[7] = v9; v14[4] = BYTE3(v9); v14[5] = BYTE2(v9); if ( (*(long long ( **)(_QWORD *, _BYTE *, long long, long long, long long))(*a1 + 1768LL))( a1, v14, 8LL, a2[8] + 12LL, 4LL) ) { return 1; } } } --*(_QWORD *)(a1[4] + 8LL); *(_QWORD *)(a1[4] + 16LL) -= a2[5]; --*(_QWORD *)(*a1 + 192LL); if ( a1[20] == a2[7] ) a1[20] += a2[5]; return 0; }
unlink_deleted_block: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0xc8] JNZ 0x0013fee3 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xc8],RCX JMP 0x0014012f LAB_0013fee3: MOV dword ptr [RBP + -0x10],0x0 MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x48] LEA RSI,[RBP + -0x60] CALL 0x0013f460 AND EAX,0x4 CMP EAX,0x0 JNZ 0x0013ff1c JMP 0x0013ff13 LAB_0013ff13: MOV byte ptr [RBP + -0x61],0x1 JMP 0x001401ac LAB_0013ff1c: MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x20 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RBP + -0x59],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x8 MOV byte ptr [RBP + -0x5a],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x10 MOV byte ptr [RBP + -0x5b],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x18 MOV byte ptr [RBP + -0x5c],AL MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x98] MOV byte ptr [RBP + -0x55],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x8 MOV byte ptr [RBP + -0x56],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x10 MOV byte ptr [RBP + -0x57],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x18 MOV byte ptr [RBP + -0x58],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[RBP + -0x60] ADD RSI,0x4 MOV RCX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RCX + 0x48] ADD RCX,0x4 MOV EDX,0x8 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x00140000 JMP 0x0013fff7 LAB_0013fff7: MOV byte ptr [RBP + -0x61],0x1 JMP 0x001401ac LAB_00140000: MOV RAX,qword ptr [RBP + -0x78] CMP qword ptr [RAX + 0x40],-0x1 JZ 0x0014012d MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x40] LEA RSI,[RBP + -0x60] CALL 0x0013f460 AND EAX,0x4 CMP EAX,0x0 JNZ 0x00140041 JMP 0x00140038 LAB_00140038: MOV byte ptr [RBP + -0x61],0x1 JMP 0x001401ac LAB_00140041: MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x48] SHR RAX,0x20 MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0xb0] MOV byte ptr [RBP + -0x51],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x8 MOV byte ptr [RBP + -0x52],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x10 MOV byte ptr [RBP + -0x53],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x18 MOV byte ptr [RBP + -0x54],AL MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RBP + -0x4d],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x8 MOV byte ptr [RBP + -0x4e],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x10 MOV byte ptr [RBP + -0x4f],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x18 MOV byte ptr [RBP + -0x50],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[RBP + -0x60] ADD RSI,0xc MOV RCX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RCX + 0x40] ADD RCX,0xc MOV EDX,0x8 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0014012b JMP 0x00140122 LAB_00140122: MOV byte ptr [RBP + -0x61],0x1 JMP 0x001401ac LAB_0014012b: JMP 0x0014012d LAB_0014012d: JMP 0x0014012f LAB_0014012f: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x1 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc0] ADD RCX,-0x1 MOV qword ptr [RAX + 0xc0],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0xa0] MOV RCX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RCX + 0x38] JNZ 0x001401a6 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x70] ADD RCX,qword ptr [RAX + 0xa0] MOV qword ptr [RAX + 0xa0],RCX LAB_001401a6: JMP 0x001401a8 LAB_001401a8: MOV byte ptr [RBP + -0x61],0x0 LAB_001401ac: MOV AL,byte ptr [RBP + -0x61] MOV byte ptr [RBP + -0xb9],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001401d6 MOV AL,byte ptr [RBP + -0xb9] ADD RSP,0xc0 POP RBP RET LAB_001401d6: CALL 0x0012a270
int8 unlink_deleted_block(long *param_1,long param_2) { int8 uVar1; int8 uVar2; uint uVar3; long lVar4; long in_FS_OFFSET; int1 local_69; int1 local_68 [4]; int1 local_64; int1 local_63; int1 local_62; int1 local_61; int1 local_60; int1 local_5f; int1 local_5e; int1 local_5d; int1 local_5c; int1 local_5b; int1 local_5a; int1 local_59; int1 local_58; int1 local_57; int1 local_56; int1 local_55; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (*(long *)(param_2 + 0x38) == *(long *)(*param_1 + 200)) { *(int8 *)(*param_1 + 200) = *(int8 *)(param_2 + 0x40); } else { local_18 = 0; uVar3 = _ma_get_block_info(param_1,local_68,(int)param_1[0x90],*(int8 *)(param_2 + 0x48)); if ((uVar3 & 4) == 0) { local_69 = 1; goto LAB_001401ac; } uVar1 = *(int8 *)(param_2 + 0x40); uVar2 = *(int8 *)(param_2 + 0x40); local_61 = (int1)((ulong)uVar2 >> 0x20); local_62 = (int1)((ulong)uVar2 >> 0x28); local_63 = (int1)((ulong)uVar2 >> 0x30); local_64 = (int1)((ulong)uVar2 >> 0x38); local_5d = (int1)uVar1; local_5e = (int1)((ulong)uVar1 >> 8); local_5f = (int1)((ulong)uVar1 >> 0x10); local_60 = (int1)((ulong)uVar1 >> 0x18); lVar4 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_64,8,*(long *)(param_2 + 0x48) + 4,4); if (lVar4 != 0) { local_69 = 1; goto LAB_001401ac; } if (*(long *)(param_2 + 0x40) != -1) { uVar3 = _ma_get_block_info(param_1,local_68,(int)param_1[0x90],*(int8 *)(param_2 + 0x40) ); if ((uVar3 & 4) == 0) { local_69 = 1; goto LAB_001401ac; } uVar1 = *(int8 *)(param_2 + 0x48); uVar2 = *(int8 *)(param_2 + 0x48); local_59 = (int1)((ulong)uVar2 >> 0x20); local_5a = (int1)((ulong)uVar2 >> 0x28); local_5b = (int1)((ulong)uVar2 >> 0x30); local_5c = (int1)((ulong)uVar2 >> 0x38); local_55 = (int1)uVar1; local_56 = (int1)((ulong)uVar1 >> 8); local_57 = (int1)((ulong)uVar1 >> 0x10); local_58 = (int1)((ulong)uVar1 >> 0x18); lVar4 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_5c,8,*(long *)(param_2 + 0x40) + 0xc,4) ; if (lVar4 != 0) { local_69 = 1; goto LAB_001401ac; } } } *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(param_2 + 0x28); *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + -1; if (param_1[0x14] == *(long *)(param_2 + 0x38)) { param_1[0x14] = *(long *)(param_2 + 0x28) + param_1[0x14]; } local_69 = 0; LAB_001401ac: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_69); }
58,226
my_mb_wc_big5
eloqsql/strings/ctype-big5.c
static int my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc,const uchar *s,const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O0
c
my_mb_wc_big5: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x3fc8e movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x3fd67 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x3fcb6 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x3fd67 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x3fcd0 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x3fd67 movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x3fd2a movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0xf9, %eax jg 0x3fd2a movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x40, %eax cmpl %ecx, %eax jg 0x3fd0a movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x7e, %eax jle 0x3fd33 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x3fd2a movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jle 0x3fd33 movl $0x0, -0x4(%rbp) jmp 0x3fd67 movl -0x2c(%rbp), %edi shll $0x8, %edi movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl %eax, %edi callq 0x400a0 cltq movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x3fd60 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x3fd67 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq
my_mb_wc_big5: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_3FC8E mov [rbp+var_4], 0FFFFFF9Bh jmp loc_3FD67 loc_3FC8E: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_3FCB6 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_3FD67 loc_3FCB6: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_3FCD0 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_3FD67 loc_3FCD0: mov eax, [rbp+var_2C] movzx ecx, al mov eax, 0A1h cmp eax, ecx jg short loc_3FD2A mov eax, [rbp+var_2C] movzx eax, al cmp eax, 0F9h jg short loc_3FD2A mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 40h ; '@' cmp eax, ecx jg short loc_3FD0A mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jle short loc_3FD33 loc_3FD0A: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 0A1h cmp eax, ecx jg short loc_3FD2A mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jle short loc_3FD33 loc_3FD2A: mov [rbp+var_4], 0 jmp short loc_3FD67 loc_3FD33: mov edi, [rbp+var_2C] shl edi, 8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add edi, eax call func_big5_uni_onechar cdqe mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz short loc_3FD60 mov [rbp+var_4], 0FFFFFFFEh jmp short loc_3FD67 loc_3FD60: mov [rbp+var_4], 2 loc_3FD67: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_mb_wc_big5(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { int v4; // eax unsigned int v6; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v6 = *a3; if ( v6 >= 0x80 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (unsigned __int8)v6 < 0xA1u || (unsigned __int8)v6 > 0xF9u || (a3[1] < 0x40u || a3[1] > 0x7Eu) && (a3[1] < 0xA1u || a3[1] == 255) ) { return 0; } else { v4 = func_big5_uni_onechar(a3[1] + (v6 << 8)); *a2 = v4; if ( v4 ) return 2; else return (unsigned int)-2; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_big5: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0013fc8e MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0013fd67 LAB_0013fc8e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x0013fcb6 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013fd67 LAB_0013fcb6: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0013fcd0 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0013fd67 LAB_0013fcd0: MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0xa1 CMP EAX,ECX JG 0x0013fd2a MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0xf9 JG 0x0013fd2a MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x40 CMP EAX,ECX JG 0x0013fd0a MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JLE 0x0013fd33 LAB_0013fd0a: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0xa1 CMP EAX,ECX JG 0x0013fd2a MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JLE 0x0013fd33 LAB_0013fd2a: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013fd67 LAB_0013fd33: MOV EDI,dword ptr [RBP + -0x2c] SHL EDI,0x8 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EDI,EAX CALL 0x001400a0 CDQE MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x0013fd60 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x0013fd67 LAB_0013fd60: MOV dword ptr [RBP + -0x4],0x2 LAB_0013fd67: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_mb_wc_big5(int8 param_1,long *param_2,byte *param_3,byte *param_4) { uint uVar1; int iVar2; int4 local_c; if (param_3 < param_4) { uVar1 = (uint)*param_3; if (uVar1 < 0x80) { *param_2 = (long)(int)uVar1; local_c = 1; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if (((uVar1 < 0xa1) || (0xf9 < uVar1)) || (((param_3[1] < 0x40 || (0x7e < param_3[1])) && ((param_3[1] < 0xa1 || (param_3[1] == 0xff)))))) { local_c = 0; } else { iVar2 = func_big5_uni_onechar(uVar1 * 0x100 + (uint)param_3[1]); *param_2 = (long)iVar2; if ((long)iVar2 == 0) { local_c = 0xfffffffe; } else { local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
58,227
my_mb_wc_big5
eloqsql/strings/ctype-big5.c
static int my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc,const uchar *s,const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O3
c
my_mb_wc_big5: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x34286 movsbq (%rdx), %rdi testq %rdi, %rdi js 0x34250 movq %rdi, (%rsi) movl $0x1, %eax retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x34286 leal 0x5f(%rdi), %ecx xorl %eax, %eax cmpb $0x58, %cl ja 0x34286 movzbl 0x1(%rdx), %ecx leal -0x7f(%rcx), %edx cmpb $-0x3f, %dl setb %dl leal 0x1(%rcx), %r8d cmpb $-0x5e, %r8b setb %r8b testb %r8b, %dl je 0x34287 retq pushq %rbp movq %rsp, %rbp movzbl %dil, %eax shll $0x8, %eax leal (%rax,%rcx), %edx addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0 cmpl $0x26bc, %edx # imm = 0x26BC ja 0x342ae movl %edx, %eax leaq 0x330a4(%rip), %rcx # 0x67350 jmp 0x342c5 orl %ecx, %eax addl $0xffff36c0, %eax # imm = 0xFFFF36C0 cmpl $0x309d, %eax # imm = 0x309D jae 0x342de movl %eax, %eax leaq 0x37e0b(%rip), %rcx # 0x6c0d0 leaq (%rcx,%rax,2), %rax movzwl (%rax), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0x342ea jmp 0x342e5 movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_big5: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_34286 movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_34250 mov [rsi], rdi mov eax, 1 retn loc_34250: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short locret_34286 lea ecx, [rdi+5Fh] xor eax, eax cmp cl, 58h ; 'X' ja short locret_34286 movzx ecx, byte ptr [rdx+1] lea edx, [rcx-7Fh] cmp dl, 0C1h setb dl lea r8d, [rcx+1] cmp r8b, 0A2h setb r8b test dl, r8b jz short loc_34287 locret_34286: retn loc_34287: push rbp mov rbp, rsp movzx eax, dil shl eax, 8 lea edx, [rax+rcx] add edx, 0FFFF5EC0h cmp edx, 26BCh ja short loc_342AE mov eax, edx lea rcx, tab_big5_uni0 jmp short loc_342C5 loc_342AE: or eax, ecx add eax, 0FFFF36C0h cmp eax, 309Dh jnb short loc_342DE mov eax, eax lea rcx, tab_big5_uni1 loc_342C5: lea rax, [rcx+rax*2] movzx eax, word ptr [rax] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_342EA jmp short loc_342E5 loc_342DE: mov qword ptr [rsi], 0 loc_342E5: mov eax, 0FFFFFFFEh loc_342EA: pop rbp retn
long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // ecx int v7; // eax unsigned int v8; // edx long long v9; // rax unsigned __int16 *v10; // rcx long long v11; // rcx result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( v5 >= 0 ) { *a2 = v5; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { result = 0LL; if ( (unsigned __int8)(v5 + 95) <= 0x58u ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u ) { v7 = (unsigned __int8)v5 << 8; v8 = v7 + v6 - 41280; if ( v8 > 0x26BC ) { LODWORD(v9) = (v6 | v7) - 51520; if ( (unsigned int)v9 >= 0x309D ) { *a2 = 0LL; return 4294967294LL; } v9 = (unsigned int)v9; v10 = (unsigned __int16 *)&tab_big5_uni1; } else { v9 = v8; v10 = (unsigned __int16 *)&tab_big5_uni0; } v11 = v10[v9]; *a2 = v11; result = 2LL; if ( (_WORD)v11 ) return result; return 4294967294LL; } } } } return result; }
my_mb_wc_big5: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00134286 MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x00134250 MOV qword ptr [RSI],RDI MOV EAX,0x1 RET LAB_00134250: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x00134286 LEA ECX,[RDI + 0x5f] XOR EAX,EAX CMP CL,0x58 JA 0x00134286 MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + -0x7f] CMP DL,0xc1 SETC DL LEA R8D,[RCX + 0x1] CMP R8B,0xa2 SETC R8B TEST DL,R8B JZ 0x00134287 LAB_00134286: RET LAB_00134287: PUSH RBP MOV RBP,RSP MOVZX EAX,DIL SHL EAX,0x8 LEA EDX,[RAX + RCX*0x1] ADD EDX,0xffff5ec0 CMP EDX,0x26bc JA 0x001342ae MOV EAX,EDX LEA RCX,[0x167350] JMP 0x001342c5 LAB_001342ae: OR EAX,ECX ADD EAX,0xffff36c0 CMP EAX,0x309d JNC 0x001342de MOV EAX,EAX LEA RCX,[0x16c0d0] LAB_001342c5: LEA RAX,[RCX + RAX*0x2] MOVZX EAX,word ptr [RAX] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x001342ea JMP 0x001342e5 LAB_001342de: MOV qword ptr [RSI],0x0 LAB_001342e5: MOV EAX,0xfffffffe LAB_001342ea: POP RBP RET
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; int *puVar4; uint uVar5; if (param_4 <= param_3) { return 0xffffff9b; } bVar1 = *param_3; if (-1 < (long)(char)bVar1) { *param_2 = (long)(char)bVar1; return 1; } if (param_4 < param_3 + 2) { return 0xffffff9a; } if ((byte)(bVar1 + 0x5f) < 0x59) { bVar2 = param_3[1]; if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) { return 0; } uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140; if (uVar5 < 0x26bd) { puVar4 = &tab_big5_uni0; } else { uVar5 = CONCAT11(bVar1,bVar2) - 0xc940; if (0x309c < uVar5) { *param_2 = 0; return 0xfffffffe; } puVar4 = &tab_big5_uni1; } uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2); *param_2 = (ulong)uVar3; if (uVar3 == 0) { return 0xfffffffe; } return 2; } return 0; }
58,228
LefDefParser::defwEndPinProperties()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwEndPinProperties() { defwFunc = DEFW_PIN_END; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_PINPROP_START && defwState != DEFW_PINPROP) return DEFW_BAD_ORDER; if (defwCounter > 0) return DEFW_BAD_DATA; else if (defwCounter < 0) return DEFW_TOO_MANY_STMS; if (defwState == DEFW_PINPROP_START) fprintf(defwFile, "END PINPROPERTIES\n\n"); else fprintf(defwFile, ";\nEND PINPROPERTIES\n\n"); defwLines++; defwState = DEFW_PINPROP_END; return DEFW_OK; }
O0
cpp
LefDefParser::defwEndPinProperties(): pushq %rax leaq 0x13e20(%rip), %rax # 0x2b168 movl $0x27, (%rax) leaq 0x13e03(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x17368 movl $0x1, 0x4(%rsp) jmp 0x17426 leaq 0x13df5(%rip), %rax # 0x2b164 cmpl $0x28, (%rax) je 0x1738d leaq 0x13de9(%rip), %rax # 0x2b164 cmpl $0x29, (%rax) je 0x1738d movl $0x2, 0x4(%rsp) jmp 0x17426 leaq 0x13de4(%rip), %rax # 0x2b178 cmpl $0x0, (%rax) jle 0x173a6 movl $0x3, 0x4(%rsp) jmp 0x17426 leaq 0x13dcb(%rip), %rax # 0x2b178 cmpl $0x0, (%rax) jge 0x173bc movl $0x7, 0x4(%rsp) jmp 0x17426 jmp 0x173be leaq 0x13d9f(%rip), %rax # 0x2b164 cmpl $0x28, (%rax) jne 0x173e4 leaq 0x13d87(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0xd5f7(%rip), %rsi # 0x249d2 movb $0x0, %al callq 0x10f0 jmp 0x173fc leaq 0x13d6d(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0xd5db(%rip), %rsi # 0x249d0 movb $0x0, %al callq 0x10f0 leaq 0x13d5d(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x13d51(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0x13d4c(%rip), %rax # 0x2b164 movl $0x2a, (%rax) movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax popq %rcx retq nopl (%rax)
_ZN12LefDefParser20defwEndPinPropertiesEv: push rax lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 27h ; ''' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_17368 mov [rsp+8+var_4], 1 jmp loc_17426 loc_17368: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 28h ; '(' jz short loc_1738D lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 29h ; ')' jz short loc_1738D mov [rsp+8+var_4], 2 jmp loc_17426 loc_1738D: lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter cmp dword ptr [rax], 0 jle short loc_173A6 mov [rsp+8+var_4], 3 jmp loc_17426 loc_173A6: lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter cmp dword ptr [rax], 0 jge short loc_173BC mov [rsp+8+var_4], 7 jmp short loc_17426 loc_173BC: jmp short $+2 loc_173BE: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 28h ; '(' jnz short loc_173E4 lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aEndPinproperti+2; "END PINPROPERTIES\n\n" mov al, 0 call _fprintf jmp short loc_173FC loc_173E4: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aEndPinproperti; ";\nEND PINPROPERTIES\n\n" mov al, 0 call _fprintf loc_173FC: lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 2Ah ; '*' mov [rsp+8+var_4], 0 loc_17426: mov eax, [rsp+8+var_4] pop rcx retn
long long LefDefParser::defwEndPinProperties(LefDefParser *this) { LefDefParser::defwFunc = 39; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState == 40 || LefDefParser::defwState == 41 ) { if ( LefDefParser::defwCounter <= 0 ) { if ( LefDefParser::defwCounter >= 0 ) { if ( LefDefParser::defwState == 40 ) fprintf(LefDefParser::defwFile, "END PINPROPERTIES\n\n"); else fprintf(LefDefParser::defwFile, ";\nEND PINPROPERTIES\n\n"); ++LefDefParser::defwLines; LefDefParser::defwState = 42; return 0; } else { return 7; } } else { return 3; } } else { return 2; } } else { return 1; } }
defwEndPinProperties: PUSH RAX LEA RAX,[0x12b168] MOV dword ptr [RAX],0x27 LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x00117368 MOV dword ptr [RSP + 0x4],0x1 JMP 0x00117426 LAB_00117368: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x28 JZ 0x0011738d LEA RAX,[0x12b164] CMP dword ptr [RAX],0x29 JZ 0x0011738d MOV dword ptr [RSP + 0x4],0x2 JMP 0x00117426 LAB_0011738d: LEA RAX,[0x12b178] CMP dword ptr [RAX],0x0 JLE 0x001173a6 MOV dword ptr [RSP + 0x4],0x3 JMP 0x00117426 LAB_001173a6: LEA RAX,[0x12b178] CMP dword ptr [RAX],0x0 JGE 0x001173bc MOV dword ptr [RSP + 0x4],0x7 JMP 0x00117426 LAB_001173bc: JMP 0x001173be LAB_001173be: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x28 JNZ 0x001173e4 LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x1249d2] MOV AL,0x0 CALL 0x001010f0 JMP 0x001173fc LAB_001173e4: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x1249d0] MOV AL,0x0 CALL 0x001010f0 LAB_001173fc: LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LEA RAX,[0x12b164] MOV dword ptr [RAX],0x2a MOV dword ptr [RSP + 0x4],0x0 LAB_00117426: MOV EAX,dword ptr [RSP + 0x4] POP RCX RET
/* LefDefParser::defwEndPinProperties() */ int4 LefDefParser::defwEndPinProperties(void) { int4 local_4; defwFunc = 0x27; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if ((defwState == 0x28) || (defwState == 0x29)) { if (defwCounter < 1) { if (defwCounter < 0) { local_4 = 7; } else { if (defwState == 0x28) { fprintf(defwFile,"END PINPROPERTIES\n\n"); } else { fprintf(defwFile,";\nEND PINPROPERTIES\n\n"); } defwLines = defwLines + 1; defwState = 0x2a; local_4 = 0; } } else { local_4 = 3; } } else { local_4 = 2; } return local_4; }
58,229
uf_zerofill_skip_zero
eloqsql/storage/myisam/mi_packrec.c
static void uf_zerofill_skip_zero(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((char*) to,(uint) (end-to)); else { end-=rec->space_length_bits; decode_bytes(rec,bit_buff,to,end); bzero((char*) end,rec->space_length_bits); } }
O0
c
uf_zerofill_skip_zero: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbc587 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbc5ab jmp 0xbc5c7 movq -0x10(%rbp), %rdi callq 0xbc0e0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbc5c7 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 jmp 0xbc60b movq -0x8(%rbp), %rax movl 0x1c(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbc7f0 movq -0x20(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
uf_zerofill_skip_zero_0: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BC587 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BC5AB jmp short loc_BC5C7 loc_BC587: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BC5C7 loc_BC5AB: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov eax, eax mov edx, eax xor esi, esi call _memset jmp short loc_BC60B loc_BC5C7: mov rax, [rbp+var_8] mov ecx, [rax+1Ch] mov rax, [rbp+var_20] mov ecx, ecx mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_20], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes_0 mov rdi, [rbp+var_20] mov rax, [rbp+var_8] mov eax, [rax+1Ch] mov edx, eax xor esi, esi call _memset loc_BC60B: add rsp, 20h pop rbp retn
long long uf_zerofill_skip_zero_0(long long a1, int *a2, long long a3, long long a4) { int v4; // eax int v5; // ecx long long v8; // [rsp+0h] [rbp-20h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) goto LABEL_6; return memset(a3, 0LL, (unsigned int)(a4 - a3)); } fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); LABEL_6: v8 = a4 - *(unsigned int *)(a1 + 28); decode_bytes_0(a1, a2, a3, v8); return memset(v8, 0LL, *(unsigned int *)(a1 + 28)); }
uf_zerofill_skip_zero: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bc587 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bc5ab JMP 0x001bc5c7 LAB_001bc587: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bc0e0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bc5c7 LAB_001bc5ab: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 JMP 0x001bc60b LAB_001bc5c7: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x1c] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001bc7f0 MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 LAB_001bc60b: ADD RSP,0x20 POP RBP RET
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; void *__s; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { __s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x1c)); decode_bytes(param_1,param_2,param_3,__s); memset(__s,0,(ulong)*(uint *)(param_1 + 0x1c)); } else { memset(param_3,0,(ulong)(uint)((int)param_4 - (int)param_3)); } return; }
58,230
Conv::report_error(char const*) const
eloqsql/client/mariadb-conv.cc
void report_error(const char *from) const { if (well_formed_error_pos()) { fflush(stdout); fprintf(stderr, "Illegal %s byte sequence at position %d\n", m_fromcs->cs_name.str, (uint) (well_formed_error_pos() - from)); } else if (cannot_convert_error_pos()) { fflush(stdout); fprintf(stderr, "Conversion from %s to %s failed at position %d\n", m_fromcs->cs_name.str, m_tocs->cs_name.str, (uint) (cannot_convert_error_pos() - from)); } }
O0
cpp
Conv::report_error(char const*) const: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x18(%rbp) callq 0x26e60 cmpq $0x0, %rax je 0x266c9 movq 0x1ba946(%rip), %rax # 0x1e0fc0 movq (%rax), %rdi callq 0x253d0 movq -0x18(%rbp), %rdi movq 0x1ba953(%rip), %rax # 0x1e0fe0 movq (%rax), %rax movq %rax, -0x28(%rbp) movq 0xa0(%rdi), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) callq 0x26e60 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rcx subq %rcx, %rax movl %eax, %ecx leaq 0x62aa5(%rip), %rsi # 0x89165 movb $0x0, %al callq 0x254a0 jmp 0x26742 movq -0x18(%rbp), %rdi callq 0x26e80 cmpq $0x0, %rax je 0x26740 movq 0x1ba8e1(%rip), %rax # 0x1e0fc0 movq (%rax), %rdi callq 0x253d0 movq -0x18(%rbp), %rdi movq 0x1ba8ee(%rip), %rax # 0x1e0fe0 movq (%rax), %rax movq %rax, -0x40(%rbp) movq 0xa0(%rdi), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq 0x98(%rdi), %rax movq 0x10(%rax), %rax movq %rax, -0x30(%rbp) callq 0x26e80 movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rdx movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rsi subq %rsi, %rax movl %eax, %r8d leaq 0x62a55(%rip), %rsi # 0x8918e movb $0x0, %al callq 0x254a0 jmp 0x26742 addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
_ZNK4Conv12report_errorEPKc: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8]; this mov [rbp+var_18], rdi call _ZNK18String_copy_status21well_formed_error_posEv; String_copy_status::well_formed_error_pos(void) cmp rax, 0 jz short loc_266C9 mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rdi, [rbp+var_18]; this mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_28], rax mov rax, [rdi+0A0h] mov rax, [rax+10h] mov [rbp+var_20], rax call _ZNK18String_copy_status21well_formed_error_posEv; String_copy_status::well_formed_error_pos(void) mov rdi, [rbp+var_28] mov rdx, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, rcx mov ecx, eax lea rsi, aIllegalSByteSe; "Illegal %s byte sequence at position %d"... mov al, 0 call _fprintf jmp short loc_26742 loc_266C9: mov rdi, [rbp+var_18]; this call _ZNK13String_copier24cannot_convert_error_posEv; String_copier::cannot_convert_error_pos(void) cmp rax, 0 jz short loc_26740 mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rdi, [rbp+var_18]; this mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_40], rax mov rax, [rdi+0A0h] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rdi+98h] mov rax, [rax+10h] mov [rbp+var_30], rax call _ZNK13String_copier24cannot_convert_error_posEv; String_copier::cannot_convert_error_pos(void) mov rdi, [rbp+var_40] mov rdx, [rbp+var_38] mov rcx, [rbp+var_30] mov rsi, [rbp+var_10] sub rax, rsi mov r8d, eax lea rsi, aConversionFrom; "Conversion from %s to %s failed at posi"... mov al, 0 call _fprintf loc_26740: jmp short $+2 loc_26742: add rsp, 40h pop rbp retn
long long Conv::report_error(Conv *this, const char *a2) { int v2; // eax long long result; // rax int v4; // eax long long v5; // [rsp+0h] [rbp-40h] const char *v6; // [rsp+8h] [rbp-38h] const char *v7; // [rsp+10h] [rbp-30h] long long v8; // [rsp+18h] [rbp-28h] const char *v9; // [rsp+20h] [rbp-20h] if ( String_copy_status::well_formed_error_pos(this) ) { fflush(stdout); v8 = stderr; v9 = *(const char **)(*((_QWORD *)this + 20) + 16LL); v2 = String_copy_status::well_formed_error_pos(this); return fprintf(v8, "Illegal %s byte sequence at position %d\n", v9, v2 - (int)a2); } else { result = String_copier::cannot_convert_error_pos(this); if ( result ) { fflush(stdout); v5 = stderr; v6 = *(const char **)(*((_QWORD *)this + 20) + 16LL); v7 = *(const char **)(*((_QWORD *)this + 19) + 16LL); v4 = String_copier::cannot_convert_error_pos(this); return fprintf(v5, "Conversion from %s to %s failed at position %d\n", v6, v7, v4 - (int)a2); } } return result; }
report_error: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RDI CALL 0x00126e60 CMP RAX,0x0 JZ 0x001266c9 MOV RAX,qword ptr [0x002e0fc0] MOV RDI,qword ptr [RAX] CALL 0x001253d0 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [0x002e0fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RDI + 0xa0] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX CALL 0x00126e60 MOV RDI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV ECX,EAX LEA RSI,[0x189165] MOV AL,0x0 CALL 0x001254a0 JMP 0x00126742 LAB_001266c9: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00126e80 CMP RAX,0x0 JZ 0x00126740 MOV RAX,qword ptr [0x002e0fc0] MOV RDI,qword ptr [RAX] CALL 0x001253d0 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [0x002e0fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RDI + 0xa0] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RDI + 0x98] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x30],RAX CALL 0x00126e80 MOV RDI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x10] SUB RAX,RSI MOV R8D,EAX LEA RSI,[0x18918e] MOV AL,0x0 CALL 0x001254a0 LAB_00126740: JMP 0x00126742 LAB_00126742: ADD RSP,0x40 POP RBP RET
/* Conv::report_error(char const*) const */ void __thiscall Conv::report_error(Conv *this,char *param_1) { FILE *pFVar1; int8 uVar2; int8 uVar3; int iVar4; long lVar5; lVar5 = String_copy_status::well_formed_error_pos((String_copy_status *)this); if (lVar5 == 0) { lVar5 = String_copier::cannot_convert_error_pos((String_copier *)this); if (lVar5 != 0) { fflush(*(FILE **)PTR_stdout_002e0fc0); pFVar1 = *(FILE **)PTR_stderr_002e0fe0; uVar2 = *(int8 *)(*(long *)(this + 0xa0) + 0x10); uVar3 = *(int8 *)(*(long *)(this + 0x98) + 0x10); iVar4 = String_copier::cannot_convert_error_pos((String_copier *)this); fprintf(pFVar1,"Conversion from %s to %s failed at position %d\n",uVar2,uVar3, (ulong)(uint)(iVar4 - (int)param_1)); } } else { fflush(*(FILE **)PTR_stdout_002e0fc0); pFVar1 = *(FILE **)PTR_stderr_002e0fe0; uVar2 = *(int8 *)(*(long *)(this + 0xa0) + 0x10); iVar4 = String_copy_status::well_formed_error_pos((String_copy_status *)this); fprintf(pFVar1,"Illegal %s byte sequence at position %d\n",uVar2, (ulong)(uint)(iVar4 - (int)param_1)); } return; }
58,231
Conv::report_error(char const*) const
eloqsql/client/mariadb-conv.cc
void report_error(const char *from) const { if (well_formed_error_pos()) { fflush(stdout); fprintf(stderr, "Illegal %s byte sequence at position %d\n", m_fromcs->cs_name.str, (uint) (well_formed_error_pos() - from)); } else if (cannot_convert_error_pos()) { fflush(stdout); fprintf(stderr, "Conversion from %s to %s failed at position %d\n", m_fromcs->cs_name.str, m_tocs->cs_name.str, (uint) (cannot_convert_error_pos() - from)); } }
O3
cpp
Conv::report_error(char const*) const: pushq %rbp movq %rsp, %rbp movq %rsi, %rdx cmpq $0x0, 0x8(%rdi) jne 0x263b3 cmpq $0x0, 0x10(%rdi) jne 0x263be popq %rbp retq leaq 0x8(%rdi), %rsi callq 0x247ef jmp 0x263b1 leaq 0x10(%rdi), %rsi callq 0x24843 jmp 0x263b1 nop
_ZNK4Conv12report_errorEPKc: push rbp mov rbp, rsp mov rdx, rsi cmp qword ptr [rdi+8], 0 jnz short loc_263B3 cmp qword ptr [rdi+10h], 0 jnz short loc_263BE loc_263B1: pop rbp retn loc_263B3: lea rsi, [rdi+8] call _ZNK4Conv12report_errorEPKc_cold_1; Conv::report_error(char const*) [clone] jmp short loc_263B1 loc_263BE: lea rsi, [rdi+10h] call _ZNK4Conv12report_errorEPKc_cold_2; Conv::report_error(char const*) [clone] jmp short loc_263B1
long long Conv::report_error(Conv *this, const char *a2) { long long result; // rax if ( *((_QWORD *)this + 1) ) return Conv::report_error((long long)this, (_DWORD *)this + 2, (int)a2); if ( *((_QWORD *)this + 2) ) return Conv::report_error((long long)this, (_DWORD *)this + 4, (int)a2); return result; }
report_error: PUSH RBP MOV RBP,RSP MOV RDX,RSI CMP qword ptr [RDI + 0x8],0x0 JNZ 0x001263b3 CMP qword ptr [RDI + 0x10],0x0 JNZ 0x001263be LAB_001263b1: POP RBP RET LAB_001263b3: LEA RSI,[RDI + 0x8] CALL 0x001247ef JMP 0x001263b1 LAB_001263be: LEA RSI,[RDI + 0x10] CALL 0x00124843 JMP 0x001263b1
/* Conv::report_error(char const*) const */ void Conv::report_error(char *param_1) { if (*(long *)(param_1 + 8) == 0) { if (*(long *)(param_1 + 0x10) != 0) { report_error(param_1); } } else { report_error(param_1); } return; }
58,232
my_error_unregister_all
eloqsql/mysys/my_error.c
void my_error_unregister_all(void) { struct my_err_head *cursor, *saved_next; for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) { /* We need this ptr, but we're about to free its container, so save it. */ saved_next= cursor->meh_next; my_free(cursor); } my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ my_errmsgs_list= &my_errmsgs_globerrs; }
O3
c
my_error_unregister_all: movq 0x2ed213(%rip), %rdi # 0x393190 testq %rdi, %rdi je 0xa5f9e pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rbx callq 0xaa406 movq %rbx, %rdi testq %rbx, %rbx jne 0xa5f88 addq $0x8, %rsp popq %rbx popq %rbp movq $0x0, 0x2ed1e7(%rip) # 0x393190 leaq 0x2ed1e0(%rip), %rax # 0x393190 movq %rax, 0x2ed1d1(%rip) # 0x393188 retq
my_error_unregister_all: mov rdi, cs:my_errmsgs_globerrs test rdi, rdi jz short loc_A5F9E push rbp mov rbp, rsp push rbx push rax loc_A5F88: mov rbx, [rdi] call my_free mov rdi, rbx test rbx, rbx jnz short loc_A5F88 add rsp, 8 pop rbx pop rbp loc_A5F9E: mov cs:my_errmsgs_globerrs, 0 lea rax, my_errmsgs_globerrs mov cs:my_errmsgs_list, rax retn
long long *my_error_unregister_all() { _QWORD *v0; // rdi _QWORD *v1; // rbx long long *result; // rax v0 = (_QWORD *)my_errmsgs_globerrs; if ( my_errmsgs_globerrs ) { do { v1 = (_QWORD *)*v0; my_free(v0); v0 = v1; } while ( v1 ); } my_errmsgs_globerrs = 0LL; result = &my_errmsgs_globerrs; my_errmsgs_list = &my_errmsgs_globerrs; return result; }
my_error_unregister_all: MOV RDI,qword ptr [0x00493190] TEST RDI,RDI JZ 0x001a5f9e PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LAB_001a5f88: MOV RBX,qword ptr [RDI] CALL 0x001aa406 MOV RDI,RBX TEST RBX,RBX JNZ 0x001a5f88 ADD RSP,0x8 POP RBX POP RBP LAB_001a5f9e: MOV qword ptr [0x00493190],0x0 LEA RAX,[0x493190] MOV qword ptr [0x00493188],RAX RET
void my_error_unregister_all(void) { long *plVar1; plVar1 = my_errmsgs_globerrs; if (my_errmsgs_globerrs != (long *)0x0) { do { plVar1 = (long *)*plVar1; my_free(); } while (plVar1 != (long *)0x0); } my_errmsgs_globerrs = (long *)0x0; my_errmsgs_list = (int *)&my_errmsgs_globerrs; return; }
58,233
init_state_maps
eloqsql/mysys/charset.c
static my_bool init_state_maps(struct charset_info_st *cs) { uint i; uchar *state_map; uchar *ident_map; if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME)))) return 1; cs->ident_map= ident_map= state_map + 256; /* Fill state_map with states to get a faster parser */ for (i=0; i < 256 ; i++) { if (my_isalpha(cs,i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isdigit(cs,i)) state_map[i]=(uchar) MY_LEX_NUMBER_IDENT; else if (is_multi_byte_ident(cs, i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isspace(cs,i)) state_map[i]=(uchar) MY_LEX_SKIP; else state_map[i]=(uchar) MY_LEX_CHAR; } state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL; state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT; state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON; state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR; state_map[0]=(uchar) MY_LEX_EOL; state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE; state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT; state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT; state_map[(uchar)'@']= (uchar) MY_LEX_USER_END; state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER; state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER; state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT; state_map[(uchar)',']= (uchar) MY_LEX_COMMA; state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER; /* Create a second map to make it faster to find identifiers */ for (i=0; i < 256 ; i++) { ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT || state_map[i] == MY_LEX_NUMBER_IDENT); } /* Special handling of hex and binary strings */ state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX; state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN; state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR; return 0; }
O0
c
init_state_maps: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x200, %edi # imm = 0x200 movl $0x10, %esi callq 0x2e6a0 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rcx movq %rax, 0x80(%rcx) cmpq $0x0, %rax jne 0x349a9 movb $0x1, -0x1(%rbp) jmp 0x34bd6 movq -0x20(%rbp), %rcx addq $0x100, %rcx # imm = 0x100 movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rcx, 0x88(%rax) movl $0x0, -0x14(%rbp) cmpl $0x100, -0x14(%rbp) # imm = 0x100 jae 0x34a93 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x3, %eax cmpl $0x0, %eax je 0x34a02 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x2, (%rax,%rcx) jmp 0x34a83 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x34a2a movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0xe, (%rax,%rcx) jmp 0x34a81 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %eax movzbl %al, %esi callq 0x34cb0 cmpb $0x0, %al je 0x34a4a movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x2, (%rax,%rcx) jmp 0x34a7f movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x34a72 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x1a, (%rax,%rcx) jmp 0x34a7d movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x1, (%rax,%rcx) jmp 0x34a7f jmp 0x34a81 jmp 0x34a83 jmp 0x34a85 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x349ca movq -0x20(%rbp), %rax movb $0x2, 0x24(%rax) movq -0x20(%rbp), %rax movb $0x2, 0x5f(%rax) movq -0x20(%rbp), %rax movb $0xa, 0x27(%rax) movq -0x20(%rbp), %rax movb $0x10, 0x2e(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x21(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x3d(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x3e(%rax) movq -0x20(%rbp), %rax movb $0x9, 0x3c(%rax) movq -0x20(%rbp), %rax movb $0x11, 0x7c(%rax) movq -0x20(%rbp), %rax movb $0x11, 0x26(%rax) movq -0x20(%rbp), %rax movb $0xb, 0x23(%rax) movq -0x20(%rbp), %rax movb $0x16, 0x3b(%rax) movq -0x20(%rbp), %rax movb $0x17, 0x3a(%rax) movq -0x20(%rbp), %rax movb $0x12, (%rax) movq -0x20(%rbp), %rax movb $0x13, 0x5c(%rax) movq -0x20(%rbp), %rax movb $0x14, 0x2f(%rax) movq -0x20(%rbp), %rax movb $0x15, 0x2a(%rax) movq -0x20(%rbp), %rax movb $0x18, 0x40(%rax) movq -0x20(%rbp), %rax movb $0x1b, 0x60(%rax) movq -0x20(%rbp), %rax movb $0x21, 0x22(%rax) movq -0x20(%rbp), %rax movb $0x22, 0x2d(%rax) movq -0x20(%rbp), %rax movb $0x24, 0x2c(%rax) movq -0x20(%rbp), %rax movb $0x23, 0x3f(%rax) movl $0x0, -0x14(%rbp) cmpl $0x100, -0x14(%rbp) # imm = 0x100 jae 0x34ba2 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movzbl (%rax,%rcx), %ecx movb $0x1, %al cmpl $0x2, %ecx movb %al, -0x29(%rbp) je 0x34b83 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movzbl (%rax,%rcx), %eax cmpl $0xe, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %dl movq -0x28(%rbp), %rax movl -0x14(%rbp), %ecx movb %dl, (%rax,%rcx) movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x34b51 movq -0x20(%rbp), %rax movb $0x1e, 0x58(%rax) movq -0x20(%rbp), %rax movb $0x1e, 0x78(%rax) movq -0x20(%rbp), %rax movb $0x1f, 0x42(%rax) movq -0x20(%rbp), %rax movb $0x1f, 0x62(%rax) movq -0x20(%rbp), %rax movb $0x20, 0x4e(%rax) movq -0x20(%rbp), %rax movb $0x20, 0x6e(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nop
init_state_maps: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov edi, 200h mov esi, 10h call my_once_alloc mov [rbp+var_20], rax mov rcx, [rbp+var_10] mov [rcx+80h], rax cmp rax, 0 jnz short loc_349A9 mov [rbp+var_1], 1 jmp loc_34BD6 loc_349A9: mov rcx, [rbp+var_20] add rcx, 100h mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov [rax+88h], rcx mov [rbp+var_14], 0 loc_349CA: cmp [rbp+var_14], 100h jnb loc_34A93 mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 3 cmp eax, 0 jz short loc_34A02 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 2 jmp loc_34A83 loc_34A02: mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 4 cmp eax, 0 jz short loc_34A2A mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 0Eh jmp short loc_34A81 loc_34A2A: mov rdi, [rbp+var_10] mov eax, [rbp+var_14] movzx esi, al call is_multi_byte_ident cmp al, 0 jz short loc_34A4A mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 2 jmp short loc_34A7F loc_34A4A: mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 jz short loc_34A72 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 1Ah jmp short loc_34A7D loc_34A72: mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 1 loc_34A7D: jmp short $+2 loc_34A7F: jmp short $+2 loc_34A81: jmp short $+2 loc_34A83: jmp short $+2 loc_34A85: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp loc_349CA loc_34A93: mov rax, [rbp+var_20] mov byte ptr [rax+24h], 2 mov rax, [rbp+var_20] mov byte ptr [rax+5Fh], 2 mov rax, [rbp+var_20] mov byte ptr [rax+27h], 0Ah mov rax, [rbp+var_20] mov byte ptr [rax+2Eh], 10h mov rax, [rbp+var_20] mov byte ptr [rax+21h], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Dh], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Eh], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Ch], 9 mov rax, [rbp+var_20] mov byte ptr [rax+7Ch], 11h mov rax, [rbp+var_20] mov byte ptr [rax+26h], 11h mov rax, [rbp+var_20] mov byte ptr [rax+23h], 0Bh mov rax, [rbp+var_20] mov byte ptr [rax+3Bh], 16h mov rax, [rbp+var_20] mov byte ptr [rax+3Ah], 17h mov rax, [rbp+var_20] mov byte ptr [rax], 12h mov rax, [rbp+var_20] mov byte ptr [rax+5Ch], 13h mov rax, [rbp+var_20] mov byte ptr [rax+2Fh], 14h mov rax, [rbp+var_20] mov byte ptr [rax+2Ah], 15h mov rax, [rbp+var_20] mov byte ptr [rax+40h], 18h mov rax, [rbp+var_20] mov byte ptr [rax+60h], 1Bh mov rax, [rbp+var_20] mov byte ptr [rax+22h], 21h ; '!' mov rax, [rbp+var_20] mov byte ptr [rax+2Dh], 22h ; '"' mov rax, [rbp+var_20] mov byte ptr [rax+2Ch], 24h ; '$' mov rax, [rbp+var_20] mov byte ptr [rax+3Fh], 23h ; '#' mov [rbp+var_14], 0 loc_34B51: cmp [rbp+var_14], 100h jnb short loc_34BA2 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] movzx ecx, byte ptr [rax+rcx] mov al, 1 cmp ecx, 2 mov [rbp+var_29], al jz short loc_34B83 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] movzx eax, byte ptr [rax+rcx] cmp eax, 0Eh setz al mov [rbp+var_29], al loc_34B83: mov al, [rbp+var_29] and al, 1 movzx eax, al mov dl, al mov rax, [rbp+var_28] mov ecx, [rbp+var_14] mov [rax+rcx], dl mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_34B51 loc_34BA2: mov rax, [rbp+var_20] mov byte ptr [rax+58h], 1Eh mov rax, [rbp+var_20] mov byte ptr [rax+78h], 1Eh mov rax, [rbp+var_20] mov byte ptr [rax+42h], 1Fh mov rax, [rbp+var_20] mov byte ptr [rax+62h], 1Fh mov rax, [rbp+var_20] mov byte ptr [rax+4Eh], 20h ; ' ' mov rax, [rbp+var_20] mov byte ptr [rax+6Eh], 20h ; ' ' mov [rbp+var_1], 0 loc_34BD6: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char init_state_maps(_QWORD *a1) { bool v2; // [rsp+7h] [rbp-29h] char *v3; // [rsp+10h] [rbp-20h] unsigned int i; // [rsp+1Ch] [rbp-14h] unsigned int j; // [rsp+1Ch] [rbp-14h] v3 = my_once_alloc(512LL, 16); a1[16] = v3; if ( !v3 ) return 1; a1[17] = v3 + 256; for ( i = 0; i < 0x100; ++i ) { if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 3) != 0 ) { v3[i] = 2; } else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 4) != 0 ) { v3[i] = 14; } else if ( (unsigned __int8)is_multi_byte_ident(a1, (unsigned __int8)i) ) { v3[i] = 2; } else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 8) != 0 ) { v3[i] = 26; } else { v3[i] = 1; } } v3[36] = 2; v3[95] = 2; v3[39] = 10; v3[46] = 16; v3[33] = 8; v3[61] = 8; v3[62] = 8; v3[60] = 9; v3[124] = 17; v3[38] = 17; v3[35] = 11; v3[59] = 22; v3[58] = 23; *v3 = 18; v3[92] = 19; v3[47] = 20; v3[42] = 21; v3[64] = 24; v3[96] = 27; v3[34] = 33; v3[45] = 34; v3[44] = 36; v3[63] = 35; for ( j = 0; j < 0x100; ++j ) { v2 = 1; if ( v3[j] != 2 ) v2 = v3[j] == 14; v3[j + 256] = v2; } v3[88] = 30; v3[120] = 30; v3[66] = 31; v3[98] = 31; v3[78] = 32; v3[110] = 32; return 0; }
init_state_maps: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV EDI,0x200 MOV ESI,0x10 CALL 0x0012e6a0 MOV qword ptr [RBP + -0x20],RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x80],RAX CMP RAX,0x0 JNZ 0x001349a9 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00134bd6 LAB_001349a9: MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x100 MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],RCX MOV dword ptr [RBP + -0x14],0x0 LAB_001349ca: CMP dword ptr [RBP + -0x14],0x100 JNC 0x00134a93 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x3 CMP EAX,0x0 JZ 0x00134a02 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x2 JMP 0x00134a83 LAB_00134a02: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x4 CMP EAX,0x0 JZ 0x00134a2a MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0xe JMP 0x00134a81 LAB_00134a2a: MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOVZX ESI,AL CALL 0x00134cb0 CMP AL,0x0 JZ 0x00134a4a MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x2 JMP 0x00134a7f LAB_00134a4a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 JZ 0x00134a72 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x1a JMP 0x00134a7d LAB_00134a72: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x1 LAB_00134a7d: JMP 0x00134a7f LAB_00134a7f: JMP 0x00134a81 LAB_00134a81: JMP 0x00134a83 LAB_00134a83: JMP 0x00134a85 LAB_00134a85: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001349ca LAB_00134a93: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x24],0x2 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x5f],0x2 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x27],0xa MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2e],0x10 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x21],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3d],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3e],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3c],0x9 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x7c],0x11 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x26],0x11 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x23],0xb MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3b],0x16 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3a],0x17 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x12 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x5c],0x13 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2f],0x14 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2a],0x15 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x40],0x18 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x60],0x1b MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x22],0x21 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2d],0x22 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2c],0x24 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3f],0x23 MOV dword ptr [RBP + -0x14],0x0 LAB_00134b51: CMP dword ptr [RBP + -0x14],0x100 JNC 0x00134ba2 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,byte ptr [RAX + RCX*0x1] MOV AL,0x1 CMP ECX,0x2 MOV byte ptr [RBP + -0x29],AL JZ 0x00134b83 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xe SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_00134b83: MOV AL,byte ptr [RBP + -0x29] AND AL,0x1 MOVZX EAX,AL MOV DL,AL MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00134b51 LAB_00134ba2: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x58],0x1e MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x78],0x1e MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x42],0x1f MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x62],0x1f MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x4e],0x20 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x6e],0x20 MOV byte ptr [RBP + -0x1],0x0 LAB_00134bd6: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 init_state_maps(long param_1) { char cVar1; int1 *puVar2; bool local_31; uint local_1c; int1 local_9; puVar2 = (int1 *)my_once_alloc(0x200,0x10); *(int1 **)(param_1 + 0x80) = puVar2; if (puVar2 == (int1 *)0x0) { local_9 = 1; } else { *(int1 **)(param_1 + 0x88) = puVar2 + 0x100; for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 3) == 0) { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 4) == 0) { cVar1 = is_multi_byte_ident(param_1,local_1c & 0xff); if (cVar1 == '\0') { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 8) == 0) { puVar2[local_1c] = 1; } else { puVar2[local_1c] = 0x1a; } } else { puVar2[local_1c] = 2; } } else { puVar2[local_1c] = 0xe; } } else { puVar2[local_1c] = 2; } } puVar2[0x24] = 2; puVar2[0x5f] = 2; puVar2[0x27] = 10; puVar2[0x2e] = 0x10; puVar2[0x21] = 8; puVar2[0x3d] = 8; puVar2[0x3e] = 8; puVar2[0x3c] = 9; puVar2[0x7c] = 0x11; puVar2[0x26] = 0x11; puVar2[0x23] = 0xb; puVar2[0x3b] = 0x16; puVar2[0x3a] = 0x17; *puVar2 = 0x12; puVar2[0x5c] = 0x13; puVar2[0x2f] = 0x14; puVar2[0x2a] = 0x15; puVar2[0x40] = 0x18; puVar2[0x60] = 0x1b; puVar2[0x22] = 0x21; puVar2[0x2d] = 0x22; puVar2[0x2c] = 0x24; puVar2[0x3f] = 0x23; for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) { local_31 = true; if (puVar2[local_1c] != '\x02') { local_31 = puVar2[local_1c] == '\x0e'; } (puVar2 + 0x100)[local_1c] = local_31; } puVar2[0x58] = 0x1e; puVar2[0x78] = 0x1e; puVar2[0x42] = 0x1f; puVar2[0x62] = 0x1f; puVar2[0x4e] = 0x20; puVar2[0x6e] = 0x20; local_9 = 0; } return local_9; }
58,234
clip_image_encode
llama.cpp/examples/llava/clip.cpp
bool clip_image_encode(struct clip_ctx * ctx, const int n_threads, clip_image_f32 * img, float * vec) { if (!ctx->has_vision_encoder) { LOG_ERR("%s: This gguf file seems to have no vision encoder\n", __func__); return false; } clip_image_f32_batch imgs{}; imgs.size = 1; imgs.data = img; return clip_image_batch_encode(ctx, n_threads, &imgs, vec); }
O3
cpp
clip_image_encode: pushq %rbx subq $0x10, %rsp cmpb $0x0, 0x1(%rdi) je 0x33b27 movq %rsp, %rax movq $0x1, 0x8(%rax) movq %rdx, (%rax) movq %rax, %rdx callq 0x33b5b movl %eax, %ebx jmp 0x33b53 leaq 0x15c302(%rip), %rax # 0x18fe30 cmpl $0x4, (%rax) jg 0x33b51 leaq 0x104bf5(%rip), %rsi # 0x13872f leaq 0x104c27(%rip), %rdx # 0x138768 xorl %ebx, %ebx movl $0x4, %edi xorl %eax, %eax callq 0x314f3 jmp 0x33b53 xorl %ebx, %ebx movl %ebx, %eax addq $0x10, %rsp popq %rbx retq
clip_image_encode: push rbx sub rsp, 10h cmp byte ptr [rdi+1], 0 jz short loc_33B27 mov rax, rsp mov qword ptr [rax+8], 1 mov [rax], rdx mov rdx, rax call clip_image_batch_encode mov ebx, eax jmp short loc_33B53 loc_33B27: lea rax, g_logger_state cmp dword ptr [rax], 4 jg short loc_33B51 lea rsi, aSThisGgufFileS; "%s: This gguf file seems to have no vis"... lea rdx, aClipImageEncod; "clip_image_encode" xor ebx, ebx mov edi, 4 xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz; clip_log_internal(ggml_log_level,char const*,...) jmp short loc_33B53 loc_33B51: xor ebx, ebx loc_33B53: mov eax, ebx add rsp, 10h pop rbx retn
long long clip_image_encode( 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 int v14; // ebx _QWORD v16[3]; // [rsp+0h] [rbp-18h] BYREF if ( *(_BYTE *)(a1 + 1) ) { v16[1] = 1LL; v16[0] = a3; return (unsigned int)clip_image_batch_encode(a1, a2, v16); } else { v14 = 0; if ( g_logger_state <= 4 ) clip_log_internal( 4u, (long long)"%s: This gguf file seems to have no vision encoder\n", (long long)"clip_image_encode", a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); } return v14; }
clip_image_encode: PUSH RBX SUB RSP,0x10 CMP byte ptr [RDI + 0x1],0x0 JZ 0x00133b27 MOV RAX,RSP MOV qword ptr [RAX + 0x8],0x1 MOV qword ptr [RAX],RDX MOV RDX,RAX CALL 0x00133b5b MOV EBX,EAX JMP 0x00133b53 LAB_00133b27: LEA RAX,[0x28fe30] CMP dword ptr [RAX],0x4 JG 0x00133b51 LEA RSI,[0x23872f] LEA RDX,[0x238768] XOR EBX,EBX MOV EDI,0x4 XOR EAX,EAX CALL 0x001314f3 JMP 0x00133b53 LAB_00133b51: XOR EBX,EBX LAB_00133b53: MOV EAX,EBX ADD RSP,0x10 POP RBX RET
int4 clip_image_encode(long param_1,int8 param_2,int8 param_3) { int4 uVar1; int8 local_18; int8 local_10; if (*(char *)(param_1 + 1) == '\0') { if (g_logger_state < 5) { uVar1 = 0; clip_log_internal(4,"%s: This gguf file seems to have no vision encoder\n","clip_image_encode" ); } else { uVar1 = 0; } } else { local_10 = 1; local_18 = param_3; uVar1 = clip_image_batch_encode(param_1,param_2,&local_18); } return uVar1; }
58,235
inline_mysql_file_seek
eloqsql/include/mysql/psi/mysql_file.h
static inline my_off_t inline_mysql_file_seek( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t pos, int whence, myf flags) { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_seek(file, pos, whence, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_seek(file, pos, whence, flags); return result; }
O0
c
inline_mysql_file_seek: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x20bcc0(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x8, %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 0xb6613 leaq 0x20bc7a(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xf6650 movq %rax, -0x38(%rbp) leaq 0x20bc43(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xb6632 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xf6650 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nop
inline_mysql_file_seek_4: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d 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, 8 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 short loc_B6613 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] xor ecx, ecx mov esi, ecx call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_B6632 loc_B6613: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_B6632: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
long long inline_mysql_file_seek_4( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] long long v9; // [rsp+58h] [rbp-38h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL); if ( !v8 ) return my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14); v9 = my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL); return v9; }
inline_mysql_file_seek: PUSH RBP MOV RBP,RSP SUB RSP,0x90 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 dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x8 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 0x001b6613 LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6650 MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001b6632 LAB_001b6613: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6650 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001b6632: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
int8 inline_mysql_file_seek (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int8 local_40; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int8 local_10; local_38 = param_6; local_2c = 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,8); if (local_48 == 0) { local_10 = my_seek(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c); local_40 = my_seek(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,0); local_10 = local_40; } return local_10; }
58,236
my_copy
eloqsql/mysys/my_copy.c
int my_copy(const char *from, const char *to, myf MyFlags) { size_t Count; my_bool new_file_stat= 0; /* 1 if we could stat "to" */ int create_flag; File from_file,to_file; uchar buff[IO_SIZE]; MY_STAT stat_buff,new_stat_buff; my_bool file_created= 0; DBUG_ENTER("my_copy"); DBUG_PRINT("my",("from %s to %s MyFlags %lu", from, to, MyFlags)); from_file=to_file= -1; DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */ if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ new_file_stat= MY_TEST(my_stat((char*) to, &new_stat_buff, MYF(0))); if ((from_file=my_open(from,O_RDONLY | O_SHARE,MyFlags)) >= 0) { if (!my_stat(from, &stat_buff, MyFlags)) { my_errno=errno; goto err; } if (MyFlags & MY_HOLD_ORIGINAL_MODES && new_file_stat) stat_buff=new_stat_buff; create_flag= (MyFlags & MY_DONT_OVERWRITE_FILE) ? O_EXCL : O_TRUNC; if ((to_file= my_create(to,(int) stat_buff.st_mode, O_WRONLY | create_flag | O_BINARY | O_SHARE, MyFlags)) < 0) goto err; file_created= 1; while ((Count=my_read(from_file, buff, sizeof(buff), MyFlags)) != 0) { if (Count == (uint) -1 || my_write(to_file,buff,Count,MYF(MyFlags | MY_NABP))) goto err; } /* sync the destination file */ if (MyFlags & MY_SYNC) { if (my_sync(to_file, MyFlags)) goto err; } if (my_close(from_file,MyFlags) | my_close(to_file,MyFlags)) DBUG_RETURN(-1); /* Error on close */ from_file=to_file= -1; /* Files are closed */ /* Copy modes if possible */ if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat) DBUG_RETURN(0); /* File copyed but not stat */ /* Copy modes */ if (chmod(to, stat_buff.st_mode & 07777)) { my_errno= errno; if (MyFlags & MY_WME) my_error(EE_CHANGE_PERMISSIONS, MYF(ME_BELL), to, errno); if (MyFlags & MY_FAE) goto err; } #if !defined(_WIN32) /* Copy ownership */ if (chown(to, stat_buff.st_uid, stat_buff.st_gid)) { my_errno= errno; if (MyFlags & MY_WME) my_error(EE_CANT_COPY_OWNERSHIP, MYF(ME_BELL), to, errno); if (MyFlags & MY_FAE) goto err; } #endif if (MyFlags & MY_COPYTIME) { struct utimbuf timep; timep.actime = stat_buff.st_atime; timep.modtime = stat_buff.st_mtime; (void) utime((char*) to, &timep); /* last accessed and modified times */ } DBUG_RETURN(0); } err: if (from_file >= 0) (void) my_close(from_file,MyFlags); if (to_file >= 0) (void) my_close(to_file, MyFlags); /* attempt to delete the to-file we've partially written */ if (file_created) (void) my_delete(to, MyFlags); DBUG_RETURN(-1); }
O3
c
my_copy: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1148, %rsp # imm = 0x1148 movq %rdx, %r14 movq %rdi, %r13 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testb %r14b, %r14b movq %rsi, -0x1038(%rbp) js 0xa5691 movl $0x0, -0x103c(%rbp) xorl %ebx, %ebx jmp 0xa56b4 movq %rsi, %rcx leaq -0x1170(%rbp), %rsi movq %rcx, %rdi xorl %edx, %edx callq 0xa9ebb testq %rax, %rax setne %bl sete %al movl %eax, -0x103c(%rbp) movq %r13, %rdi xorl %esi, %esi movq %r14, %rdx callq 0xaa79c movl $0xffffffff, %r15d # imm = 0xFFFFFFFF testl %eax, %eax js 0xa57de movl %eax, %r12d leaq -0x10e0(%rbp), %rsi movq %r13, %rdi movq %r14, %rdx callq 0xa9ebb testq %rax, %rax je 0xa577f testb %bl, %bl je 0xa5709 leaq -0x10e0(%rbp), %rdi leaq -0x1170(%rbp), %rsi movl $0x90, %edx callq 0x2a0a0 btl $0xb, %r14d movl -0x10c8(%rbp), %esi movl $0x201, %eax # imm = 0x201 movl $0x81, %edx cmovael %eax, %edx movq -0x1038(%rbp), %rdi movq %r14, %rcx callq 0xa5934 testl %eax, %eax js 0xa578d movl %eax, %r13d movq %r14, %rbx orq $0x4, %rbx leaq -0x1030(%rbp), %r15 movl $0x1000, %edx # imm = 0x1000 movl %r12d, %edi movq %r15, %rsi movq %r14, %rcx callq 0xaad5c testq %rax, %rax je 0xa579a movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0xa57b0 movl %r13d, %edi movq %r15, %rsi movq %rax, %rdx movq %rbx, %rcx callq 0x30d44 testq %rax, %rax je 0xa5745 jmp 0xa57b0 callq 0x2a7f0 movl (%rax), %ebx callq 0xac2be movl %ebx, (%rax) movl %r12d, %edi movq %r14, %rsi callq 0xaa941 jmp 0xa57de btl $0xc, %r14d jae 0xa5806 movl %r13d, %edi movq %r14, %rsi callq 0xabc40 testl %eax, %eax je 0xa5806 movl %r12d, %edi movq %r14, %rsi callq 0xaa941 movl %r13d, %edi movq %r14, %rsi callq 0xaa941 movq -0x1038(%rbp), %rbx movq %rbx, %rdi movq %r14, %rsi callq 0xa59bc movl $0xffffffff, %r15d # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xa592f movl %r15d, %eax addq $0x1148, %rsp # imm = 0x1148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %r12d, %edi movq %r14, %rsi callq 0xaa941 movl %eax, %ebx movl %r13d, %edi movq %r14, %rsi callq 0xaa941 xorl %r15d, %r15d orl %ebx, %eax setne %al movl -0x103c(%rbp), %edx orb %al, %dl testb $0x1, %dl je 0xa583b movb %al, %r15b negl %r15d jmp 0xa57de movl $0xfff, %esi # imm = 0xFFF andl -0x10c8(%rbp), %esi movq -0x1038(%rbp), %rbx movq %rbx, %rdi callq 0x2a100 testl %eax, %eax je 0xa589d callq 0x2a7f0 movq %rax, %rbx movl (%rax), %r15d callq 0xac2be movl %r15d, (%rax) testb $0x10, %r14b je 0xa588c movl (%rbx), %ecx movl $0x4, %esi movl $0x20, %edi movq -0x1038(%rbp), %rdx xorl %eax, %eax callq 0xa5c33 testb $0x8, %r14b movq -0x1038(%rbp), %rbx jne 0xa57cd movl -0x10c4(%rbp), %esi movl -0x10c0(%rbp), %edx movq %rbx, %rdi callq 0x2a3b0 testl %eax, %eax je 0xa58f9 callq 0x2a7f0 movq %rax, %rbx movl (%rax), %r15d callq 0xac2be movl %r15d, (%rax) testb $0x10, %r14b je 0xa58e8 movl (%rbx), %ecx movl $0x4, %esi movl $0x23, %edi movq -0x1038(%rbp), %rdx xorl %eax, %eax callq 0xa5c33 testb $0x8, %r14b movq -0x1038(%rbp), %rbx jne 0xa57cd xorl %r15d, %r15d testb $0x40, %r14b je 0xa57de movq -0x1098(%rbp), %rax movq -0x1088(%rbp), %rcx leaq -0x1050(%rbp), %rsi movq %rax, (%rsi) movq %rcx, 0x8(%rsi) movq %rbx, %rdi callq 0x2a600 jmp 0xa57de callq 0x2a250
my_copy: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 1148h mov r14, rdx mov r13, rdi mov rax, fs:28h mov [rbp+var_30], rax test r14b, r14b mov [rbp+var_1038], rsi js short loc_A5691 mov [rbp+var_103C], 0 xor ebx, ebx jmp short loc_A56B4 loc_A5691: mov rcx, rsi lea rsi, [rbp+var_1170] mov rdi, rcx xor edx, edx call my_stat test rax, rax setnz bl setz al mov [rbp+var_103C], eax loc_A56B4: mov rdi, r13 xor esi, esi mov rdx, r14 call my_open mov r15d, 0FFFFFFFFh test eax, eax js loc_A57DE mov r12d, eax lea rsi, [rbp+var_10E0] mov rdi, r13 mov rdx, r14 call my_stat test rax, rax jz loc_A577F test bl, bl jz short loc_A5709 lea rdi, [rbp+var_10E0] lea rsi, [rbp+var_1170] mov edx, 90h call _memcpy loc_A5709: bt r14d, 0Bh mov esi, [rbp+var_10C8] mov eax, 201h mov edx, 81h cmovnb edx, eax mov rdi, [rbp+var_1038] mov rcx, r14 call my_create test eax, eax js short loc_A578D mov r13d, eax mov rbx, r14 or rbx, 4 lea r15, [rbp+var_1030] loc_A5745: mov edx, 1000h mov edi, r12d mov rsi, r15 mov rcx, r14 call my_read test rax, rax jz short loc_A579A mov ecx, 0FFFFFFFFh cmp rax, rcx jz short loc_A57B0 mov edi, r13d mov rsi, r15 mov rdx, rax mov rcx, rbx call my_write test rax, rax jz short loc_A5745 jmp short loc_A57B0 loc_A577F: call ___errno_location mov ebx, [rax] call _my_thread_var mov [rax], ebx loc_A578D: mov edi, r12d mov rsi, r14 call my_close jmp short loc_A57DE loc_A579A: bt r14d, 0Ch jnb short loc_A5806 mov edi, r13d mov rsi, r14 call my_sync test eax, eax jz short loc_A5806 loc_A57B0: mov edi, r12d mov rsi, r14 call my_close mov edi, r13d mov rsi, r14 call my_close mov rbx, [rbp+var_1038] loc_A57CD: mov rdi, rbx mov rsi, r14 call my_delete mov r15d, 0FFFFFFFFh loc_A57DE: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_A592F mov eax, r15d add rsp, 1148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A5806: mov edi, r12d mov rsi, r14 call my_close mov ebx, eax mov edi, r13d mov rsi, r14 call my_close xor r15d, r15d or eax, ebx setnz al mov edx, [rbp+var_103C] or dl, al test dl, 1 jz short loc_A583B mov r15b, al neg r15d jmp short loc_A57DE loc_A583B: mov esi, 0FFFh and esi, [rbp+var_10C8] mov rbx, [rbp+var_1038] mov rdi, rbx call _chmod test eax, eax jz short loc_A589D call ___errno_location mov rbx, rax mov r15d, [rax] call _my_thread_var mov [rax], r15d test r14b, 10h jz short loc_A588C mov ecx, [rbx] mov esi, 4 mov edi, 20h ; ' ' mov rdx, [rbp+var_1038] xor eax, eax call my_error loc_A588C: test r14b, 8 mov rbx, [rbp+var_1038] jnz loc_A57CD loc_A589D: mov esi, [rbp+var_10C4] mov edx, [rbp+var_10C0] mov rdi, rbx call _chown test eax, eax jz short loc_A58F9 call ___errno_location mov rbx, rax mov r15d, [rax] call _my_thread_var mov [rax], r15d test r14b, 10h jz short loc_A58E8 mov ecx, [rbx] mov esi, 4 mov edi, 23h ; '#' mov rdx, [rbp+var_1038] xor eax, eax call my_error loc_A58E8: test r14b, 8 mov rbx, [rbp+var_1038] jnz loc_A57CD loc_A58F9: xor r15d, r15d test r14b, 40h jz loc_A57DE mov rax, [rbp+var_1098] mov rcx, [rbp+var_1088] lea rsi, [rbp+var_1050] mov [rsi], rax mov [rsi+8], rcx mov rdi, rbx call _utime jmp loc_A57DE loc_A592F: call ___stack_chk_fail
long long my_copy(long long a1, long long a2, long long a3) { bool v4; // bl long long v5; // rax int v6; // eax unsigned int v7; // r15d unsigned int v8; // r12d long long v9; // rdx int v10; // eax unsigned int v11; // r13d long long v12; // rax int v13; // ebx long long v14; // rbx int v16; // ebx int v17; // r15d bool v18; // al long long v19; // rdi _DWORD *v20; // rbx int v21; // r15d int v22; // r8d int v23; // r9d long long v24; // rdi _DWORD *v25; // rbx int v26; // r15d int v27; // r8d int v28; // r9d _BYTE v29[144]; // [rsp+0h] [rbp-1170h] BYREF _BYTE v30[24]; // [rsp+90h] [rbp-10E0h] BYREF unsigned int v31; // [rsp+A8h] [rbp-10C8h] unsigned int v32; // [rsp+ACh] [rbp-10C4h] unsigned int v33; // [rsp+B0h] [rbp-10C0h] long long v34; // [rsp+D8h] [rbp-1098h] long long v35; // [rsp+E8h] [rbp-1088h] long long v36; // [rsp+120h] [rbp-1050h] long long v37; // [rsp+128h] [rbp-1048h] int v38; // [rsp+134h] [rbp-103Ch] long long v39; // [rsp+138h] [rbp-1038h] _BYTE v40[4096]; // [rsp+140h] [rbp-1030h] BYREF unsigned long long v41; // [rsp+1140h] [rbp-30h] v41 = __readfsqword(0x28u); v39 = a2; if ( (a3 & 0x80u) != 0LL ) { v5 = my_stat(a2, v29, 0LL); v4 = v5 != 0; LOBYTE(v5) = v5 == 0; v38 = v5; } else { v38 = 0; v4 = 0; } v6 = my_open(a1, 0LL, a3); v7 = -1; if ( v6 < 0 ) return v7; v8 = v6; if ( !my_stat(a1, v30, a3) ) { v13 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var(a1) = v13; LABEL_17: my_close(v8, a3); return v7; } if ( v4 ) memcpy(v30, v29, 144LL); v9 = 129LL; if ( (a3 & 0x800) == 0 ) v9 = 513LL; v10 = my_create(v39, v31, v9, a3); if ( v10 < 0 ) goto LABEL_17; v11 = v10; while ( 1 ) { v12 = my_read(v8, v40, 4096LL, a3); if ( !v12 ) break; if ( v12 == 0xFFFFFFFFLL || my_write(v11, (long long)v40, v12, a3 | 4) ) goto LABEL_20; } if ( (a3 & 0x1000) != 0 && (unsigned int)my_sync(v11, a3) ) { LABEL_20: my_close(v8, a3); my_close(v11, a3); v14 = v39; LABEL_21: my_delete(v14, a3); return (unsigned int)-1; } v16 = my_close(v8, a3); v17 = 0; v18 = (v16 | (unsigned int)my_close(v11, a3)) != 0; if ( ((v18 | (unsigned __int8)v38) & 1) != 0 ) { LOBYTE(v17) = v18; return (unsigned int)-v17; } else { v14 = v39; v19 = v39; if ( (unsigned int)chmod(v39, v31 & 0xFFF) ) { v20 = (_DWORD *)__errno_location(v19); v21 = *v20; *(_DWORD *)my_thread_var(v19) = v21; if ( (a3 & 0x10) != 0 ) my_error(32, 4, v39, *v20, v22, v23); v14 = v39; if ( (a3 & 8) != 0 ) goto LABEL_21; } v24 = v14; if ( (unsigned int)chown(v14, v32, v33) ) { v25 = (_DWORD *)__errno_location(v14); v26 = *v25; *(_DWORD *)my_thread_var(v24) = v26; if ( (a3 & 0x10) != 0 ) my_error(35, 4, v39, *v25, v27, v28); v14 = v39; if ( (a3 & 8) != 0 ) goto LABEL_21; } v7 = 0; if ( (a3 & 0x40) != 0 ) { v36 = v34; v37 = v35; utime(v14); } } return v7; }
my_copy: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1148 MOV R14,RDX MOV R13,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST R14B,R14B MOV qword ptr [RBP + -0x1038],RSI JS 0x001a5691 MOV dword ptr [RBP + -0x103c],0x0 XOR EBX,EBX JMP 0x001a56b4 LAB_001a5691: MOV RCX,RSI LEA RSI,[RBP + -0x1170] MOV RDI,RCX XOR EDX,EDX CALL 0x001a9ebb TEST RAX,RAX SETNZ BL SETZ AL MOV dword ptr [RBP + -0x103c],EAX LAB_001a56b4: MOV RDI,R13 XOR ESI,ESI MOV RDX,R14 CALL 0x001aa79c MOV R15D,0xffffffff TEST EAX,EAX JS 0x001a57de MOV R12D,EAX LEA RSI,[RBP + -0x10e0] MOV RDI,R13 MOV RDX,R14 CALL 0x001a9ebb TEST RAX,RAX JZ 0x001a577f TEST BL,BL JZ 0x001a5709 LEA RDI,[RBP + -0x10e0] LEA RSI,[RBP + -0x1170] MOV EDX,0x90 CALL 0x0012a0a0 LAB_001a5709: BT R14D,0xb MOV ESI,dword ptr [RBP + -0x10c8] MOV EAX,0x201 MOV EDX,0x81 CMOVNC EDX,EAX MOV RDI,qword ptr [RBP + -0x1038] MOV RCX,R14 CALL 0x001a5934 TEST EAX,EAX JS 0x001a578d MOV R13D,EAX MOV RBX,R14 OR RBX,0x4 LEA R15,[RBP + -0x1030] LAB_001a5745: MOV EDX,0x1000 MOV EDI,R12D MOV RSI,R15 MOV RCX,R14 CALL 0x001aad5c TEST RAX,RAX JZ 0x001a579a MOV ECX,0xffffffff CMP RAX,RCX JZ 0x001a57b0 MOV EDI,R13D MOV RSI,R15 MOV RDX,RAX MOV RCX,RBX CALL 0x00130d44 TEST RAX,RAX JZ 0x001a5745 JMP 0x001a57b0 LAB_001a577f: CALL 0x0012a7f0 MOV EBX,dword ptr [RAX] CALL 0x001ac2be MOV dword ptr [RAX],EBX LAB_001a578d: MOV EDI,R12D MOV RSI,R14 CALL 0x001aa941 JMP 0x001a57de LAB_001a579a: BT R14D,0xc JNC 0x001a5806 MOV EDI,R13D MOV RSI,R14 CALL 0x001abc40 TEST EAX,EAX JZ 0x001a5806 LAB_001a57b0: MOV EDI,R12D MOV RSI,R14 CALL 0x001aa941 MOV EDI,R13D MOV RSI,R14 CALL 0x001aa941 MOV RBX,qword ptr [RBP + -0x1038] LAB_001a57cd: MOV RDI,RBX MOV RSI,R14 CALL 0x001a59bc MOV R15D,0xffffffff LAB_001a57de: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001a592f MOV EAX,R15D ADD RSP,0x1148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a5806: MOV EDI,R12D MOV RSI,R14 CALL 0x001aa941 MOV EBX,EAX MOV EDI,R13D MOV RSI,R14 CALL 0x001aa941 XOR R15D,R15D OR EAX,EBX SETNZ AL MOV EDX,dword ptr [RBP + -0x103c] OR DL,AL TEST DL,0x1 JZ 0x001a583b MOV R15B,AL NEG R15D JMP 0x001a57de LAB_001a583b: MOV ESI,0xfff AND ESI,dword ptr [RBP + -0x10c8] MOV RBX,qword ptr [RBP + -0x1038] MOV RDI,RBX CALL 0x0012a100 TEST EAX,EAX JZ 0x001a589d CALL 0x0012a7f0 MOV RBX,RAX MOV R15D,dword ptr [RAX] CALL 0x001ac2be MOV dword ptr [RAX],R15D TEST R14B,0x10 JZ 0x001a588c MOV ECX,dword ptr [RBX] MOV ESI,0x4 MOV EDI,0x20 MOV RDX,qword ptr [RBP + -0x1038] XOR EAX,EAX CALL 0x001a5c33 LAB_001a588c: TEST R14B,0x8 MOV RBX,qword ptr [RBP + -0x1038] JNZ 0x001a57cd LAB_001a589d: MOV ESI,dword ptr [RBP + -0x10c4] MOV EDX,dword ptr [RBP + -0x10c0] MOV RDI,RBX CALL 0x0012a3b0 TEST EAX,EAX JZ 0x001a58f9 CALL 0x0012a7f0 MOV RBX,RAX MOV R15D,dword ptr [RAX] CALL 0x001ac2be MOV dword ptr [RAX],R15D TEST R14B,0x10 JZ 0x001a58e8 MOV ECX,dword ptr [RBX] MOV ESI,0x4 MOV EDI,0x23 MOV RDX,qword ptr [RBP + -0x1038] XOR EAX,EAX CALL 0x001a5c33 LAB_001a58e8: TEST R14B,0x8 MOV RBX,qword ptr [RBP + -0x1038] JNZ 0x001a57cd LAB_001a58f9: XOR R15D,R15D TEST R14B,0x40 JZ 0x001a57de MOV RAX,qword ptr [RBP + -0x1098] MOV RCX,qword ptr [RBP + -0x1088] LEA RSI,[RBP + -0x1050] MOV qword ptr [RSI],RAX MOV qword ptr [RSI + 0x8],RCX MOV RDI,RBX CALL 0x0012a600 JMP 0x001a57de LAB_001a592f: CALL 0x0012a250
int my_copy(int8 param_1,char *param_2,ulong param_3) { bool bVar1; int iVar2; int iVar3; int iVar4; long lVar5; int *piVar6; int *piVar7; int8 uVar8; char *__file; long in_FS_OFFSET; int1 local_1178 [144]; int1 local_10e8 [24]; uint local_10d0; __uid_t local_10cc; __gid_t local_10c8; __time_t local_10a0; __time_t local_1090; utimbuf local_1058; uint local_1044; char *local_1040; int1 local_1038 [4096]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_1040 = param_2; if ((char)param_3 < '\0') { lVar5 = my_stat(param_2,local_1178,0); bVar1 = lVar5 != 0; local_1044 = (uint)CONCAT71((int7)((ulong)lVar5 >> 8),lVar5 == 0); } else { local_1044 = 0; bVar1 = false; } iVar2 = my_open(param_1,0,param_3); iVar4 = -1; if (-1 < iVar2) { lVar5 = my_stat(param_1,local_10e8,param_3); if (lVar5 == 0) { piVar6 = __errno_location(); iVar3 = *piVar6; piVar6 = (int *)_my_thread_var(); *piVar6 = iVar3; } else { if (bVar1) { memcpy(local_10e8,local_1178,0x90); } uVar8 = 0x81; if (((uint)param_3 >> 0xb & 1) == 0) { uVar8 = 0x201; } iVar3 = my_create(local_1040,local_10d0,uVar8,param_3); if (-1 < iVar3) { while (lVar5 = my_read(iVar2,local_1038,0x1000,param_3), lVar5 != 0) { if ((lVar5 == 0xffffffff) || (lVar5 = my_write(iVar3,local_1038,lVar5,param_3 | 4), lVar5 != 0)) goto LAB_001a57b0; } if ((((uint)param_3 >> 0xc & 1) == 0) || (iVar4 = my_sync(iVar3,param_3), iVar4 == 0)) { iVar2 = my_close(iVar2,param_3); iVar4 = my_close(iVar3,param_3); __file = local_1040; if ((local_1044 & 1) != 0 || (iVar4 != 0 || iVar2 != 0)) { iVar4 = -(uint)(iVar4 != 0 || iVar2 != 0); goto LAB_001a57de; } iVar2 = chmod(local_1040,local_10d0 & 0xfff); if (iVar2 != 0) { piVar6 = __errno_location(); iVar2 = *piVar6; piVar7 = (int *)_my_thread_var(); *piVar7 = iVar2; if ((param_3 & 0x10) != 0) { my_error(0x20,4,local_1040,*piVar6); } __file = local_1040; if ((param_3 & 8) != 0) goto LAB_001a57cd; } iVar2 = chown(__file,local_10cc,local_10c8); if (iVar2 != 0) { piVar6 = __errno_location(); iVar2 = *piVar6; piVar7 = (int *)_my_thread_var(); *piVar7 = iVar2; if ((param_3 & 0x10) != 0) { my_error(0x23,4,local_1040,*piVar6); } __file = local_1040; if ((param_3 & 8) != 0) goto LAB_001a57cd; } iVar4 = 0; if ((param_3 & 0x40) != 0) { local_1058.actime = local_10a0; local_1058.modtime = local_1090; utime(__file,&local_1058); } goto LAB_001a57de; } LAB_001a57b0: my_close(iVar2,param_3); my_close(iVar3,param_3); LAB_001a57cd: my_delete(local_1040,param_3); iVar4 = -1; goto LAB_001a57de; } } my_close(iVar2,param_3); } LAB_001a57de: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return iVar4; }
58,237
minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!context->contains(name)) { return Value(); } return context->at(name); }
O3
cpp
minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq (%rdx), %r12 addq $0x20, %r14 leaq 0x8(%rsp), %r13 movq %r13, %rdi movq %r14, %rsi callq 0x6e4a4 movq (%r12), %rax movq %r12, %rdi movq %r13, %rsi callq *0x20(%rax) movl %eax, %ebp leaq 0x48(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x284e2 movq %r12, %rdi callq 0x2d98e movq -0x8(%r12), %rdi testq %rdi, %rdi je 0x7bdeb callq 0x4200c movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x7bdfa callq 0x4200c movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x7be09 callq 0x4200c movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x7be3f movq 0x70176(%rip), %rax # 0xebf90 cmpb $0x0, (%rax) je 0x7be2a movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7be34 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x7be3f movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0x7bed6 movq (%r15), %r15 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x6e4a4 movq (%r15), %rax movq %r15, %rdi movq %r12, %rsi callq *0x18(%rax) movq %rbx, %rdi movq %rax, %rsi callq 0x71110 leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x284e2 movq %r14, %rdi callq 0x2d98e movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x7be97 callq 0x4200c movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x7bea6 callq 0x4200c movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x7beb5 callq 0x4200c movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x7bf29 movq 0x700ca(%rip), %rax # 0xebf90 cmpb $0x0, (%rax) je 0x7bf14 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7bf1e leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x284e2 movq %r14, %rdi movl $0x1, %esi callq 0x284e2 jmp 0x7bf29 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x7bf29 movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x7bf3d movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x6a8e4 movq %rbx, %rdi callq 0x19be0
_ZNK5minja12VariableExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rdx] add r14, 20h ; ' ' lea r13, [rsp+88h+var_80] mov rdi, r13 mov rsi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rax, [r12] mov rdi, r12 mov rsi, r13 call qword ptr [rax+20h] mov ebp, eax lea r12, [rsp+88h+var_40] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r12-8] test rdi, rdi jz short loc_7BDEB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BDEB: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_7BDFA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BDFA: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_7BE09 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BE09: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_7BE3F mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_7BE2A mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_7BE34 loc_7BE2A: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7BE34: cmp eax, 1 jnz short loc_7BE3F mov rax, [rdi] call qword ptr [rax+18h] loc_7BE3F: test bpl, bpl jz loc_7BED6 mov r15, [r15] lea r12, [rsp+88h+var_80] mov rdi, r12 mov rsi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rax, [r15] mov rdi, r15 mov rsi, r12 call qword ptr [rax+18h] mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) 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, [r14-8] test rdi, rdi jz short loc_7BE97 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BE97: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_7BEA6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BEA6: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_7BEB5 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BEB5: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_7BF29 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_7BF14 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_7BF1E loc_7BED6: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_7BF29 loc_7BF14: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7BF1E: cmp eax, 1 jnz short loc_7BF29 mov rax, [rdi] call qword ptr [rax+18h] loc_7BF29: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_7BF3D: mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
minja::Value * minja::VariableExpr::do_evaluate(minja::Value *this, long long a2, long long *a3) { long long v5; // r12 char v6; // bp long long v7; // rdi signed __int32 v8; // eax long long v9; // r15 const minja::Value *v10; // rax long long v11; // rdi signed __int32 v12; // eax _BYTE v14[8]; // [rsp+8h] [rbp-80h] BYREF long long v15; // [rsp+10h] [rbp-78h] volatile signed __int32 *v16; // [rsp+20h] [rbp-68h] volatile signed __int32 *v17; // [rsp+30h] [rbp-58h] volatile signed __int32 *v18; // [rsp+40h] [rbp-48h] char v19[64]; // [rsp+48h] [rbp-40h] BYREF v5 = *a3; minja::Value::Value((long long)v14, a2 + 32); v6 = (*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v5 + 32LL))(v5, v14); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v19); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); if ( v17 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); if ( v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); v7 = v15; if ( v15 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v15 + 12); *(_DWORD *)(v15 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } if ( v6 ) { v9 = *a3; minja::Value::Value((long long)v14, a2 + 32); v10 = (const minja::Value *)(*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v9 + 24LL))(v9, v14); minja::Value::Value(this, v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v19); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); if ( v17 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); if ( v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); v11 = v15; if ( v15 ) { if ( _libc_single_threaded ) { v12 = *(_DWORD *)(v15 + 12); *(_DWORD *)(v15 + 12) = v12 - 1; } else { v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF); } if ( v12 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL); } } else { *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); } return this; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RDX] ADD R14,0x20 LEA R13,[RSP + 0x8] MOV RDI,R13 MOV RSI,R14 CALL 0x0016e4a4 MOV RAX,qword ptr [R12] LAB_0017bdba: MOV RDI,R12 MOV RSI,R13 CALL qword ptr [RAX + 0x20] LAB_0017bdc3: MOV EBP,EAX LEA R12,[RSP + 0x48] MOV RDI,R12 XOR ESI,ESI CALL 0x001284e2 MOV RDI,R12 CALL 0x0012d98e MOV RDI,qword ptr [R12 + -0x8] TEST RDI,RDI JZ 0x0017bdeb CALL 0x0014200c LAB_0017bdeb: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0017bdfa CALL 0x0014200c LAB_0017bdfa: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0017be09 CALL 0x0014200c LAB_0017be09: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0017be3f MOV RAX,qword ptr [0x001ebf90] CMP byte ptr [RAX],0x0 JZ 0x0017be2a MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017be34 LAB_0017be2a: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017be34: CMP EAX,0x1 JNZ 0x0017be3f MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0017be3f: TEST BPL,BPL JZ 0x0017bed6 MOV R15,qword ptr [R15] LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R14 CALL 0x0016e4a4 MOV RAX,qword ptr [R15] LAB_0017be5e: MOV RDI,R15 MOV RSI,R12 CALL qword ptr [RAX + 0x18] MOV RDI,RBX MOV RSI,RAX CALL 0x00171110 LAB_0017be72: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x001284e2 MOV RDI,R14 CALL 0x0012d98e MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x0017be97 CALL 0x0014200c LAB_0017be97: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0017bea6 CALL 0x0014200c LAB_0017bea6: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0017beb5 CALL 0x0014200c LAB_0017beb5: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0017bf29 MOV RAX,qword ptr [0x001ebf90] CMP byte ptr [RAX],0x0 JZ 0x0017bf14 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017bf1e LAB_0017bed6: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x001284e2 MOV RDI,R14 MOV ESI,0x1 CALL 0x001284e2 JMP 0x0017bf29 LAB_0017bf14: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017bf1e: CMP EAX,0x1 JNZ 0x0017bf29 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0017bf29: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::VariableExpr::do_evaluate(shared_ptr *param_1) { int *piVar1; long *plVar2; char cVar3; int iVar4; Value *pVVar5; int8 *in_RDX; long in_RSI; bool bVar6; 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]; plVar2 = (long *)*in_RDX; Value::Value(local_80,(string *)(in_RSI + 0x20)); /* try { // try from 0017bdba to 0017bdc2 has its CatchHandler @ 0017bf3d */ cVar3 = (**(code **)(*plVar2 + 0x20))(plVar2,local_80); 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_001ebf90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_78 + 0x18))(); } } if (cVar3 == '\0') { bVar6 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (shared_ptr)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar6); 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(bVar6); } else { plVar2 = (long *)*in_RDX; Value::Value(local_80,(string *)(in_RSI + 0x20)); /* try { // try from 0017be5e to 0017be71 has its CatchHandler @ 0017bf3b */ pVVar5 = (Value *)(**(code **)(*plVar2 + 0x18))(plVar2,local_80); Value::Value((Value *)param_1,pVVar5); 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_001ebf90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_78 + 0x18))(); } } } return param_1; }
58,238
inline_mysql_cond_destroy
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_destroy( mysql_cond_t *that) { #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) { PSI_COND_CALL(destroy_cond)(that->m_psi); that->m_psi= NULL; } #endif return pthread_cond_destroy(&that->m_cond); }
O0
c
inline_mysql_cond_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xfe894 leaq 0x1cf669(%rip), %rax # 0x2cdee0 movq (%rax), %rax movq 0x68(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rdi callq 0x2a260 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_cond_destroy_4: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_FE894 lea rax, PSI_server mov rax, [rax] mov rax, [rax+68h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 loc_FE894: mov rdi, [rbp+var_8] call _pthread_cond_destroy add rsp, 10h pop rbp retn
long long inline_mysql_cond_destroy_4(long long a1) { if ( *(_QWORD *)(a1 + 48) ) { ((void ( *)(_QWORD))PSI_server[13])(*(_QWORD *)(a1 + 48)); *(_QWORD *)(a1 + 48) = 0LL; } return pthread_cond_destroy(a1); }
inline_mysql_cond_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001fe894 LEA RAX,[0x3cdee0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 LAB_001fe894: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a260 ADD RSP,0x10 POP RBP RET
void inline_mysql_cond_destroy(pthread_cond_t *param_1) { if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x68))(param_1[1].__align); param_1[1].__align = 0; } pthread_cond_destroy(param_1); return; }
58,239
init_class_range
bluesky950520[P]quickjs/quickjs.c
static int init_class_range(JSRuntime *rt, JSClassShortDef const *tab, int start, int count) { JSClassDef cm_s, *cm = &cm_s; int i, class_id; for(i = 0; i < count; i++) { class_id = i + start; memset(cm, 0, sizeof(*cm)); cm->finalizer = tab[i].finalizer; cm->gc_mark = tab[i].gc_mark; if (JS_NewClass1(rt, class_id, cm, tab[i].class_name) < 0) return -1; } return 0; }
O2
c
init_class_range: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %r15 xorl %eax, %eax testl %ecx, %ecx cmovlel %eax, %ecx imulq $0x18, %rcx, %r13 movq %rsp, %r12 xorl %ebx, %ebx cmpq %rbx, %r13 je 0x17679 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) andq $0x0, 0x20(%rsp) movaps %xmm0, (%rsp) movups 0x8(%r14,%rbx), %xmm0 movups %xmm0, 0x8(%rsp) movl (%r14,%rbx), %ecx movq %r15, %rdi movl %ebp, %esi movq %r12, %rdx callq 0x1ab3b incl %ebp addq $0x18, %rbx testl %eax, %eax jns 0x17637 pushq $-0x1 popq %rax jmp 0x1767b xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_class_range: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, edx mov r14, rsi mov r15, rdi xor eax, eax test ecx, ecx cmovle ecx, eax imul r13, rcx, 18h mov r12, rsp xor ebx, ebx loc_17637: cmp r13, rbx jz short loc_17679 xorps xmm0, xmm0 movaps [rsp+58h+var_48], xmm0 and [rsp+58h+var_38], 0 movaps [rsp+58h+var_58], xmm0 movups xmm0, xmmword ptr [r14+rbx+8] movups [rsp+58h+var_58+8], xmm0 mov ecx, [r14+rbx] mov rdi, r15 mov esi, ebp mov rdx, r12 call JS_NewClass1 inc ebp add rbx, 18h test eax, eax jns short loc_17637 push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_1767B loc_17679: xor eax, eax loc_1767B: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_class_range(long long a1, long long a2, unsigned int a3, long long a4) { long long v5; // r13 long long i; // rbx int v7; // eax __m256i v9; // [rsp+0h] [rbp-58h] BYREF long long v10; // [rsp+20h] [rbp-38h] if ( (int)a4 <= 0 ) a4 = 0LL; v5 = 24 * a4; for ( i = 0LL; v5 != i; i += 24LL ) { *(_OWORD *)&v9.m256i_u64[2] = 0LL; v10 = 0LL; *(_OWORD *)v9.m256i_i8 = 0LL; *(_OWORD *)&v9.m256i_u64[1] = *(_OWORD *)(a2 + i + 8); v7 = ((long long ( *)(long long, _QWORD, __m256i *, _QWORD))JS_NewClass1)( a1, a3++, &v9, *(unsigned int *)(a2 + i)); if ( v7 < 0 ) return -1LL; } return 0LL; }
init_class_range: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,EDX MOV R14,RSI MOV R15,RDI XOR EAX,EAX TEST ECX,ECX CMOVLE ECX,EAX IMUL R13,RCX,0x18 MOV R12,RSP XOR EBX,EBX LAB_00117637: CMP R13,RBX JZ 0x00117679 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 AND qword ptr [RSP + 0x20],0x0 MOVAPS xmmword ptr [RSP],XMM0 MOVUPS XMM0,xmmword ptr [R14 + RBX*0x1 + 0x8] MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV ECX,dword ptr [R14 + RBX*0x1] MOV RDI,R15 MOV ESI,EBP MOV RDX,R12 CALL 0x0011ab3b INC EBP ADD RBX,0x18 TEST EAX,EAX JNS 0x00117637 PUSH -0x1 POP RAX JMP 0x0011767b LAB_00117679: XOR EAX,EAX LAB_0011767b: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 init_class_range(int8 param_1,long param_2,int param_3,uint param_4) { int8 *puVar1; int iVar2; ulong uVar3; long lVar4; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; uVar3 = (ulong)param_4; if ((int)param_4 < 1) { uVar3 = 0; } lVar4 = 0; do { if (uVar3 * 0x18 - lVar4 == 0) { return 0; } uStack_40 = 0; local_38 = 0; local_58 = 0; puVar1 = (int8 *)(param_2 + 8 + lVar4); uStack_50 = *puVar1; local_48 = puVar1[1]; iVar2 = JS_NewClass1(param_1,param_3,&local_58,*(int4 *)(param_2 + lVar4)); param_3 = param_3 + 1; lVar4 = lVar4 + 0x18; } while (-1 < iVar2); return 0xffffffffffffffff; }
58,240
init_class_range
bluesky950520[P]quickjs/quickjs.c
static int init_class_range(JSRuntime *rt, JSClassShortDef const *tab, int start, int count) { JSClassDef cm_s, *cm = &cm_s; int i, class_id; for(i = 0; i < count; i++) { class_id = i + start; memset(cm, 0, sizeof(*cm)); cm->finalizer = tab[i].finalizer; cm->gc_mark = tab[i].gc_mark; if (JS_NewClass1(rt, class_id, cm, tab[i].class_name) < 0) return -1; } return 0; }
O3
c
init_class_range: testl %ecx, %ecx jle 0x1d79d pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r15 movl %ecx, %eax shlq $0x3, %rax leaq (%rax,%rax,2), %r13 xorl %ebp, %ebp movq %rsp, %r12 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movq $0x0, 0x20(%rsp) movups 0x8(%r14,%rbp), %xmm0 movups %xmm0, 0x8(%rsp) movl (%r14,%rbp), %ecx movq %r15, %rdi movl %ebx, %esi movq %r12, %rdx callq 0x21097 testl %eax, %eax js 0x1d7a0 incl %ebx addq $0x18, %rbp cmpq %rbp, %r13 jne 0x1d759 xorl %eax, %eax jmp 0x1d7a5 xorl %eax, %eax retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_class_range: test ecx, ecx jle short loc_1D79D push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, edx mov r14, rsi mov r15, rdi mov eax, ecx shl rax, 3 lea r13, [rax+rax*2] xor ebp, ebp mov r12, rsp loc_1D759: xorps xmm0, xmm0 movaps [rsp+58h+var_48], xmm0 movaps [rsp+58h+var_58], xmm0 mov [rsp+58h+var_38], 0 movups xmm0, xmmword ptr [r14+rbp+8] movups [rsp+58h+var_58+8], xmm0 mov ecx, [r14+rbp] mov rdi, r15 mov esi, ebx mov rdx, r12 call JS_NewClass1 test eax, eax js short loc_1D7A0 inc ebx add rbp, 18h cmp r13, rbp jnz short loc_1D759 xor eax, eax jmp short loc_1D7A5 loc_1D79D: xor eax, eax retn loc_1D7A0: mov eax, 0FFFFFFFFh loc_1D7A5: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_class_range(long long a1, long long a2, unsigned int a3, int a4) { long long v5; // r13 long long v6; // rbp __m256i v8; // [rsp+0h] [rbp-58h] BYREF long long v9; // [rsp+20h] [rbp-38h] if ( a4 <= 0 ) return 0LL; v5 = 24LL * (unsigned int)a4; v6 = 0LL; while ( 1 ) { *(_OWORD *)&v8.m256i_u64[2] = 0LL; *(_OWORD *)v8.m256i_i8 = 0LL; v9 = 0LL; *(_OWORD *)&v8.m256i_u64[1] = *(_OWORD *)(a2 + v6 + 8); if ( (int)((long long ( *)(long long, _QWORD, __m256i *, _QWORD))JS_NewClass1)( a1, a3, &v8, *(unsigned int *)(a2 + v6)) < 0 ) break; ++a3; v6 += 24LL; if ( v5 == v6 ) return 0LL; } return 0xFFFFFFFFLL; }
init_class_range: TEST ECX,ECX JLE 0x0011d79d PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,EDX MOV R14,RSI MOV R15,RDI MOV EAX,ECX SHL RAX,0x3 LEA R13,[RAX + RAX*0x2] XOR EBP,EBP MOV R12,RSP LAB_0011d759: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x20],0x0 MOVUPS XMM0,xmmword ptr [R14 + RBP*0x1 + 0x8] MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV ECX,dword ptr [R14 + RBP*0x1] MOV RDI,R15 MOV ESI,EBX MOV RDX,R12 CALL 0x00121097 TEST EAX,EAX JS 0x0011d7a0 INC EBX ADD RBP,0x18 CMP R13,RBP JNZ 0x0011d759 XOR EAX,EAX JMP 0x0011d7a5 LAB_0011d79d: XOR EAX,EAX RET LAB_0011d7a0: MOV EAX,0xffffffff LAB_0011d7a5: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 init_class_range(int8 param_1,long param_2,int param_3,uint param_4) { int8 *puVar1; int iVar2; long lVar3; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; if ((int)param_4 < 1) { return 0; } lVar3 = 0; do { uStack_40 = 0; local_58 = 0; local_38 = 0; puVar1 = (int8 *)(param_2 + 8 + lVar3); uStack_50 = *puVar1; local_48 = puVar1[1]; iVar2 = JS_NewClass1(param_1,param_3,&local_58,*(int4 *)(param_2 + lVar3)); if (iVar2 < 0) { return 0xffffffff; } param_3 = param_3 + 1; lVar3 = lVar3 + 0x18; } while ((ulong)param_4 * 0x18 != lVar3); return 0; }
58,241
rw_pr_unlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_unlock(rw_pr_lock_t *rwlock) { if (rwlock->active_writer) { /* We are unlocking wr-lock. */ #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif rwlock->active_writer= FALSE; if (rwlock->writers_waiting_readers) { /* Avoid expensive cond signal in case when there is no contention or it is wr-only. Note that from view point of performance it would be better to signal on the condition variable after unlocking mutex (as it reduces number of contex switches). Unfortunately this would mean that such rwlock can't be safely used by MDL subsystem, which relies on the fact that it is OK to destroy rwlock once it is in unlocked state. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } else { /* We are unlocking rd-lock. */ pthread_mutex_lock(&rwlock->lock); rwlock->active_readers--; if (rwlock->active_readers == 0 && rwlock->writers_waiting_readers) { /* If we are last reader and there are waiting writers wake them up. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } return 0; }
O3
c
rw_pr_unlock: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpb $0x0, 0x60(%rdi) je 0x276a0 movb $0x0, 0x60(%rbx) cmpl $0x0, 0x5c(%rbx) je 0x276ad leaq 0x28(%rbx), %rdi callq 0x24040 jmp 0x276ad movq %rbx, %rdi callq 0x243f0 decl 0x58(%rbx) je 0x2768f movq %rbx, %rdi callq 0x241d0 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq nop
rw_pr_unlock: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi cmp byte ptr [rdi+60h], 0 jz short loc_276A0 mov byte ptr [rbx+60h], 0 loc_2768F: cmp dword ptr [rbx+5Ch], 0 jz short loc_276AD lea rdi, [rbx+28h] call _pthread_cond_signal jmp short loc_276AD loc_276A0: mov rdi, rbx call _pthread_mutex_lock dec dword ptr [rbx+58h] jz short loc_2768F loc_276AD: mov rdi, rbx call _pthread_mutex_unlock xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long rw_pr_unlock(long long a1) { if ( *(_BYTE *)(a1 + 96) ) { *(_BYTE *)(a1 + 96) = 0; } else { pthread_mutex_lock(a1); if ( (*(_DWORD *)(a1 + 88))-- != 1 ) goto LABEL_6; } if ( *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); LABEL_6: pthread_mutex_unlock(a1); return 0LL; }
rw_pr_unlock: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CMP byte ptr [RDI + 0x60],0x0 JZ 0x001276a0 MOV byte ptr [RBX + 0x60],0x0 LAB_0012768f: CMP dword ptr [RBX + 0x5c],0x0 JZ 0x001276ad LEA RDI,[RBX + 0x28] CALL 0x00124040 JMP 0x001276ad LAB_001276a0: MOV RDI,RBX CALL 0x001243f0 DEC dword ptr [RBX + 0x58] JZ 0x0012768f LAB_001276ad: MOV RDI,RBX CALL 0x001241d0 XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 rw_pr_unlock(pthread_mutex_t *param_1) { int *piVar1; if (*(char *)((long)param_1 + 0x60) == '\0') { pthread_mutex_lock(param_1); piVar1 = (int *)((long)param_1 + 0x58); *piVar1 = *piVar1 + -1; if (*piVar1 != 0) goto LAB_001276ad; } else { *(int1 *)((long)param_1 + 0x60) = 0; } if (*(int *)((long)param_1 + 0x5c) != 0) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } LAB_001276ad: pthread_mutex_unlock(param_1); return 0; }
58,242
nglog::LogMessage::SendToSink()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->sink_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); data_->sink_->send( data_->severity_, data_->fullname_, data_->basename_, data_->line_, time_, data_->message_text_ + data_->num_prefix_chars_, (data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1)); } }
O2
cpp
nglog::LogMessage::SendToSink(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x76b0(%rax), %rdi testq %rdi, %rdi je 0x17655 movq 0x76c0(%rax), %r9 testq %r9, %r9 je 0x175d4 cmpb $0xa, 0x3(%r9,%rax) je 0x17611 leaq 0x13f4f(%rip), %rsi # 0x2b52a leaq 0x13f8f(%rip), %rcx # 0x2b571 leaq 0x13f9c(%rip), %r8 # 0x2b585 leaq 0x144c5(%rip), %r9 # 0x2bab5 pushq $0x3 popq %rdi movl $0x76b, %edx # imm = 0x76B xorl %eax, %eax callq 0x15080 movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rdi movq 0x76c0(%rax), %r9 movq 0x76d8(%rax), %rdx movq 0x76d0(%rax), %rcx movl 0x7698(%rax), %esi movl 0x769c(%rax), %r8d addq $0x10, %rbx movq 0x76b8(%rax), %r10 addq %r10, %rax addq $0x4, %rax notq %r10 addq %r9, %r10 movq (%rdi), %r11 movq %rbx, %r9 pushq %r10 pushq %rax callq *0x10(%r11) addq $0x10, %rsp popq %rbx retq nop
_ZN5nglog10LogMessage10SendToSinkEv: push rbx mov rbx, rdi mov rax, [rdi+8] mov rdi, [rax+76B0h] test rdi, rdi jz loc_17655 mov r9, [rax+76C0h] test r9, r9 jz short loc_175D4 cmp byte ptr [r9+rax+3], 0Ah jz short loc_17611 loc_175D4: lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_2BAB3+2; "" push 3 pop rdi mov edx, 76Bh xor eax, eax call __ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) mov rax, [rbx+8] mov rdi, [rax+76B0h] mov r9, [rax+76C0h] loc_17611: mov rdx, [rax+76D8h] mov rcx, [rax+76D0h] mov esi, [rax+7698h] mov r8d, [rax+769Ch] add rbx, 10h mov r10, [rax+76B8h] add rax, r10 add rax, 4 not r10 add r10, r9 mov r11, [rdi] mov r9, rbx push r10 push rax call qword ptr [r11+10h] add rsp, 10h loc_17655: pop rbx retn
long long nglog::LogMessage::SendToSink(nglog::LogMessage *this) { long long result; // rax long long v3; // rdi long long v4; // r9 result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30384); if ( v3 ) { v4 = *(_QWORD *)(result + 30400); if ( !v4 || *(_BYTE *)(v4 + result + 3) != 10 ) { nglog::RawLog( 3LL, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1899LL, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", ""); result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30384); v4 = *(_QWORD *)(result + 30400); } return (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, char *, long long, long long))(*(_QWORD *)v3 + 16LL))( v3, *(unsigned int *)(result + 30360), *(_QWORD *)(result + 30424), *(_QWORD *)(result + 30416), *(unsigned int *)(result + 30364), (char *)this + 16, *(_QWORD *)(result + 30392) + result + 4, v4 + ~*(_QWORD *)(result + 30392)); } return result; }
SendToSink: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] TEST RDI,RDI JZ 0x00117655 MOV R9,qword ptr [RAX + 0x76c0] TEST R9,R9 JZ 0x001175d4 CMP byte ptr [R9 + RAX*0x1 + 0x3],0xa JZ 0x00117611 LAB_001175d4: LEA RSI,[0x12b52a] LEA RCX,[0x12b571] LEA R8,[0x12b585] LEA R9,[0x12bab5] PUSH 0x3 POP RDI MOV EDX,0x76b XOR EAX,EAX CALL 0x00115080 MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV R9,qword ptr [RAX + 0x76c0] LAB_00117611: MOV RDX,qword ptr [RAX + 0x76d8] MOV RCX,qword ptr [RAX + 0x76d0] MOV ESI,dword ptr [RAX + 0x7698] MOV R8D,dword ptr [RAX + 0x769c] ADD RBX,0x10 MOV R10,qword ptr [RAX + 0x76b8] ADD RAX,R10 ADD RAX,0x4 NOT R10 ADD R10,R9 MOV R11,qword ptr [RDI] MOV R9,RBX PUSH R10 PUSH RAX CALL qword ptr [R11 + 0x10] ADD RSP,0x10 LAB_00117655: POP RBX RET
/* nglog::LogMessage::SendToSink() */ void __thiscall nglog::LogMessage::SendToSink(LogMessage *this) { long lVar1; long *plVar2; long lVar3; lVar1 = *(long *)(this + 8); plVar2 = *(long **)(lVar1 + 0x76b0); if (plVar2 != (long *)0x0) { lVar3 = *(long *)(lVar1 + 0x76c0); if ((lVar3 == 0) || (*(char *)(lVar3 + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x76b, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0012bab5); lVar1 = *(long *)(this + 8); plVar2 = *(long **)(lVar1 + 0x76b0); lVar3 = *(long *)(lVar1 + 0x76c0); } (**(code **)(*plVar2 + 0x10)) (plVar2,*(int4 *)(lVar1 + 0x7698),*(int8 *)(lVar1 + 0x76d8), *(int8 *)(lVar1 + 0x76d0),*(int4 *)(lVar1 + 0x769c),this + 0x10, lVar1 + *(ulong *)(lVar1 + 0x76b8) + 4,~*(ulong *)(lVar1 + 0x76b8) + lVar3); } return; }
58,243
nglog::LogMessage::SendToSink()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->sink_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); data_->sink_->send( data_->severity_, data_->fullname_, data_->basename_, data_->line_, time_, data_->message_text_ + data_->num_prefix_chars_, (data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1)); } }
O3
cpp
nglog::LogMessage::SendToSink(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x76b0(%rax), %rdi testq %rdi, %rdi je 0x14b2b movq 0x76c0(%rax), %r9 testq %r9, %r9 je 0x14aa8 cmpb $0xa, 0x3(%r9,%rax) je 0x14ae7 leaq 0x17a7b(%rip), %rsi # 0x2c52a leaq 0x17abb(%rip), %rcx # 0x2c571 leaq 0x17ac8(%rip), %r8 # 0x2c585 leaq 0x17ff1(%rip), %r9 # 0x2cab5 movl $0x3, %edi movl $0x76b, %edx # imm = 0x76B xorl %eax, %eax callq 0x11d40 movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rdi movq 0x76c0(%rax), %r9 movq 0x76d8(%rax), %rdx movq 0x76d0(%rax), %rcx movl 0x7698(%rax), %esi movl 0x769c(%rax), %r8d addq $0x10, %rbx movq 0x76b8(%rax), %r10 addq %r10, %rax addq $0x4, %rax notq %r10 addq %r9, %r10 movq (%rdi), %r11 movq %rbx, %r9 pushq %r10 pushq %rax callq *0x10(%r11) addq $0x10, %rsp popq %rbx retq nop
_ZN5nglog10LogMessage10SendToSinkEv: push rbx mov rbx, rdi mov rax, [rdi+8] mov rdi, [rax+76B0h] test rdi, rdi jz loc_14B2B mov r9, [rax+76C0h] test r9, r9 jz short loc_14AA8 cmp byte ptr [r9+rax+3], 0Ah jz short loc_14AE7 loc_14AA8: lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_2CAB3+2; "" mov edi, 3 mov edx, 76Bh xor eax, eax call __ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) mov rax, [rbx+8] mov rdi, [rax+76B0h] mov r9, [rax+76C0h] loc_14AE7: mov rdx, [rax+76D8h] mov rcx, [rax+76D0h] mov esi, [rax+7698h] mov r8d, [rax+769Ch] add rbx, 10h mov r10, [rax+76B8h] add rax, r10 add rax, 4 not r10 add r10, r9 mov r11, [rdi] mov r9, rbx push r10 push rax call qword ptr [r11+10h] add rsp, 10h loc_14B2B: pop rbx retn
long long nglog::LogMessage::SendToSink(nglog::LogMessage *this) { long long result; // rax long long v3; // rdi long long v4; // r9 result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30384); if ( v3 ) { v4 = *(_QWORD *)(result + 30400); if ( !v4 || *(_BYTE *)(v4 + result + 3) != 10 ) { nglog::RawLog( 3, (unsigned int)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1899, (unsigned int)"Check %s failed: %s", (unsigned int)"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", (unsigned int)""); result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30384); v4 = *(_QWORD *)(result + 30400); } return (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, char *, long long, long long))(*(_QWORD *)v3 + 16LL))( v3, *(unsigned int *)(result + 30360), *(_QWORD *)(result + 30424), *(_QWORD *)(result + 30416), *(unsigned int *)(result + 30364), (char *)this + 16, *(_QWORD *)(result + 30392) + result + 4, v4 + ~*(_QWORD *)(result + 30392)); } return result; }
SendToSink: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] TEST RDI,RDI JZ 0x00114b2b MOV R9,qword ptr [RAX + 0x76c0] TEST R9,R9 JZ 0x00114aa8 CMP byte ptr [R9 + RAX*0x1 + 0x3],0xa JZ 0x00114ae7 LAB_00114aa8: LEA RSI,[0x12c52a] LEA RCX,[0x12c571] LEA R8,[0x12c585] LEA R9,[0x12cab5] MOV EDI,0x3 MOV EDX,0x76b XOR EAX,EAX CALL 0x00111d40 MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV R9,qword ptr [RAX + 0x76c0] LAB_00114ae7: MOV RDX,qword ptr [RAX + 0x76d8] MOV RCX,qword ptr [RAX + 0x76d0] MOV ESI,dword ptr [RAX + 0x7698] MOV R8D,dword ptr [RAX + 0x769c] ADD RBX,0x10 MOV R10,qword ptr [RAX + 0x76b8] ADD RAX,R10 ADD RAX,0x4 NOT R10 ADD R10,R9 MOV R11,qword ptr [RDI] MOV R9,RBX PUSH R10 PUSH RAX CALL qword ptr [R11 + 0x10] ADD RSP,0x10 LAB_00114b2b: POP RBX RET
/* nglog::LogMessage::SendToSink() */ void __thiscall nglog::LogMessage::SendToSink(LogMessage *this) { long lVar1; long *plVar2; long lVar3; lVar1 = *(long *)(this + 8); plVar2 = *(long **)(lVar1 + 0x76b0); if (plVar2 != (long *)0x0) { lVar3 = *(long *)(lVar1 + 0x76c0); if ((lVar3 == 0) || (*(char *)(lVar3 + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x76b, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0012cab5); lVar1 = *(long *)(this + 8); plVar2 = *(long **)(lVar1 + 0x76b0); lVar3 = *(long *)(lVar1 + 0x76c0); } (**(code **)(*plVar2 + 0x10)) (plVar2,*(int4 *)(lVar1 + 0x7698),*(int8 *)(lVar1 + 0x76d8), *(int8 *)(lVar1 + 0x76d0),*(int4 *)(lVar1 + 0x769c),this + 0x10, lVar1 + *(ulong *)(lVar1 + 0x76b8) + 4,~*(ulong *)(lVar1 + 0x76b8) + lVar3); } return; }
58,244
process_int_arg
eloqsql/strings/my_vsnprintf.c
static char *process_int_arg(char *to, const char *end, size_t length, longlong par, char arg_type, uint print_type) { size_t res_length, to_length; char *store_start= to, *store_end; char buff[32]; if ((to_length= (size_t) (end-to)) < 16 || length) store_start= buff; if (arg_type == 'd' || arg_type == 'i') store_end= longlong10_to_str(par, store_start, -10); else if (arg_type == 'u') store_end= longlong10_to_str(par, store_start, 10); else if (arg_type == 'p') { store_start[0]= '0'; store_start[1]= 'x'; store_end= ll2str(par, store_start + 2, 16, 0); } else if (arg_type == 'o') { store_end= ll2str(par, store_start, 8, 0); } else { DBUG_ASSERT(arg_type == 'X' || arg_type =='x'); store_end= ll2str(par, store_start, 16, (arg_type == 'X')); } if ((res_length= (size_t) (store_end - store_start)) > to_length) return to; /* num doesn't fit in output */ /* If %#d syntax was used, we have to pre-zero/pre-space the string */ if (store_start == buff) { length= MY_MIN(length, to_length); if (res_length < length) { size_t diff= (length- res_length); bfill(to, diff, (print_type & PREZERO_ARG) ? '0' : ' '); if (arg_type == 'p' && print_type & PREZERO_ARG) { if (diff > 1) to[1]= 'x'; else store_start[0]= 'x'; store_start[1]= '0'; } to+= diff; } bmove(to, store_start, res_length); } to+= res_length; return to; }
O3
c
process_int_arg: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r13 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) subq %rdi, %r13 cmpq $0x10, %r13 setb %al movq %rdx, -0x68(%rbp) testq %rdx, %rdx setne %dl orb %al, %dl leaq -0x50(%rbp), %rax movq %rdi, %r15 cmovneq %rax, %r15 cmpl $0x6e, %r8d movl %r8d, -0x58(%rbp) movb %dl, -0x51(%rbp) movq %r9, -0x60(%rbp) jle 0xf68ae cmpl $0x6f, %r8d je 0xf68cf cmpl $0x70, %r8d je 0xf68df movq %rax, %r12 cmpl $0x75, %r8d jne 0xf6903 movq %rcx, %rdi movq %r15, %rsi movl $0xa, %edx jmp 0xf68c8 movq %rax, %r12 cmpl $0x64, %r8d je 0xf68bd cmpl $0x69, %r8d jne 0xf6903 movq %rcx, %rdi movq %r15, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 callq 0xf545e jmp 0xf691e movq %rax, %r12 movq %rcx, %rdi movq %r15, %rsi movl $0x8, %edx jmp 0xf68ff movb $0x30, (%r15) testb %dl, %dl movq %rbx, %rsi movq %rax, %r12 cmovneq %rax, %rsi movb $0x78, 0x1(%rsi) addq $0x2, %rsi movq %rcx, %rdi movl $0x10, %edx xorl %ecx, %ecx jmp 0xf6919 xorl %eax, %eax cmpb $0x58, %r8b sete %al movq %rcx, %rdi movq %r15, %rsi movl $0x10, %edx movl %eax, %ecx callq 0xf5388 movq %rax, %r14 subq %r15, %r14 cmpq %r13, %r14 ja 0xf699a cmpq %r12, %r15 jne 0xf6997 movq -0x68(%rbp), %r12 cmpq %r12, %r13 cmovbq %r13, %r12 subq %r14, %r12 jbe 0xf6989 movq -0x60(%rbp), %rax andl $0x4, %eax sete %r13b leal 0x20(,%rax,4), %esi movq %rbx, %rdi movq %r12, %rdx callq 0x2a2e0 cmpb $0x70, -0x58(%rbp) setne %al orb %r13b, %al jne 0xf6986 leaq 0x1(%rbx), %rax cmpq $0x2, %r12 cmovbq %r15, %rax movb $0x78, (%rax) cmpb $0x0, -0x51(%rbp) leaq -0x50(%rbp), %rax cmoveq %rbx, %rax movb $0x30, 0x1(%rax) addq %r12, %rbx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x2a150 addq %r14, %rbx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xf69bb movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a280
process_int_arg: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax sub r13, rdi cmp r13, 10h setb al mov [rbp+var_68], rdx test rdx, rdx setnz dl or dl, al lea rax, [rbp+var_50] mov r15, rdi cmovnz r15, rax cmp r8d, 6Eh ; 'n' mov [rbp+var_58], r8d mov [rbp+var_51], dl mov [rbp+var_60], r9 jle short loc_F68AE cmp r8d, 6Fh ; 'o' jz short loc_F68CF cmp r8d, 70h ; 'p' jz short loc_F68DF mov r12, rax cmp r8d, 75h ; 'u' jnz short loc_F6903 mov rdi, rcx mov rsi, r15 mov edx, 0Ah jmp short loc_F68C8 loc_F68AE: mov r12, rax cmp r8d, 64h ; 'd' jz short loc_F68BD cmp r8d, 69h ; 'i' jnz short loc_F6903 loc_F68BD: mov rdi, rcx mov rsi, r15 mov edx, 0FFFFFFF6h loc_F68C8: call int10_to_str jmp short loc_F691E loc_F68CF: mov r12, rax mov rdi, rcx mov rsi, r15 mov edx, 8 jmp short loc_F68FF loc_F68DF: mov byte ptr [r15], 30h ; '0' test dl, dl mov rsi, rbx mov r12, rax cmovnz rsi, rax mov byte ptr [rsi+1], 78h ; 'x' add rsi, 2 mov rdi, rcx mov edx, 10h loc_F68FF: xor ecx, ecx jmp short loc_F6919 loc_F6903: xor eax, eax cmp r8b, 58h ; 'X' setz al mov rdi, rcx mov rsi, r15 mov edx, 10h mov ecx, eax loc_F6919: call int2str loc_F691E: mov r14, rax sub r14, r15 cmp r14, r13 ja short loc_F699A cmp r15, r12 jnz short loc_F6997 mov r12, [rbp+var_68] cmp r13, r12 cmovb r12, r13 sub r12, r14 jbe short loc_F6989 mov rax, [rbp+var_60] and eax, 4 setz r13b lea esi, ds:20h[rax*4] mov rdi, rbx mov rdx, r12 call _memset cmp byte ptr [rbp+var_58], 70h ; 'p' setnz al or al, r13b jnz short loc_F6986 lea rax, [rbx+1] cmp r12, 2 cmovb rax, r15 mov byte ptr [rax], 78h ; 'x' cmp [rbp+var_51], 0 lea rax, [rbp+var_50] cmovz rax, rbx mov byte ptr [rax+1], 30h ; '0' loc_F6986: add rbx, r12 loc_F6989: mov rdi, rbx mov rsi, r15 mov rdx, r14 call _memmove loc_F6997: add rbx, r14 loc_F699A: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_F69BB mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_F69BB: call ___stack_chk_fail
_BYTE * process_int_arg(_BYTE *a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, char a6) { _BYTE *v6; // rbx unsigned long long v7; // r13 bool v8; // dl _BYTE *v9; // r15 unsigned long long v10; // rdi _BYTE *v11; // rsi int v12; // edx _BYTE *v13; // rax unsigned long long v14; // rdi _BYTE *v15; // rsi unsigned int v16; // edx _BYTE *v17; // rsi BOOL v18; // ecx unsigned long long v19; // r14 unsigned long long v20; // r12 bool v21; // cc unsigned long long v22; // r12 _BYTE *v23; // rax _BYTE *v24; // rax char v28; // [rsp+18h] [rbp-58h] bool v29; // [rsp+1Fh] [rbp-51h] _BYTE v30[32]; // [rsp+20h] [rbp-50h] BYREF unsigned long long v31; // [rsp+40h] [rbp-30h] v6 = a1; v31 = __readfsqword(0x28u); v7 = a2 - (_QWORD)a1; v8 = (unsigned long long)(a2 - (_QWORD)a1) < 0x10 || a3 != 0; v9 = a1; if ( v8 ) v9 = v30; v28 = a5; v29 = v8; if ( a5 <= 110 ) { if ( a5 == 100 || a5 == 105 ) { v10 = a4; v11 = v9; v12 = -10; goto LABEL_11; } goto LABEL_17; } switch ( a5 ) { case 'o': v14 = a4; v15 = v9; v16 = 8; break; case 'p': *v9 = 48; v17 = a1; if ( v8 ) v17 = v30; v17[1] = 120; v15 = v17 + 2; v14 = a4; v16 = 16; break; case 'u': v10 = a4; v11 = v9; v12 = 10; LABEL_11: v13 = int10_to_str(v10, v11, v12); goto LABEL_19; default: LABEL_17: v14 = a4; v15 = v9; v16 = 16; v18 = (_BYTE)a5 == 88; goto LABEL_18; } v18 = 0; LABEL_18: v13 = int2str(v14, v15, v16, v18); LABEL_19: v19 = v13 - v9; if ( v13 - v9 <= v7 ) { if ( v9 == v30 ) { v20 = a3; if ( v7 < a3 ) v20 = v7; v21 = v20 <= v19; v22 = v20 - v19; if ( !v21 ) { memset(v6, 4 * (a6 & 4u) + 32, v22); if ( (a6 & 4) != 0 && v28 == 112 ) { v23 = v6 + 1; if ( v22 < 2 ) v23 = v9; *v23 = 120; v24 = v30; if ( !v29 ) v24 = v6; v24[1] = 48; } v6 += v22; } memmove(v6, v9, v19); } v6 += v19; } return v6; }
process_int_arg: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX SUB R13,RDI CMP R13,0x10 SETC AL MOV qword ptr [RBP + -0x68],RDX TEST RDX,RDX SETNZ DL OR DL,AL LEA RAX,[RBP + -0x50] MOV R15,RDI CMOVNZ R15,RAX CMP R8D,0x6e MOV dword ptr [RBP + -0x58],R8D MOV byte ptr [RBP + -0x51],DL MOV qword ptr [RBP + -0x60],R9 JLE 0x001f68ae CMP R8D,0x6f JZ 0x001f68cf CMP R8D,0x70 JZ 0x001f68df MOV R12,RAX CMP R8D,0x75 JNZ 0x001f6903 MOV RDI,RCX MOV RSI,R15 MOV EDX,0xa JMP 0x001f68c8 LAB_001f68ae: MOV R12,RAX CMP R8D,0x64 JZ 0x001f68bd CMP R8D,0x69 JNZ 0x001f6903 LAB_001f68bd: MOV RDI,RCX MOV RSI,R15 MOV EDX,0xfffffff6 LAB_001f68c8: CALL 0x001f545e JMP 0x001f691e LAB_001f68cf: MOV R12,RAX MOV RDI,RCX MOV RSI,R15 MOV EDX,0x8 JMP 0x001f68ff LAB_001f68df: MOV byte ptr [R15],0x30 TEST DL,DL MOV RSI,RBX MOV R12,RAX CMOVNZ RSI,RAX MOV byte ptr [RSI + 0x1],0x78 ADD RSI,0x2 MOV RDI,RCX MOV EDX,0x10 LAB_001f68ff: XOR ECX,ECX JMP 0x001f6919 LAB_001f6903: XOR EAX,EAX CMP R8B,0x58 SETZ AL MOV RDI,RCX MOV RSI,R15 MOV EDX,0x10 MOV ECX,EAX LAB_001f6919: CALL 0x001f5388 LAB_001f691e: MOV R14,RAX SUB R14,R15 CMP R14,R13 JA 0x001f699a CMP R15,R12 JNZ 0x001f6997 MOV R12,qword ptr [RBP + -0x68] CMP R13,R12 CMOVC R12,R13 SUB R12,R14 JBE 0x001f6989 MOV RAX,qword ptr [RBP + -0x60] AND EAX,0x4 SETZ R13B LEA ESI,[0x20 + RAX*0x4] MOV RDI,RBX MOV RDX,R12 CALL 0x0012a2e0 CMP byte ptr [RBP + -0x58],0x70 SETNZ AL OR AL,R13B JNZ 0x001f6986 LEA RAX,[RBX + 0x1] CMP R12,0x2 CMOVC RAX,R15 MOV byte ptr [RAX],0x78 CMP byte ptr [RBP + -0x51],0x0 LEA RAX,[RBP + -0x50] CMOVZ RAX,RBX MOV byte ptr [RAX + 0x1],0x30 LAB_001f6986: ADD RBX,R12 LAB_001f6989: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0012a150 LAB_001f6997: ADD RBX,R14 LAB_001f699a: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001f69bb MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001f69bb: CALL 0x0012a280
int1 * process_int_arg(int1 *param_1,long param_2,ulong param_3,int8 param_4,int param_5, uint param_6) { long lVar1; int1 *puVar2; int8 uVar3; ulong uVar4; ulong __n; int1 *__src; long in_FS_OFFSET; bool bVar5; bool bVar6; bool bVar7; int1 local_58 [32]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = param_2 - (long)param_1; bVar5 = uVar4 < 0x10; bVar6 = param_3 != 0; __src = param_1; if (bVar6 || bVar5) { __src = local_58; } puVar2 = __src; if (param_5 < 0x6f) { if ((param_5 == 100) || (param_5 == 0x69)) { uVar3 = 0xfffffff6; LAB_001f68c8: lVar1 = int10_to_str(param_4,__src,uVar3); goto LAB_001f691e; } LAB_001f6903: bVar7 = (char)param_5 == 'X'; uVar3 = 0x10; } else { if (param_5 == 0x6f) { uVar3 = 8; } else { if (param_5 != 0x70) { if (param_5 != 0x75) goto LAB_001f6903; uVar3 = 10; goto LAB_001f68c8; } *__src = 0x30; puVar2 = param_1; if (bVar6 || bVar5) { puVar2 = local_58; } puVar2[1] = 0x78; uVar3 = 0x10; puVar2 = puVar2 + 2; } bVar7 = false; } lVar1 = int2str(param_4,puVar2,uVar3,bVar7); LAB_001f691e: __n = lVar1 - (long)__src; if (__n <= uVar4) { if (__src == local_58) { if (uVar4 < param_3) { param_3 = uVar4; } uVar4 = param_3 - __n; if (__n <= param_3 && uVar4 != 0) { memset(param_1,(param_6 & 4) * 4 + 0x20,uVar4); if ((char)param_5 == 'p' && (param_6 & 4) != 0) { puVar2 = param_1 + 1; if (uVar4 < 2) { puVar2 = __src; } *puVar2 = 0x78; puVar2 = local_58; if (!bVar6 && !bVar5) { puVar2 = param_1; } puVar2[1] = 0x30; } param_1 = param_1 + uVar4; } memmove(param_1,__src,__n); } param_1 = param_1 + __n; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return param_1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
58,245
unsigned int intx::count_significant_bytes<256u>(intx::uint<256u> const&)
corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp
inline constexpr unsigned count_significant_bytes(const uint<N>& x) noexcept { const auto w = count_significant_words(x); return (w != 0) ? count_significant_bytes(x[w - 1]) + (w - 1) * 8 : 0; }
O2
cpp
unsigned int intx::count_significant_bytes<256u>(intx::uint<256u> const&): pushq %rbx movq %rdi, %rbx callq 0x3ab25 testl %eax, %eax je 0x3a9f5 decl %eax movq (%rbx,%rax,8), %rcx testq %rcx, %rcx je 0x3a9f9 bsrq %rcx, %rcx xorq $0x3f, %rcx jmp 0x3a9fc xorl %eax, %eax jmp 0x3aa07 pushq $0x40 popq %rcx pushq $0x47 popq %rdx subl %ecx, %edx shrl $0x3, %edx leal (%rdx,%rax,8), %eax popq %rbx retq
_ZN4intx23count_significant_bytesILj256EEEjRKNS_4uintIXT_EEE: push rbx mov rbx, rdi call _ZN4intx23count_significant_wordsILj256EEEjRKNS_4uintIXT_EEE; intx::count_significant_words<256u>(intx::uint<256u> const&) test eax, eax jz short loc_3A9F5 dec eax mov rcx, [rbx+rax*8] test rcx, rcx jz short loc_3A9F9 bsr rcx, rcx xor rcx, 3Fh jmp short loc_3A9FC loc_3A9F5: xor eax, eax jmp short loc_3AA07 loc_3A9F9: push 40h ; '@' pop rcx loc_3A9FC: push 47h ; 'G' pop rdx sub edx, ecx shr edx, 3 lea eax, [rdx+rax*8] loc_3AA07: pop rbx retn
long long intx::count_significant_bytes<256u>(long long a1) { int v1; // eax long long v2; // rax unsigned long long v3; // rcx v1 = intx::count_significant_words<256u>(); if ( !v1 ) return 0LL; v2 = (unsigned int)(v1 - 1); v3 = *(_QWORD *)(a1 + 8 * v2); if ( v3 ) { _BitScanReverse64(&v3, v3); LODWORD(v3) = v3 ^ 0x3F; } else { LODWORD(v3) = 64; } return ((unsigned int)(71 - v3) >> 3) + 8 * (_DWORD)v2; }
count_significant_bytes<256u>: PUSH RBX MOV RBX,RDI CALL 0x0013ab25 TEST EAX,EAX JZ 0x0013a9f5 DEC EAX MOV RCX,qword ptr [RBX + RAX*0x8] TEST RCX,RCX JZ 0x0013a9f9 BSR RCX,RCX XOR RCX,0x3f JMP 0x0013a9fc LAB_0013a9f5: XOR EAX,EAX JMP 0x0013aa07 LAB_0013a9f9: PUSH 0x40 POP RCX LAB_0013a9fc: PUSH 0x47 POP RDX SUB EDX,ECX SHR EDX,0x3 LEA EAX,[RDX + RAX*0x8] LAB_0013aa07: POP RBX RET
/* unsigned int intx::count_significant_bytes<256u>(intx::uint<256u> const&) */ uint intx::count_significant_bytes<256u>(uint *param_1) { ulong uVar1; long lVar2; uint uVar3; uint uVar4; uVar3 = count_significant_words<256u>(param_1); if (uVar3 == 0) { uVar3 = 0; } else { uVar1 = *(ulong *)(param_1 + (ulong)(uVar3 - 1) * 8); if (uVar1 == 0) { uVar4 = 0x40; } else { lVar2 = 0x3f; if (uVar1 != 0) { for (; uVar1 >> lVar2 == 0; lVar2 = lVar2 + -1) { } } uVar4 = (uint)lVar2 ^ 0x3f; } uVar3 = (0x47 - uVar4 >> 3) + (uVar3 - 1) * 8; } return uVar3; }
58,246
Trie::Trie(Trie const&)
MikePodsytnik[P]TCRtrie/src/Trie.cpp
Trie::Trie(const Trie& other) : patterns_(other.patterns_) { root_ = CopyTrie(other.root_); }
O3
cpp
Trie::Trie(Trie const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx movabsq $0x400000004, %rax # imm = 0x400000004 movq %rax, (%rdi) movb $0x0, 0x8(%rdi) movl $0x20, 0xc(%rdi) leaq 0x40(%rdi), %rax movq %rax, 0x10(%rdi) movq $0x1, 0x18(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movl $0x3f800000, 0x30(%rdi) # imm = 0x3F800000 movups %xmm0, 0x38(%rdi) leaq 0x50(%rdi), %r14 addq $0x50, %rsi movq %r14, %rdi callq 0x31224 movq 0x48(%r15), %rsi movq %rbx, %rdi callq 0x2ebb6 movq %rax, 0x48(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r15 movq %r14, %rdi callq 0x311f4 jmp 0x2eba1 movq %rax, %r15 addq $0x10, %rbx movq %rbx, %rdi callq 0x315c6 movq %r15, %rdi callq 0x7780 nop
_ZN4TrieC2ERKS_: push r15; Alternative name is 'Trie::Trie(Trie const&)' push r14 push rbx mov r15, rsi mov rbx, rdi mov rax, 400000004h mov [rdi], rax mov byte ptr [rdi+8], 0 mov dword ptr [rdi+0Ch], 20h ; ' ' lea rax, [rdi+40h] mov [rdi+10h], rax mov qword ptr [rdi+18h], 1 xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 mov dword ptr [rdi+30h], 3F800000h movups xmmword ptr [rdi+38h], xmm0 lea r14, [rdi+50h] add rsi, 50h ; 'P' mov rdi, r14 call _ZNSt6vectorI10AIRREntitySaIS0_EEC2ERKS2_; std::vector<AIRREntity>::vector(std::vector<AIRREntity> const&) mov rsi, [r15+48h] mov rdi, rbx call _ZN4Trie8CopyTrieEPKNS_8TrieNodeE; Trie::CopyTrie(Trie::TrieNode const*) mov [rbx+48h], rax pop rbx pop r14 pop r15 retn mov r15, rax mov rdi, r14 call _ZNSt6vectorI10AIRREntitySaIS0_EED2Ev; std::vector<AIRREntity>::~vector() jmp short loc_2EBA1 mov r15, rax loc_2EBA1: add rbx, 10h mov rdi, rbx call _ZNSt10_HashtableIcSt4pairIKcSt13unordered_mapIcfSt4hashIcESt8equal_toIcESaIS0_IS1_fEEEESaISA_ENSt8__detail10_Select1stES6_S4_NSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<char,std::pair<char const,std::unordered_map<char,float>>,std::allocator<std::pair<char const,std::unordered_map<char,float>>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, r15 call __Unwind_Resume
void Trie::Trie(Trie *this, const Trie *a2) { *(_QWORD *)this = 0x400000004LL; *((_BYTE *)this + 8) = 0; *((_DWORD *)this + 3) = 32; *((_QWORD *)this + 2) = (char *)this + 64; *((_QWORD *)this + 3) = 1LL; *((_OWORD *)this + 2) = 0LL; *((_DWORD *)this + 12) = 1065353216; *(_OWORD *)((char *)this + 56) = 0LL; std::vector<AIRREntity>::vector((char *)this + 80, (char *)a2 + 80); *((_QWORD *)this + 9) = Trie::CopyTrie(this, *((_QWORD *)a2 + 9)); }
Trie: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV RBX,RDI MOV RAX,0x400000004 MOV qword ptr [RDI],RAX MOV byte ptr [RDI + 0x8],0x0 MOV dword ptr [RDI + 0xc],0x20 LEA RAX,[RDI + 0x40] MOV qword ptr [RDI + 0x10],RAX MOV qword ptr [RDI + 0x18],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOV dword ptr [RDI + 0x30],0x3f800000 MOVUPS xmmword ptr [RDI + 0x38],XMM0 LEA R14,[RDI + 0x50] ADD RSI,0x50 LAB_0012eb73: MOV RDI,R14 CALL 0x00131224 MOV RSI,qword ptr [R15 + 0x48] LAB_0012eb7f: MOV RDI,RBX CALL 0x0012ebb6 LAB_0012eb87: MOV qword ptr [RBX + 0x48],RAX POP RBX POP R14 POP R15 RET
/* Trie::Trie(Trie const&) */ void __thiscall Trie::Trie(Trie *this,Trie *param_1) { int8 uVar1; *(int8 *)this = 0x400000004; this[8] = (Trie)0x0; *(int4 *)(this + 0xc) = 0x20; *(Trie **)(this + 0x10) = this + 0x40; *(int8 *)(this + 0x18) = 1; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int4 *)(this + 0x30) = 0x3f800000; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; /* try { // try from 0012eb73 to 0012eb7a has its CatchHandler @ 0012eb9e */ std::vector<AIRREntity,std::allocator<AIRREntity>>::vector ((vector<AIRREntity,std::allocator<AIRREntity>> *)(this + 0x50), (vector *)(param_1 + 0x50)); /* try { // try from 0012eb7f to 0012eb86 has its CatchHandler @ 0012eb91 */ uVar1 = CopyTrie(this,*(TrieNode **)(param_1 + 0x48)); *(int8 *)(this + 0x48) = uVar1; return; }
58,247
fmt::v10::detail::bigint::square()
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR20 void square() { int num_bigits = static_cast<int>(bigits_.size()); int num_result_bigits = 2 * num_bigits; basic_memory_buffer<bigit, bigits_capacity> n(std::move(bigits_)); bigits_.resize(to_unsigned(num_result_bigits)); auto sum = uint128_t(); for (int bigit_index = 0; bigit_index < num_bigits; ++bigit_index) { // Compute bigit at position bigit_index of the result by adding // cross-product terms n[i] * n[j] such that i + j == bigit_index. for (int i = 0, j = bigit_index; j >= 0; ++i, --j) { // Most terms are multiplied twice which can be optimized in the future. sum += static_cast<double_bigit>(n[i]) * n[j]; } (*this)[bigit_index] = static_cast<bigit>(sum); sum >>= num_bits<bigit>(); // Compute the carry. } // Do the same for the top half. for (int bigit_index = num_bigits; bigit_index < num_result_bigits; ++bigit_index) { for (int j = num_bigits - 1, i = bigit_index - j; i < num_bigits;) sum += static_cast<double_bigit>(n[i++]) * n[j--]; (*this)[bigit_index] = static_cast<bigit>(sum); sum >>= num_bits<bigit>(); } remove_leading_zeros(); exp_ *= 2; }
O0
c
fmt::v10::detail::bigint::square(): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x150(%rsp) movq 0x150(%rsp), %rdi movq %rdi, 0x60(%rsp) callq 0xb5dd0 movq 0x60(%rsp), %rsi movl %eax, 0x14c(%rsp) movl 0x14c(%rsp), %eax addl %eax, %eax movl %eax, 0x148(%rsp) leaq 0xa8(%rsp), %rdi callq 0xb6780 movl 0x148(%rsp), %edi callq 0xa5690 movq 0x60(%rsp), %rdi movl %eax, %eax movl %eax, %esi callq 0xb6230 jmp 0xb6446 movq $0x0, 0x88(%rsp) movq $0x0, 0x80(%rsp) movl $0x0, 0x7c(%rsp) movl 0x7c(%rsp), %eax cmpl 0x14c(%rsp), %eax jge 0xb65db movl $0x0, 0x78(%rsp) movl 0x7c(%rsp), %eax movl %eax, 0x74(%rsp) cmpl $0x0, 0x74(%rsp) jl 0xb6546 movl 0x78(%rsp), %esi leaq 0xa8(%rsp), %rdi callq 0xb67e0 movq %rax, 0x58(%rsp) jmp 0xb64aa movq 0x58(%rsp), %rax movl (%rax), %eax movq %rax, 0x48(%rsp) movl 0x74(%rsp), %esi leaq 0xa8(%rsp), %rdi callq 0xb67e0 movq %rax, 0x50(%rsp) jmp 0xb64ce movq 0x48(%rsp), %rdx movq 0x50(%rsp), %rax movl (%rax), %eax imulq %rax, %rdx movq 0x80(%rsp), %rcx movq 0x88(%rsp), %rax addq %rdx, %rcx adcq $0x0, %rax movq %rcx, 0x80(%rsp) movq %rax, 0x88(%rsp) movl 0x78(%rsp), %eax addl $0x1, %eax movl %eax, 0x78(%rsp) movl 0x74(%rsp), %eax addl $-0x1, %eax movl %eax, 0x74(%rsp) jmp 0xb6487 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0xa8(%rsp), %rdi callq 0xb68c0 jmp 0xb6771 movq 0x60(%rsp), %rdi movl 0x80(%rsp), %eax movl %eax, 0x3c(%rsp) movl 0x7c(%rsp), %esi callq 0xb6800 movq %rax, 0x40(%rsp) jmp 0xb6566 movq 0x40(%rsp), %rax movl 0x3c(%rsp), %ecx movl %ecx, (%rax) callq 0xb6830 movl %eax, 0x38(%rsp) jmp 0xb657c movl 0x38(%rsp), %ecx movq 0x80(%rsp), %rax movq 0x88(%rsp), %rdx movb %cl, %sil movb %sil, %cl movq %rdx, %rdi shrq %cl, %rdi movq %rdi, 0x30(%rsp) movb %sil, %cl shrdq %cl, %rdx, %rax movq 0x30(%rsp), %rcx xorl %edx, %edx testb $0x40, %sil cmovneq %rcx, %rax cmovneq %rdx, %rcx movq %rcx, 0x88(%rsp) movq %rax, 0x80(%rsp) movl 0x7c(%rsp), %eax addl $0x1, %eax movl %eax, 0x7c(%rsp) jmp 0xb6466 movl 0x14c(%rsp), %eax movl %eax, 0x70(%rsp) movl 0x70(%rsp), %eax cmpl 0x148(%rsp), %eax jge 0xb673d movl 0x14c(%rsp), %eax subl $0x1, %eax movl %eax, 0x6c(%rsp) movl 0x70(%rsp), %eax subl 0x6c(%rsp), %eax movl %eax, 0x68(%rsp) movl 0x68(%rsp), %eax cmpl 0x14c(%rsp), %eax jge 0xb66aa movl 0x68(%rsp), %esi movl %esi, %eax incl %eax movl %eax, 0x68(%rsp) leaq 0xa8(%rsp), %rdi callq 0xb67e0 movq %rax, 0x28(%rsp) jmp 0xb6642 movq 0x28(%rsp), %rax movl (%rax), %eax movq %rax, 0x18(%rsp) movl 0x6c(%rsp), %esi movl %esi, %eax decl %eax movl %eax, 0x6c(%rsp) leaq 0xa8(%rsp), %rdi callq 0xb67e0 movq %rax, 0x20(%rsp) jmp 0xb666e movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rax movl (%rax), %eax imulq %rax, %rdx movq 0x80(%rsp), %rcx movq 0x88(%rsp), %rax addq %rdx, %rcx adcq $0x0, %rax movq %rcx, 0x80(%rsp) movq %rax, 0x88(%rsp) jmp 0xb6611 movq 0x60(%rsp), %rdi movl 0x80(%rsp), %eax movl %eax, 0xc(%rsp) movl 0x70(%rsp), %esi callq 0xb6800 movq %rax, 0x10(%rsp) jmp 0xb66ca movq 0x10(%rsp), %rax movl 0xc(%rsp), %ecx movl %ecx, (%rax) callq 0xb6830 movl %eax, 0x8(%rsp) jmp 0xb66e0 movl 0x8(%rsp), %ecx movq 0x80(%rsp), %rax movq 0x88(%rsp), %rdx movb %cl, %sil movb %sil, %cl movq %rdx, %rdi shrq %cl, %rdi movq %rdi, (%rsp) movb %sil, %cl shrdq %cl, %rdx, %rax movq (%rsp), %rcx xorl %edx, %edx testb $0x40, %sil cmovneq %rcx, %rax cmovneq %rdx, %rcx movq %rcx, 0x88(%rsp) movq %rax, 0x80(%rsp) movl 0x70(%rsp), %eax addl $0x1, %eax movl %eax, 0x70(%rsp) jmp 0xb65e6 movq 0x60(%rsp), %rdi callq 0xb6840 jmp 0xb6749 movq 0x60(%rsp), %rax movl 0xa0(%rax), %ecx shll %ecx movl %ecx, 0xa0(%rax) leaq 0xa8(%rsp), %rdi callq 0xb68c0 addq $0x158, %rsp # imm = 0x158 retq movq 0xa0(%rsp), %rdi callq 0x90db0 nop
_ZN3fmt3v106detail6bigint6squareEv: sub rsp, 158h mov [rsp+158h+var_8], rdi mov rdi, [rsp+158h+var_8] mov [rsp+158h+var_F8], rdi call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void) mov rsi, [rsp+158h+var_F8] mov [rsp+158h+var_C], eax mov eax, [rsp+158h+var_C] add eax, eax mov [rsp+158h+var_10], eax lea rdi, [rsp+158h+var_B0] call _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEEC2EOS3_; fmt::v10::basic_memory_buffer<uint,32ul,std::allocator<uint>>::basic_memory_buffer(fmt::v10::basic_memory_buffer<uint,32ul,std::allocator<uint>>&&) mov edi, [rsp+158h+var_10] call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int) mov rdi, [rsp+158h+var_F8] mov eax, eax mov esi, eax call _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEE6resizeEm; fmt::v10::basic_memory_buffer<uint,32ul,std::allocator<uint>>::resize(ulong) jmp short $+2 loc_B6446: mov [rsp+158h+var_D0], 0 mov [rsp+158h+var_D8], 0 mov [rsp+158h+var_DC], 0 loc_B6466: mov eax, [rsp+158h+var_DC] cmp eax, [rsp+158h+var_C] jge loc_B65DB mov [rsp+158h+var_E0], 0 mov eax, [rsp+158h+var_DC] mov [rsp+158h+var_E4], eax loc_B6487: cmp [rsp+158h+var_E4], 0 jl loc_B6546 mov esi, [rsp+158h+var_E0] lea rdi, [rsp+158h+var_B0] call _ZN3fmt3v106detail6bufferIjEixIiEERjT_; fmt::v10::detail::buffer<uint>::operator[]<int>(int) mov [rsp+158h+var_100], rax jmp short $+2 loc_B64AA: mov rax, [rsp+158h+var_100] mov eax, [rax] mov [rsp+158h+var_110], rax mov esi, [rsp+158h+var_E4] lea rdi, [rsp+158h+var_B0] call _ZN3fmt3v106detail6bufferIjEixIiEERjT_; fmt::v10::detail::buffer<uint>::operator[]<int>(int) mov [rsp+158h+var_108], rax jmp short $+2 loc_B64CE: mov rdx, [rsp+158h+var_110] mov rax, [rsp+158h+var_108] mov eax, [rax] imul rdx, rax mov rcx, [rsp+158h+var_D8] mov rax, [rsp+158h+var_D0] add rcx, rdx adc rax, 0 mov [rsp+158h+var_D8], rcx mov [rsp+158h+var_D0], rax mov eax, [rsp+158h+var_E0] add eax, 1 mov [rsp+158h+var_E0], eax mov eax, [rsp+158h+var_E4] add eax, 0FFFFFFFFh mov [rsp+158h+var_E4], eax jmp loc_B6487 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_A0] call _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEED2Ev; fmt::v10::basic_memory_buffer<uint,32ul,std::allocator<uint>>::~basic_memory_buffer() jmp loc_B6771 loc_B6546: mov rdi, [rsp+158h+var_F8] mov eax, dword ptr [rsp+158h+var_D8] mov [rsp+158h+var_11C], eax mov esi, [rsp+158h+var_DC] call _ZN3fmt3v106detail6bigintixEi; fmt::v10::detail::bigint::operator[](int) mov [rsp+158h+var_118], rax jmp short $+2 loc_B6566: mov rax, [rsp+158h+var_118] mov ecx, [rsp+158h+var_11C] mov [rax], ecx call _ZN3fmt3v106detail8num_bitsIjEEiv; fmt::v10::detail::num_bits<uint>(void) mov [rsp+158h+var_120], eax jmp short $+2 loc_B657C: mov ecx, [rsp+158h+var_120] mov rax, [rsp+158h+var_D8] mov rdx, [rsp+158h+var_D0] mov sil, cl mov cl, sil mov rdi, rdx shr rdi, cl mov [rsp+158h+var_128], rdi mov cl, sil shrd rax, rdx, cl mov rcx, [rsp+158h+var_128] xor edx, edx test sil, 40h cmovnz rax, rcx cmovnz rcx, rdx mov [rsp+158h+var_D0], rcx mov [rsp+158h+var_D8], rax mov eax, [rsp+158h+var_DC] add eax, 1 mov [rsp+158h+var_DC], eax jmp loc_B6466 loc_B65DB: mov eax, [rsp+158h+var_C] mov [rsp+158h+var_E8], eax loc_B65E6: mov eax, [rsp+158h+var_E8] cmp eax, [rsp+158h+var_10] jge loc_B673D mov eax, [rsp+158h+var_C] sub eax, 1 mov [rsp+158h+var_EC], eax mov eax, [rsp+158h+var_E8] sub eax, [rsp+158h+var_EC] mov [rsp+158h+var_F0], eax loc_B6611: mov eax, [rsp+158h+var_F0] cmp eax, [rsp+158h+var_C] jge loc_B66AA mov esi, [rsp+158h+var_F0] mov eax, esi inc eax mov [rsp+158h+var_F0], eax lea rdi, [rsp+158h+var_B0] call _ZN3fmt3v106detail6bufferIjEixIiEERjT_; fmt::v10::detail::buffer<uint>::operator[]<int>(int) mov [rsp+158h+var_130], rax jmp short $+2 loc_B6642: mov rax, [rsp+158h+var_130] mov eax, [rax] mov [rsp+158h+var_140], rax mov esi, [rsp+158h+var_EC] mov eax, esi dec eax mov [rsp+158h+var_EC], eax lea rdi, [rsp+158h+var_B0] call _ZN3fmt3v106detail6bufferIjEixIiEERjT_; fmt::v10::detail::buffer<uint>::operator[]<int>(int) mov [rsp+158h+var_138], rax jmp short $+2 loc_B666E: mov rdx, [rsp+158h+var_140] mov rax, [rsp+158h+var_138] mov eax, [rax] imul rdx, rax mov rcx, [rsp+158h+var_D8] mov rax, [rsp+158h+var_D0] add rcx, rdx adc rax, 0 mov [rsp+158h+var_D8], rcx mov [rsp+158h+var_D0], rax jmp loc_B6611 loc_B66AA: mov rdi, [rsp+158h+var_F8] mov eax, dword ptr [rsp+158h+var_D8] mov [rsp+158h+var_14C], eax mov esi, [rsp+158h+var_E8] call _ZN3fmt3v106detail6bigintixEi; fmt::v10::detail::bigint::operator[](int) mov [rsp+158h+var_148], rax jmp short $+2 loc_B66CA: mov rax, [rsp+158h+var_148] mov ecx, [rsp+158h+var_14C] mov [rax], ecx call _ZN3fmt3v106detail8num_bitsIjEEiv; fmt::v10::detail::num_bits<uint>(void) mov [rsp+158h+var_150], eax jmp short $+2 loc_B66E0: mov ecx, [rsp+158h+var_150] mov rax, [rsp+158h+var_D8] mov rdx, [rsp+158h+var_D0] mov sil, cl mov cl, sil mov rdi, rdx shr rdi, cl mov [rsp+158h+var_158], rdi mov cl, sil shrd rax, rdx, cl mov rcx, [rsp+158h+var_158] xor edx, edx test sil, 40h cmovnz rax, rcx cmovnz rcx, rdx mov [rsp+158h+var_D0], rcx mov [rsp+158h+var_D8], rax mov eax, [rsp+158h+var_E8] add eax, 1 mov [rsp+158h+var_E8], eax jmp loc_B65E6 loc_B673D: mov rdi, [rsp+158h+var_F8]; this call _ZN3fmt3v106detail6bigint20remove_leading_zerosEv; fmt::v10::detail::bigint::remove_leading_zeros(void) jmp short $+2 loc_B6749: mov rax, [rsp+158h+var_F8] mov ecx, [rax+0A0h] shl ecx, 1 mov [rax+0A0h], ecx lea rdi, [rsp+158h+var_B0] call _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEED2Ev; fmt::v10::basic_memory_buffer<uint,32ul,std::allocator<uint>>::~basic_memory_buffer() add rsp, 158h retn loc_B6771: mov rdi, [rsp+arg_98] call __Unwind_Resume
long long fmt::v10::detail::bigint::square(fmt::v10::detail::bigint *this) { unsigned int v1; // eax unsigned long long v2; // rax long long v3; // rcx unsigned long long v4; // rax long long v5; // rcx char v7; // [rsp+8h] [rbp-150h] long long v8; // [rsp+18h] [rbp-140h] char v9; // [rsp+38h] [rbp-120h] long long v10; // [rsp+48h] [rbp-110h] int v11; // [rsp+68h] [rbp-F0h] int v12; // [rsp+6Ch] [rbp-ECh] signed int k; // [rsp+70h] [rbp-E8h] int j; // [rsp+74h] [rbp-E4h] int v15; // [rsp+78h] [rbp-E0h] int i; // [rsp+7Ch] [rbp-DCh] __int128 v17; // [rsp+80h] [rbp-D8h] _BYTE v18[160]; // [rsp+A8h] [rbp-B0h] BYREF signed int v19; // [rsp+148h] [rbp-10h] signed int v20; // [rsp+14Ch] [rbp-Ch] fmt::v10::detail::bigint *v21; // [rsp+150h] [rbp-8h] v21 = this; v20 = fmt::v10::detail::buffer<unsigned int>::size((long long)this); v19 = 2 * v20; fmt::v10::basic_memory_buffer<unsigned int,32ul,std::allocator<unsigned int>>::basic_memory_buffer(v18, this); v1 = fmt::v10::detail::to_unsigned<int>(v19); fmt::v10::basic_memory_buffer<unsigned int,32ul,std::allocator<unsigned int>>::resize((long long)this, v1); v17 = 0uLL; for ( i = 0; i < v20; ++i ) { v15 = 0; for ( j = i; j >= 0; --j ) { v10 = *(unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<int>(v18); v17 += (unsigned long long)*(unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<int>(v18) * v10; ++v15; } *(_DWORD *)fmt::v10::detail::bigint::operator[](this, (unsigned int)i) = v17; v9 = fmt::v10::detail::num_bits<unsigned int>(this); v2 = ((unsigned long long)v17 >> v9) | (*((_QWORD *)&v17 + 1) << (64 - v9)); v3 = *((_QWORD *)&v17 + 1) >> v9; if ( (v9 & 0x40) != 0 ) { v2 = *((_QWORD *)&v17 + 1) >> v9; v3 = 0LL; } *((_QWORD *)&v17 + 1) = v3; *(_QWORD *)&v17 = v2; } for ( k = v20; k < v19; ++k ) { v12 = v20 - 1; v11 = k - (v20 - 1); while ( v11 < v20 ) { ++v11; v8 = *(unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<int>(v18); --v12; v17 += (unsigned long long)*(unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<int>(v18) * v8; } *(_DWORD *)fmt::v10::detail::bigint::operator[](this, (unsigned int)k) = v17; v7 = fmt::v10::detail::num_bits<unsigned int>(this); v4 = ((unsigned long long)v17 >> v7) | (*((_QWORD *)&v17 + 1) << (64 - v7)); v5 = *((_QWORD *)&v17 + 1) >> v7; if ( (v7 & 0x40) != 0 ) { v4 = *((_QWORD *)&v17 + 1) >> v7; v5 = 0LL; } *((_QWORD *)&v17 + 1) = v5; *(_QWORD *)&v17 = v4; } fmt::v10::detail::bigint::remove_leading_zeros(this); *((_DWORD *)this + 40) *= 2; return fmt::v10::basic_memory_buffer<unsigned int,32ul,std::allocator<unsigned int>>::~basic_memory_buffer(v18); }
square: SUB RSP,0x158 MOV qword ptr [RSP + 0x150],RDI MOV RDI,qword ptr [RSP + 0x150] MOV qword ptr [RSP + 0x60],RDI CALL 0x001b5dd0 MOV RSI,qword ptr [RSP + 0x60] MOV dword ptr [RSP + 0x14c],EAX MOV EAX,dword ptr [RSP + 0x14c] ADD EAX,EAX MOV dword ptr [RSP + 0x148],EAX LEA RDI,[RSP + 0xa8] CALL 0x001b6780 MOV EDI,dword ptr [RSP + 0x148] CALL 0x001a5690 MOV RDI,qword ptr [RSP + 0x60] MOV EAX,EAX MOV ESI,EAX LAB_001b643f: CALL 0x001b6230 JMP 0x001b6446 LAB_001b6446: MOV qword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x80],0x0 MOV dword ptr [RSP + 0x7c],0x0 LAB_001b6466: MOV EAX,dword ptr [RSP + 0x7c] CMP EAX,dword ptr [RSP + 0x14c] JGE 0x001b65db MOV dword ptr [RSP + 0x78],0x0 MOV EAX,dword ptr [RSP + 0x7c] MOV dword ptr [RSP + 0x74],EAX LAB_001b6487: CMP dword ptr [RSP + 0x74],0x0 JL 0x001b6546 MOV ESI,dword ptr [RSP + 0x78] LEA RDI,[RSP + 0xa8] CALL 0x001b67e0 MOV qword ptr [RSP + 0x58],RAX JMP 0x001b64aa LAB_001b64aa: MOV RAX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RAX] MOV qword ptr [RSP + 0x48],RAX MOV ESI,dword ptr [RSP + 0x74] LEA RDI,[RSP + 0xa8] CALL 0x001b67e0 MOV qword ptr [RSP + 0x50],RAX JMP 0x001b64ce LAB_001b64ce: MOV RDX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX] IMUL RDX,RAX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x88] ADD RCX,RDX ADC RAX,0x0 MOV qword ptr [RSP + 0x80],RCX MOV qword ptr [RSP + 0x88],RAX MOV EAX,dword ptr [RSP + 0x78] ADD EAX,0x1 MOV dword ptr [RSP + 0x78],EAX MOV EAX,dword ptr [RSP + 0x74] ADD EAX,-0x1 MOV dword ptr [RSP + 0x74],EAX JMP 0x001b6487 LAB_001b6546: MOV RDI,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RSP + 0x80] MOV dword ptr [RSP + 0x3c],EAX MOV ESI,dword ptr [RSP + 0x7c] CALL 0x001b6800 MOV qword ptr [RSP + 0x40],RAX JMP 0x001b6566 LAB_001b6566: MOV RAX,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RSP + 0x3c] MOV dword ptr [RAX],ECX CALL 0x001b6830 MOV dword ptr [RSP + 0x38],EAX JMP 0x001b657c LAB_001b657c: MOV ECX,dword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] MOV SIL,CL MOV CL,SIL MOV RDI,RDX SHR RDI,CL MOV qword ptr [RSP + 0x30],RDI MOV CL,SIL SHRD RAX,RDX,CL MOV RCX,qword ptr [RSP + 0x30] XOR EDX,EDX TEST SIL,0x40 CMOVNZ RAX,RCX CMOVNZ RCX,RDX MOV qword ptr [RSP + 0x88],RCX MOV qword ptr [RSP + 0x80],RAX MOV EAX,dword ptr [RSP + 0x7c] ADD EAX,0x1 MOV dword ptr [RSP + 0x7c],EAX JMP 0x001b6466 LAB_001b65db: MOV EAX,dword ptr [RSP + 0x14c] MOV dword ptr [RSP + 0x70],EAX LAB_001b65e6: MOV EAX,dword ptr [RSP + 0x70] CMP EAX,dword ptr [RSP + 0x148] JGE 0x001b673d MOV EAX,dword ptr [RSP + 0x14c] SUB EAX,0x1 MOV dword ptr [RSP + 0x6c],EAX MOV EAX,dword ptr [RSP + 0x70] SUB EAX,dword ptr [RSP + 0x6c] MOV dword ptr [RSP + 0x68],EAX LAB_001b6611: MOV EAX,dword ptr [RSP + 0x68] CMP EAX,dword ptr [RSP + 0x14c] JGE 0x001b66aa MOV ESI,dword ptr [RSP + 0x68] MOV EAX,ESI INC EAX MOV dword ptr [RSP + 0x68],EAX LEA RDI,[RSP + 0xa8] CALL 0x001b67e0 MOV qword ptr [RSP + 0x28],RAX JMP 0x001b6642 LAB_001b6642: MOV RAX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX] MOV qword ptr [RSP + 0x18],RAX MOV ESI,dword ptr [RSP + 0x6c] MOV EAX,ESI DEC EAX MOV dword ptr [RSP + 0x6c],EAX LEA RDI,[RSP + 0xa8] CALL 0x001b67e0 MOV qword ptr [RSP + 0x20],RAX JMP 0x001b666e LAB_001b666e: MOV RDX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX] IMUL RDX,RAX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x88] ADD RCX,RDX ADC RAX,0x0 MOV qword ptr [RSP + 0x80],RCX MOV qword ptr [RSP + 0x88],RAX JMP 0x001b6611 LAB_001b66aa: MOV RDI,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RSP + 0x80] MOV dword ptr [RSP + 0xc],EAX MOV ESI,dword ptr [RSP + 0x70] CALL 0x001b6800 MOV qword ptr [RSP + 0x10],RAX JMP 0x001b66ca LAB_001b66ca: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] MOV dword ptr [RAX],ECX CALL 0x001b6830 MOV dword ptr [RSP + 0x8],EAX JMP 0x001b66e0 LAB_001b66e0: MOV ECX,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] MOV SIL,CL MOV CL,SIL MOV RDI,RDX SHR RDI,CL MOV qword ptr [RSP],RDI MOV CL,SIL SHRD RAX,RDX,CL MOV RCX,qword ptr [RSP] XOR EDX,EDX TEST SIL,0x40 CMOVNZ RAX,RCX CMOVNZ RCX,RDX MOV qword ptr [RSP + 0x88],RCX MOV qword ptr [RSP + 0x80],RAX MOV EAX,dword ptr [RSP + 0x70] ADD EAX,0x1 MOV dword ptr [RSP + 0x70],EAX JMP 0x001b65e6 LAB_001b673d: MOV RDI,qword ptr [RSP + 0x60] CALL 0x001b6840 LAB_001b6747: JMP 0x001b6749 LAB_001b6749: MOV RAX,qword ptr [RSP + 0x60] MOV ECX,dword ptr [RAX + 0xa0] SHL ECX,0x1 MOV dword ptr [RAX + 0xa0],ECX LEA RDI,[RSP + 0xa8] CALL 0x001b68c0 ADD RSP,0x158 RET
/* fmt::v10::detail::bigint::square() */ void __thiscall fmt::v10::detail::bigint::square(bigint *this) { byte bVar1; ulong uVar2; uint uVar3; uint *puVar4; int4 *puVar5; ulong uVar6; bool bVar7; int local_f0; int local_ec; int local_e8; int local_e4; int local_e0; int local_dc; ulong local_d8; ulong local_d0; basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> local_b0 [160]; int local_10; int local_c; bigint *local_8; local_8 = this; local_c = buffer<unsigned_int>::size((buffer<unsigned_int> *)this); local_10 = local_c * 2; basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>>::basic_memory_buffer (local_b0,(basic_memory_buffer *)this); uVar3 = to_unsigned<int>(local_10); /* try { // try from 001b643f to 001b6746 has its CatchHandler @ 001b6520 */ basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>>::resize ((basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *)this, (ulong)uVar3); local_d0 = 0; local_d8 = 0; for (local_dc = 0; local_dc < local_c; local_dc = local_dc + 1) { local_e0 = 0; for (local_e4 = local_dc; -1 < local_e4; local_e4 = local_e4 + -1) { puVar4 = buffer<unsigned_int>::operator[]<int>((buffer<unsigned_int> *)local_b0,local_e0); uVar3 = *puVar4; puVar4 = buffer<unsigned_int>::operator[]<int>((buffer<unsigned_int> *)local_b0,local_e4); bVar7 = CARRY8(local_d8,(ulong)uVar3 * (ulong)*puVar4); local_d8 = local_d8 + (ulong)uVar3 * (ulong)*puVar4; local_d0 = local_d0 + bVar7; local_e0 = local_e0 + 1; } puVar5 = (int4 *)operator[](this,local_dc); *puVar5 = (int4)local_d8; uVar3 = num_bits<unsigned_int>(); uVar6 = local_d0 >> ((byte)uVar3 & 0x3f); bVar1 = (byte)uVar3 & 0x3f; uVar2 = local_d0 << 0x40 - bVar1; local_d0 = uVar6; local_d8 = local_d8 >> bVar1 | uVar2; if ((uVar3 & 0x40) != 0) { local_d0 = 0; local_d8 = uVar6; } } for (local_e8 = local_c; local_e8 < local_10; local_e8 = local_e8 + 1) { local_f0 = local_e8 - (local_c + -1); local_ec = local_c + -1; while (local_f0 < local_c) { puVar4 = buffer<unsigned_int>::operator[]<int>((buffer<unsigned_int> *)local_b0,local_f0); uVar3 = *puVar4; puVar4 = buffer<unsigned_int>::operator[]<int>((buffer<unsigned_int> *)local_b0,local_ec); bVar7 = CARRY8(local_d8,(ulong)uVar3 * (ulong)*puVar4); local_d8 = local_d8 + (ulong)uVar3 * (ulong)*puVar4; local_d0 = local_d0 + bVar7; local_f0 = local_f0 + 1; local_ec = local_ec + -1; } puVar5 = (int4 *)operator[](this,local_e8); *puVar5 = (int4)local_d8; uVar3 = num_bits<unsigned_int>(); uVar6 = local_d0 >> ((byte)uVar3 & 0x3f); bVar1 = (byte)uVar3 & 0x3f; uVar2 = local_d0 << 0x40 - bVar1; local_d0 = uVar6; local_d8 = local_d8 >> bVar1 | uVar2; if ((uVar3 & 0x40) != 0) { local_d0 = 0; local_d8 = uVar6; } } remove_leading_zeros(this); *(int *)(this + 0xa0) = *(int *)(this + 0xa0) << 1; basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>>::~basic_memory_buffer (local_b0); return; }
58,248
stack_remove_next
qoraal-tictactoe/build_O0/_deps/qoraal-src/include/qoraal/common/lists.h
static INLINE void stack_remove_next (plists_t obj, unsigned int offsetof_next) { plists_t next ; plists_t last ; LISTS_ASSERT(obj, ("stack_remove_next")) ; next = *LISTS_NEXT_REF(obj, offsetof_next) ; if (next != NULL_LLO) { last = *LISTS_NEXT_REF(next, offsetof_next) ; } else { last = NULL_LLO ; } *LISTS_NEXT_REF(obj, offsetof_next) = last ; }
O0
c
stack_remove_next: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x24294 leaq 0x1c2a2(%rip), %rdi # 0x4052f movb $0x0, %al callq 0x1bb90 movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx addq %rcx, %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x242bf movq -0x18(%rbp), %rax movl -0xc(%rbp), %ecx addq %rcx, %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x242c7 movq $0x0, -0x20(%rbp) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movl -0xc(%rbp), %edx addq %rdx, %rax movq %rcx, (%rax) addq $0x20, %rsp popq %rbp retq nop
stack_remove_next: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp [rbp+var_8], 0 jnz short loc_24294 lea rdi, aStackRemoveNex; "stack_remove_next" mov al, 0 call debug_assert loc_24294: mov rax, [rbp+var_8] mov ecx, [rbp+var_C] add rax, rcx mov rax, [rax] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_242BF mov rax, [rbp+var_18] mov ecx, [rbp+var_C] add rax, rcx mov rax, [rax] mov [rbp+var_20], rax jmp short loc_242C7 loc_242BF: mov [rbp+var_20], 0 loc_242C7: mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov edx, [rbp+var_C] add rax, rdx mov [rax], rcx add rsp, 20h pop rbp retn
_QWORD * stack_remove_next( 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) { _QWORD *result; // rax char v15; // [rsp+0h] [rbp-20h] long long v16; // [rsp+0h] [rbp-20h] long long v17; // [rsp+8h] [rbp-18h] if ( !a1 ) debug_assert((long long)aStackRemoveNex, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v15); v17 = *(_QWORD *)((unsigned int)a2 + a1); if ( v17 ) v16 = *(_QWORD *)((unsigned int)a2 + v17); else v16 = 0LL; result = (_QWORD *)((unsigned int)a2 + a1); *result = v16; return result; }
stack_remove_next: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x00124294 LEA RDI,[0x14052f] MOV AL,0x0 CALL 0x0011bb90 LAB_00124294: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001242bf MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0xc] ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x001242c7 LAB_001242bf: MOV qword ptr [RBP + -0x20],0x0 LAB_001242c7: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] ADD RAX,RDX MOV qword ptr [RAX],RCX ADD RSP,0x20 POP RBP RET
void stack_remove_next(long param_1,uint param_2) { int8 local_28; if (param_1 == 0) { debug_assert(s_stack_remove_next_0014052f); } if (*(long *)(param_1 + (ulong)param_2) == 0) { local_28 = 0; } else { local_28 = *(int8 *)(*(long *)(param_1 + (ulong)param_2) + (ulong)param_2); } *(int8 *)(param_1 + (ulong)param_2) = local_28; return; }
58,249
TestLogString()
ng-log[P]ng-log/src/logging_unittest.cc
void TestLogString() { vector<string> errors; vector<string>* no_errors = nullptr; LOG_STRING(INFO, &errors) << "LOG_STRING: " << "collected info"; LOG_STRING(WARNING, &errors) << "LOG_STRING: " << "collected warning"; LOG_STRING(ERROR, &errors) << "LOG_STRING: " << "collected error"; LOG_STRING(INFO, no_errors) << "LOG_STRING: " << "reported info"; LOG_STRING(WARNING, no_errors) << "LOG_STRING: " << "reported warning"; LOG_STRING(ERROR, nullptr) << "LOG_STRING: " << "reported error"; for (auto& error : errors) { LOG(INFO) << "Captured by LOG_STRING: " << error; } }
O0
cpp
TestLogString(): pushq %rbp movq %rsp, %rbp subq $0x370, %rsp # imm = 0x370 leaq -0x18(%rbp), %rdi movq %rdi, -0x2f8(%rbp) callq 0x231d0 movq -0x2f8(%rbp), %r8 movq $0x0, -0x20(%rbp) leaq 0x5a0e3(%rip), %rsi # 0x6d114 leaq -0x80(%rbp), %rdi movl $0x232, %edx # imm = 0x232 xorl %ecx, %ecx callq 0x319b0 jmp 0x13043 leaq -0x80(%rbp), %rdi callq 0x316d0 movq %rax, -0x300(%rbp) jmp 0x13055 movq -0x300(%rbp), %rdi leaq 0x5b9c8(%rip), %rsi # 0x6ea2b callq 0xa7f0 movq %rax, -0x308(%rbp) jmp 0x13071 movq -0x308(%rbp), %rdi leaq 0x5b9b9(%rip), %rsi # 0x6ea38 callq 0xa7f0 jmp 0x13086 leaq -0x80(%rbp), %rdi callq 0x31e80 jmp 0x13091 leaq 0x5a07c(%rip), %rsi # 0x6d114 leaq -0xf0(%rbp), %rdi movl $0x234, %edx # imm = 0x234 movl $0x1, %ecx leaq -0x18(%rbp), %r8 callq 0x319b0 jmp 0x130b4 leaq -0xf0(%rbp), %rdi callq 0x316d0 movq %rax, -0x310(%rbp) jmp 0x130c9 movq -0x310(%rbp), %rdi leaq 0x5b954(%rip), %rsi # 0x6ea2b callq 0xa7f0 movq %rax, -0x318(%rbp) jmp 0x130e5 movq -0x318(%rbp), %rdi leaq 0x5b954(%rip), %rsi # 0x6ea47 callq 0xa7f0 jmp 0x130fa leaq -0xf0(%rbp), %rdi callq 0x31e80 jmp 0x13108 leaq 0x5a005(%rip), %rsi # 0x6d114 leaq -0x150(%rbp), %rdi movl $0x236, %edx # imm = 0x236 movl $0x2, %ecx leaq -0x18(%rbp), %r8 callq 0x319b0 jmp 0x1312b leaq -0x150(%rbp), %rdi callq 0x316d0 movq %rax, -0x320(%rbp) jmp 0x13140 movq -0x320(%rbp), %rdi leaq 0x5b8dd(%rip), %rsi # 0x6ea2b callq 0xa7f0 movq %rax, -0x328(%rbp) jmp 0x1315c movq -0x328(%rbp), %rdi leaq 0x5b8ef(%rip), %rsi # 0x6ea59 callq 0xa7f0 jmp 0x13171 leaq -0x150(%rbp), %rdi callq 0x31e80 jmp 0x1317f movq -0x20(%rbp), %r8 leaq 0x59f8a(%rip), %rsi # 0x6d114 leaq -0x1b0(%rbp), %rdi movl $0x239, %edx # imm = 0x239 xorl %ecx, %ecx callq 0x319b0 jmp 0x1319f leaq -0x1b0(%rbp), %rdi callq 0x316d0 movq %rax, -0x330(%rbp) jmp 0x131b4 movq -0x330(%rbp), %rdi leaq 0x5b869(%rip), %rsi # 0x6ea2b callq 0xa7f0 movq %rax, -0x338(%rbp) jmp 0x131d0 movq -0x338(%rbp), %rdi leaq 0x5b88b(%rip), %rsi # 0x6ea69 callq 0xa7f0 jmp 0x131e5 leaq -0x1b0(%rbp), %rdi callq 0x31e80 jmp 0x131f3 movq -0x20(%rbp), %r8 leaq 0x59f16(%rip), %rsi # 0x6d114 leaq -0x210(%rbp), %rdi movl $0x23b, %edx # imm = 0x23B movl $0x1, %ecx callq 0x319b0 jmp 0x13216 leaq -0x210(%rbp), %rdi callq 0x316d0 movq %rax, -0x340(%rbp) jmp 0x1322b movq -0x340(%rbp), %rdi leaq 0x5b7f2(%rip), %rsi # 0x6ea2b callq 0xa7f0 movq %rax, -0x348(%rbp) jmp 0x13247 movq -0x348(%rbp), %rdi leaq 0x5b822(%rip), %rsi # 0x6ea77 callq 0xa7f0 jmp 0x1325c leaq -0x210(%rbp), %rdi callq 0x31e80 jmp 0x1326a leaq 0x59ea3(%rip), %rsi # 0x6d114 xorl %eax, %eax movl %eax, %r8d leaq -0x270(%rbp), %rdi movl $0x23d, %edx # imm = 0x23D movl $0x2, %ecx callq 0x319b0 jmp 0x1328e leaq -0x270(%rbp), %rdi callq 0x316d0 movq %rax, -0x350(%rbp) jmp 0x132a3 movq -0x350(%rbp), %rdi leaq 0x5b77a(%rip), %rsi # 0x6ea2b callq 0xa7f0 movq %rax, -0x358(%rbp) jmp 0x132bf movq -0x358(%rbp), %rdi leaq 0x5b7bb(%rip), %rsi # 0x6ea88 callq 0xa7f0 jmp 0x132d4 leaq -0x270(%rbp), %rdi callq 0x31e80 jmp 0x132e2 leaq -0x18(%rbp), %rax movq %rax, -0x278(%rbp) movq -0x278(%rbp), %rdi callq 0x23ae0 movq %rax, -0x280(%rbp) movq -0x278(%rbp), %rdi callq 0x29970 movq %rax, -0x288(%rbp) leaq -0x280(%rbp), %rdi leaq -0x288(%rbp), %rsi callq 0x299a0 testb $0x1, %al jne 0x1332f jmp 0x134ce leaq -0x280(%rbp), %rdi callq 0x23b10 movq %rax, -0x290(%rbp) leaq 0x59dcb(%rip), %rsi # 0x6d114 leaq -0x2f0(%rbp), %rdi movl $0x241, %edx # imm = 0x241 callq 0x316f0 jmp 0x1335c leaq -0x2f0(%rbp), %rdi callq 0x316d0 movq %rax, -0x360(%rbp) jmp 0x13371 movq -0x360(%rbp), %rdi leaq 0x5b718(%rip), %rsi # 0x6ea97 callq 0xa7f0 movq %rax, -0x368(%rbp) jmp 0x1338d movq -0x368(%rbp), %rdi movq -0x290(%rbp), %rsi callq 0xa6e0 jmp 0x133a2 leaq -0x2f0(%rbp), %rdi callq 0x31e80 jmp 0x133b0 jmp 0x133b2 leaq -0x280(%rbp), %rdi callq 0x299e0 jmp 0x13313 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) jmp 0x134e0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) leaq -0x80(%rbp), %rdi callq 0x31e80 jmp 0x133f7 jmp 0x134e0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) leaq -0xf0(%rbp), %rdi callq 0x31e80 jmp 0x1341c jmp 0x134e0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) leaq -0x150(%rbp), %rdi callq 0x31e80 jmp 0x13441 jmp 0x134e0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) leaq -0x1b0(%rbp), %rdi callq 0x31e80 jmp 0x13466 jmp 0x134e0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) leaq -0x210(%rbp), %rdi callq 0x31e80 jmp 0x13488 jmp 0x134e0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) leaq -0x270(%rbp), %rdi callq 0x31e80 jmp 0x134aa jmp 0x134e0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) leaq -0x2f0(%rbp), %rdi callq 0x31e80 jmp 0x134cc jmp 0x134e0 leaq -0x18(%rbp), %rdi callq 0x231f0 addq $0x370, %rsp # imm = 0x370 popq %rbp retq leaq -0x18(%rbp), %rdi callq 0x231f0 movq -0x88(%rbp), %rdi callq 0xaf50 movq %rax, %rdi callq 0x226c0 nopl (%rax)
_ZL13TestLogStringv: push rbp mov rbp, rsp sub rsp, 370h lea rdi, [rbp+var_18] mov [rbp+var_2F8], rdi call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov r8, [rbp+var_2F8] mov [rbp+var_20], 0 lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_80] mov edx, 232h xor ecx, ecx call _ZN5nglog10LogMessageC2EPKciNS_11LogSeverityEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE; nglog::LogMessage::LogMessage(char const*,int,nglog::LogSeverity,std::vector<std::string> *) jmp short $+2 loc_13043: lea rdi, [rbp+var_80]; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_300], rax jmp short $+2 loc_13055: mov rdi, [rbp+var_300] lea rsi, aLogString; "LOG_STRING: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_308], rax jmp short $+2 loc_13071: mov rdi, [rbp+var_308] lea rsi, aCollectedInfo; "collected info" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_13086: lea rdi, [rbp+var_80]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_13091: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_F0] mov edx, 234h mov ecx, 1 lea r8, [rbp+var_18] call _ZN5nglog10LogMessageC2EPKciNS_11LogSeverityEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE; nglog::LogMessage::LogMessage(char const*,int,nglog::LogSeverity,std::vector<std::string> *) jmp short $+2 loc_130B4: lea rdi, [rbp+var_F0]; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_310], rax jmp short $+2 loc_130C9: mov rdi, [rbp+var_310] lea rsi, aLogString; "LOG_STRING: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_318], rax jmp short $+2 loc_130E5: mov rdi, [rbp+var_318] lea rsi, aCollectedWarni; "collected warning" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_130FA: lea rdi, [rbp+var_F0]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_13108: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_150] mov edx, 236h mov ecx, 2 lea r8, [rbp+var_18] call _ZN5nglog10LogMessageC2EPKciNS_11LogSeverityEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE; nglog::LogMessage::LogMessage(char const*,int,nglog::LogSeverity,std::vector<std::string> *) jmp short $+2 loc_1312B: lea rdi, [rbp+var_150]; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_320], rax jmp short $+2 loc_13140: mov rdi, [rbp+var_320] lea rsi, aLogString; "LOG_STRING: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_328], rax jmp short $+2 loc_1315C: mov rdi, [rbp+var_328] lea rsi, aCollectedError; "collected error" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_13171: lea rdi, [rbp+var_150]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_1317F: mov r8, [rbp+var_20] lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_1B0] mov edx, 239h xor ecx, ecx call _ZN5nglog10LogMessageC2EPKciNS_11LogSeverityEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE; nglog::LogMessage::LogMessage(char const*,int,nglog::LogSeverity,std::vector<std::string> *) jmp short $+2 loc_1319F: lea rdi, [rbp+var_1B0]; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_330], rax jmp short $+2 loc_131B4: mov rdi, [rbp+var_330] lea rsi, aLogString; "LOG_STRING: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_338], rax jmp short $+2 loc_131D0: mov rdi, [rbp+var_338] lea rsi, aReportedInfo; "reported info" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_131E5: lea rdi, [rbp+var_1B0]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_131F3: mov r8, [rbp+var_20] lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_210] mov edx, 23Bh mov ecx, 1 call _ZN5nglog10LogMessageC2EPKciNS_11LogSeverityEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE; nglog::LogMessage::LogMessage(char const*,int,nglog::LogSeverity,std::vector<std::string> *) jmp short $+2 loc_13216: lea rdi, [rbp+var_210]; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_340], rax jmp short $+2 loc_1322B: mov rdi, [rbp+var_340] lea rsi, aLogString; "LOG_STRING: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_348], rax jmp short $+2 loc_13247: mov rdi, [rbp+var_348] lea rsi, aReportedWarnin; "reported warning" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_1325C: lea rdi, [rbp+var_210]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_1326A: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... xor eax, eax mov r8d, eax lea rdi, [rbp+var_270] mov edx, 23Dh mov ecx, 2 call _ZN5nglog10LogMessageC2EPKciNS_11LogSeverityEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE; nglog::LogMessage::LogMessage(char const*,int,nglog::LogSeverity,std::vector<std::string> *) jmp short $+2 loc_1328E: lea rdi, [rbp+var_270]; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_350], rax jmp short $+2 loc_132A3: mov rdi, [rbp+var_350] lea rsi, aLogString; "LOG_STRING: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_358], rax jmp short $+2 loc_132BF: mov rdi, [rbp+var_358] lea rsi, aReportedError; "reported error" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_132D4: lea rdi, [rbp+var_270]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_132E2: lea rax, [rbp+var_18] mov [rbp+var_278], rax mov rdi, [rbp+var_278] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_280], rax mov rdi, [rbp+var_278] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_288], rax loc_13313: lea rdi, [rbp+var_280] lea rsi, [rbp+var_288] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_1332F jmp loc_134CE loc_1332F: lea rdi, [rbp+var_280] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov [rbp+var_290], rax lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_2F0]; this mov edx, 241h; int call _ZN5nglog10LogMessageC2EPKci; nglog::LogMessage::LogMessage(char const*,int) jmp short $+2 loc_1335C: lea rdi, [rbp+var_2F0]; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_360], rax jmp short $+2 loc_13371: mov rdi, [rbp+var_360] lea rsi, aCapturedByLogS; "Captured by LOG_STRING: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_368], rax jmp short $+2 loc_1338D: mov rdi, [rbp+var_368] mov rsi, [rbp+var_290] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_133A2: lea rdi, [rbp+var_2F0]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_133B0: jmp short $+2 loc_133B2: lea rdi, [rbp+var_280] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp loc_13313 mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax jmp loc_134E0 mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax lea rdi, [rbp+var_80]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_133F7: jmp loc_134E0 mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax lea rdi, [rbp+var_F0]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_1341C: jmp loc_134E0 mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax lea rdi, [rbp+var_150]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_13441: jmp loc_134E0 mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax lea rdi, [rbp+var_1B0]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_13466: jmp short loc_134E0 mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax lea rdi, [rbp+var_210]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_13488: jmp short loc_134E0 mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax lea rdi, [rbp+var_270]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_134AA: jmp short loc_134E0 mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax lea rdi, [rbp+var_2F0]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short $+2 loc_134CC: jmp short loc_134E0 loc_134CE: lea rdi, [rbp+var_18]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 370h pop rbp retn loc_134E0: lea rdi, [rbp+var_18]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rbp+var_88] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void TestLogString(void) { long long v0; // [rsp+8h] [rbp-368h] long long v1; // [rsp+10h] [rbp-360h] long long v2; // [rsp+18h] [rbp-358h] long long v3; // [rsp+20h] [rbp-350h] long long v4; // [rsp+28h] [rbp-348h] long long v5; // [rsp+30h] [rbp-340h] long long v6; // [rsp+38h] [rbp-338h] long long v7; // [rsp+40h] [rbp-330h] long long v8; // [rsp+48h] [rbp-328h] long long v9; // [rsp+50h] [rbp-320h] long long v10; // [rsp+58h] [rbp-318h] long long v11; // [rsp+60h] [rbp-310h] long long v12; // [rsp+68h] [rbp-308h] long long v13; // [rsp+70h] [rbp-300h] _BYTE v14[96]; // [rsp+80h] [rbp-2F0h] BYREF long long v15; // [rsp+E0h] [rbp-290h] long long v16; // [rsp+E8h] [rbp-288h] BYREF _QWORD v17[2]; // [rsp+F0h] [rbp-280h] BYREF _BYTE v18[96]; // [rsp+100h] [rbp-270h] BYREF _BYTE v19[96]; // [rsp+160h] [rbp-210h] BYREF _BYTE v20[96]; // [rsp+1C0h] [rbp-1B0h] BYREF _BYTE v21[96]; // [rsp+220h] [rbp-150h] BYREF _BYTE v22[100]; // [rsp+280h] [rbp-F0h] BYREF _BYTE v23[96]; // [rsp+2F0h] [rbp-80h] BYREF long long v24; // [rsp+350h] [rbp-20h] _BYTE v25[24]; // [rsp+358h] [rbp-18h] BYREF std::vector<std::string>::vector(v25); v24 = 0LL; nglog::LogMessage::LogMessage( v23, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc", 562LL, 0LL, v25); v13 = nglog::LogMessage::stream((nglog::LogMessage *)v23); v12 = std::operator<<<std::char_traits<char>>(v13, "LOG_STRING: "); std::operator<<<std::char_traits<char>>(v12, "collected info"); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v23); nglog::LogMessage::LogMessage( v22, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc", 564LL, 1LL, v25); v11 = nglog::LogMessage::stream((nglog::LogMessage *)v22); v10 = std::operator<<<std::char_traits<char>>(v11, "LOG_STRING: "); std::operator<<<std::char_traits<char>>(v10, "collected warning"); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v22); nglog::LogMessage::LogMessage( v21, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc", 566LL, 2LL, v25); v9 = nglog::LogMessage::stream((nglog::LogMessage *)v21); v8 = std::operator<<<std::char_traits<char>>(v9, "LOG_STRING: "); std::operator<<<std::char_traits<char>>(v8, "collected error"); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v21); nglog::LogMessage::LogMessage( v20, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc", 569LL, 0LL, v24); v7 = nglog::LogMessage::stream((nglog::LogMessage *)v20); v6 = std::operator<<<std::char_traits<char>>(v7, "LOG_STRING: "); std::operator<<<std::char_traits<char>>(v6, "reported info"); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v20); nglog::LogMessage::LogMessage( v19, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc", 571LL, 1LL, v24); v5 = nglog::LogMessage::stream((nglog::LogMessage *)v19); v4 = std::operator<<<std::char_traits<char>>(v5, "LOG_STRING: "); std::operator<<<std::char_traits<char>>(v4, "reported warning"); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v19); nglog::LogMessage::LogMessage( v18, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc", 573LL, 2LL, 0LL); v3 = nglog::LogMessage::stream((nglog::LogMessage *)v18); v2 = std::operator<<<std::char_traits<char>>(v3, "LOG_STRING: "); std::operator<<<std::char_traits<char>>(v2, "reported error"); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v18); v17[1] = v25; v17[0] = std::vector<std::string>::begin(v25); v16 = std::vector<std::string>::end(v25); while ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v17, &v16) & 1) != 0 ) { v15 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(v17); nglog::LogMessage::LogMessage( (nglog::LogMessage *)v14, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc", 577); v1 = nglog::LogMessage::stream((nglog::LogMessage *)v14); v0 = std::operator<<<std::char_traits<char>>(v1, "Captured by LOG_STRING: "); std::operator<<<char>(v0, v15); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v14); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v17); } std::vector<std::string>::~vector(v25); }
TestLogString: PUSH RBP MOV RBP,RSP SUB RSP,0x370 LEA RDI,[RBP + -0x18] MOV qword ptr [RBP + -0x2f8],RDI CALL 0x001231d0 MOV R8,qword ptr [RBP + -0x2f8] MOV qword ptr [RBP + -0x20],0x0 LAB_0011302a: LEA RSI,[0x16d114] LEA RDI,[RBP + -0x80] MOV EDX,0x232 XOR ECX,ECX CALL 0x001319b0 JMP 0x00113043 LAB_00113043: LEA RDI,[RBP + -0x80] CALL 0x001316d0 MOV qword ptr [RBP + -0x300],RAX JMP 0x00113055 LAB_00113055: MOV RDI,qword ptr [RBP + -0x300] LEA RSI,[0x16ea2b] CALL 0x0010a7f0 MOV qword ptr [RBP + -0x308],RAX JMP 0x00113071 LAB_00113071: MOV RDI,qword ptr [RBP + -0x308] LEA RSI,[0x16ea38] CALL 0x0010a7f0 JMP 0x00113086 LAB_00113086: LEA RDI,[RBP + -0x80] CALL 0x00131e80 JMP 0x00113091 LAB_00113091: LEA RSI,[0x16d114] LEA RDI,[RBP + -0xf0] MOV EDX,0x234 MOV ECX,0x1 LEA R8,[RBP + -0x18] CALL 0x001319b0 JMP 0x001130b4 LAB_001130b4: LEA RDI,[RBP + -0xf0] CALL 0x001316d0 MOV qword ptr [RBP + -0x310],RAX JMP 0x001130c9 LAB_001130c9: MOV RDI,qword ptr [RBP + -0x310] LEA RSI,[0x16ea2b] CALL 0x0010a7f0 MOV qword ptr [RBP + -0x318],RAX JMP 0x001130e5 LAB_001130e5: MOV RDI,qword ptr [RBP + -0x318] LEA RSI,[0x16ea47] CALL 0x0010a7f0 JMP 0x001130fa LAB_001130fa: LEA RDI,[RBP + -0xf0] CALL 0x00131e80 JMP 0x00113108 LAB_00113108: LEA RSI,[0x16d114] LEA RDI,[RBP + -0x150] MOV EDX,0x236 MOV ECX,0x2 LEA R8,[RBP + -0x18] CALL 0x001319b0 JMP 0x0011312b LAB_0011312b: LEA RDI,[RBP + -0x150] CALL 0x001316d0 MOV qword ptr [RBP + -0x320],RAX JMP 0x00113140 LAB_00113140: MOV RDI,qword ptr [RBP + -0x320] LEA RSI,[0x16ea2b] CALL 0x0010a7f0 MOV qword ptr [RBP + -0x328],RAX JMP 0x0011315c LAB_0011315c: MOV RDI,qword ptr [RBP + -0x328] LEA RSI,[0x16ea59] CALL 0x0010a7f0 JMP 0x00113171 LAB_00113171: LEA RDI,[RBP + -0x150] CALL 0x00131e80 JMP 0x0011317f LAB_0011317f: MOV R8,qword ptr [RBP + -0x20] LEA RSI,[0x16d114] LEA RDI,[RBP + -0x1b0] MOV EDX,0x239 XOR ECX,ECX CALL 0x001319b0 JMP 0x0011319f LAB_0011319f: LEA RDI,[RBP + -0x1b0] CALL 0x001316d0 MOV qword ptr [RBP + -0x330],RAX JMP 0x001131b4 LAB_001131b4: MOV RDI,qword ptr [RBP + -0x330] LEA RSI,[0x16ea2b] CALL 0x0010a7f0 MOV qword ptr [RBP + -0x338],RAX JMP 0x001131d0 LAB_001131d0: MOV RDI,qword ptr [RBP + -0x338] LEA RSI,[0x16ea69] CALL 0x0010a7f0 JMP 0x001131e5 LAB_001131e5: LEA RDI,[RBP + -0x1b0] CALL 0x00131e80 JMP 0x001131f3 LAB_001131f3: MOV R8,qword ptr [RBP + -0x20] LEA RSI,[0x16d114] LEA RDI,[RBP + -0x210] MOV EDX,0x23b MOV ECX,0x1 CALL 0x001319b0 JMP 0x00113216 LAB_00113216: LEA RDI,[RBP + -0x210] CALL 0x001316d0 MOV qword ptr [RBP + -0x340],RAX JMP 0x0011322b LAB_0011322b: MOV RDI,qword ptr [RBP + -0x340] LEA RSI,[0x16ea2b] CALL 0x0010a7f0 MOV qword ptr [RBP + -0x348],RAX JMP 0x00113247 LAB_00113247: MOV RDI,qword ptr [RBP + -0x348] LEA RSI,[0x16ea77] CALL 0x0010a7f0 JMP 0x0011325c LAB_0011325c: LEA RDI,[RBP + -0x210] CALL 0x00131e80 JMP 0x0011326a LAB_0011326a: LEA RSI,[0x16d114] XOR EAX,EAX MOV R8D,EAX LEA RDI,[RBP + -0x270] MOV EDX,0x23d MOV ECX,0x2 CALL 0x001319b0 JMP 0x0011328e LAB_0011328e: LEA RDI,[RBP + -0x270] CALL 0x001316d0 MOV qword ptr [RBP + -0x350],RAX JMP 0x001132a3 LAB_001132a3: MOV RDI,qword ptr [RBP + -0x350] LEA RSI,[0x16ea2b] CALL 0x0010a7f0 MOV qword ptr [RBP + -0x358],RAX JMP 0x001132bf LAB_001132bf: MOV RDI,qword ptr [RBP + -0x358] LEA RSI,[0x16ea88] CALL 0x0010a7f0 JMP 0x001132d4 LAB_001132d4: LEA RDI,[RBP + -0x270] CALL 0x00131e80 JMP 0x001132e2 LAB_001132e2: LEA RAX,[RBP + -0x18] MOV qword ptr [RBP + -0x278],RAX MOV RDI,qword ptr [RBP + -0x278] CALL 0x00123ae0 MOV qword ptr [RBP + -0x280],RAX MOV RDI,qword ptr [RBP + -0x278] CALL 0x00129970 MOV qword ptr [RBP + -0x288],RAX LAB_00113313: LEA RDI,[RBP + -0x280] LEA RSI,[RBP + -0x288] CALL 0x001299a0 TEST AL,0x1 JNZ 0x0011332f JMP 0x001134ce LAB_0011332f: LEA RDI,[RBP + -0x280] CALL 0x00123b10 MOV qword ptr [RBP + -0x290],RAX LEA RSI,[0x16d114] LEA RDI,[RBP + -0x2f0] MOV EDX,0x241 CALL 0x001316f0 JMP 0x0011335c LAB_0011335c: LEA RDI,[RBP + -0x2f0] CALL 0x001316d0 MOV qword ptr [RBP + -0x360],RAX JMP 0x00113371 LAB_00113371: MOV RDI,qword ptr [RBP + -0x360] LEA RSI,[0x16ea97] CALL 0x0010a7f0 MOV qword ptr [RBP + -0x368],RAX JMP 0x0011338d LAB_0011338d: MOV RDI,qword ptr [RBP + -0x368] MOV RSI,qword ptr [RBP + -0x290] CALL 0x0010a6e0 JMP 0x001133a2 LAB_001133a2: LEA RDI,[RBP + -0x2f0] CALL 0x00131e80 JMP 0x001133b0 LAB_001133b0: JMP 0x001133b2 LAB_001133b2: LEA RDI,[RBP + -0x280] CALL 0x001299e0 JMP 0x00113313 LAB_001134ce: LEA RDI,[RBP + -0x18] CALL 0x001231f0 ADD RSP,0x370 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* TestLogString() */ void TestLogString(void) { bool bVar1; ostream *poVar2; LogMessage local_2f8 [96]; string *local_298; int8 local_290; int8 local_288; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_280; LogMessage local_278 [96]; LogMessage local_218 [96]; LogMessage local_1b8 [96]; LogMessage local_158 [96]; LogMessage local_f8 [112]; LogMessage local_88 [96]; int8 local_28; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_20 [24]; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_20); local_28 = 0; /* try { // try from 0011302a to 00113040 has its CatchHandler @ 001133c3 */ nglog::LogMessage::LogMessage (local_88, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x232 ,0,local_20); /* try { // try from 00113043 to 00113083 has its CatchHandler @ 001133da */ poVar2 = (ostream *)nglog::LogMessage::stream(local_88); poVar2 = std::operator<<(poVar2,"LOG_STRING: "); std::operator<<(poVar2,"collected info"); /* try { // try from 00113086 to 001130b1 has its CatchHandler @ 001133c3 */ nglog::LogMessage::~LogMessage(local_88); nglog::LogMessage::LogMessage (local_f8, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x234 ,1,local_20); /* try { // try from 001130b4 to 001130f7 has its CatchHandler @ 001133fc */ poVar2 = (ostream *)nglog::LogMessage::stream(local_f8); poVar2 = std::operator<<(poVar2,"LOG_STRING: "); std::operator<<(poVar2,"collected warning"); /* try { // try from 001130fa to 00113128 has its CatchHandler @ 001133c3 */ nglog::LogMessage::~LogMessage(local_f8); nglog::LogMessage::LogMessage (local_158, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x236 ,2,local_20); /* try { // try from 0011312b to 0011316e has its CatchHandler @ 00113421 */ poVar2 = (ostream *)nglog::LogMessage::stream(local_158); poVar2 = std::operator<<(poVar2,"LOG_STRING: "); std::operator<<(poVar2,"collected error"); /* try { // try from 00113171 to 0011319c has its CatchHandler @ 001133c3 */ nglog::LogMessage::~LogMessage(local_158); nglog::LogMessage::LogMessage (local_1b8, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x239 ,0,local_28); /* try { // try from 0011319f to 001131e2 has its CatchHandler @ 00113446 */ poVar2 = (ostream *)nglog::LogMessage::stream(local_1b8); poVar2 = std::operator<<(poVar2,"LOG_STRING: "); std::operator<<(poVar2,"reported info"); /* try { // try from 001131e5 to 00113213 has its CatchHandler @ 001133c3 */ nglog::LogMessage::~LogMessage(local_1b8); nglog::LogMessage::LogMessage (local_218, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x23b ,1,local_28); /* try { // try from 00113216 to 00113259 has its CatchHandler @ 00113468 */ poVar2 = (ostream *)nglog::LogMessage::stream(local_218); poVar2 = std::operator<<(poVar2,"LOG_STRING: "); std::operator<<(poVar2,"reported warning"); /* try { // try from 0011325c to 0011328b has its CatchHandler @ 001133c3 */ nglog::LogMessage::~LogMessage(local_218); nglog::LogMessage::LogMessage (local_278, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x23d ,2,0); /* try { // try from 0011328e to 001132d1 has its CatchHandler @ 0011348a */ poVar2 = (ostream *)nglog::LogMessage::stream(local_278); poVar2 = std::operator<<(poVar2,"LOG_STRING: "); std::operator<<(poVar2,"reported error"); /* try { // try from 001132d4 to 00113359 has its CatchHandler @ 001133c3 */ nglog::LogMessage::~LogMessage(local_278); local_280 = local_20; local_288 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin (local_280); local_290 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_280) ; while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_288,(__normal_iterator *)&local_290); if (!bVar1) break; local_298 = (string *) __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_288); nglog::LogMessage::LogMessage (local_2f8, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc", 0x241); /* try { // try from 0011335c to 0011339f has its CatchHandler @ 001134ac */ poVar2 = (ostream *)nglog::LogMessage::stream(local_2f8); poVar2 = std::operator<<(poVar2,"Captured by LOG_STRING: "); std::operator<<(poVar2,local_298); /* try { // try from 001133a2 to 001133ad has its CatchHandler @ 001133c3 */ nglog::LogMessage::~LogMessage(local_2f8); __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_288); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_20); return; }
58,250
JS_DetectModule
bluesky950520[P]quickjs/quickjs.c
BOOL JS_DetectModule(const char *input, size_t input_len) { JSRuntime *rt; JSContext *ctx; JSValue val; BOOL is_module; is_module = TRUE; rt = JS_NewRuntime(); if (!rt) return FALSE; ctx = JS_NewContextRaw(rt); if (!ctx) { JS_FreeRuntime(rt); return FALSE; } JS_AddIntrinsicRegExp(ctx); // otherwise regexp literals don't parse val = __JS_EvalInternal(ctx, JS_UNDEFINED, input, input_len, "<unnamed>", JS_EVAL_TYPE_MODULE|JS_EVAL_FLAG_COMPILE_ONLY, -1); if (JS_IsException(val)) { const char *msg = JS_ToCString(ctx, rt->current_exception); // gruesome hack to recognize exceptions from import statements; // necessary because we don't pass in a module loader is_module = !!strstr(msg, "ReferenceError: could not load module"); JS_FreeCString(ctx, msg); } JS_FreeValue(ctx, val); JS_FreeContext(ctx); JS_FreeRuntime(rt); return is_module; }
O2
c
JS_DetectModule: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r15 movq %rdi, %r12 callq 0x17e46 testq %rax, %rax je 0x336fa movq %rax, %rbx movq %rax, %rdi callq 0x182dd testq %rax, %rax je 0x336fe movq %rax, %r14 movq %rax, %rdi callq 0x191bb orl $-0x1, 0x8(%rsp) movl $0x21, (%rsp) leaq 0x52764(%rip), %r9 # 0x85e01 pushq $0x3 popq %rdx movq %r14, %rdi xorl %esi, %esi movq %r12, %rcx movq %r15, %r8 callq 0x30900 movq %rax, %r15 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x33702 movq 0xf0(%rbx), %rsi movq 0xf8(%rbx), %rdx movq %r14, %rdi callq 0x1aa0d movq %rax, %r13 leaq 0x5272f(%rip), %rsi # 0x85e0b movq %rax, %rdi callq 0xe9a0 xorl %ebp, %ebp testq %rax, %rax setne %bpl movq %r14, %rdi movq %r13, %rsi callq 0x1b057 jmp 0x33705 xorl %ebp, %ebp jmp 0x33723 xorl %ebp, %ebp jmp 0x3371b pushq $0x1 popq %rbp movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1801e movq %r14, %rdi callq 0x19f36 movq %rbx, %rdi callq 0x17c92 movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_DetectModule: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rsi mov r12, rdi call JS_NewRuntime test rax, rax jz loc_336FA mov rbx, rax mov rdi, rax call JS_NewContextRaw test rax, rax jz short loc_336FE mov r14, rax mov rdi, rax call JS_AddIntrinsicRegExp or [rsp+48h+var_40], 0FFFFFFFFh mov [rsp+48h+var_48], 21h ; '!' lea r9, aUnnamed; "<unnamed>" push 3 pop rdx mov rdi, r14 xor esi, esi mov rcx, r12 mov r8, r15 call __JS_EvalInternal mov r15, rax mov r12, rdx cmp r12d, 6 jnz short loc_33702 mov rsi, [rbx+0F0h] mov rdx, [rbx+0F8h] mov rdi, r14 call JS_ToCString_0 mov r13, rax lea rsi, aReferenceerror; "ReferenceError: could not load module" mov rdi, rax call _strstr xor ebp, ebp test rax, rax setnz bpl mov rdi, r14 mov rsi, r13 call JS_FreeCString jmp short loc_33705 loc_336FA: xor ebp, ebp jmp short loc_33723 loc_336FE: xor ebp, ebp jmp short loc_3371B loc_33702: push 1 pop rbp loc_33705: mov rdi, r14 mov rsi, r15 mov rdx, r12 call JS_FreeValue mov rdi, r14 call JS_FreeContext loc_3371B: mov rdi, rbx call JS_FreeRuntime loc_33723: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BOOL8 JS_DetectModule( char *a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rax long long v11; // rbx unsigned int *v12; // rax unsigned int *v13; // r14 double v14; // xmm4_8 double v15; // xmm5_8 unsigned long long v16; // r15 long long v17; // rdx long long v18; // r12 long long v19; // r13 BOOL v20; // ebp v10 = JS_NewRuntime(); if ( v10 ) { v11 = v10; v12 = (unsigned int *)JS_NewContextRaw(v10); if ( v12 ) { v13 = v12; JS_AddIntrinsicRegExp(v12); v16 = _JS_EvalInternal( (long long)v13, 0LL, 3LL, a1, a2, "<unnamed>", a3, a4, a5, a6, v14, v15, a9, a10, 0x21u, 0xFFFFFFFF); v18 = v17; if ( (_DWORD)v17 == 6 ) { v19 = JS_ToCString_0((long long)v13, *(_QWORD *)(v11 + 240), *(_QWORD *)(v11 + 248)); v20 = strstr(v19, "ReferenceError: could not load module") != 0; JS_FreeCString((long long)v13, v19); } else { v20 = 1; } JS_FreeValue((long long)v13, v16, v18); JS_FreeContext(v13); } else { v20 = 0; } JS_FreeRuntime(v11); } else { return 0; } return v20; }
JS_DetectModule: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RSI MOV R12,RDI CALL 0x00117e46 TEST RAX,RAX JZ 0x001336fa MOV RBX,RAX MOV RDI,RAX CALL 0x001182dd TEST RAX,RAX JZ 0x001336fe MOV R14,RAX MOV RDI,RAX CALL 0x001191bb OR dword ptr [RSP + 0x8],0xffffffff MOV dword ptr [RSP],0x21 LEA R9,[0x185e01] PUSH 0x3 POP RDX MOV RDI,R14 XOR ESI,ESI MOV RCX,R12 MOV R8,R15 CALL 0x00130900 MOV R15,RAX MOV R12,RDX CMP R12D,0x6 JNZ 0x00133702 MOV RSI,qword ptr [RBX + 0xf0] MOV RDX,qword ptr [RBX + 0xf8] MOV RDI,R14 CALL 0x0011aa0d MOV R13,RAX LEA RSI,[0x185e0b] MOV RDI,RAX CALL 0x0010e9a0 XOR EBP,EBP TEST RAX,RAX SETNZ BPL MOV RDI,R14 MOV RSI,R13 CALL 0x0011b057 JMP 0x00133705 LAB_001336fa: XOR EBP,EBP JMP 0x00133723 LAB_001336fe: XOR EBP,EBP JMP 0x0013371b LAB_00133702: PUSH 0x1 POP RBP LAB_00133705: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x0011801e MOV RDI,R14 CALL 0x00119f36 LAB_0013371b: MOV RDI,RBX CALL 0x00117c92 LAB_00133723: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool JS_DetectModule(int8 param_1,int8 param_2) { long lVar1; long lVar2; char *__haystack; char *pcVar3; bool bVar4; int1 auVar5 [16]; lVar1 = JS_NewRuntime(); if (lVar1 == 0) { bVar4 = false; } else { lVar2 = JS_NewContextRaw(lVar1); if (lVar2 == 0) { bVar4 = false; } else { JS_AddIntrinsicRegExp(lVar2); auVar5 = __JS_EvalInternal(lVar2,0,3,param_1,param_2,"<unnamed>",0x21,0xffffffff); if (auVar5._8_4_ == 6) { __haystack = (char *)JS_ToCString(lVar2,*(int8 *)(lVar1 + 0xf0), *(int8 *)(lVar1 + 0xf8)); pcVar3 = strstr(__haystack,"ReferenceError: could not load module"); bVar4 = pcVar3 != (char *)0x0; JS_FreeCString(lVar2,__haystack); } else { bVar4 = true; } JS_FreeValue(lVar2,auVar5._0_8_,auVar5._8_8_); JS_FreeContext(lVar2); } JS_FreeRuntime(lVar1); } return bVar4; }
58,251
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&)
llama.cpp/common/minja/minja.hpp
inline std::shared_ptr<Context> Context::make(Value && values, const std::shared_ptr<Context> & parent) { return std::make_shared<Context>(values.is_null() ? Value::object() : std::move(values), parent); }
O3
cpp
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movq %rsi, %r15 movq 0x10(%rsi), %rdx movq 0x20(%rsi), %rax movq %rax, %rcx orq %rdx, %rcx sete %cl cmpb $0x0, 0x40(%rsi) movq %rdi, %rbx sete %sil andb %cl, %sil movq 0x30(%r15), %rcx testq %rcx, %rcx sete %bpl andb %sil, %bpl cmpb $0x1, %bpl jne 0xb7fa2 movl $0x30, %edi callq 0x20200 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0xa84c0(%rip), %rcx # 0x160430 addq $0x10, %rcx movq %rcx, (%rax) leaq 0x10(%rax), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq $0x0, 0x20(%rax) leaq 0x10(%rsp), %rsi movq %rax, 0x8(%rsi) movq %rcx, (%rsi) leaq 0x20(%rsp), %rdi callq 0xc14da jmp 0xb801e leaq 0x40(%r15), %rdi xorps %xmm0, %xmm0 leaq 0x60(%rsp), %r12 movaps %xmm0, -0x40(%r12) movq %rdx, -0x30(%r12) movq 0x18(%r15), %rdx xorl %r13d, %r13d movq %r13, 0x18(%r15) movq %rdx, -0x28(%r12) movq %r13, 0x10(%r15) movq %rax, -0x20(%r12) movq 0x28(%r15), %rax movq %r13, 0x28(%r15) movq %rax, -0x18(%r12) movq %r13, 0x20(%r15) movq %rcx, -0x10(%r12) movq 0x38(%r15), %rax movq %r13, 0x38(%r15) movq %rax, -0x8(%r12) movq %r13, 0x30(%r15) movups (%rdi), %xmm0 movaps %xmm0, (%r12) xorl %esi, %esi callq 0x858ca movb $0x0, 0x40(%r15) movq %r13, 0x48(%r15) movq %r12, %rdi movl $0x1, %esi callq 0x858ca leaq 0xf(%rsp), %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi movq %r14, %rcx callq 0xc006e leaq 0x60(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x858ca movq %r14, %rdi callq 0x89fe4 leaq 0x58(%rsp), %rdi callq 0x71092 leaq 0x48(%rsp), %rdi callq 0x71092 leaq 0x38(%rsp), %r14 movq %r14, %rdi callq 0x71092 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xb80a0 movq 0xa9f1d(%rip), %rax # 0x161f98 cmpb $0x0, (%rax) je 0xb808b movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xb8095 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xb80a0 movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0xb80af leaq 0x18(%rsp), %rdi callq 0x71092 movq %rbx, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xb6738 testb %bpl, %bpl je 0xb80dd leaq 0x18(%rsp), %rdi callq 0x71092 movq %rbx, %rdi callq 0x20ad0 nop
_ZN5minja7Context4makeEONS_5ValueERKSt10shared_ptrIS0_E: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rdx mov r15, rsi mov rdx, [rsi+10h] mov rax, [rsi+20h] mov rcx, rax or rcx, rdx setz cl cmp byte ptr [rsi+40h], 0 mov rbx, rdi setz sil and sil, cl mov rcx, [r15+30h] test rcx, rcx setz bpl and bpl, sil cmp bpl, 1 jnz short loc_B7FA2 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<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>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx lea rcx, [rax+10h] xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov qword ptr [rax+20h], 0 lea rsi, [rsp+0A8h+var_98] mov [rsi+8], rax mov [rsi], rcx lea rdi, [rsp+0A8h+var_88] call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) jmp short loc_B801E loc_B7FA2: lea rdi, [r15+40h] xorps xmm0, xmm0 lea r12, [rsp+0A8h+var_48] movaps xmmword ptr [r12-40h], xmm0 mov [r12-30h], rdx mov rdx, [r15+18h] xor r13d, r13d mov [r15+18h], r13 mov [r12-28h], rdx mov [r15+10h], r13 mov [r12-20h], rax mov rax, [r15+28h] mov [r15+28h], r13 mov [r12-18h], rax mov [r15+20h], r13 mov [r12-10h], rcx mov rax, [r15+38h] mov [r15+38h], r13 mov [r12-8], rax mov [r15+30h], r13 movups xmm0, xmmword ptr [rdi] movaps xmmword ptr [r12], xmm0 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 byte ptr [r15+40h], 0 mov [r15+48h], r13 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_B801E: lea rsi, [rsp+0A8h+var_99] lea rdx, [rsp+0A8h+var_88] mov rdi, rbx mov rcx, r14 call _ZNSt12__shared_ptrIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJNS0_5ValueERKSt10shared_ptrIS1_EEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context> const&>(std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Value,std::shared_ptr<minja::Context> const&) lea r14, [rsp+0A8h+var_48] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+0A8h+var_50] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0A8h+var_60] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+0A8h+var_70] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_B80A0 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_B808B mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_B8095 loc_B808B: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_B8095: cmp eax, 1 jnz short loc_B80A0 mov rax, [rdi] call qword ptr [rax+18h] loc_B80A0: test bpl, bpl jz short loc_B80AF lea rdi, [rsp+0A8h+var_90] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_B80AF: mov rax, rbx add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_18]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jz short loc_B80DD lea rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_B80DD: mov rdi, rbx call __Unwind_Resume
long long minja::Context::make(long long a1, long long a2, long long a3) { __int128 v4; // rax volatile signed __int32 *v6; // rcx bool v7; // bp long long v8; // rax volatile signed __int32 *v9; // rax volatile signed __int32 *v10; // rax long long v11; // rdi signed __int32 v12; // eax char v14; // [rsp+Fh] [rbp-99h] BYREF long long v15; // [rsp+10h] [rbp-98h] BYREF volatile signed __int32 *v16; // [rsp+18h] [rbp-90h] BYREF __int128 v17; // [rsp+20h] [rbp-88h] BYREF long long v18; // [rsp+30h] [rbp-78h] volatile signed __int32 *v19[2]; // [rsp+38h] [rbp-70h] BYREF volatile signed __int32 *v20[2]; // [rsp+48h] [rbp-60h] BYREF volatile signed __int32 *v21; // [rsp+58h] [rbp-50h] BYREF _OWORD v22[4]; // [rsp+60h] [rbp-48h] BYREF *((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 16); *(_QWORD *)&v4 = *(_QWORD *)(a2 + 32); v6 = *(volatile signed __int32 **)(a2 + 48); v7 = v4 == 0 && *(_BYTE *)(a2 + 64) == 0 && v6 == 0LL; if ( v7 ) { v8 = operator new(0x30uLL); *(_QWORD *)(v8 + 8) = 0x100000001LL; *(_QWORD *)v8 = &`vtable for'std::_Sp_counted_ptr_inplace<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>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v8 + 16) = 0LL; *(_QWORD *)(v8 + 32) = 0LL; v16 = (volatile signed __int32 *)v8; v15 = v8 + 16; minja::Value::Value(&v17, &v15); } else { v17 = 0LL; v18 = *((_QWORD *)&v4 + 1); *((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 24); *(_QWORD *)(a2 + 24) = 0LL; v19[0] = *((volatile signed __int32 **)&v4 + 1); *(_QWORD *)(a2 + 16) = 0LL; v19[1] = (volatile signed __int32 *)v4; v9 = *(volatile signed __int32 **)(a2 + 40); *(_QWORD *)(a2 + 40) = 0LL; v20[0] = v9; *(_QWORD *)(a2 + 32) = 0LL; v20[1] = v6; v10 = *(volatile signed __int32 **)(a2 + 56); *(_QWORD *)(a2 + 56) = 0LL; v21 = v10; *(_QWORD *)(a2 + 48) = 0LL; v22[0] = *(_OWORD *)(a2 + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + 64)); *(_BYTE *)(a2 + 64) = 0; *(_QWORD *)(a2 + 72) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v22); } std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context> const&>( a1, &v14, &v17, 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((char *)v22); 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(v22); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v19); v11 = *((_QWORD *)&v17 + 1); if ( *((_QWORD *)&v17 + 1) ) { if ( _libc_single_threaded ) { v12 = *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL) = v12 - 1; } else { v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v17 + 1) + 12LL), 0xFFFFFFFF); } if ( v12 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL); } if ( v7 ) std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v16); return a1; }
make: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV R15,RSI MOV RDX,qword ptr [RSI + 0x10] MOV RAX,qword ptr [RSI + 0x20] MOV RCX,RAX OR RCX,RDX SETZ CL CMP byte ptr [RSI + 0x40],0x0 MOV RBX,RDI SETZ SIL AND SIL,CL MOV RCX,qword ptr [R15 + 0x30] TEST RCX,RCX SETZ BPL AND BPL,SIL CMP BPL,0x1 JNZ 0x001b7fa2 MOV EDI,0x30 CALL 0x00120200 MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x260430] ADD RCX,0x10 MOV qword ptr [RAX],RCX LEA RCX,[RAX + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],0x0 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI],RCX LEA RDI,[RSP + 0x20] CALL 0x001c14da JMP 0x001b801e LAB_001b7fa2: LEA RDI,[R15 + 0x40] XORPS XMM0,XMM0 LEA R12,[RSP + 0x60] MOVAPS xmmword ptr [R12 + -0x40],XMM0 MOV qword ptr [R12 + -0x30],RDX MOV RDX,qword ptr [R15 + 0x18] XOR R13D,R13D MOV qword ptr [R15 + 0x18],R13 MOV qword ptr [R12 + -0x28],RDX MOV qword ptr [R15 + 0x10],R13 MOV qword ptr [R12 + -0x20],RAX MOV RAX,qword ptr [R15 + 0x28] MOV qword ptr [R15 + 0x28],R13 MOV qword ptr [R12 + -0x18],RAX MOV qword ptr [R15 + 0x20],R13 MOV qword ptr [R12 + -0x10],RCX MOV RAX,qword ptr [R15 + 0x38] MOV qword ptr [R15 + 0x38],R13 MOV qword ptr [R12 + -0x8],RAX MOV qword ptr [R15 + 0x30],R13 MOVUPS XMM0,xmmword ptr [RDI] MOVAPS xmmword ptr [R12],XMM0 XOR ESI,ESI CALL 0x001858ca MOV byte ptr [R15 + 0x40],0x0 MOV qword ptr [R15 + 0x48],R13 MOV RDI,R12 MOV ESI,0x1 CALL 0x001858ca LAB_001b801e: LEA RSI,[RSP + 0xf] LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV RCX,R14 CALL 0x001c006e LAB_001b8033: LEA R14,[RSP + 0x60] MOV RDI,R14 XOR ESI,ESI CALL 0x001858ca MOV RDI,R14 CALL 0x00189fe4 LEA RDI,[RSP + 0x58] CALL 0x00171092 LEA RDI,[RSP + 0x48] CALL 0x00171092 LEA R14,[RSP + 0x38] MOV RDI,R14 CALL 0x00171092 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001b80a0 MOV RAX,qword ptr [0x00261f98] CMP byte ptr [RAX],0x0 JZ 0x001b808b MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001b8095 LAB_001b808b: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001b8095: CMP EAX,0x1 JNZ 0x001b80a0 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001b80a0: TEST BPL,BPL JZ 0x001b80af LEA RDI,[RSP + 0x18] CALL 0x00171092 LAB_001b80af: MOV RAX,RBX ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) */ Context * __thiscall minja::Context::make(Context *this,Value *param_1,shared_ptr *param_2) { int *piVar1; Value VVar2; long lVar3; long lVar4; long lVar5; int iVar6; int1 local_99; int8 *local_98; int8 *local_90; int8 local_88; long *plStack_80; long local_78; int8 local_70; long local_68; int8 local_60; long local_58; int8 local_50; int8 local_48; int8 uStack_40; lVar3 = *(long *)(param_1 + 0x10); lVar4 = *(long *)(param_1 + 0x20); VVar2 = param_1[0x40]; lVar5 = *(long *)(param_1 + 0x30); if (lVar5 != 0 || (VVar2 != (Value)0x0 || (lVar4 != 0 || lVar3 != 0))) { local_88 = 0; plStack_80 = (long *)0x0; local_70 = *(int8 *)(param_1 + 0x18); *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x10) = 0; local_60 = *(int8 *)(param_1 + 0x28); *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x20) = 0; local_50 = *(int8 *)(param_1 + 0x38); *(int8 *)(param_1 + 0x38) = 0; *(int8 *)(param_1 + 0x30) = 0; local_48 = *(int8 *)(param_1 + 0x40); uStack_40 = *(int8 *)(param_1 + 0x48); local_78 = lVar3; local_68 = lVar4; local_58 = lVar5; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1 + 0x40,0)); param_1[0x40] = (Value)0x0; *(int8 *)(param_1 + 0x48) = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_48,0)); } else { local_90 = (int8 *)operator_new(0x30); local_90[1] = 0x100000001; *local_90 = &PTR___Sp_counted_base_00260440; local_98 = local_90 + 2; local_90[2] = 0; local_90[3] = 0; local_90[4] = 0; Value::Value((Value *)&local_88,(shared_ptr *)&local_98); } /* try { // try from 001b801e to 001b8032 has its CatchHandler @ 001b80c1 */ std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context>const&> ((__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2> *)this,&local_99,&local_88, param_2); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_48,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_50); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_60); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70); if (plStack_80 != (long *)0x0) { if (*PTR___libc_single_threaded_00261f98 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_80 + 0xc); iVar6 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar6 = *(int *)((long)plStack_80 + 0xc); *(int *)((long)plStack_80 + 0xc) = iVar6 + -1; } if (iVar6 == 1) { (**(code **)(*plStack_80 + 0x18))(); } } if (lVar5 == 0 && (VVar2 == (Value)0x0 && (lVar4 == 0 && lVar3 == 0))) { std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_90); } return this; }
58,252
Vector4DistanceSqr
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI float Vector4DistanceSqr(Vector4 v1, Vector4 v2) { float result = (v1.x - v2.x)*(v1.x - v2.x) + (v1.y - v2.y)*(v1.y - v2.y) + (v1.z - v2.z)*(v1.z - v2.z) + (v1.w - v2.w)*(v1.w - v2.w); return result; }
O0
c
Vector4DistanceSqr: pushq %rbp movq %rsp, %rbp movlpd %xmm0, -0x10(%rbp) movlpd %xmm1, -0x8(%rbp) movlpd %xmm2, -0x20(%rbp) movlpd %xmm3, -0x18(%rbp) movss -0x10(%rbp), %xmm0 subss -0x20(%rbp), %xmm0 movss -0x10(%rbp), %xmm2 subss -0x20(%rbp), %xmm2 movss -0xc(%rbp), %xmm1 subss -0x1c(%rbp), %xmm1 movss -0xc(%rbp), %xmm3 subss -0x1c(%rbp), %xmm3 mulss %xmm3, %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss -0x8(%rbp), %xmm1 subss -0x18(%rbp), %xmm1 movss -0x8(%rbp), %xmm2 subss -0x18(%rbp), %xmm2 mulss %xmm2, %xmm1 addss %xmm0, %xmm1 movss -0x4(%rbp), %xmm0 subss -0x14(%rbp), %xmm0 movss -0x4(%rbp), %xmm2 subss -0x14(%rbp), %xmm2 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x24(%rbp) movss -0x24(%rbp), %xmm0 popq %rbp retq
Vector4DistanceSqr: push rbp mov rbp, rsp movlpd [rbp+var_10], xmm0 movlpd [rbp+var_8], xmm1 movlpd [rbp+var_20], xmm2 movlpd [rbp+var_18], xmm3 movss xmm0, dword ptr [rbp+var_10] subss xmm0, dword ptr [rbp+var_20] movss xmm2, dword ptr [rbp+var_10] subss xmm2, dword ptr [rbp+var_20] movss xmm1, dword ptr [rbp+var_10+4] subss xmm1, dword ptr [rbp+var_20+4] movss xmm3, dword ptr [rbp+var_10+4] subss xmm3, dword ptr [rbp+var_20+4] mulss xmm1, xmm3 mulss xmm0, xmm2 addss xmm0, xmm1 movss xmm1, dword ptr [rbp+var_8] subss xmm1, dword ptr [rbp+var_18] movss xmm2, dword ptr [rbp+var_8] subss xmm2, dword ptr [rbp+var_18] mulss xmm1, xmm2 addss xmm1, xmm0 movss xmm0, dword ptr [rbp+var_8+4] subss xmm0, dword ptr [rbp+var_18+4] movss xmm2, dword ptr [rbp+var_8+4] subss xmm2, dword ptr [rbp+var_18+4] mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_24], xmm0 movss xmm0, [rbp+var_24] pop rbp retn
float Vector4DistanceSqr(double a1, double a2, double a3, double a4) { return (float)((float)(*((float *)&a2 + 1) - *((float *)&a4 + 1)) * (float)(*((float *)&a2 + 1) - *((float *)&a4 + 1))) + (float)((float)((float)(*(float *)&a2 - *(float *)&a4) * (float)(*(float *)&a2 - *(float *)&a4)) + (float)((float)((float)(*(float *)&a1 - *(float *)&a3) * (float)(*(float *)&a1 - *(float *)&a3)) + (float)((float)(*((float *)&a1 + 1) - *((float *)&a3 + 1)) * (float)(*((float *)&a1 + 1) - *((float *)&a3 + 1))))); }
Vector4DistanceSqr: PUSH RBP MOV RBP,RSP MOVLPD qword ptr [RBP + -0x10],XMM0 MOVLPD qword ptr [RBP + -0x8],XMM1 MOVLPD qword ptr [RBP + -0x20],XMM2 MOVLPD qword ptr [RBP + -0x18],XMM3 MOVSS XMM0,dword ptr [RBP + -0x10] SUBSS XMM0,dword ptr [RBP + -0x20] MOVSS XMM2,dword ptr [RBP + -0x10] SUBSS XMM2,dword ptr [RBP + -0x20] MOVSS XMM1,dword ptr [RBP + -0xc] SUBSS XMM1,dword ptr [RBP + -0x1c] MOVSS XMM3,dword ptr [RBP + -0xc] SUBSS XMM3,dword ptr [RBP + -0x1c] MULSS XMM1,XMM3 MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS XMM1,dword ptr [RBP + -0x8] SUBSS XMM1,dword ptr [RBP + -0x18] MOVSS XMM2,dword ptr [RBP + -0x8] SUBSS XMM2,dword ptr [RBP + -0x18] MULSS XMM1,XMM2 ADDSS XMM1,XMM0 MOVSS XMM0,dword ptr [RBP + -0x4] SUBSS XMM0,dword ptr [RBP + -0x14] MOVSS XMM2,dword ptr [RBP + -0x4] SUBSS XMM2,dword ptr [RBP + -0x14] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x24],XMM0 MOVSS XMM0,dword ptr [RBP + -0x24] POP RBP RET
float Vector4DistanceSqr(int8 param_1,int8 param_2,int8 param_3,int8 param_4 ) { float fVar1; float fVar2; float fVar3; float fVar4; fVar4 = (float)((ulong)param_4 >> 0x20); fVar3 = (float)((ulong)param_3 >> 0x20); fVar2 = (float)((ulong)param_2 >> 0x20); fVar1 = (float)((ulong)param_1 >> 0x20); return (fVar2 - fVar4) * (fVar2 - fVar4) + ((float)param_2 - (float)param_4) * ((float)param_2 - (float)param_4) + ((float)param_1 - (float)param_3) * ((float)param_1 - (float)param_3) + (fVar1 - fVar3) * (fVar1 - fVar3); }
58,253
js_os_stat
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_stat(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int is_lstat) { const char *path; int err, res; struct stat st; JSValue obj; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; #if defined(_WIN32) res = stat(path, &st); #else if (is_lstat) res = lstat(path, &st); else res = stat(path, &st); #endif err = (res < 0) ? errno : 0; JS_FreeCString(ctx, path); if (res < 0) { obj = JS_NULL; } else { obj = JS_NewObject(ctx); if (JS_IsException(obj)) return JS_EXCEPTION; JS_DefinePropertyValueStr(ctx, obj, "dev", JS_NewInt64(ctx, st.st_dev), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "ino", JS_NewInt64(ctx, st.st_ino), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "mode", JS_NewInt32(ctx, st.st_mode), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "nlink", JS_NewInt64(ctx, st.st_nlink), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "uid", JS_NewInt64(ctx, st.st_uid), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "gid", JS_NewInt64(ctx, st.st_gid), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "rdev", JS_NewInt64(ctx, st.st_rdev), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "size", JS_NewInt64(ctx, st.st_size), JS_PROP_C_W_E); #if !defined(_WIN32) JS_DefinePropertyValueStr(ctx, obj, "blocks", JS_NewInt64(ctx, st.st_blocks), JS_PROP_C_W_E); #endif #if defined(_WIN32) JS_DefinePropertyValueStr(ctx, obj, "atime", JS_NewInt64(ctx, (int64_t)st.st_atime * 1000), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "mtime", JS_NewInt64(ctx, (int64_t)st.st_mtime * 1000), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "ctime", JS_NewInt64(ctx, (int64_t)st.st_ctime * 1000), JS_PROP_C_W_E); #elif defined(__APPLE__) JS_DefinePropertyValueStr(ctx, obj, "atime", JS_NewInt64(ctx, timespec_to_ms(&st.st_atimespec)), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "mtime", JS_NewInt64(ctx, timespec_to_ms(&st.st_mtimespec)), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "ctime", JS_NewInt64(ctx, timespec_to_ms(&st.st_ctimespec)), JS_PROP_C_W_E); #else JS_DefinePropertyValueStr(ctx, obj, "atime", JS_NewInt64(ctx, timespec_to_ms(&st.st_atim)), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "mtime", JS_NewInt64(ctx, timespec_to_ms(&st.st_mtim)), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "ctime", JS_NewInt64(ctx, timespec_to_ms(&st.st_ctim)), JS_PROP_C_W_E); #endif } return make_obj_error(ctx, obj, err); }
O1
c
js_os_stat: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %r9d, %ebp movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx xorl %r15d, %r15d xorl %esi, %esi xorl %r8d, %r8d callq 0x20bf7 movl $0x6, %r12d testq %rax, %rax je 0x198c5 movq %rax, %r14 leaq 0x18(%rsp), %rsi movq %rax, %rdi testl %ebp, %ebp je 0x1988c callq 0xe460 jmp 0x19891 callq 0xe580 movl %eax, %r15d xorl %ebp, %ebp testl %eax, %eax jns 0x198a1 callq 0xe0b0 movl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x20edd testl %r15d, %r15d js 0x198cc movq %rbx, %rdi callq 0x20fda movq %rdx, %r15 cmpl $0x6, %r15d jne 0x198da xorl %r15d, %r15d xorl %ecx, %ecx jmp 0x19c4e xorl %r14d, %r14d movl $0x2, %r15d jmp 0x19c2b movq %rax, %r14 movq 0x18(%rsp), %rax movslq %eax, %rcx xorl %r12d, %r12d cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, 0x14(%rsp) movl $0x7, %ebp movl %ebp, (%rsp) leaq 0x827a4(%rip), %rcx # 0x9c0bc movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movq 0x20(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, (%rsp) leaq 0x82751(%rip), %rcx # 0x9c0a9 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movl 0x30(%rsp), %r8d movl %ebp, (%rsp) leaq 0x823a9(%rip), %rcx # 0x9bd1e movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx xorl %r9d, %r9d callq 0x26c57 movq 0x28(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, (%rsp) leaq 0x826f5(%rip), %rcx # 0x9c0ad movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movslq 0x34(%rsp), %rax movl %eax, %ecx xorps %xmm0, %xmm0 cvtsi2sd %rcx, %xmm0 testq %rax, %rax movq %xmm0, %r8 cmovnsq %rax, %r8 movl $0x7, %r9d cmovnsq %r12, %r9 movl %ebp, (%rsp) leaq 0x826be(%rip), %rcx # 0x9c0b3 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movslq 0x38(%rsp), %rax movl %eax, %ecx xorps %xmm0, %xmm0 cvtsi2sd %rcx, %xmm0 testq %rax, %rax movq %xmm0, %r8 cmovnsq %rax, %r8 movl $0x7, %r9d cmovnsq %r12, %r9 movl %ebp, (%rsp) leaq 0x82685(%rip), %rcx # 0x9c0b7 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movq 0x40(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, (%rsp) leaq 0x82649(%rip), %rcx # 0x9c0bb movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movq 0x48(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, (%rsp) leaq 0x88a94(%rip), %rcx # 0xa2546 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movq 0x58(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, (%rsp) leaq 0x825ce(%rip), %rcx # 0x9c0c0 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movabsq $0x431bde82d7b634db, %r13 # imm = 0x431BDE82D7B634DB movq %r13, %rax imulq 0x68(%rsp) imulq $0x3e8, 0x60(%rsp), %rax # imm = 0x3E8 movq %rdx, %rcx shrq $0x3f, %rcx sarq $0x12, %rdx addq %rcx, %rdx addq %rax, %rdx movslq %edx, %rax cmpq %rdx, %rax xorps %xmm0, %xmm0 cvtsi2sd %rdx, %xmm0 movl %eax, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, (%rsp) leaq 0x8256e(%rip), %rcx # 0x9c0c7 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movq %r13, %rax imulq 0x78(%rsp) imulq $0x3e8, 0x70(%rsp), %rax # imm = 0x3E8 movq %rdx, %rcx shrq $0x3f, %rcx sarq $0x12, %rdx addq %rcx, %rdx addq %rax, %rdx movslq %edx, %rax cmpq %rdx, %rax xorps %xmm0, %xmm0 cvtsi2sd %rdx, %xmm0 movl %eax, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, (%rsp) leaq 0x82517(%rip), %rcx # 0x9c0cd movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 imulq $0x3e8, 0x80(%rsp), %rcx # imm = 0x3E8 movq %r13, %rax imulq 0x88(%rsp) movq %rdx, %rax shrq $0x3f, %rax sarq $0x12, %rdx addq %rax, %rdx addq %rcx, %rdx movslq %edx, %rax cmpq %rdx, %rax movl %eax, %eax xorps %xmm0, %xmm0 cvtsi2sd %rdx, %xmm0 movq %xmm0, %r8 cmoveq %rax, %r8 movl $0x7, %r9d cmoveq %r12, %r9 movl %ebp, (%rsp) movl 0x14(%rsp), %ebp leaq 0x824b6(%rip), %rcx # 0x9c0d3 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x26c57 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl %ebp, %ecx callq 0x1ab4d movq %rdx, %r12 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r15d orq %rcx, %r15 movq %r15, %rax movq %r12, %rdx addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_os_stat: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov ebp, r9d mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] xor r15d, r15d xor esi, esi xor r8d, r8d call JS_ToCStringLen2 mov r12d, 6 test rax, rax jz short loc_198C5 mov r14, rax lea rsi, [rsp+0D8h+var_C0] mov rdi, rax test ebp, ebp jz short loc_1988C call _lstat jmp short loc_19891 loc_1988C: call _stat loc_19891: mov r15d, eax xor ebp, ebp test eax, eax jns short loc_198A1 call ___errno_location mov ebp, [rax] loc_198A1: mov rdi, rbx mov rsi, r14 call JS_FreeCString test r15d, r15d js short loc_198CC mov rdi, rbx call JS_NewObject mov r15, rdx cmp r15d, 6 jnz short loc_198DA xor r15d, r15d loc_198C5: xor ecx, ecx jmp loc_19C4E loc_198CC: xor r14d, r14d mov r15d, 2 jmp loc_19C2B loc_198DA: mov r14, rax mov rax, [rsp+0D8h+var_C0] movsxd rcx, eax xor r12d, r12d cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_C4], ebp mov ebp, 7 mov [rsp+0D8h+var_D8], ebp lea rcx, aRdev+1; "dev" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_B8] movsxd rcx, eax cmp rcx, rax xorps xmm0, xmm0 cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aIno; "ino" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov r8d, [rsp+0D8h+var_A8] mov [rsp+0D8h+var_D8], ebp lea rcx, aInvalidFileMod+0Dh; "mode" mov rdi, rbx mov rsi, r14 mov rdx, r15 xor r9d, r9d call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_B0] movsxd rcx, eax cmp rcx, rax xorps xmm0, xmm0 cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aNlink; "nlink" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr movsxd rax, [rsp+0D8h+var_A4] mov ecx, eax xorps xmm0, xmm0 cvtsi2sd xmm0, rcx test rax, rax movq r8, xmm0 cmovns r8, rax mov r9d, 7 cmovns r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aUid; "uid" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr movsxd rax, [rsp+0D8h+var_A0] mov ecx, eax xorps xmm0, xmm0 cvtsi2sd xmm0, rcx test rax, rax movq r8, xmm0 cmovns r8, rax mov r9d, 7 cmovns r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aGid; "gid" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_98] movsxd rcx, eax cmp rcx, rax xorps xmm0, xmm0 cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aRdev; "rdev" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_90] movsxd rcx, eax cmp rcx, rax xorps xmm0, xmm0 cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aResize+2; "size" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_80] movsxd rcx, eax cmp rcx, rax xorps xmm0, xmm0 cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aBlocks; "blocks" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov r13, 431BDE82D7B634DBh mov rax, r13 imul [rsp+0D8h+var_70] imul rax, [rsp+0D8h+var_78], 3E8h mov rcx, rdx shr rcx, 3Fh sar rdx, 12h add rdx, rcx add rdx, rax movsxd rax, edx cmp rax, rdx xorps xmm0, xmm0 cvtsi2sd xmm0, rdx mov eax, eax movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aAtime; "atime" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, r13 imul [rsp+0D8h+var_60] imul rax, [rsp+0D8h+var_68], 3E8h mov rcx, rdx shr rcx, 3Fh sar rdx, 12h add rdx, rcx add rdx, rax movsxd rax, edx cmp rax, rdx xorps xmm0, xmm0 cvtsi2sd xmm0, rdx mov eax, eax movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_D8], ebp lea rcx, aMtime; "mtime" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr imul rcx, [rsp+0D8h+var_58], 3E8h mov rax, r13 imul [rsp+0D8h+var_50] mov rax, rdx shr rax, 3Fh sar rdx, 12h add rdx, rax add rdx, rcx movsxd rax, edx cmp rax, rdx mov eax, eax xorps xmm0, xmm0 cvtsi2sd xmm0, rdx movq r8, xmm0 cmovz r8, rax mov r9d, 7 cmovz r9, r12 mov [rsp+0D8h+var_D8], ebp mov ebp, [rsp+0D8h+var_C4] lea rcx, aCtime; "ctime" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr loc_19C2B: mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, ebp call make_obj_error mov r12, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r15d, eax loc_19C4E: or r15, rcx mov rax, r15 mov rdx, r12 add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_os_stat(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6) { long long v8; // r15 long long v9; // rax long long v10; // r14 long long v11; // rdi int v12; // eax int v13; // r15d unsigned int v14; // ebp long long v15; // rax long long v16; // rdx long long v17; // r15 unsigned long long v18; // rcx long long v19; // r14 double v20; // r8 int v21; // r9d double v22; // r8 int v23; // r9d double v24; // r8 int v25; // r9d double v26; // r8 int v27; // r9d double v28; // r8 int v29; // r9d double v30; // r8 int v31; // r9d double v32; // r8 int v33; // r9d double v34; // r8 int v35; // r9d long long v36; // rdx double v37; // r8 int v38; // r9d long long v39; // rdx double v40; // r8 int v41; // r9d long long v42; // rdx double v43; // r8 int v44; // r9d long long obj_error; // rax long long v47; // [rsp+18h] [rbp-C0h] BYREF long long v48; // [rsp+20h] [rbp-B8h] long long v49; // [rsp+28h] [rbp-B0h] int v50; // [rsp+30h] [rbp-A8h] int v51; // [rsp+34h] [rbp-A4h] int v52; // [rsp+38h] [rbp-A0h] long long v53; // [rsp+40h] [rbp-98h] long long v54; // [rsp+48h] [rbp-90h] long long v55; // [rsp+58h] [rbp-80h] long long v56; // [rsp+60h] [rbp-78h] long long v57; // [rsp+68h] [rbp-70h] long long v58; // [rsp+70h] [rbp-68h] long long v59; // [rsp+78h] [rbp-60h] long long v60; // [rsp+80h] [rbp-58h] long long v61; // [rsp+88h] [rbp-50h] v8 = 0LL; v9 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( !v9 ) goto LABEL_10; v10 = v9; v11 = v9; if ( a6 ) v12 = lstat(v9, &v47); else v12 = stat(v9, &v47); v13 = v12; v14 = 0; if ( v12 < 0 ) v14 = *(_DWORD *)__errno_location(v11); JS_FreeCString(a1, v10); if ( v13 < 0 ) { v19 = 0LL; v17 = 2LL; LABEL_57: obj_error = make_obj_error(a1, v19, v17, v14); v18 = obj_error & 0xFFFFFFFF00000000LL; v8 = (unsigned int)obj_error; return v18 | v8; } v15 = JS_NewObject(a1); v17 = v16; if ( (_DWORD)v16 != 6 ) { v19 = v15; v20 = (double)(int)v47; if ( (int)v47 == v47 ) LODWORD(v20) = v47; v21 = 7; if ( (int)v47 == v47 ) v21 = 0; JS_DefinePropertyValueStr(a1, v15, v16, (unsigned int)"dev", LODWORD(v20), v21, 7); v22 = (double)(int)v48; if ( (int)v48 == v48 ) LODWORD(v22) = v48; v23 = 7; if ( (int)v48 == v48 ) v23 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"ino", LODWORD(v22), v23, 7); JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"mode", v50, 0, 7); v24 = (double)(int)v49; if ( (int)v49 == v49 ) LODWORD(v24) = v49; v25 = 7; if ( (int)v49 == v49 ) v25 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"nlink", LODWORD(v24), v25, 7); v26 = (double)v51; if ( v51 >= 0LL ) LODWORD(v26) = v51; v27 = 7; if ( v51 >= 0LL ) v27 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"uid", LODWORD(v26), v27, 7); v28 = (double)v52; if ( v52 >= 0LL ) LODWORD(v28) = v52; v29 = 7; if ( v52 >= 0LL ) v29 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"gid", LODWORD(v28), v29, 7); v30 = (double)(int)v53; if ( (int)v53 == v53 ) LODWORD(v30) = v53; v31 = 7; if ( (int)v53 == v53 ) v31 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"rdev", LODWORD(v30), v31, 7); v32 = (double)(int)v54; if ( (int)v54 == v54 ) LODWORD(v32) = v54; v33 = 7; if ( (int)v54 == v54 ) v33 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"size", LODWORD(v32), v33, 7); v34 = (double)(int)v55; if ( (int)v55 == v55 ) LODWORD(v34) = v55; v35 = 7; if ( (int)v55 == v55 ) v35 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"blocks", LODWORD(v34), v35, 7); v36 = 1000 * v56 + v57 / 1000000; v37 = (double)(int)v36; if ( (int)v36 == v36 ) LODWORD(v37) = 1000 * v56 + v57 / 1000000; v38 = 7; if ( (int)v36 == v36 ) v38 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"atime", LODWORD(v37), v38, 7); v39 = 1000 * v58 + v59 / 1000000; v40 = (double)(int)v39; if ( (int)v39 == v39 ) LODWORD(v40) = 1000 * v58 + v59 / 1000000; v41 = 7; if ( (int)v39 == v39 ) v41 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"mtime", LODWORD(v40), v41, 7); v42 = 1000 * v60 + v61 / 1000000; v43 = (double)(int)v42; if ( (int)v42 == v42 ) LODWORD(v43) = 1000 * v60 + v61 / 1000000; v44 = 7; if ( (int)v42 == v42 ) v44 = 0; JS_DefinePropertyValueStr(a1, v19, v17, (unsigned int)"ctime", LODWORD(v43), v44, 7); goto LABEL_57; } v8 = 0LL; LABEL_10: v18 = 0LL; return v18 | v8; }
js_os_stat: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV EBP,R9D MOV RBX,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] XOR R15D,R15D XOR ESI,ESI XOR R8D,R8D CALL 0x00120bf7 MOV R12D,0x6 TEST RAX,RAX JZ 0x001198c5 MOV R14,RAX LEA RSI,[RSP + 0x18] MOV RDI,RAX TEST EBP,EBP JZ 0x0011988c CALL 0x0010e460 JMP 0x00119891 LAB_0011988c: CALL 0x0010e580 LAB_00119891: MOV R15D,EAX XOR EBP,EBP TEST EAX,EAX JNS 0x001198a1 CALL 0x0010e0b0 MOV EBP,dword ptr [RAX] LAB_001198a1: MOV RDI,RBX MOV RSI,R14 CALL 0x00120edd TEST R15D,R15D JS 0x001198cc MOV RDI,RBX CALL 0x00120fda MOV R15,RDX CMP R15D,0x6 JNZ 0x001198da XOR R15D,R15D LAB_001198c5: XOR ECX,ECX JMP 0x00119c4e LAB_001198cc: XOR R14D,R14D MOV R15D,0x2 JMP 0x00119c2b LAB_001198da: MOV R14,RAX MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,EAX XOR R12D,R12D CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP + 0x14],EBP MOV EBP,0x7 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0bc] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,EAX CMP RCX,RAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0a9] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOV R8D,dword ptr [RSP + 0x30] MOV dword ptr [RSP],EBP LEA RCX,[0x19bd1e] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 XOR R9D,R9D CALL 0x00126c57 MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,EAX CMP RCX,RAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0ad] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOVSXD RAX,dword ptr [RSP + 0x34] MOV ECX,EAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RCX TEST RAX,RAX MOVQ R8,XMM0 CMOVNS R8,RAX MOV R9D,0x7 CMOVNS R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0b3] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOVSXD RAX,dword ptr [RSP + 0x38] MOV ECX,EAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RCX TEST RAX,RAX MOVQ R8,XMM0 CMOVNS R8,RAX MOV R9D,0x7 CMOVNS R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0b7] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOV RAX,qword ptr [RSP + 0x40] MOVSXD RCX,EAX CMP RCX,RAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0bb] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,EAX CMP RCX,RAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x1a2546] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOV RAX,qword ptr [RSP + 0x58] MOVSXD RCX,EAX CMP RCX,RAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0c0] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOV R13,0x431bde82d7b634db MOV RAX,R13 IMUL qword ptr [RSP + 0x68] IMUL RAX,qword ptr [RSP + 0x60],0x3e8 MOV RCX,RDX SHR RCX,0x3f SAR RDX,0x12 ADD RDX,RCX ADD RDX,RAX MOVSXD RAX,EDX CMP RAX,RDX XORPS XMM0,XMM0 CVTSI2SD XMM0,RDX MOV EAX,EAX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0c7] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 MOV RAX,R13 IMUL qword ptr [RSP + 0x78] IMUL RAX,qword ptr [RSP + 0x70],0x3e8 MOV RCX,RDX SHR RCX,0x3f SAR RDX,0x12 ADD RDX,RCX ADD RDX,RAX MOVSXD RAX,EDX CMP RAX,RDX XORPS XMM0,XMM0 CVTSI2SD XMM0,RDX MOV EAX,EAX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP],EBP LEA RCX,[0x19c0cd] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 IMUL RCX,qword ptr [RSP + 0x80],0x3e8 MOV RAX,R13 IMUL qword ptr [RSP + 0x88] MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x12 ADD RDX,RAX ADD RDX,RCX MOVSXD RAX,EDX CMP RAX,RDX MOV EAX,EAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RDX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9D,0x7 CMOVZ R9,R12 MOV dword ptr [RSP],EBP MOV EBP,dword ptr [RSP + 0x14] LEA RCX,[0x19c0d3] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00126c57 LAB_00119c2b: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV ECX,EBP CALL 0x0011ab4d MOV R12,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV R15D,EAX LAB_00119c4e: OR R15,RCX MOV RAX,R15 MOV RDX,R12 ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_os_stat(int8 param_1) { int iVar1; char *__file; int *piVar2; int8 uVar3; double dVar4; ulong uVar6; int iVar7; int8 *in_R8; double dVar8; int in_R9D; int8 uVar9; int8 uVar10; ulong uVar11; bool bVar12; int1 auVar13 [16]; stat local_c0; int8 uVar5; __file = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0); uVar10 = 6; if (__file == (char *)0x0) { LAB_001198c5: uVar11 = 0; uVar6 = 0; } else { if (in_R9D == 0) { iVar1 = stat(__file,&local_c0); } else { iVar1 = lstat(__file,&local_c0); } iVar7 = 0; if (iVar1 < 0) { piVar2 = __errno_location(); iVar7 = *piVar2; } JS_FreeCString(param_1,__file); if (iVar1 < 0) { auVar13 = ZEXT816(2) << 0x40; } else { auVar13 = JS_NewObject(param_1); uVar5 = auVar13._8_8_; uVar3 = auVar13._0_8_; if (auVar13._8_4_ == 6) goto LAB_001198c5; uVar10 = 0; bVar12 = (long)(int)local_c0.st_dev == local_c0.st_dev; dVar8 = (double)(long)local_c0.st_dev; if (bVar12) { dVar8 = (double)(local_c0.st_dev & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,&DAT_0019c0bc,dVar8,uVar9,7); bVar12 = (long)(int)local_c0.st_ino == local_c0.st_ino; dVar8 = (double)(long)local_c0.st_ino; if (bVar12) { dVar8 = (double)(local_c0.st_ino & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,&DAT_0019c0a9,dVar8,uVar9,7); JS_DefinePropertyValueStr(param_1,uVar3,uVar5,"mode",local_c0.st_mode,0,7); bVar12 = (long)(int)local_c0.st_nlink == local_c0.st_nlink; dVar8 = (double)(long)local_c0.st_nlink; if (bVar12) { dVar8 = (double)(local_c0.st_nlink & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,"nlink",dVar8,uVar9,7); dVar4 = (double)(long)(int)local_c0.st_uid; dVar8 = (double)local_c0.st_uid; if (-1 < (long)dVar4) { dVar8 = dVar4; } uVar9 = 7; if (-1 < (long)dVar4) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,&DAT_0019c0b3,dVar8,uVar9,7); dVar4 = (double)(long)(int)local_c0.st_gid; dVar8 = (double)local_c0.st_gid; if (-1 < (long)dVar4) { dVar8 = dVar4; } uVar9 = 7; if (-1 < (long)dVar4) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,&DAT_0019c0b7,dVar8,uVar9,7); bVar12 = (long)(int)local_c0.st_rdev == local_c0.st_rdev; dVar8 = (double)(long)local_c0.st_rdev; if (bVar12) { dVar8 = (double)(local_c0.st_rdev & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,&DAT_0019c0bb,dVar8,uVar9,7); bVar12 = (int)local_c0.st_size == local_c0.st_size; dVar8 = (double)local_c0.st_size; if (bVar12) { dVar8 = (double)(local_c0.st_size & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,"size",dVar8,uVar9,7); bVar12 = (int)local_c0.st_blocks == local_c0.st_blocks; dVar8 = (double)local_c0.st_blocks; if (bVar12) { dVar8 = (double)(local_c0.st_blocks & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,"blocks",dVar8,uVar9,7); uVar6 = local_c0.st_atim.tv_nsec / 1000000 + local_c0.st_atim.tv_sec * 1000; bVar12 = (long)(int)uVar6 == uVar6; dVar8 = (double)(long)uVar6; if (bVar12) { dVar8 = (double)(uVar6 & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,"atime",dVar8,uVar9,7); uVar6 = local_c0.st_mtim.tv_nsec / 1000000 + local_c0.st_mtim.tv_sec * 1000; bVar12 = (long)(int)uVar6 == uVar6; dVar8 = (double)(long)uVar6; if (bVar12) { dVar8 = (double)(uVar6 & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,"mtime",dVar8,uVar9,7); uVar6 = local_c0.st_ctim.tv_nsec / 1000000 + local_c0.st_ctim.tv_sec * 1000; bVar12 = (long)(int)uVar6 == uVar6; dVar8 = (double)(long)uVar6; if (bVar12) { dVar8 = (double)(uVar6 & 0xffffffff); } uVar9 = 7; if (bVar12) { uVar9 = uVar10; } JS_DefinePropertyValueStr(param_1,uVar3,uVar5,"ctime",dVar8,uVar9,7); } auVar13 = make_obj_error(param_1,auVar13._0_8_,auVar13._8_8_,iVar7); uVar10 = auVar13._8_8_; uVar6 = auVar13._0_8_ & 0xffffffff00000000; uVar11 = auVar13._0_8_ & 0xffffffff; } auVar13._8_8_ = uVar10; auVar13._0_8_ = uVar11 | uVar6; return auVar13; }
58,254
js_os_stat
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_stat(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int is_lstat) { const char *path; int err, res; struct stat st; JSValue obj; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; #if defined(_WIN32) res = stat(path, &st); #else if (is_lstat) res = lstat(path, &st); else res = stat(path, &st); #endif err = (res < 0) ? errno : 0; JS_FreeCString(ctx, path); if (res < 0) { obj = JS_NULL; } else { obj = JS_NewObject(ctx); if (JS_IsException(obj)) return JS_EXCEPTION; JS_DefinePropertyValueStr(ctx, obj, "dev", JS_NewInt64(ctx, st.st_dev), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "ino", JS_NewInt64(ctx, st.st_ino), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "mode", JS_NewInt32(ctx, st.st_mode), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "nlink", JS_NewInt64(ctx, st.st_nlink), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "uid", JS_NewInt64(ctx, st.st_uid), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "gid", JS_NewInt64(ctx, st.st_gid), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "rdev", JS_NewInt64(ctx, st.st_rdev), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "size", JS_NewInt64(ctx, st.st_size), JS_PROP_C_W_E); #if !defined(_WIN32) JS_DefinePropertyValueStr(ctx, obj, "blocks", JS_NewInt64(ctx, st.st_blocks), JS_PROP_C_W_E); #endif #if defined(_WIN32) JS_DefinePropertyValueStr(ctx, obj, "atime", JS_NewInt64(ctx, (int64_t)st.st_atime * 1000), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "mtime", JS_NewInt64(ctx, (int64_t)st.st_mtime * 1000), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "ctime", JS_NewInt64(ctx, (int64_t)st.st_ctime * 1000), JS_PROP_C_W_E); #elif defined(__APPLE__) JS_DefinePropertyValueStr(ctx, obj, "atime", JS_NewInt64(ctx, timespec_to_ms(&st.st_atimespec)), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "mtime", JS_NewInt64(ctx, timespec_to_ms(&st.st_mtimespec)), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "ctime", JS_NewInt64(ctx, timespec_to_ms(&st.st_ctimespec)), JS_PROP_C_W_E); #else JS_DefinePropertyValueStr(ctx, obj, "atime", JS_NewInt64(ctx, timespec_to_ms(&st.st_atim)), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "mtime", JS_NewInt64(ctx, timespec_to_ms(&st.st_mtim)), JS_PROP_C_W_E); JS_DefinePropertyValueStr(ctx, obj, "ctime", JS_NewInt64(ctx, timespec_to_ms(&st.st_ctim)), JS_PROP_C_W_E); #endif } return make_obj_error(ctx, obj, err); }
O2
c
js_os_stat: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %r9d, %ebp movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x11a6c pushq $0x6 popq %r12 testq %rax, %rax je 0x143c0 movq %rax, %r14 leaq 0x18(%rsp), %rsi movq %rax, %rdi testl %ebp, %ebp je 0x1438a callq 0xe470 jmp 0x1438f callq 0xe590 movl %eax, %r15d xorl %ebp, %ebp testl %eax, %eax jns 0x1439f callq 0xe0b0 movl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x1b057 testl %r15d, %r15d js 0x143c9 movq %rbx, %rdi callq 0x1b2c9 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x143d5 xorl %eax, %eax xorl %ecx, %ecx jmp 0x14706 xorl %r14d, %r14d pushq $0x2 popq %r15 jmp 0x146e4 movq %rax, %r14 movq 0x18(%rsp), %rax movslq %eax, %rcx xorl %edx, %edx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 pushq $0x7 popq %r12 movq %r12, %r9 cmoveq %rdx, %r9 xorl %r13d, %r13d movl %ebp, 0x14(%rsp) pushq $0x7 popq %rbp movl %ebp, (%rsp) leaq 0x6ec51(%rip), %rcx # 0x83065 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b movq 0x20(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movq %r12, %r9 cmoveq %r13, %r9 xorl %r13d, %r13d movl %ebp, (%rsp) leaq 0x6ec01(%rip), %rcx # 0x83052 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b movl 0x30(%rsp), %r8d movl %ebp, (%rsp) leaq 0x6e859(%rip), %rcx # 0x82cc7 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx xorl %r9d, %r9d callq 0x20a2b movq 0x28(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movq %r12, %r9 cmoveq %r13, %r9 xorl %r13d, %r13d movl %ebp, (%rsp) leaq 0x6eba8(%rip), %rcx # 0x83056 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b movslq 0x34(%rsp), %rax movl %eax, %ecx cvtsi2sd %rcx, %xmm0 testq %rax, %rax movq %xmm0, %r8 cmovnsq %rax, %r8 movq %r12, %r9 cmovnsq %r13, %r9 xorl %r13d, %r13d movl %ebp, (%rsp) leaq 0x6eb74(%rip), %rcx # 0x8305c movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b movslq 0x38(%rsp), %rax movl %eax, %ecx cvtsi2sd %rcx, %xmm0 testq %rax, %rax movq %xmm0, %r8 cmovnsq %rax, %r8 movq %r12, %r9 cmovnsq %r13, %r9 xorl %r13d, %r13d movl %ebp, (%rsp) leaq 0x6eb3e(%rip), %rcx # 0x83060 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b movq 0x40(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movq %r12, %r9 cmoveq %r13, %r9 xorl %r13d, %r13d movl %ebp, (%rsp) leaq 0x6eb05(%rip), %rcx # 0x83064 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b movq 0x48(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movq %r12, %r9 cmoveq %r13, %r9 xorl %r13d, %r13d movl %ebp, (%rsp) leaq 0x74ee4(%rip), %rcx # 0x89480 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b movq 0x58(%rsp), %rax movslq %eax, %rcx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movq %r12, %r9 cmoveq %r13, %r9 movl %ebp, (%rsp) leaq 0x6ea93(%rip), %rcx # 0x83069 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b imulq $0x3e8, 0x60(%rsp), %rcx # imm = 0x3E8 movq 0x68(%rsp), %rax movl $0xf4240, %r13d # imm = 0xF4240 cqto idivq %r13 addq %rcx, %rax movslq %eax, %rcx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movq %r12, %r9 movl $0x0, %eax cmoveq %rax, %r9 movl %ebp, (%rsp) leaq 0x6ea44(%rip), %rcx # 0x83070 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b imulq $0x3e8, 0x70(%rsp), %rcx # imm = 0x3E8 movq 0x78(%rsp), %rax cqto idivq %r13 addq %rcx, %rax movslq %eax, %rcx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r8 cmoveq %rax, %r8 movq %r12, %r9 movl $0x0, %eax cmoveq %rax, %r9 movl %ebp, (%rsp) leaq 0x6e9fa(%rip), %rcx # 0x83076 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x20a2b imulq $0x3e8, 0x80(%rsp), %rcx # imm = 0x3E8 movq 0x88(%rsp), %rax cqto idivq %r13 addq %rcx, %rax movslq %eax, %rcx cmpq %rax, %rcx movl %ecx, %ecx cvtsi2sd %rax, %xmm0 movq %xmm0, %r8 cmoveq %rcx, %r8 movl $0x0, %eax cmoveq %rax, %r12 movl %ebp, (%rsp) movl 0x14(%rsp), %ebp leaq 0x6e9a9(%rip), %rcx # 0x8307c movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %r9 callq 0x20a2b movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl %ebp, %ecx callq 0x157db movq %rdx, %r12 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax orq %rcx, %rax movq %r12, %rdx addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_os_stat: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov ebp, r9d mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToCString push 6 pop r12 test rax, rax jz short loc_143C0 mov r14, rax lea rsi, [rsp+0D8h+var_C0] mov rdi, rax test ebp, ebp jz short loc_1438A call _lstat jmp short loc_1438F loc_1438A: call _stat loc_1438F: mov r15d, eax xor ebp, ebp test eax, eax jns short loc_1439F call ___errno_location mov ebp, [rax] loc_1439F: mov rdi, rbx mov rsi, r14 call JS_FreeCString test r15d, r15d js short loc_143C9 mov rdi, rbx call JS_NewObject mov r15, rdx cmp r15d, 6 jnz short loc_143D5 loc_143C0: xor eax, eax xor ecx, ecx jmp loc_14706 loc_143C9: xor r14d, r14d push 2 pop r15 jmp loc_146E4 loc_143D5: mov r14, rax mov rax, [rsp+0D8h+var_C0] movsxd rcx, eax xor edx, edx cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax push 7 pop r12 mov r9, r12 cmovz r9, rdx xor r13d, r13d mov [rsp+0D8h+var_C4], ebp push 7 pop rbp mov [rsp+0D8h+var_D8], ebp lea rcx, aRdev+1; "dev" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_B8] movsxd rcx, eax cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9, r12 cmovz r9, r13 xor r13d, r13d mov [rsp+0D8h+var_D8], ebp lea rcx, aIno; "ino" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov r8d, [rsp+0D8h+var_A8] mov [rsp+0D8h+var_D8], ebp lea rcx, aInvalidFileMod+0Dh; "mode" mov rdi, rbx mov rsi, r14 mov rdx, r15 xor r9d, r9d call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_B0] movsxd rcx, eax cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9, r12 cmovz r9, r13 xor r13d, r13d mov [rsp+0D8h+var_D8], ebp lea rcx, aNlink; "nlink" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr movsxd rax, [rsp+0D8h+var_A4] mov ecx, eax cvtsi2sd xmm0, rcx test rax, rax movq r8, xmm0 cmovns r8, rax mov r9, r12 cmovns r9, r13 xor r13d, r13d mov [rsp+0D8h+var_D8], ebp lea rcx, aUid; "uid" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr movsxd rax, [rsp+0D8h+var_A0] mov ecx, eax cvtsi2sd xmm0, rcx test rax, rax movq r8, xmm0 cmovns r8, rax mov r9, r12 cmovns r9, r13 xor r13d, r13d mov [rsp+0D8h+var_D8], ebp lea rcx, aGid; "gid" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_98] movsxd rcx, eax cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9, r12 cmovz r9, r13 xor r13d, r13d mov [rsp+0D8h+var_D8], ebp lea rcx, aRdev; "rdev" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_90] movsxd rcx, eax cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9, r12 cmovz r9, r13 xor r13d, r13d mov [rsp+0D8h+var_D8], ebp lea rcx, aResize+2; "size" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr mov rax, [rsp+0D8h+var_80] movsxd rcx, eax cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9, r12 cmovz r9, r13 mov [rsp+0D8h+var_D8], ebp lea rcx, aBlocks; "blocks" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr imul rcx, [rsp+0D8h+var_78], 3E8h mov rax, [rsp+0D8h+var_70] mov r13d, 0F4240h cqo idiv r13 add rax, rcx movsxd rcx, eax cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9, r12 mov eax, 0 cmovz r9, rax mov [rsp+0D8h+var_D8], ebp lea rcx, aAtime; "atime" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr imul rcx, [rsp+0D8h+var_68], 3E8h mov rax, [rsp+0D8h+var_60] cqo idiv r13 add rax, rcx movsxd rcx, eax cmp rcx, rax cvtsi2sd xmm0, rax mov eax, ecx movq r8, xmm0 cmovz r8, rax mov r9, r12 mov eax, 0 cmovz r9, rax mov [rsp+0D8h+var_D8], ebp lea rcx, aMtime; "mtime" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_DefinePropertyValueStr imul rcx, [rsp+0D8h+var_58], 3E8h mov rax, [rsp+0D8h+var_50] cqo idiv r13 add rax, rcx movsxd rcx, eax cmp rcx, rax mov ecx, ecx cvtsi2sd xmm0, rax movq r8, xmm0 cmovz r8, rcx mov eax, 0 cmovz r12, rax mov [rsp+0D8h+var_D8], ebp mov ebp, [rsp+0D8h+var_C4] lea rcx, aCtime; "ctime" mov rdi, rbx mov rsi, r14 mov rdx, r15 mov r9, r12 call JS_DefinePropertyValueStr loc_146E4: mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, ebp call make_obj_error mov r12, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax loc_14706: or rax, rcx mov rdx, r12 add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_os_stat(long long a1, long long a2, long long a3, long long a4, long long *a5, int a6) { long long v8; // rax long long v9; // r14 long long v10; // rdi int v11; // eax int v12; // r15d unsigned int v13; // ebp long long v14; // rax long long v15; // rdx long long v16; // r15 long long obj_error; // rax unsigned long long v18; // rcx long long v19; // r14 double v20; // r8 int v21; // r12d int v22; // r9d double v23; // r8 int v24; // r9d double v25; // r8 int v26; // r9d double v27; // r8 int v28; // r9d double v29; // r8 int v30; // r9d double v31; // r8 int v32; // r9d double v33; // r8 int v34; // r9d double v35; // r8 int v36; // r9d long long v37; // rax double v38; // r8 int v39; // r9d long long v40; // rax double v41; // r8 int v42; // r9d long long v43; // rax double v44; // r8 long long v46; // [rsp+18h] [rbp-C0h] BYREF long long v47; // [rsp+20h] [rbp-B8h] long long v48; // [rsp+28h] [rbp-B0h] int v49; // [rsp+30h] [rbp-A8h] int v50; // [rsp+34h] [rbp-A4h] int v51; // [rsp+38h] [rbp-A0h] long long v52; // [rsp+40h] [rbp-98h] long long v53; // [rsp+48h] [rbp-90h] long long v54; // [rsp+58h] [rbp-80h] long long v55; // [rsp+60h] [rbp-78h] long long v56; // [rsp+68h] [rbp-70h] long long v57; // [rsp+70h] [rbp-68h] long long v58; // [rsp+78h] [rbp-60h] long long v59; // [rsp+80h] [rbp-58h] long long v60; // [rsp+88h] [rbp-50h] v8 = JS_ToCString(a1, *a5, a5[1]); if ( !v8 ) goto LABEL_9; v9 = v8; v10 = v8; if ( a6 ) v11 = lstat(v8, &v46); else v11 = stat(v8, &v46); v12 = v11; v13 = 0; if ( v11 < 0 ) v13 = *(_DWORD *)__errno_location(v10); JS_FreeCString(a1, v9); if ( v12 < 0 ) { v19 = 0LL; v16 = 2LL; LABEL_54: obj_error = make_obj_error(a1, v19, v16, v13); v18 = obj_error & 0xFFFFFFFF00000000LL; obj_error = (unsigned int)obj_error; return v18 | obj_error; } v14 = JS_NewObject(a1); v16 = v15; if ( (_DWORD)v15 != 6 ) { v19 = v14; v20 = (double)(int)v46; if ( (int)v46 == v46 ) LODWORD(v20) = v46; v21 = 7; v22 = 7; if ( (int)v46 == v46 ) v22 = 0; JS_DefinePropertyValueStr(a1, v14, v15, (unsigned int)"dev", LODWORD(v20), v22, 7); v23 = (double)(int)v47; if ( (int)v47 == v47 ) LODWORD(v23) = v47; v24 = 7; if ( (int)v47 == v47 ) v24 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"ino", LODWORD(v23), v24, 7); JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"mode", v49, 0, 7); v25 = (double)(int)v48; if ( (int)v48 == v48 ) LODWORD(v25) = v48; v26 = 7; if ( (int)v48 == v48 ) v26 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"nlink", LODWORD(v25), v26, 7); v27 = (double)v50; if ( v50 >= 0LL ) LODWORD(v27) = v50; v28 = 7; if ( v50 >= 0LL ) v28 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"uid", LODWORD(v27), v28, 7); v29 = (double)v51; if ( v51 >= 0LL ) LODWORD(v29) = v51; v30 = 7; if ( v51 >= 0LL ) v30 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"gid", LODWORD(v29), v30, 7); v31 = (double)(int)v52; if ( (int)v52 == v52 ) LODWORD(v31) = v52; v32 = 7; if ( (int)v52 == v52 ) v32 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"rdev", LODWORD(v31), v32, 7); v33 = (double)(int)v53; if ( (int)v53 == v53 ) LODWORD(v33) = v53; v34 = 7; if ( (int)v53 == v53 ) v34 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"size", LODWORD(v33), v34, 7); v35 = (double)(int)v54; if ( (int)v54 == v54 ) LODWORD(v35) = v54; v36 = 7; if ( (int)v54 == v54 ) v36 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"blocks", LODWORD(v35), v36, 7); v37 = 1000 * v55 + v56 / 1000000; v38 = (double)(int)v37; if ( (int)v37 == v37 ) LODWORD(v38) = 1000 * v55 + v56 / 1000000; v39 = 7; if ( (int)v37 == v37 ) v39 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"atime", LODWORD(v38), v39, 7); v40 = 1000 * v57 + v58 / 1000000; v41 = (double)(int)v40; if ( (int)v40 == v40 ) LODWORD(v41) = 1000 * v57 + v58 / 1000000; v42 = 7; if ( (int)v40 == v40 ) v42 = 0; JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"mtime", LODWORD(v41), v42, 7); v43 = 1000 * v59 + v60 / 1000000; v44 = (double)(int)v43; if ( (int)v43 == v43 ) { LODWORD(v44) = 1000 * v59 + v60 / 1000000; v21 = 0; } JS_DefinePropertyValueStr(a1, v19, v16, (unsigned int)"ctime", LODWORD(v44), v21, 7); goto LABEL_54; } LABEL_9: obj_error = 0LL; v18 = 0LL; return v18 | obj_error; }
js_os_stat: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV EBP,R9D MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] CALL 0x00111a6c PUSH 0x6 POP R12 TEST RAX,RAX JZ 0x001143c0 MOV R14,RAX LEA RSI,[RSP + 0x18] MOV RDI,RAX TEST EBP,EBP JZ 0x0011438a CALL 0x0010e470 JMP 0x0011438f LAB_0011438a: CALL 0x0010e590 LAB_0011438f: MOV R15D,EAX XOR EBP,EBP TEST EAX,EAX JNS 0x0011439f CALL 0x0010e0b0 MOV EBP,dword ptr [RAX] LAB_0011439f: MOV RDI,RBX MOV RSI,R14 CALL 0x0011b057 TEST R15D,R15D JS 0x001143c9 MOV RDI,RBX CALL 0x0011b2c9 MOV R15,RDX CMP R15D,0x6 JNZ 0x001143d5 LAB_001143c0: XOR EAX,EAX XOR ECX,ECX JMP 0x00114706 LAB_001143c9: XOR R14D,R14D PUSH 0x2 POP R15 JMP 0x001146e4 LAB_001143d5: MOV R14,RAX MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,EAX XOR EDX,EDX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX PUSH 0x7 POP R12 MOV R9,R12 CMOVZ R9,RDX XOR R13D,R13D MOV dword ptr [RSP + 0x14],EBP PUSH 0x7 POP RBP MOV dword ptr [RSP],EBP LEA RCX,[0x183065] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,EAX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9,R12 CMOVZ R9,R13 XOR R13D,R13D MOV dword ptr [RSP],EBP LEA RCX,[0x183052] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b MOV R8D,dword ptr [RSP + 0x30] MOV dword ptr [RSP],EBP LEA RCX,[0x182cc7] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 XOR R9D,R9D CALL 0x00120a2b MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,EAX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9,R12 CMOVZ R9,R13 XOR R13D,R13D MOV dword ptr [RSP],EBP LEA RCX,[0x183056] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b MOVSXD RAX,dword ptr [RSP + 0x34] MOV ECX,EAX CVTSI2SD XMM0,RCX TEST RAX,RAX MOVQ R8,XMM0 CMOVNS R8,RAX MOV R9,R12 CMOVNS R9,R13 XOR R13D,R13D MOV dword ptr [RSP],EBP LEA RCX,[0x18305c] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b MOVSXD RAX,dword ptr [RSP + 0x38] MOV ECX,EAX CVTSI2SD XMM0,RCX TEST RAX,RAX MOVQ R8,XMM0 CMOVNS R8,RAX MOV R9,R12 CMOVNS R9,R13 XOR R13D,R13D MOV dword ptr [RSP],EBP LEA RCX,[0x183060] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b MOV RAX,qword ptr [RSP + 0x40] MOVSXD RCX,EAX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9,R12 CMOVZ R9,R13 XOR R13D,R13D MOV dword ptr [RSP],EBP LEA RCX,[0x183064] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,EAX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9,R12 CMOVZ R9,R13 XOR R13D,R13D MOV dword ptr [RSP],EBP LEA RCX,[0x189480] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b MOV RAX,qword ptr [RSP + 0x58] MOVSXD RCX,EAX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9,R12 CMOVZ R9,R13 MOV dword ptr [RSP],EBP LEA RCX,[0x183069] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b IMUL RCX,qword ptr [RSP + 0x60],0x3e8 MOV RAX,qword ptr [RSP + 0x68] MOV R13D,0xf4240 CQO IDIV R13 ADD RAX,RCX MOVSXD RCX,EAX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9,R12 MOV EAX,0x0 CMOVZ R9,RAX MOV dword ptr [RSP],EBP LEA RCX,[0x183070] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b IMUL RCX,qword ptr [RSP + 0x70],0x3e8 MOV RAX,qword ptr [RSP + 0x78] CQO IDIV R13 ADD RAX,RCX MOVSXD RCX,EAX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R8,XMM0 CMOVZ R8,RAX MOV R9,R12 MOV EAX,0x0 CMOVZ R9,RAX MOV dword ptr [RSP],EBP LEA RCX,[0x183076] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00120a2b IMUL RCX,qword ptr [RSP + 0x80],0x3e8 MOV RAX,qword ptr [RSP + 0x88] CQO IDIV R13 ADD RAX,RCX MOVSXD RCX,EAX CMP RCX,RAX MOV ECX,ECX CVTSI2SD XMM0,RAX MOVQ R8,XMM0 CMOVZ R8,RCX MOV EAX,0x0 CMOVZ R12,RAX MOV dword ptr [RSP],EBP MOV EBP,dword ptr [RSP + 0x14] LEA RCX,[0x18307c] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV R9,R12 CALL 0x00120a2b LAB_001146e4: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV ECX,EBP CALL 0x001157db MOV R12,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV EAX,EAX LAB_00114706: OR RAX,RCX MOV RDX,R12 ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_os_stat(int8 param_1) { int iVar1; char *__file; int *piVar2; int8 uVar3; ulong uVar4; ulong uVar5; int iVar7; int8 *in_R8; double dVar8; int in_R9D; int8 uVar9; int8 uVar10; bool bVar11; int1 auVar12 [16]; stat local_c0; int8 uVar6; __file = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]); uVar10 = 6; if (__file == (char *)0x0) { LAB_001143c0: uVar4 = 0; uVar5 = 0; } else { if (in_R9D == 0) { iVar1 = stat(__file,&local_c0); } else { iVar1 = lstat(__file,&local_c0); } iVar7 = 0; if (iVar1 < 0) { piVar2 = __errno_location(); iVar7 = *piVar2; } JS_FreeCString(param_1,__file); if (iVar1 < 0) { auVar12 = ZEXT816(2) << 0x40; } else { auVar12 = JS_NewObject(param_1); uVar6 = auVar12._8_8_; uVar3 = auVar12._0_8_; if (auVar12._8_4_ == 6) goto LAB_001143c0; bVar11 = (long)(int)local_c0.st_dev == local_c0.st_dev; dVar8 = (double)(long)local_c0.st_dev; if (bVar11) { dVar8 = (double)(local_c0.st_dev & 0xffffffff); } uVar10 = 7; uVar9 = uVar10; if (bVar11) { uVar9 = 0; } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,&DAT_00183065,dVar8,uVar9,7); uVar9 = uVar10; dVar8 = (double)(long)local_c0.st_ino; if ((long)(int)local_c0.st_ino == local_c0.st_ino) { uVar9 = 0; dVar8 = (double)(local_c0.st_ino & 0xffffffff); } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,&DAT_00183052,dVar8,uVar9,7); JS_DefinePropertyValueStr(param_1,uVar3,uVar6,"mode",local_c0.st_mode,0,7); uVar9 = uVar10; dVar8 = (double)(long)local_c0.st_nlink; if ((long)(int)local_c0.st_nlink == local_c0.st_nlink) { uVar9 = 0; dVar8 = (double)(local_c0.st_nlink & 0xffffffff); } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,"nlink",dVar8,uVar9,7); uVar9 = uVar10; dVar8 = (double)local_c0.st_uid; if (-1 < (long)(int)local_c0.st_uid) { uVar9 = 0; dVar8 = (double)(long)(int)local_c0.st_uid; } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,&DAT_0018305c,dVar8,uVar9,7); uVar9 = uVar10; dVar8 = (double)local_c0.st_gid; if (-1 < (long)(int)local_c0.st_gid) { uVar9 = 0; dVar8 = (double)(long)(int)local_c0.st_gid; } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,&DAT_00183060,dVar8,uVar9,7); uVar9 = uVar10; dVar8 = (double)(long)local_c0.st_rdev; if ((long)(int)local_c0.st_rdev == local_c0.st_rdev) { uVar9 = 0; dVar8 = (double)(local_c0.st_rdev & 0xffffffff); } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,&DAT_00183064,dVar8,uVar9,7); uVar9 = uVar10; dVar8 = (double)local_c0.st_size; if ((int)local_c0.st_size == local_c0.st_size) { uVar9 = 0; dVar8 = (double)(local_c0.st_size & 0xffffffff); } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,"size",dVar8,uVar9,7); uVar9 = uVar10; dVar8 = (double)local_c0.st_blocks; if ((int)local_c0.st_blocks == local_c0.st_blocks) { uVar9 = 0; dVar8 = (double)(local_c0.st_blocks & 0xffffffff); } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,"blocks",dVar8,uVar9,7); uVar4 = local_c0.st_atim.tv_nsec / 1000000 + local_c0.st_atim.tv_sec * 1000; uVar9 = uVar10; dVar8 = (double)(long)uVar4; if ((long)(int)uVar4 == uVar4) { uVar9 = 0; dVar8 = (double)(uVar4 & 0xffffffff); } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,"atime",dVar8,uVar9,7); uVar4 = local_c0.st_mtim.tv_nsec / 1000000 + local_c0.st_mtim.tv_sec * 1000; uVar9 = uVar10; dVar8 = (double)(long)uVar4; if ((long)(int)uVar4 == uVar4) { uVar9 = 0; dVar8 = (double)(uVar4 & 0xffffffff); } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,"mtime",dVar8,uVar9,7); uVar4 = local_c0.st_ctim.tv_nsec / 1000000 + local_c0.st_ctim.tv_sec * 1000; dVar8 = (double)(long)uVar4; if ((long)(int)uVar4 == uVar4) { uVar10 = 0; dVar8 = (double)(uVar4 & 0xffffffff); } JS_DefinePropertyValueStr(param_1,uVar3,uVar6,"ctime",dVar8,uVar10,7); } auVar12 = make_obj_error(param_1,auVar12._0_8_,auVar12._8_8_,iVar7); uVar10 = auVar12._8_8_; uVar5 = auVar12._0_8_ & 0xffffffff00000000; uVar4 = auVar12._0_8_ & 0xffffffff; } auVar12._0_8_ = uVar4 | uVar5; auVar12._8_8_ = uVar10; return auVar12; }
58,255
std::hash<minja::Value>::operator()(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
size_t operator()(const minja::Value & v) const { if (!v.is_hashable()) throw std::runtime_error("Unsupported type for hashing: " + v.dump()); return std::hash<json>()(v.get<json>()); }
O2
cpp
std::hash<minja::Value>::operator()(minja::Value const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq %rsi, %rdi callq 0x62ef0 testb %al, %al je 0x82574 movq %rsp, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x82610 movq %rbx, %rdi callq 0x829c4 movq %rax, %rbx movq %rsp, %rdi callq 0x3d252 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x20(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x62f00 leaq 0x32bbd(%rip), %rsi # 0xb5155 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x58626 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x23e60 xorl %ebp, %ebp movq 0x7ba34(%rip), %rsi # 0xfdff0 movq 0x7b995(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 movq %rsp, %rdi callq 0x24208 jmp 0x825de movq %rax, %r14 movb $0x1, %bpl leaq 0x20(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x825f2 jmp 0x82607 movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 jmp 0x82607 movq %rax, %r14 movq %rsp, %rdi callq 0x3d252 movq %r14, %rdi callq 0x23fd0 nop
_ZNKSt4hashIN5minja5ValueEEclERKS1_: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rdi, rsi; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz short loc_82574 mov rbx, rsp mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(void) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rbx, rax mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_82574: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+58h+var_38] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnsupportedTyp; "Unsupported type for hashing: " mov rdi, rsp lea rdx, [rsp+58h+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp 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 mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_825DE mov r14, rax mov bpl, 1 loc_825DE: lea rdi, [rsp+58h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_825F2 jmp short loc_82607 mov r14, rax loc_825F2: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_82607 mov r14, rax mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_82607: mov rdi, r14 call __Unwind_Resume
long long std::hash<minja::Value>::operator()(long long a1, minja::Value *a2) { long long v2; // rbx void *exception; // rbx _BYTE v5[32]; // [rsp+0h] [rbp-58h] BYREF _BYTE v6[56]; // [rsp+20h] [rbp-38h] BYREF if ( !minja::Value::is_primitive(a2) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v5, (long long)"Unsupported type for hashing: ", (long long)v6); std::runtime_error::runtime_error(exception, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Value::get<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>>( v5, a2); v2 = nlohmann::json_abi_v3_11_3::detail::hash<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>>(v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v5); return v2; }
operator(): PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RDI,RSI CALL 0x00162ef0 TEST AL,AL JZ 0x00182574 MOV RBX,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x00182610 LAB_00182555: MOV RDI,RBX CALL 0x001829c4 LAB_0018255d: MOV RBX,RAX MOV RDI,RSP CALL 0x0013d252 MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_00182574: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_0018257f: LEA RDI,[RSP + 0x20] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00162f00 LAB_00182591: LEA RSI,[0x1b5155] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x00158626 MOV BPL,0x1 LAB_001825a8: MOV RSI,RSP MOV RDI,RBX CALL 0x00123e60 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1) { char cVar1; ulong uVar2; runtime_error *this_00; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> abStack_58 [32]; int1 local_38 [32]; cVar1 = minja::Value::is_primitive(param_1); if (cVar1 != '\0') { minja::Value:: get<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>> (); /* try { // try from 00182555 to 0018255c has its CatchHandler @ 001825fc */ uVar2 = nlohmann::json_abi_v3_11_3::detail:: hash<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>> (abStack_58); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(abStack_58); return uVar2; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018257f to 00182590 has its CatchHandler @ 001825ef */ minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0)); /* try { // try from 00182591 to 001825a4 has its CatchHandler @ 001825d8 */ operator+((char *)abStack_58,(string *)"Unsupported type for hashing: "); /* try { // try from 001825a8 to 001825ca has its CatchHandler @ 001825cb */ std::runtime_error::runtime_error(this_00,(string *)abStack_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
58,256
ssz_dump_to_file_no_quotes
corpus-core[P]colibri-stateless/src/util/ssz.c
void ssz_dump_to_file_no_quotes(FILE* f, ssz_ob_t ob) { ssz_dump_t ctx = { .buf = {0}, .write_unit_as_hex = true, .no_quotes = true, }; dump(&ctx, ob, NULL, 0); bytes_write(ctx.buf.data, f, false); buffer_free(&ctx.buf); }
O0
c
ssz_dump_to_file_no_quotes: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp leaq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq 0x38161(%rip), %rcx # 0x54338 movq %rcx, -0x28(%rbp) movq 0x3815e(%rip), %rcx # 0x54340 movq %rcx, -0x20(%rbp) movq 0x3815b(%rip), %rcx # 0x54348 movq %rcx, -0x18(%rbp) movq 0x38158(%rip), %rcx # 0x54350 movq %rcx, -0x10(%rbp) leaq -0x28(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi xorl %edx, %edx movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x1b850 movq -0x8(%rbp), %rdx movl -0x28(%rbp), %edi movq -0x20(%rbp), %rsi xorl %ecx, %ecx callq 0x192d0 leaq -0x28(%rbp), %rdi callq 0x18d90 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
ssz_dump_to_file_no_quotes: push rbp mov rbp, rsp sub rsp, 40h lea rax, [rbp+arg_0] mov [rbp+var_8], rdi mov rcx, cs:qword_54338 mov [rbp+var_28], rcx mov rcx, cs:qword_54340 mov [rbp+var_20], rcx mov rcx, cs:qword_54348 mov [rbp+var_18], rcx mov rcx, cs:qword_54350 mov [rbp+var_10], rcx lea rdi, [rbp+var_28] xor ecx, ecx mov esi, ecx xor edx, edx mov rcx, [rax] mov [rsp+40h+var_40], rcx mov rcx, [rax+8] mov [rsp+40h+var_38], rcx mov rax, [rax+10h] mov [rsp+40h+var_30], rax call dump mov rdx, [rbp+var_8] mov edi, dword ptr [rbp+var_28] mov rsi, [rbp+var_20] xor ecx, ecx call bytes_write lea rdi, [rbp+var_28] call buffer_free add rsp, 40h pop rbp retn
long long ssz_dump_to_file_no_quotes( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14, long long a15, unsigned __int16 *a16, long long a17) { long long v18; // [rsp+18h] [rbp-28h] BYREF long long v19; // [rsp+20h] [rbp-20h] long long v20; // [rsp+28h] [rbp-18h] long long v21; // [rsp+30h] [rbp-10h] long long v22; // [rsp+38h] [rbp-8h] v22 = a1; v18 = 0LL; v19 = 0LL; v20 = 0LL; v21 = 257LL; dump((unsigned int *)&v18, 0LL, 0LL, (long long)a16, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, a15, a16, a17); bytes_write(v18, v19, v22, 0); return buffer_free((long long)&v18); }
ssz_dump_to_file_no_quotes: PUSH RBP MOV RBP,RSP SUB RSP,0x40 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV RCX,qword ptr [0x00154338] MOV qword ptr [RBP + -0x28],RCX MOV RCX,qword ptr [0x00154340] MOV qword ptr [RBP + -0x20],RCX MOV RCX,qword ptr [0x00154348] MOV qword ptr [RBP + -0x18],RCX MOV RCX,qword ptr [0x00154350] MOV qword ptr [RBP + -0x10],RCX LEA RDI,[RBP + -0x28] XOR ECX,ECX MOV ESI,ECX XOR EDX,EDX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x0011b850 MOV RDX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] XOR ECX,ECX CALL 0x001192d0 LEA RDI,[RBP + -0x28] CALL 0x00118d90 ADD RSP,0x40 POP RBP RET
void ssz_dump_to_file_no_quotes(int8 param_1) { int8 in_R8; int8 in_R9; int8 in_stack_00000008; int8 in_stack_00000010; int8 in_stack_00000018; ulong local_30; int8 local_28; int8 local_20; int8 local_18; int8 local_10; local_30 = DAT_00154338; local_28 = DAT_00154340; local_20 = DAT_00154348; local_18 = DAT_00154350; local_10 = param_1; dump(&local_30,0,0); bytes_write(local_30 & 0xffffffff,local_28,local_10,0,in_R8,in_R9,in_stack_00000008, in_stack_00000010,in_stack_00000018); buffer_free(&local_30); return; }
58,257
ssz_dump_to_file_no_quotes
corpus-core[P]colibri-stateless/src/util/ssz.c
void ssz_dump_to_file_no_quotes(FILE* f, ssz_ob_t ob) { ssz_dump_t ctx = { .buf = {0}, .write_unit_as_hex = true, .no_quotes = true, }; dump(&ctx, ob, NULL, 0); bytes_write(ctx.buf.data, f, false); buffer_free(&ctx.buf); }
O3
c
ssz_dump_to_file_no_quotes: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx movups 0x2acd2(%rip), %xmm0 # 0x3f290 leaq 0x20(%rsp), %r14 movaps %xmm0, 0x10(%r14) movups 0x2acb1(%rip), %xmm0 # 0x3f280 movaps %xmm0, (%r14) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x14001 movl (%r14), %edi movq 0x8(%r14), %rsi movq %rbx, %rdx xorl %ecx, %ecx callq 0x12b1b movq %r14, %rdi callq 0x12733 addq $0x48, %rsp popq %rbx popq %r14 retq nop
ssz_dump_to_file_no_quotes: push r14 push rbx sub rsp, 48h mov rbx, rdi movups xmm0, cs:xmmword_3F290 lea r14, [rsp+58h+var_38] movaps xmmword ptr [r14+10h], xmm0 movups xmm0, cs:xmmword_3F280 movaps xmmword ptr [r14], xmm0 mov rax, [rsp+58h+arg_10] mov [rsp+58h+var_48], rax movaps xmm0, [rsp+58h+arg_0] movups [rsp+58h+var_58], xmm0 mov rdi, r14 xor esi, esi xor edx, edx call dump mov edi, [r14] mov rsi, [r14+8] mov rdx, rbx xor ecx, ecx call bytes_write mov rdi, r14 call buffer_free add rsp, 48h pop rbx pop r14 retn
long long ssz_dump_to_file_no_quotes( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __int128 a7, long long a8) { _OWORD v9[3]; // [rsp+20h] [rbp-38h] BYREF v9[1] = xmmword_3F290; v9[0] = xmmword_3F280; dump((long long)v9, 0LL, 0LL, a4, a5, a6, a7, *((unsigned __int16 **)&a7 + 1), a8); bytes_write(v9[0], *((long long *)&v9[0] + 1), a1, 0); return buffer_free((long long)v9); }
ssz_dump_to_file_no_quotes: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [0x0013f290] LEA R14,[RSP + 0x20] MOVAPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [0x0013f280] MOVAPS xmmword ptr [R14],XMM0 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX CALL 0x00114001 MOV EDI,dword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] MOV RDX,RBX XOR ECX,ECX CALL 0x00112b1b MOV RDI,R14 CALL 0x00112733 ADD RSP,0x48 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ssz_dump_to_file_no_quotes(int8 param_1) { int8 in_R8; int8 in_R9; int4 in_stack_00000008; int4 in_stack_00000010; int8 in_stack_00000018; ulong local_38; int8 uStack_30; int8 local_28; int8 uStack_20; local_28 = _DAT_0013f290; uStack_20 = _UNK_0013f298; local_38 = _DAT_0013f280; uStack_30 = _UNK_0013f288; dump(&local_38,0,0); bytes_write(local_38 & 0xffffffff,uStack_30,param_1,0,in_R8,in_R9,in_stack_00000008, in_stack_00000010,in_stack_00000018); buffer_free(&local_38); return; }
58,258
ratio
pnggroup[P]pngcheck/pngcheck.c
int ratio(ulg uc, ulg c) /* GRR 19970621: swiped from UnZip 5.31 list.c */ { ulg denom; if (uc == 0) return 0; if (uc > 2000000L) { /* risk signed overflow if multiply numerator */ denom = uc / 1000L; return ((uc >= c) ? (int) ((uc-c + (denom>>1)) / denom) : -((int) ((c-uc + (denom>>1)) / denom))); } else { /* ^^^^^^^^ rounding */ denom = uc; return ((uc >= c) ? (int) ((1000L*(uc-c) + (denom>>1)) / denom) : -((int) ((1000L*(c-uc) + (denom>>1)) / denom))); } /* ^^^^^^^^ rounding */ }
O1
c
ratio: testq %rdi, %rdi je 0x1103e cmpq $0x1e8481, %rdi # imm = 0x1E8481 jb 0x11041 movq %rdi, %rax shrq $0x3, %rax movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF mulq %rcx movq %rdx, %rcx shrq $0x4, %rcx shrq $0x5, %rdx movq %rdi, %rax subq %rsi, %rax jae 0x11064 subq %rdi, %rsi addq %rdx, %rsi movq %rsi, %rax xorl %edx, %edx divq %rcx jmp 0x11061 xorl %eax, %eax retq movq %rdi, %rcx shrq %rcx movq %rdi, %rax subq %rsi, %rax jae 0x1106d subq %rdi, %rsi imulq $0x3e8, %rsi, %rax # imm = 0x3E8 addq %rcx, %rax xorl %edx, %edx divq %rdi negl %eax retq addq %rdx, %rax xorl %edx, %edx divq %rcx retq imulq $0x3e8, %rax, %rax # imm = 0x3E8 addq %rcx, %rax xorl %edx, %edx divq %rdi retq
ratio: test rdi, rdi jz short loc_1103E cmp rdi, 1E8481h jb short loc_11041 mov rax, rdi shr rax, 3 mov rcx, 20C49BA5E353F7CFh mul rcx mov rcx, rdx shr rcx, 4 shr rdx, 5 mov rax, rdi sub rax, rsi jnb short loc_11064 sub rsi, rdi add rsi, rdx mov rax, rsi xor edx, edx div rcx jmp short loc_11061 loc_1103E: xor eax, eax retn loc_11041: mov rcx, rdi shr rcx, 1 mov rax, rdi sub rax, rsi jnb short loc_1106D sub rsi, rdi imul rax, rsi, 3E8h add rax, rcx xor edx, edx div rdi loc_11061: neg eax retn loc_11064: add rax, rdx xor edx, edx div rcx retn loc_1106D: imul rax, 3E8h add rax, rcx xor edx, edx div rdi retn
unsigned long long ratio(unsigned long long a1, unsigned long long a2) { unsigned long long v2; // rcx unsigned long long v3; // rdx unsigned long long v4; // rax unsigned long long v6; // rcx if ( !a1 ) return 0LL; if ( a1 < 0x1E8481 ) { v6 = a1 >> 1; if ( a1 < a2 ) { v4 = (v6 + 1000 * (a2 - a1)) / a1; return (unsigned int)-(int)v4; } return (v6 + 1000 * (a1 - a2)) / a1; } else { v2 = a1 / 0x3E8; v3 = a1 / 0x7D0; if ( a1 < a2 ) { v4 = (v3 + a2 - a1) / v2; return (unsigned int)-(int)v4; } return (v3 + a1 - a2) / v2; } }
ratio: TEST RDI,RDI JZ 0x0011103e CMP RDI,0x1e8481 JC 0x00111041 MOV RAX,RDI SHR RAX,0x3 MOV RCX,0x20c49ba5e353f7cf MUL RCX MOV RCX,RDX SHR RCX,0x4 SHR RDX,0x5 MOV RAX,RDI SUB RAX,RSI JNC 0x00111064 SUB RSI,RDI ADD RSI,RDX MOV RAX,RSI XOR EDX,EDX DIV RCX JMP 0x00111061 LAB_0011103e: XOR EAX,EAX RET LAB_00111041: MOV RCX,RDI SHR RCX,0x1 MOV RAX,RDI SUB RAX,RSI JNC 0x0011106d SUB RSI,RDI IMUL RAX,RSI,0x3e8 ADD RAX,RCX XOR EDX,EDX DIV RDI LAB_00111061: NEG EAX RET LAB_00111064: ADD RAX,RDX XOR EDX,EDX DIV RCX RET LAB_0011106d: IMUL RAX,RAX,0x3e8 ADD RAX,RCX XOR EDX,EDX DIV RDI RET
ulong ratio(ulong param_1,ulong param_2) { int iVar1; ulong uVar2; ulong uVar3; if (param_1 == 0) { return 0; } if (param_1 < 0x1e8481) { if (param_2 <= param_1) { return ((param_1 - param_2) * 1000 + (param_1 >> 1)) / param_1; } iVar1 = (int)(((param_2 - param_1) * 1000 + (param_1 >> 1)) / param_1); } else { uVar2 = (param_1 >> 3) / 0x7d; uVar3 = (param_1 >> 3) / 0xfa; if (param_2 <= param_1) { return ((param_1 - param_2) + uVar3) / uVar2; } iVar1 = (int)(((param_2 - param_1) + uVar3) / uVar2); } return (ulong)(uint)-iVar1; }
58,259
my_strntoull_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for(; s<e && my_isspace(cs,*s); s++); if (s == e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); overflow = 0; i = 0; for ( ; s != e; s++) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (ulonglong) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) i) : (longlong) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O0
c
my_strntoull_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rcx xorl %eax, %eax cmpq -0x68(%rbp), %rcx movb %al, -0x76(%rbp) jae 0x4a908 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x76(%rbp) movb -0x76(%rbp), %al testb $0x1, %al jne 0x4a911 jmp 0x4a921 jmp 0x4a913 movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x4a8d9 movq -0x60(%rbp), %rax cmpq -0x68(%rbp), %rax jne 0x4a930 jmp 0x4aaf1 movq -0x60(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x4a951 movl $0x1, -0x3c(%rbp) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x4a97b movq -0x60(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x4a972 movl $0x0, -0x3c(%rbp) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x4a979 movl $0x0, -0x3c(%rbp) jmp 0x4a97b movq -0x60(%rbp), %rax movq %rax, -0x70(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x48(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x4c(%rbp) movl $0x0, -0x74(%rbp) movq $0x0, -0x58(%rbp) movq -0x60(%rbp), %rax cmpq -0x68(%rbp), %rax je 0x4aa95 movq -0x60(%rbp), %rax movb (%rax), %al movb %al, -0x75(%rbp) movzbl -0x75(%rbp), %eax cmpl $0x30, %eax jl 0x4a9f0 movzbl -0x75(%rbp), %eax cmpl $0x39, %eax jg 0x4a9f0 movzbl -0x75(%rbp), %eax subl $0x30, %eax movb %al, -0x75(%rbp) jmp 0x4aa38 movzbl -0x75(%rbp), %eax cmpl $0x41, %eax jl 0x4aa11 movzbl -0x75(%rbp), %eax cmpl $0x5a, %eax jg 0x4aa11 movzbl -0x75(%rbp), %eax subl $0x41, %eax addl $0xa, %eax movb %al, -0x75(%rbp) jmp 0x4aa36 movzbl -0x75(%rbp), %eax cmpl $0x61, %eax jl 0x4aa32 movzbl -0x75(%rbp), %eax cmpl $0x7a, %eax jg 0x4aa32 movzbl -0x75(%rbp), %eax subl $0x61, %eax addl $0xa, %eax movb %al, -0x75(%rbp) jmp 0x4aa34 jmp 0x4aa95 jmp 0x4aa36 jmp 0x4aa38 movzbl -0x75(%rbp), %eax cmpl -0x24(%rbp), %eax jl 0x4aa43 jmp 0x4aa95 movq -0x58(%rbp), %rax cmpq -0x48(%rbp), %rax ja 0x4aa60 movq -0x58(%rbp), %rax cmpq -0x48(%rbp), %rax jne 0x4aa69 movzbl -0x75(%rbp), %eax cmpl -0x4c(%rbp), %eax jbe 0x4aa69 movl $0x1, -0x74(%rbp) jmp 0x4aa82 movslq -0x24(%rbp), %rax imulq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movzbl -0x75(%rbp), %eax addq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x4aa84 movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x4a9bb movq -0x60(%rbp), %rax cmpq -0x70(%rbp), %rax jne 0x4aaa1 jmp 0x4aaf1 cmpq $0x0, -0x30(%rbp) je 0x4aab3 movq -0x60(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) cmpl $0x0, -0x74(%rbp) je 0x4aacd movq -0x38(%rbp), %rax movl $0x22, (%rax) movq $-0x1, -0x8(%rbp) jmp 0x4ab15 cmpl $0x0, -0x3c(%rbp) je 0x4aadf xorl %eax, %eax subq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x4aae7 movq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x4ab15 movq -0x38(%rbp), %rax movl $0x21, (%rax) cmpq $0x0, -0x30(%rbp) je 0x4ab0d movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
my_strntoull_8bit: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_18] mov [rbp+var_60], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_68], rax loc_4A8D9: mov rcx, [rbp+var_60] xor eax, eax cmp rcx, [rbp+var_68] mov [rbp+var_76], al jnb short loc_4A908 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_60] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_76], al loc_4A908: mov al, [rbp+var_76] test al, 1 jnz short loc_4A911 jmp short loc_4A921 loc_4A911: jmp short $+2 loc_4A913: mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_4A8D9 loc_4A921: mov rax, [rbp+var_60] cmp rax, [rbp+var_68] jnz short loc_4A930 jmp loc_4AAF1 loc_4A930: mov rax, [rbp+var_60] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_4A951 mov [rbp+var_3C], 1 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_4A97B loc_4A951: mov rax, [rbp+var_60] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_4A972 mov [rbp+var_3C], 0 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_4A979 loc_4A972: mov [rbp+var_3C], 0 loc_4A979: jmp short $+2 loc_4A97B: mov rax, [rbp+var_60] mov [rbp+var_70], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_48], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_4C], eax mov [rbp+var_74], 0 mov [rbp+var_58], 0 loc_4A9BB: mov rax, [rbp+var_60] cmp rax, [rbp+var_68] jz loc_4AA95 mov rax, [rbp+var_60] mov al, [rax] mov [rbp+var_75], al movzx eax, [rbp+var_75] cmp eax, 30h ; '0' jl short loc_4A9F0 movzx eax, [rbp+var_75] cmp eax, 39h ; '9' jg short loc_4A9F0 movzx eax, [rbp+var_75] sub eax, 30h ; '0' mov [rbp+var_75], al jmp short loc_4AA38 loc_4A9F0: movzx eax, [rbp+var_75] cmp eax, 41h ; 'A' jl short loc_4AA11 movzx eax, [rbp+var_75] cmp eax, 5Ah ; 'Z' jg short loc_4AA11 movzx eax, [rbp+var_75] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_75], al jmp short loc_4AA36 loc_4AA11: movzx eax, [rbp+var_75] cmp eax, 61h ; 'a' jl short loc_4AA32 movzx eax, [rbp+var_75] cmp eax, 7Ah ; 'z' jg short loc_4AA32 movzx eax, [rbp+var_75] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_75], al jmp short loc_4AA34 loc_4AA32: jmp short loc_4AA95 loc_4AA34: jmp short $+2 loc_4AA36: jmp short $+2 loc_4AA38: movzx eax, [rbp+var_75] cmp eax, [rbp+var_24] jl short loc_4AA43 jmp short loc_4AA95 loc_4AA43: mov rax, [rbp+var_58] cmp rax, [rbp+var_48] ja short loc_4AA60 mov rax, [rbp+var_58] cmp rax, [rbp+var_48] jnz short loc_4AA69 movzx eax, [rbp+var_75] cmp eax, [rbp+var_4C] jbe short loc_4AA69 loc_4AA60: mov [rbp+var_74], 1 jmp short loc_4AA82 loc_4AA69: movsxd rax, [rbp+var_24] imul rax, [rbp+var_58] mov [rbp+var_58], rax movzx eax, [rbp+var_75] add rax, [rbp+var_58] mov [rbp+var_58], rax loc_4AA82: jmp short $+2 loc_4AA84: mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp loc_4A9BB loc_4AA95: mov rax, [rbp+var_60] cmp rax, [rbp+var_70] jnz short loc_4AAA1 jmp short loc_4AAF1 loc_4AAA1: cmp [rbp+var_30], 0 jz short loc_4AAB3 mov rcx, [rbp+var_60] mov rax, [rbp+var_30] mov [rax], rcx loc_4AAB3: cmp [rbp+var_74], 0 jz short loc_4AACD mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_4AB15 loc_4AACD: cmp [rbp+var_3C], 0 jz short loc_4AADF xor eax, eax sub rax, [rbp+var_58] mov [rbp+var_80], rax jmp short loc_4AAE7 loc_4AADF: mov rax, [rbp+var_58] mov [rbp+var_80], rax loc_4AAE7: mov rax, [rbp+var_80] mov [rbp+var_8], rax jmp short loc_4AB15 loc_4AAF1: mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' cmp [rbp+var_30], 0 jz short loc_4AB0D mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax], rcx loc_4AB0D: mov [rbp+var_8], 0 loc_4AB15: mov rax, [rbp+var_8] pop rbp retn
long long my_strntoull_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6) { bool v8; // [rsp+Ah] [rbp-76h] unsigned __int8 v9; // [rsp+Bh] [rbp-75h] unsigned __int8 v10; // [rsp+Bh] [rbp-75h] int v11; // [rsp+Ch] [rbp-74h] _BYTE *v12; // [rsp+10h] [rbp-70h] _BYTE *v13; // [rsp+18h] [rbp-68h] _BYTE *v14; // [rsp+20h] [rbp-60h] unsigned long long v15; // [rsp+28h] [rbp-58h] unsigned long long v16; // [rsp+38h] [rbp-48h] int v17; // [rsp+44h] [rbp-3Ch] *a6 = 0; v14 = a2; v13 = &a2[a3]; while ( 1 ) { v8 = 0; if ( v14 < v13 ) v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0; if ( !v8 ) break; ++v14; } if ( v14 == v13 ) goto LABEL_39; if ( *v14 == 45 ) { v17 = 1; ++v14; } else { v17 = 0; if ( *v14 == 43 ) ++v14; } v12 = v14; v16 = 0xFFFFFFFFFFFFFFFFLL / a4; v11 = 0; v15 = 0LL; while ( v14 != v13 ) { v9 = *v14; if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u ) { if ( v9 < 0x41u || v9 > 0x5Au ) { if ( v9 < 0x61u || v9 > 0x7Au ) break; v10 = v9 - 97 + 10; } else { v10 = v9 - 65 + 10; } } else { v10 = v9 - 48; } if ( v10 >= a4 ) break; if ( v15 > v16 || v15 == v16 && v10 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) ) v11 = 1; else v15 = v15 * a4 + v10; ++v14; } if ( v14 == v12 ) { LABEL_39: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v14; if ( v11 ) { *a6 = 34; return -1LL; } else if ( v17 ) { return -(long long)v15; } else { return v15; } } }
my_strntoull_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX LAB_0014a8d9: MOV RCX,qword ptr [RBP + -0x60] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x68] MOV byte ptr [RBP + -0x76],AL JNC 0x0014a908 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x60] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x76],AL LAB_0014a908: MOV AL,byte ptr [RBP + -0x76] TEST AL,0x1 JNZ 0x0014a911 JMP 0x0014a921 LAB_0014a911: JMP 0x0014a913 LAB_0014a913: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0014a8d9 LAB_0014a921: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x68] JNZ 0x0014a930 JMP 0x0014aaf1 LAB_0014a930: MOV RAX,qword ptr [RBP + -0x60] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x0014a951 MOV dword ptr [RBP + -0x3c],0x1 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0014a97b LAB_0014a951: MOV RAX,qword ptr [RBP + -0x60] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x0014a972 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0014a979 LAB_0014a972: MOV dword ptr [RBP + -0x3c],0x0 LAB_0014a979: JMP 0x0014a97b LAB_0014a97b: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x70],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x48],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x4c],EAX MOV dword ptr [RBP + -0x74],0x0 MOV qword ptr [RBP + -0x58],0x0 LAB_0014a9bb: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x68] JZ 0x0014aa95 MOV RAX,qword ptr [RBP + -0x60] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x75],AL MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x30 JL 0x0014a9f0 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x39 JG 0x0014a9f0 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x30 MOV byte ptr [RBP + -0x75],AL JMP 0x0014aa38 LAB_0014a9f0: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x41 JL 0x0014aa11 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x5a JG 0x0014aa11 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x41 ADD EAX,0xa MOV byte ptr [RBP + -0x75],AL JMP 0x0014aa36 LAB_0014aa11: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x61 JL 0x0014aa32 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x7a JG 0x0014aa32 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x61 ADD EAX,0xa MOV byte ptr [RBP + -0x75],AL JMP 0x0014aa34 LAB_0014aa32: JMP 0x0014aa95 LAB_0014aa34: JMP 0x0014aa36 LAB_0014aa36: JMP 0x0014aa38 LAB_0014aa38: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,dword ptr [RBP + -0x24] JL 0x0014aa43 JMP 0x0014aa95 LAB_0014aa43: MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x48] JA 0x0014aa60 MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x48] JNZ 0x0014aa69 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,dword ptr [RBP + -0x4c] JBE 0x0014aa69 LAB_0014aa60: MOV dword ptr [RBP + -0x74],0x1 JMP 0x0014aa82 LAB_0014aa69: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX MOVZX EAX,byte ptr [RBP + -0x75] ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX LAB_0014aa82: JMP 0x0014aa84 LAB_0014aa84: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0014a9bb LAB_0014aa95: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x70] JNZ 0x0014aaa1 JMP 0x0014aaf1 LAB_0014aaa1: CMP qword ptr [RBP + -0x30],0x0 JZ 0x0014aab3 MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_0014aab3: CMP dword ptr [RBP + -0x74],0x0 JZ 0x0014aacd MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0014ab15 LAB_0014aacd: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0014aadf XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x80],RAX JMP 0x0014aae7 LAB_0014aadf: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x80],RAX LAB_0014aae7: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014ab15 LAB_0014aaf1: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 CMP qword ptr [RBP + -0x30],0x0 JZ 0x0014ab0d MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_0014ab0d: MOV qword ptr [RBP + -0x8],0x0 LAB_0014ab15: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,int8 *param_5, int4 *param_6) { int1 auVar1 [16]; int1 auVar2 [16]; bool bVar3; byte *pbVar4; byte *pbVar5; ulong uVar6; bool bVar7; ulong local_88; byte local_7d; byte *local_68; ulong local_60; *param_6 = 0; pbVar5 = param_2 + param_3; local_68 = param_2; while( true ) { bVar7 = false; if (local_68 < pbVar5) { bVar7 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_68) & 8) != 0; } if (!bVar7) break; local_68 = local_68 + 1; } if (local_68 != pbVar5) { if (*local_68 == 0x2d) { bVar7 = true; local_68 = local_68 + 1; } else { if (*local_68 == 0x2b) { local_68 = local_68 + 1; } bVar7 = false; } pbVar4 = local_68; auVar1._8_8_ = 0; auVar1._0_8_ = (long)param_4; uVar6 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0); auVar2._8_8_ = 0; auVar2._0_8_ = (long)param_4; bVar3 = false; local_60 = 0; for (; local_68 != pbVar5; local_68 = local_68 + 1) { local_7d = *local_68; if ((local_7d < 0x30) || (0x39 < local_7d)) { if ((local_7d < 0x41) || (0x5a < local_7d)) { if ((local_7d < 0x61) || (0x7a < local_7d)) break; local_7d = local_7d + 0xa9; } else { local_7d = local_7d - 0x37; } } else { local_7d = local_7d - 0x30; } if (param_4 <= (int)(uint)local_7d) break; if ((uVar6 < local_60) || ((local_60 == uVar6 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar2,0) < (uint)local_7d))) ) { bVar3 = true; } else { local_60 = (ulong)local_7d + (long)param_4 * local_60; } } if (local_68 != pbVar4) { if (param_5 != (int8 *)0x0) { *param_5 = local_68; } if (bVar3) { *param_6 = 0x22; return 0xffffffffffffffff; } if (bVar7) { local_88 = -local_60; } else { local_88 = local_60; } return local_88; } } *param_6 = 0x21; if (param_5 != (int8 *)0x0) { *param_5 = param_2; } return 0; }
58,260
mi_dynmap_file
eloqsql/storage/myisam/mi_dynrec.c
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) { DBUG_ENTER("mi_dynmap_file"); if (size == 0 || size > (my_off_t) (~((size_t) 0))) { if (size) DBUG_PRINT("warning", ("File is too large for mmap")); else DBUG_PRINT("warning", ("Do not mmap zero-length")); DBUG_RETURN(1); } /* I wonder if it is good to use MAP_NORESERVE. From the Linux man page: MAP_NORESERVE Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get SIGSEGV upon a write if no physical memory is available. */ info->s->file_map= (uchar*) my_mmap(0, (size_t) size, info->s->mode==O_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NORESERVE, info->dfile, 0L); if (info->s->file_map == (uchar*) MAP_FAILED) { info->s->file_map= NULL; DBUG_RETURN(1); } #if defined(HAVE_MADVISE) madvise((char*) info->s->file_map, size, MADV_RANDOM); #endif info->s->mmaped_length= (size_t) size; info->s->file_read= mi_mmap_pread; info->s->file_write= mi_mmap_pwrite; DBUG_RETURN(0); }
O3
c
mi_dynmap_file: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movb $0x1, %r14b testq %rsi, %rsi je 0x76ac7 movq %rsi, %r15 movq %rdi, %rbx movq (%rdi), %rax xorl %ecx, %ecx cmpl $0x0, 0x358(%rax) setne %cl leal 0x1(,%rcx,2), %edx movl 0x1c0(%rdi), %r8d xorl %edi, %edi movl $0x4001, %ecx # imm = 0x4001 xorl %r9d, %r9d callq 0x295f0 movq (%rbx), %rcx movq %rax, 0x270(%rcx) movq (%rbx), %rax movq 0x270(%rax), %rdi cmpq $-0x1, %rdi je 0x76abc movq %r15, %rsi movl $0x1, %edx callq 0x29490 movq (%rbx), %rax movq %r15, 0x4d0(%rax) movq (%rbx), %rax leaq 0x36(%rip), %rcx # 0x76ad5 movq %rcx, 0x2e0(%rax) movq (%rbx), %rax leaq 0x1f3(%rip), %rcx # 0x76ca3 movq %rcx, 0x2e8(%rax) xorl %r14d, %r14d jmp 0x76ac7 movq $0x0, 0x270(%rax) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mi_dynmap_file: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14b, 1 test rsi, rsi jz loc_76AC7 mov r15, rsi mov rbx, rdi mov rax, [rdi] xor ecx, ecx cmp dword ptr [rax+358h], 0 setnz cl lea edx, ds:1[rcx*2] mov r8d, [rdi+1C0h] xor edi, edi mov ecx, 4001h xor r9d, r9d call _mmap64 mov rcx, [rbx] mov [rcx+270h], rax mov rax, [rbx] mov rdi, [rax+270h] cmp rdi, 0FFFFFFFFFFFFFFFFh jz short loc_76ABC mov rsi, r15 mov edx, 1 call _madvise mov rax, [rbx] mov [rax+4D0h], r15 mov rax, [rbx] lea rcx, mi_mmap_pread mov [rax+2E0h], rcx mov rax, [rbx] lea rcx, mi_mmap_pwrite mov [rax+2E8h], rcx xor r14d, r14d jmp short loc_76AC7 loc_76ABC: mov qword ptr [rax+270h], 0 loc_76AC7: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mi_dynmap_file(unsigned int *a1, long long a2) { long long v2; // rax unsigned int v3; // r14d long long v5; // rax long long v6; // rdi LOBYTE(v3) = 1; if ( a2 ) { *(_QWORD *)(*(_QWORD *)a1 + 624LL) = mmap64( 0LL, a2, 2 * (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 856LL) != 0) + 1, 16385LL, a1[112], 0LL, v2); v5 = *(_QWORD *)a1; v6 = *(_QWORD *)(*(_QWORD *)a1 + 624LL); if ( v6 == -1 ) { *(_QWORD *)(v5 + 624) = 0LL; } else { madvise(v6, a2, 1LL); *(_QWORD *)(*(_QWORD *)a1 + 1232LL) = a2; *(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_mmap_pread; *(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_mmap_pwrite; return 0; } } return v3; }
mi_dynmap_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14B,0x1 TEST RSI,RSI JZ 0x00176ac7 MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] XOR ECX,ECX CMP dword ptr [RAX + 0x358],0x0 SETNZ CL LEA EDX,[0x1 + RCX*0x2] MOV R8D,dword ptr [RDI + 0x1c0] XOR EDI,EDI MOV ECX,0x4001 XOR R9D,R9D CALL 0x001295f0 MOV RCX,qword ptr [RBX] MOV qword ptr [RCX + 0x270],RAX MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + 0x270] CMP RDI,-0x1 JZ 0x00176abc MOV RSI,R15 MOV EDX,0x1 CALL 0x00129490 MOV RAX,qword ptr [RBX] MOV qword ptr [RAX + 0x4d0],R15 MOV RAX,qword ptr [RBX] LEA RCX,[0x176ad5] MOV qword ptr [RAX + 0x2e0],RCX MOV RAX,qword ptr [RBX] LEA RCX,[0x176ca3] MOV qword ptr [RAX + 0x2e8],RCX XOR R14D,R14D JMP 0x00176ac7 LAB_00176abc: MOV qword ptr [RAX + 0x270],0x0 LAB_00176ac7: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
ulong mi_dynmap_file(long *param_1,size_t param_2) { void *pvVar1; int8 unaff_R14; ulong uVar2; uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); if (param_2 != 0) { pvVar1 = mmap64((void *)0x0,param_2,(uint)(*(int *)(*param_1 + 0x358) != 0) * 2 + 1,0x4001, (int)param_1[0x38],0); *(void **)(*param_1 + 0x270) = pvVar1; pvVar1 = *(void **)(*param_1 + 0x270); if (pvVar1 == (void *)0xffffffffffffffff) { *(int8 *)(*param_1 + 0x270) = 0; } else { madvise(pvVar1,param_2,1); *(size_t *)(*param_1 + 0x4d0) = param_2; *(code **)(*param_1 + 0x2e0) = mi_mmap_pread; *(code **)(*param_1 + 0x2e8) = mi_mmap_pwrite; uVar2 = 0; } } return uVar2 & 0xffffffff; }
58,261
js_bound_function_mark
bluesky950520[P]quickjs/quickjs.c
static void js_bound_function_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSObject *p = JS_VALUE_GET_OBJ(val); JSBoundFunction *bf = p->u.bound_function; int i; JS_MarkValue(rt, bf->func_obj, mark_func); JS_MarkValue(rt, bf->this_val, mark_func); for(i = 0; i < bf->argc; i++) JS_MarkValue(rt, bf->argv[i], mark_func); }
O1
c
js_bound_function_mark: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdi, %r14 movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE movq 0x30(%rsi), %r12 movsd (%r12), %xmm0 movl 0x8(%r12), %eax movsd %xmm0, (%rsp) andl $-0x2, %eax cmpl %r15d, %eax jne 0x3aa56 movq (%rsp), %rsi movq %r14, %rdi callq *%rbx movsd 0x10(%r12), %xmm0 movl 0x18(%r12), %eax movsd %xmm0, (%rsp) andl $-0x2, %eax cmpl %r15d, %eax jne 0x3aa78 movq (%rsp), %rsi movq %r14, %rdi callq *%rbx cmpl $0x0, 0x20(%r12) jle 0x3aab8 leaq 0x30(%r12), %r13 xorl %ebp, %ebp movsd -0x8(%r13), %xmm0 movl (%r13), %eax movsd %xmm0, (%rsp) andl $-0x2, %eax cmpl %r15d, %eax jne 0x3aaa7 movq (%rsp), %rsi movq %r14, %rdi callq *%rbx incq %rbp movslq 0x20(%r12), %rax addq $0x10, %r13 cmpq %rax, %rbp jl 0x3aa87 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_bound_function_mark: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdi mov r15d, 0FFFFFFFEh mov r12, [rsi+30h] movsd xmm0, qword ptr [r12] mov eax, [r12+8] movsd [rsp+38h+var_38], xmm0 and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_3AA56 mov rsi, [rsp+38h+var_38] mov rdi, r14 call rbx loc_3AA56: movsd xmm0, qword ptr [r12+10h] mov eax, [r12+18h] movsd [rsp+38h+var_38], xmm0 and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_3AA78 mov rsi, [rsp+38h+var_38] mov rdi, r14 call rbx loc_3AA78: cmp dword ptr [r12+20h], 0 jle short loc_3AAB8 lea r13, [r12+30h] xor ebp, ebp loc_3AA87: movsd xmm0, qword ptr [r13-8] mov eax, [r13+0] movsd [rsp+38h+var_38], xmm0 and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_3AAA7 mov rsi, [rsp+38h+var_38] mov rdi, r14 call rbx loc_3AAA7: inc rbp movsxd rax, dword ptr [r12+20h] add r13, 10h cmp rbp, rax jl short loc_3AA87 loc_3AAB8: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_bound_function_mark(long long a1, long long a2, long long a3, void ( *a4)(long long, _QWORD)) { long long v5; // r12 long long result; // rax _DWORD *v7; // r13 long long v8; // rbp v5 = *(_QWORD *)(a2 + 48); if ( (*(_DWORD *)(v5 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)v5); result = *(_DWORD *)(v5 + 24) & 0xFFFFFFFE; if ( (_DWORD)result == -2 ) result = ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v5 + 16)); if ( *(int *)(v5 + 32) > 0 ) { v7 = (_DWORD *)(v5 + 48); v8 = 0LL; do { if ( (*v7 & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *((_QWORD *)v7 - 1)); ++v8; result = *(int *)(v5 + 32); v7 += 4; } while ( v8 < result ); } return result; }
58,262
js_bound_function_mark
bluesky950520[P]quickjs/quickjs.c
static void js_bound_function_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSObject *p = JS_VALUE_GET_OBJ(val); JSBoundFunction *bf = p->u.bound_function; int i; JS_MarkValue(rt, bf->func_obj, mark_func); JS_MarkValue(rt, bf->this_val, mark_func); for(i = 0; i < bf->argc; i++) JS_MarkValue(rt, bf->argv[i], mark_func); }
O2
c
js_bound_function_mark: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdi, %r14 movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE movq 0x30(%rsi), %r12 movl 0x8(%r12), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x33ac6 movq (%r12), %rsi movq %r14, %rdi callq *%rbx movl 0x18(%r12), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x33add movq 0x10(%r12), %rsi movq %r14, %rdi callq *%rbx leaq 0x30(%r12), %r13 xorl %ebp, %ebp movslq 0x20(%r12), %rax cmpq %rax, %rbp jge 0x33b0c movl (%r13), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x33b03 movq -0x8(%r13), %rsi movq %r14, %rdi callq *%rbx incq %rbp addq $0x10, %r13 jmp 0x33ae4 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_bound_function_mark: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdi mov r15d, 0FFFFFFFEh mov r12, [rsi+30h] mov eax, [r12+8] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_33AC6 mov rsi, [r12] mov rdi, r14 call rbx loc_33AC6: mov eax, [r12+18h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_33ADD mov rsi, [r12+10h] mov rdi, r14 call rbx loc_33ADD: lea r13, [r12+30h] xor ebp, ebp loc_33AE4: movsxd rax, dword ptr [r12+20h] cmp rbp, rax jge short loc_33B0C mov eax, [r13+0] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_33B03 mov rsi, [r13-8] mov rdi, r14 call rbx loc_33B03: inc rbp add r13, 10h jmp short loc_33AE4 loc_33B0C: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_bound_function_mark(long long a1, long long a2, long long a3, void ( *a4)(long long, _QWORD)) { long long v5; // r12 _DWORD *v6; // r13 long long i; // rbp long long result; // rax v5 = *(_QWORD *)(a2 + 48); if ( (*(_DWORD *)(v5 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)v5); if ( (*(_DWORD *)(v5 + 24) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v5 + 16)); v6 = (_DWORD *)(v5 + 48); for ( i = 0LL; ; ++i ) { result = *(int *)(v5 + 32); if ( i >= result ) break; if ( (*v6 & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *((_QWORD *)v6 - 1)); v6 += 4; } return result; }
js_bound_function_mark: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDI MOV R15D,0xfffffffe MOV R12,qword ptr [RSI + 0x30] MOV EAX,dword ptr [R12 + 0x8] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x00133ac6 MOV RSI,qword ptr [R12] MOV RDI,R14 CALL RBX LAB_00133ac6: MOV EAX,dword ptr [R12 + 0x18] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x00133add MOV RSI,qword ptr [R12 + 0x10] MOV RDI,R14 CALL RBX LAB_00133add: LEA R13,[R12 + 0x30] XOR EBP,EBP LAB_00133ae4: MOVSXD RAX,dword ptr [R12 + 0x20] CMP RBP,RAX JGE 0x00133b0c MOV EAX,dword ptr [R13] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x00133b03 MOV RSI,qword ptr [R13 + -0x8] MOV RDI,R14 CALL RBX LAB_00133b03: INC RBP ADD R13,0x10 JMP 0x00133ae4 LAB_00133b0c: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void js_bound_function_mark(int8 param_1,long param_2,int8 param_3,code *param_4) { int8 *puVar1; long lVar2; uint *puVar3; puVar1 = *(int8 **)(param_2 + 0x30); if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,*puVar1); } if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,puVar1[2]); } puVar3 = (uint *)(puVar1 + 6); for (lVar2 = 0; lVar2 < *(int *)(puVar1 + 4); lVar2 = lVar2 + 1) { if ((*puVar3 & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,*(int8 *)(puVar3 + -2)); } puVar3 = puVar3 + 4; } return; }
58,263
testing::internal::SuiteApiResolver<YogaTest_HadOverflowTests>::GetTearDownCaseOrSuite(char const*, int)
yoga-mod/tests/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h
static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char* filename, int line_num) { #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ SetUpTearDownSuiteFuncType test_case_fp = GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase); SetUpTearDownSuiteFuncType test_suite_fp = GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite); GTEST_CHECK_(!test_case_fp || !test_suite_fp) << "Test can not provide both TearDownTestSuite and TearDownTestCase," " please make sure there is only one present at" << filename << ":" << line_num; return test_case_fp != nullptr ? test_case_fp : test_suite_fp; #else (void)(filename); (void)(line_num); return &T::TearDownTestSuite; #endif }
O0
c
testing::internal::SuiteApiResolver<YogaTest_HadOverflowTests>::GetTearDownCaseOrSuite(char const*, int): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) leaq -0x68e26(%rip), %rsi # 0x94d80 movq %rsi, %rdi callq 0x94d10 movq %rax, -0x18(%rbp) leaq -0x68e29(%rip), %rsi # 0x94d90 movq %rsi, %rdi callq 0x94d10 movq %rax, -0x20(%rbp) movb $0x1, %al cmpq $0x0, -0x18(%rbp) movb %al, -0x35(%rbp) je 0xfdbde cmpq $0x0, -0x20(%rbp) setne %al xorb $-0x1, %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al movzbl %al, %edi andl $0x1, %edi callq 0x6f3c20 testb $0x1, %al jne 0xfdbf2 jmp 0xfdbf7 jmp 0xfdca2 leaq 0x6479cb(%rip), %rdx # 0x7455c9 leaq -0x24(%rbp), %rdi movq %rdi, -0x48(%rbp) movl $0x3, %esi movl $0x223, %ecx # imm = 0x223 callq 0x6f8ea0 movq -0x48(%rbp), %rdi callq 0x94d60 movq %rax, %rdi leaq 0x647a22(%rip), %rsi # 0x74564a callq 0x35490 movq %rax, -0x40(%rbp) jmp 0xfdc33 movq -0x40(%rbp), %rdi leaq 0x647aaa(%rip), %rsi # 0x7456e8 callq 0x35490 movq %rax, -0x50(%rbp) jmp 0xfdc49 movq -0x50(%rbp), %rdi movq -0x8(%rbp), %rsi callq 0x35490 movq %rax, -0x58(%rbp) jmp 0xfdc5c movq -0x58(%rbp), %rdi leaq 0x6598c9(%rip), %rsi # 0x757530 callq 0x35490 movq %rax, -0x60(%rbp) jmp 0xfdc72 movq -0x60(%rbp), %rdi movl -0xc(%rbp), %esi callq 0x35970 jmp 0xfdc80 leaq -0x24(%rbp), %rdi callq 0x6f8fe0 jmp 0xfdca2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) leaq -0x24(%rbp), %rdi callq 0x6f8fe0 jmp 0xfdcc5 cmpq $0x0, -0x18(%rbp) je 0xfdcb3 movq -0x18(%rbp), %rax movq %rax, -0x68(%rbp) jmp 0xfdcbb movq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax addq $0x70, %rsp popq %rbp retq movq -0x30(%rbp), %rdi callq 0x35990 nop
_ZN7testing8internal16SuiteApiResolverI25YogaTest_HadOverflowTestsE22GetTearDownCaseOrSuiteEPKci: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_C], esi lea rsi, _ZN7testing4Test16TearDownTestCaseEv; void (*)(void) mov rdi, rsi; this call _ZN7testing8internal19GetNotDefaultOrNullEPFvvES2_; testing::internal::GetNotDefaultOrNull(void (*)(void),void (*)(void)) mov [rbp+var_18], rax lea rsi, _ZN7testing4Test17TearDownTestSuiteEv; bool mov rdi, rsi; this call _ZN7testing8internal19GetNotDefaultOrNullEPFvvES2_; testing::internal::GetNotDefaultOrNull(void (*)(void),void (*)(void)) mov [rbp+var_20], rax mov al, 1 cmp [rbp+var_18], 0 mov [rbp+var_35], al jz short loc_FDBDE cmp [rbp+var_20], 0 setnz al xor al, 0FFh mov [rbp+var_35], al loc_FDBDE: mov al, [rbp+var_35] movzx edi, al and edi, 1; this call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool) test al, 1 jnz short loc_FDBF2 jmp short loc_FDBF7 loc_FDBF2: jmp loc_FDCA2 loc_FDBF7: lea rdx, aWorkspaceLlm4b_58; "/workspace/llm4binary/github2025/yoga-m"... lea rdi, [rbp+var_24] mov [rbp+var_48], rdi mov esi, 3 mov ecx, 223h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, [rbp+var_48]; this call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov rdi, rax lea rsi, aConditionTestC; "Condition !test_case_fp || !test_suite_"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_40], rax jmp short $+2 loc_FDC33: mov rdi, [rbp+var_40] lea rsi, aTestCanNotProv_0; "Test can not provide both TearDownTestS"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_50], rax jmp short $+2 loc_FDC49: mov rdi, [rbp+var_50] mov rsi, [rbp+var_8] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_58], rax jmp short $+2 loc_FDC5C: mov rdi, [rbp+var_58] lea rsi, aTrace+6; ":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_60], rax jmp short $+2 loc_FDC72: mov rdi, [rbp+var_60] mov esi, [rbp+var_C] call __ZNSolsEi; std::ostream::operator<<(int) jmp short $+2 loc_FDC80: lea rdi, [rbp+var_24]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_FDCA2 mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax lea rdi, [rbp+var_24]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_FDCC5 loc_FDCA2: cmp [rbp+var_18], 0 jz short loc_FDCB3 mov rax, [rbp+var_18] mov [rbp+var_68], rax jmp short loc_FDCBB loc_FDCB3: mov rax, [rbp+var_20] mov [rbp+var_68], rax loc_FDCBB: mov rax, [rbp+var_68] add rsp, 70h pop rbp retn loc_FDCC5: mov rdi, [rbp+var_30] call __Unwind_Resume
testing::internal * testing::internal::SuiteApiResolver<YogaTest_HadOverflowTests>::GetTearDownCaseOrSuite( long long a1, unsigned int a2, void (*a3)(void)) { void (*v3)(void); // rdx void *Stream; // rax long long v7; // [rsp+10h] [rbp-60h] long long v8; // [rsp+18h] [rbp-58h] long long v9; // [rsp+20h] [rbp-50h] long long v10; // [rsp+30h] [rbp-40h] char v11; // [rsp+3Bh] [rbp-35h] _BYTE v12[4]; // [rsp+4Ch] [rbp-24h] BYREF testing::internal *v13; // [rsp+50h] [rbp-20h] testing::internal *NotDefaultOrNull; // [rsp+58h] [rbp-18h] unsigned int v15; // [rsp+64h] [rbp-Ch] long long v16; // [rsp+68h] [rbp-8h] v16 = a1; v15 = a2; NotDefaultOrNull = testing::internal::GetNotDefaultOrNull( (testing::internal *)testing::Test::TearDownTestCase, (testing::internal *)testing::Test::TearDownTestCase, a3); v13 = testing::internal::GetNotDefaultOrNull( (testing::internal *)testing::Test::TearDownTestSuite, (testing::internal *)testing::Test::TearDownTestSuite, v3); v11 = 1; if ( NotDefaultOrNull ) v11 = ~(v13 != 0LL); if ( (testing::internal::IsTrue((testing::internal *)(v11 & 1), (bool)testing::Test::TearDownTestSuite) & 1) == 0 ) { testing::internal::GTestLog::GTestLog( v12, 3LL, "/workspace/llm4binary/github2025/yoga-mod/tests/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h", 547LL); Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)v12); v10 = std::operator<<<std::char_traits<char>>(Stream, "Condition !test_case_fp || !test_suite_fp failed. "); v9 = std::operator<<<std::char_traits<char>>( v10, "Test can not provide both TearDownTestSuite and TearDownTestCase, please make sure there is only one present at"); v8 = std::operator<<<std::char_traits<char>>(v9, v16); v7 = std::operator<<<std::char_traits<char>>(v8, ":"); std::ostream::operator<<(v7, v15); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v12); } if ( NotDefaultOrNull ) return NotDefaultOrNull; else return v13; }
GetTearDownCaseOrSuite: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI LEA RSI,[0x194d80] MOV RDI,RSI CALL 0x00194d10 MOV qword ptr [RBP + -0x18],RAX LEA RSI,[0x194d90] MOV RDI,RSI CALL 0x00194d10 MOV qword ptr [RBP + -0x20],RAX MOV AL,0x1 CMP qword ptr [RBP + -0x18],0x0 MOV byte ptr [RBP + -0x35],AL JZ 0x001fdbde CMP qword ptr [RBP + -0x20],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x35],AL LAB_001fdbde: MOV AL,byte ptr [RBP + -0x35] MOVZX EDI,AL AND EDI,0x1 CALL 0x007f3c20 TEST AL,0x1 JNZ 0x001fdbf2 JMP 0x001fdbf7 LAB_001fdbf2: JMP 0x001fdca2 LAB_001fdbf7: LEA RDX,[0x8455c9] LEA RDI,[RBP + -0x24] MOV qword ptr [RBP + -0x48],RDI MOV ESI,0x3 MOV ECX,0x223 CALL 0x007f8ea0 MOV RDI,qword ptr [RBP + -0x48] CALL 0x00194d60 MOV RDI,RAX LAB_001fdc21: LEA RSI,[0x84564a] CALL 0x00135490 MOV qword ptr [RBP + -0x40],RAX JMP 0x001fdc33 LAB_001fdc33: MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[0x8456e8] CALL 0x00135490 MOV qword ptr [RBP + -0x50],RAX JMP 0x001fdc49 LAB_001fdc49: MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x8] CALL 0x00135490 MOV qword ptr [RBP + -0x58],RAX JMP 0x001fdc5c LAB_001fdc5c: MOV RDI,qword ptr [RBP + -0x58] LEA RSI,[0x857530] CALL 0x00135490 MOV qword ptr [RBP + -0x60],RAX JMP 0x001fdc72 LAB_001fdc72: MOV RDI,qword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + -0xc] CALL 0x00135970 LAB_001fdc7e: JMP 0x001fdc80 LAB_001fdc80: LEA RDI,[RBP + -0x24] CALL 0x007f8fe0 JMP 0x001fdca2 LAB_001fdca2: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001fdcb3 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x68],RAX JMP 0x001fdcbb LAB_001fdcb3: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX LAB_001fdcbb: MOV RAX,qword ptr [RBP + -0x68] ADD RSP,0x70 POP RBP RET
/* testing::internal::SuiteApiResolver<YogaTest_HadOverflowTests>::GetTearDownCaseOrSuite(char const*, int) */ long testing::internal::SuiteApiResolver<YogaTest_HadOverflowTests>::GetTearDownCaseOrSuite (char *param_1,int param_2) { ulong uVar1; ostream *poVar2; long local_70; byte local_3d; GTestLog local_2c [4]; long local_28; long local_20; int local_14; char *local_10; local_14 = param_2; local_10 = param_1; local_20 = GetNotDefaultOrNull(Test::TearDownTestCase,Test::TearDownTestCase); local_28 = GetNotDefaultOrNull(Test::TearDownTestSuite,Test::TearDownTestSuite); local_3d = 1; if (local_20 != 0) { local_3d = local_28 != 0 ^ 0xff; } uVar1 = IsTrue((bool)(local_3d & 1)); if ((uVar1 & 1) == 0) { GTestLog::GTestLog(local_2c,3, "/workspace/llm4binary/github2025/yoga-mod/tests/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h" ,0x223); poVar2 = (ostream *)GTestLog::GetStream(); /* try { // try from 001fdc21 to 001fdc7d has its CatchHandler @ 001fdc8b */ poVar2 = std::operator<<(poVar2,"Condition !test_case_fp || !test_suite_fp failed. "); poVar2 = std::operator<<(poVar2, "Test can not provide both TearDownTestSuite and TearDownTestCase, please make sure there is only one present at" ); poVar2 = std::operator<<(poVar2,local_10); poVar2 = std::operator<<(poVar2,":"); std::ostream::operator<<(poVar2,local_14); GTestLog::~GTestLog(local_2c); } if (local_20 == 0) { local_70 = local_28; } else { local_70 = local_20; } return local_70; }
58,264
translog_record_read_next_chunk
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_record_read_next_chunk(TRANSLOG_READER_DATA *data) { translog_size_t new_current_offset= data->current_offset + data->chunk_size; uint16 chunk_header_len, chunk_len; uint8 type; DBUG_ENTER("translog_record_read_next_chunk"); if (data->eor) { DBUG_PRINT("info", ("end of the record flag set")); DBUG_RETURN(1); } if (data->header.groups_no && data->header.groups_no - 1 != data->current_group && data->header.groups[data->current_group].num == data->current_chunk) { /* Goto next group */ data->current_group++; data->current_chunk= 0; DBUG_PRINT("info", ("skip to group: #%u", data->current_group)); translog_destroy_scanner(&data->scanner); translog_scanner_init(data->header.groups[data->current_group].addr, 1, &data->scanner, 1); } else { data->current_chunk++; if (translog_get_next_chunk(&data->scanner)) DBUG_RETURN(1); if (data->scanner.page == END_OF_LOG) { /* Actually it should not happened, but we want to quit nicely in case of a truncated log */ DBUG_RETURN(1); } } type= data->scanner.page[data->scanner.page_offset] & TRANSLOG_CHUNK_TYPE; if (type == TRANSLOG_CHUNK_LSN && data->header.groups_no) { DBUG_PRINT("info", ("Last chunk: data len: %u offset: %u group: %u of %u", data->header.chunk0_data_len, data->scanner.page_offset, data->current_group, data->header.groups_no - 1)); DBUG_ASSERT(data->header.groups_no - 1 == data->current_group); DBUG_ASSERT(data->header.lsn == data->scanner.page_addr + data->scanner.page_offset); translog_destroy_scanner(&data->scanner); translog_scanner_init(data->header.chunk0_data_addr, 1, &data->scanner, 1); data->chunk_size= data->header.chunk0_data_len; data->body_offset= data->scanner.page_offset; data->current_offset= new_current_offset; data->eor= 1; DBUG_RETURN(0); } if (type == TRANSLOG_CHUNK_LSN || type == TRANSLOG_CHUNK_FIXED) { data->eor= 1; DBUG_RETURN(1); /* End of record */ } chunk_header_len= translog_get_chunk_header_length(data->scanner.page + data->scanner.page_offset); chunk_len= translog_get_total_chunk_length(data->scanner.page, data->scanner.page_offset); data->chunk_size= chunk_len - chunk_header_len; data->body_offset= data->scanner.page_offset + chunk_header_len; data->current_offset= new_current_offset; DBUG_PRINT("info", ("grp: %u chunk: %u body_offset: %u chunk_size: %u " "current_offset: %lu", (uint) data->current_group, (uint) data->current_chunk, (uint) data->body_offset, (uint) data->chunk_size, (ulong) data->current_offset)); DBUG_RETURN(0); }
O0
c
translog_record_read_next_chunk: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x246c(%rax), %eax movq -0x10(%rbp), %rcx movzwl 0x2472(%rcx), %ecx addl %ecx, %eax movl %eax, -0x14(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x247c(%rax) je 0x4b752 jmp 0x4b745 jmp 0x4b747 jmp 0x4b749 movb $0x1, -0x1(%rbp) jmp 0x4b9db movq -0x10(%rbp), %rax cmpl $0x0, 0x418(%rax) je 0x4b811 movq -0x10(%rbp), %rax movl 0x418(%rax), %eax subl $0x1, %eax movq -0x10(%rbp), %rcx cmpl 0x2474(%rcx), %eax je 0x4b811 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2474(%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movzbl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x2478(%rcx), %eax jne 0x4b811 movq -0x10(%rbp), %rax movl 0x2474(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x2474(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2478(%rax) jmp 0x4b7cc movq -0x10(%rbp), %rdi addq $0x438, %rdi # imm = 0x438 callq 0x48b90 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2474(%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq -0x10(%rbp), %rdx addq $0x438, %rdx # imm = 0x438 movl $0x1, %ecx movl %ecx, %esi callq 0x48860 jmp 0x4b864 movq -0x10(%rbp), %rax movl 0x2478(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x2478(%rax) movq -0x10(%rbp), %rdi addq $0x438, %rdi # imm = 0x438 callq 0x489b0 cmpb $0x0, %al je 0x4b843 jmp 0x4b83a movb $0x1, -0x1(%rbp) jmp 0x4b9db movq -0x10(%rbp), %rax leaq 0xc63e12(%rip), %rcx # 0xcaf660 cmpq %rcx, 0x2450(%rax) jne 0x4b862 jmp 0x4b859 movb $0x1, -0x1(%rbp) jmp 0x4b9db jmp 0x4b864 movq -0x10(%rbp), %rax movq 0x2450(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2460(%rcx), %ecx movzbl (%rax,%rcx), %eax andl $0xc0, %eax movb %al, -0x19(%rbp) movzbl -0x19(%rbp), %eax cmpl $0x0, %eax jne 0x4b92c movq -0x10(%rbp), %rax cmpl $0x0, 0x418(%rax) je 0x4b92c jmp 0x4b8a5 jmp 0x4b8a7 jmp 0x4b8a9 jmp 0x4b8ab jmp 0x4b8ad jmp 0x4b8af movq -0x10(%rbp), %rdi addq $0x438, %rdi # imm = 0x438 callq 0x48b90 movq -0x10(%rbp), %rax movq 0x428(%rax), %rdi movq -0x10(%rbp), %rdx addq $0x438, %rdx # imm = 0x438 movl $0x1, %ecx movl %ecx, %esi callq 0x48860 movq -0x10(%rbp), %rax movw 0x436(%rax), %cx movq -0x10(%rbp), %rax movw %cx, 0x2472(%rax) movq -0x10(%rbp), %rax movl 0x2460(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2468(%rax) movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x246c(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x247c(%rax) movb $0x0, -0x1(%rbp) jmp 0x4b9db movzbl -0x19(%rbp), %eax cmpl $0x0, %eax je 0x4b93e movzbl -0x19(%rbp), %eax cmpl $0x40, %eax jne 0x4b952 movq -0x10(%rbp), %rax movb $0x1, 0x247c(%rax) movb $0x1, -0x1(%rbp) jmp 0x4b9db movq -0x10(%rbp), %rax movq 0x2450(%rax), %rdi movq -0x10(%rbp), %rax movl 0x2460(%rax), %eax addq %rax, %rdi callq 0x522a0 movw %ax, -0x16(%rbp) movq -0x10(%rbp), %rax movq 0x2450(%rax), %rdi movq -0x10(%rbp), %rax movl 0x2460(%rax), %eax movzwl %ax, %esi callq 0x482a0 movw %ax, -0x18(%rbp) movzwl -0x18(%rbp), %eax movzwl -0x16(%rbp), %ecx subl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x2472(%rax) movq -0x10(%rbp), %rax movl 0x2460(%rax), %ecx movzwl -0x16(%rbp), %eax addl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2468(%rax) movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x246c(%rax) jmp 0x4b9d5 jmp 0x4b9d7 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_record_read_next_chunk: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax+246Ch] mov rcx, [rbp+var_10] movzx ecx, word ptr [rcx+2472h] add eax, ecx mov [rbp+var_14], eax mov rax, [rbp+var_10] cmp byte ptr [rax+247Ch], 0 jz short loc_4B752 jmp short $+2 loc_4B745: jmp short $+2 loc_4B747: jmp short $+2 loc_4B749: mov [rbp+var_1], 1 jmp loc_4B9DB loc_4B752: mov rax, [rbp+var_10] cmp dword ptr [rax+418h], 0 jz loc_4B811 mov rax, [rbp+var_10] mov eax, [rax+418h] sub eax, 1 mov rcx, [rbp+var_10] cmp eax, [rcx+2474h] jz loc_4B811 mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov ecx, [rcx+2474h] shl rcx, 4 add rax, rcx movzx eax, byte ptr [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+2478h] jnz short loc_4B811 mov rax, [rbp+var_10] mov ecx, [rax+2474h] add ecx, 1 mov [rax+2474h], ecx mov rax, [rbp+var_10] mov dword ptr [rax+2478h], 0 jmp short $+2 loc_4B7CC: mov rdi, [rbp+var_10] add rdi, 438h call translog_destroy_scanner mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov ecx, [rcx+2474h] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rdx, [rbp+var_10] add rdx, 438h mov ecx, 1 mov esi, ecx call translog_scanner_init jmp short loc_4B864 loc_4B811: mov rax, [rbp+var_10] mov ecx, [rax+2478h] add ecx, 1 mov [rax+2478h], ecx mov rdi, [rbp+var_10] add rdi, 438h call translog_get_next_chunk cmp al, 0 jz short loc_4B843 jmp short $+2 loc_4B83A: mov [rbp+var_1], 1 jmp loc_4B9DB loc_4B843: mov rax, [rbp+var_10] lea rcx, end_of_log cmp [rax+2450h], rcx jnz short loc_4B862 jmp short $+2 loc_4B859: mov [rbp+var_1], 1 jmp loc_4B9DB loc_4B862: jmp short $+2 loc_4B864: mov rax, [rbp+var_10] mov rax, [rax+2450h] mov rcx, [rbp+var_10] mov ecx, [rcx+2460h] movzx eax, byte ptr [rax+rcx] and eax, 0C0h mov [rbp+var_19], al movzx eax, [rbp+var_19] cmp eax, 0 jnz loc_4B92C mov rax, [rbp+var_10] cmp dword ptr [rax+418h], 0 jz loc_4B92C jmp short $+2 loc_4B8A5: jmp short $+2 loc_4B8A7: jmp short $+2 loc_4B8A9: jmp short $+2 loc_4B8AB: jmp short $+2 loc_4B8AD: jmp short $+2 loc_4B8AF: mov rdi, [rbp+var_10] add rdi, 438h call translog_destroy_scanner mov rax, [rbp+var_10] mov rdi, [rax+428h] mov rdx, [rbp+var_10] add rdx, 438h mov ecx, 1 mov esi, ecx call translog_scanner_init mov rax, [rbp+var_10] mov cx, [rax+436h] mov rax, [rbp+var_10] mov [rax+2472h], cx mov rax, [rbp+var_10] mov ecx, [rax+2460h] mov rax, [rbp+var_10] mov [rax+2468h], ecx mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+246Ch], ecx mov rax, [rbp+var_10] mov byte ptr [rax+247Ch], 1 mov [rbp+var_1], 0 jmp loc_4B9DB loc_4B92C: movzx eax, [rbp+var_19] cmp eax, 0 jz short loc_4B93E movzx eax, [rbp+var_19] cmp eax, 40h ; '@' jnz short loc_4B952 loc_4B93E: mov rax, [rbp+var_10] mov byte ptr [rax+247Ch], 1 mov [rbp+var_1], 1 jmp loc_4B9DB loc_4B952: mov rax, [rbp+var_10] mov rdi, [rax+2450h] mov rax, [rbp+var_10] mov eax, [rax+2460h] add rdi, rax call translog_get_chunk_header_length mov [rbp+var_16], ax mov rax, [rbp+var_10] mov rdi, [rax+2450h] mov rax, [rbp+var_10] mov eax, [rax+2460h] movzx esi, ax call translog_get_total_chunk_length mov [rbp+var_18], ax movzx eax, [rbp+var_18] movzx ecx, [rbp+var_16] sub eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+2472h], cx mov rax, [rbp+var_10] mov ecx, [rax+2460h] movzx eax, [rbp+var_16] add ecx, eax mov rax, [rbp+var_10] mov [rax+2468h], ecx mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+246Ch], ecx jmp short $+2 loc_4B9D5: jmp short $+2 loc_4B9D7: mov [rbp+var_1], 0 loc_4B9DB: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char translog_record_read_next_chunk(long long a1) { char v2; // [rsp+7h] [rbp-19h] unsigned __int16 chunk_header_length; // [rsp+Ah] [rbp-16h] int v4; // [rsp+Ch] [rbp-14h] v4 = *(unsigned __int16 *)(a1 + 9330) + *(_DWORD *)(a1 + 9324); if ( *(_BYTE *)(a1 + 9340) ) return 1; if ( *(_DWORD *)(a1 + 1048) && *(_DWORD *)(a1 + 1048) - 1 != *(_DWORD *)(a1 + 9332) && *(unsigned __int8 *)(16LL * *(unsigned int *)(a1 + 9332) + *(_QWORD *)(a1 + 8) + 8) == *(_DWORD *)(a1 + 9336) ) { ++*(_DWORD *)(a1 + 9332); *(_DWORD *)(a1 + 9336) = 0; translog_destroy_scanner(a1 + 1080); translog_scanner_init(*(_QWORD *)(16LL * *(unsigned int *)(a1 + 9332) + *(_QWORD *)(a1 + 8)), 1, a1 + 1080, 1); } else { ++*(_DWORD *)(a1 + 9336); if ( translog_get_next_chunk(a1 + 1080) ) return 1; if ( *(_UNKNOWN **)(a1 + 9296) == &end_of_log ) return 1; } v2 = *(_BYTE *)(*(_QWORD *)(a1 + 9296) + *(unsigned int *)(a1 + 9312)) & 0xC0; if ( v2 || !*(_DWORD *)(a1 + 1048) ) { if ( v2 && v2 != 64 ) { chunk_header_length = translog_get_chunk_header_length(*(unsigned int *)(a1 + 9312) + *(_QWORD *)(a1 + 9296)); *(_WORD *)(a1 + 9330) = translog_get_total_chunk_length(*(_QWORD *)(a1 + 9296), *(_DWORD *)(a1 + 9312)) - chunk_header_length; *(_DWORD *)(a1 + 9320) = chunk_header_length + *(_DWORD *)(a1 + 9312); *(_DWORD *)(a1 + 9324) = v4; return 0; } else { *(_BYTE *)(a1 + 9340) = 1; return 1; } } else { translog_destroy_scanner(a1 + 1080); translog_scanner_init(*(_QWORD *)(a1 + 1064), 1, a1 + 1080, 1); *(_WORD *)(a1 + 9330) = *(_WORD *)(a1 + 1078); *(_DWORD *)(a1 + 9320) = *(_DWORD *)(a1 + 9312); *(_DWORD *)(a1 + 9324) = v4; *(_BYTE *)(a1 + 9340) = 1; return 0; } }
translog_record_read_next_chunk: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x246c] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RCX + 0x2472] ADD EAX,ECX MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x247c],0x0 JZ 0x0014b752 JMP 0x0014b745 LAB_0014b745: JMP 0x0014b747 LAB_0014b747: JMP 0x0014b749 LAB_0014b749: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014b9db LAB_0014b752: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x418],0x0 JZ 0x0014b811 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x418] SUB EAX,0x1 MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x2474] JZ 0x0014b811 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2474] SHL RCX,0x4 ADD RAX,RCX MOVZX EAX,byte ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x2478] JNZ 0x0014b811 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2474] ADD ECX,0x1 MOV dword ptr [RAX + 0x2474],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2478],0x0 JMP 0x0014b7cc LAB_0014b7cc: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x438 CALL 0x00148b90 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2474] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x438 MOV ECX,0x1 MOV ESI,ECX CALL 0x00148860 JMP 0x0014b864 LAB_0014b811: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2478] ADD ECX,0x1 MOV dword ptr [RAX + 0x2478],ECX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x438 CALL 0x001489b0 CMP AL,0x0 JZ 0x0014b843 JMP 0x0014b83a LAB_0014b83a: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014b9db LAB_0014b843: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0xdaf660] CMP qword ptr [RAX + 0x2450],RCX JNZ 0x0014b862 JMP 0x0014b859 LAB_0014b859: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014b9db LAB_0014b862: JMP 0x0014b864 LAB_0014b864: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2450] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2460] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0xc0 MOV byte ptr [RBP + -0x19],AL MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x0 JNZ 0x0014b92c MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x418],0x0 JZ 0x0014b92c JMP 0x0014b8a5 LAB_0014b8a5: JMP 0x0014b8a7 LAB_0014b8a7: JMP 0x0014b8a9 LAB_0014b8a9: JMP 0x0014b8ab LAB_0014b8ab: JMP 0x0014b8ad LAB_0014b8ad: JMP 0x0014b8af LAB_0014b8af: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x438 CALL 0x00148b90 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x428] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x438 MOV ECX,0x1 MOV ESI,ECX CALL 0x00148860 MOV RAX,qword ptr [RBP + -0x10] MOV CX,word ptr [RAX + 0x436] MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x2472],CX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2460] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2468],ECX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x246c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x247c],0x1 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014b9db LAB_0014b92c: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x0 JZ 0x0014b93e MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x40 JNZ 0x0014b952 LAB_0014b93e: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x247c],0x1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014b9db LAB_0014b952: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x2450] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2460] ADD RDI,RAX CALL 0x001522a0 MOV word ptr [RBP + -0x16],AX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x2450] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2460] MOVZX ESI,AX CALL 0x001482a0 MOV word ptr [RBP + -0x18],AX MOVZX EAX,word ptr [RBP + -0x18] MOVZX ECX,word ptr [RBP + -0x16] SUB EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x2472],CX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2460] MOVZX EAX,word ptr [RBP + -0x16] ADD ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2468],ECX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x246c],ECX JMP 0x0014b9d5 LAB_0014b9d5: JMP 0x0014b9d7 LAB_0014b9d7: MOV byte ptr [RBP + -0x1],0x0 LAB_0014b9db: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 translog_record_read_next_chunk(long param_1) { char cVar1; byte bVar2; ushort uVar3; short sVar4; int iVar5; int1 local_9; iVar5 = *(int *)(param_1 + 0x246c) + (uint)*(ushort *)(param_1 + 0x2472); if (*(char *)(param_1 + 0x247c) != '\0') { return 1; } if (((*(int *)(param_1 + 0x418) == 0) || (*(int *)(param_1 + 0x418) + -1 == *(int *)(param_1 + 0x2474))) || ((uint)*(byte *)(*(long *)(param_1 + 8) + (ulong)*(uint *)(param_1 + 0x2474) * 0x10 + 8) != *(uint *)(param_1 + 0x2478))) { *(int *)(param_1 + 0x2478) = *(int *)(param_1 + 0x2478) + 1; cVar1 = translog_get_next_chunk(param_1 + 0x438); if (cVar1 != '\0') { return 1; } if (*(int1 **)(param_1 + 0x2450) == &end_of_log) { return 1; } } else { *(int *)(param_1 + 0x2474) = *(int *)(param_1 + 0x2474) + 1; *(int4 *)(param_1 + 0x2478) = 0; translog_destroy_scanner(param_1 + 0x438); translog_scanner_init (*(int8 *)(*(long *)(param_1 + 8) + (ulong)*(uint *)(param_1 + 0x2474) * 0x10),1 ,param_1 + 0x438); } bVar2 = *(byte *)(*(long *)(param_1 + 0x2450) + (ulong)*(uint *)(param_1 + 0x2460)) & 0xc0; if ((bVar2 == 0) && (*(int *)(param_1 + 0x418) != 0)) { translog_destroy_scanner(param_1 + 0x438); translog_scanner_init(*(int8 *)(param_1 + 0x428),1,param_1 + 0x438); *(int2 *)(param_1 + 0x2472) = *(int2 *)(param_1 + 0x436); *(int4 *)(param_1 + 0x2468) = *(int4 *)(param_1 + 0x2460); *(int *)(param_1 + 0x246c) = iVar5; *(int1 *)(param_1 + 0x247c) = 1; local_9 = 0; } else if ((bVar2 == 0) || (bVar2 == 0x40)) { *(int1 *)(param_1 + 0x247c) = 1; local_9 = 1; } else { uVar3 = translog_get_chunk_header_length (*(long *)(param_1 + 0x2450) + (ulong)*(uint *)(param_1 + 0x2460)); sVar4 = translog_get_total_chunk_length (*(int8 *)(param_1 + 0x2450),*(uint *)(param_1 + 0x2460) & 0xffff); *(ushort *)(param_1 + 0x2472) = sVar4 - uVar3; *(uint *)(param_1 + 0x2468) = *(int *)(param_1 + 0x2460) + (uint)uVar3; *(int *)(param_1 + 0x246c) = iVar5; local_9 = 0; } return local_9; }
58,265
void testing::internal::InitGoogleTestImpl<char>(int*, char**)
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc
void InitGoogleTestImpl(int* argc, CharType** argv) { // We don't want to run the initialization code twice. if (GTestIsInitialized()) return; if (*argc <= 0) return; g_argvs.clear(); for (int i = 0; i != *argc; i++) { g_argvs.push_back(StreamableToString(argv[i])); } #ifdef GTEST_HAS_ABSL absl::InitializeSymbolizer(g_argvs[0].c_str()); #ifdef GTEST_HAS_ABSL_FLAGS // When using the Abseil Flags library, set the program usage message to the // help message, but remove the color-encoding from the message first. absl::SetProgramUsageMessage(absl::StrReplaceAll( kColorEncodedHelpMessage, {{"@D", ""}, {"@R", ""}, {"@G", ""}, {"@Y", ""}, {"@@", "@"}})); #endif // GTEST_HAS_ABSL_FLAGS #endif // GTEST_HAS_ABSL ParseGoogleTestFlagsOnly(argc, argv); GetUnitTestImpl()->PostFlagParsingInit(); }
O3
cpp
void testing::internal::InitGoogleTestImpl<char>(int*, char**): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r13 movq %rdi, %r14 leaq 0x3db2b(%rip), %rsi # 0xb4b88 leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x73db2 movq (%r15), %rbx movq 0x8(%r15), %r12 movq %r15, %rdi callq 0x73be2 cmpq %r12, %rbx jne 0x77119 cmpl $0x0, (%r14) jle 0x77119 movq %r13, (%rsp) movq 0x3daf1(%rip), %rsi # 0xb4b88 leaq 0x3daea(%rip), %rdi # 0xb4b88 callq 0x7e690 cmpl $0x0, (%r14) je 0x770fc leaq 0x18(%rsp), %rbp xorl %ebx, %ebx leaq 0x8(%rsp), %r15 leaq 0x3dacc(%rip), %r12 # 0xb4b88 movq (%rsp), %r13 movq %r15, %rdi movq %r13, %rsi callq 0x7e593 movq %r12, %rdi movq %r15, %rsi callq 0x7bde2 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x770ed movq 0x18(%rsp), %rsi incq %rsi callq 0x11120 incq %rbx movl (%r14), %eax addq $0x8, %r13 cmpq %rax, %rbx jne 0x770c0 movq %r14, %rdi movq (%rsp), %rsi callq 0x76cfa callq 0x5a66a movq 0x3dad4(%rip), %rdi # 0xb4be8 callq 0x6fff0 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x77142 movq 0x18(%rsp), %rsi incq %rsi callq 0x11120 movq %rbx, %rdi callq 0x11760
_ZN7testing8internal18InitGoogleTestImplIcEEvPiPPT_: push rbp push r15 push r14 push r13 push r12; __int64 push rbx; int sub rsp, 28h mov r13, rsi mov r14, rdi lea rsi, _ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs lea r15, [rsp+58h+var_50] mov rdi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov rbx, [r15] mov r12, [r15+8] mov rdi, r15; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() cmp rbx, r12 jnz loc_77119 cmp dword ptr [r14], 0 jle loc_77119 mov [rsp+58h+var_58], r13; void * mov rsi, qword ptr cs:_ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs lea rdi, _ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE15_M_erase_at_endEPS5_; std::vector<std::string>::_M_erase_at_end(std::string*) cmp dword ptr [r14], 0 jz short loc_770FC lea rbp, [rsp+58h+var_40] xor ebx, ebx lea r15, [rsp+58h+var_50] lea r12, _ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs mov r13, [rsp+58h+var_58] loc_770C0: mov rdi, r15 mov rsi, r13 call _ZN7testing8internal18StreamableToStringIPcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<char *>(char * const&) mov rdi, r12 mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+58h+var_50]; void * cmp rdi, rbp jz short loc_770ED mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_770ED: inc rbx mov eax, [r14] add r13, 8 cmp rbx, rax jnz short loc_770C0 loc_770FC: mov rdi, r14; this mov rsi, [rsp+58h+var_58]; int call _ZN7testing8internal28ParseGoogleTestFlagsOnlyImplIcEEvPiPPT_; testing::internal::ParseGoogleTestFlagsOnlyImpl<char>(int *,char **) call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, cs:qword_B4BE8; this call _ZN7testing8internal12UnitTestImpl19PostFlagParsingInitEv; testing::internal::UnitTestImpl::PostFlagParsingInit(void) loc_77119: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, rbp jz short loc_77142 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77142: mov rdi, rbx call __Unwind_Resume
void testing::internal::InitGoogleTestImpl<char>( testing::UnitTest *this, const char *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { const char *v10; // r13 void *v11; // rbx void *v12; // r12 double v13; // xmm4_8 double v14; // xmm5_8 long long v15; // rbx long long v16; // rdx int v17; // ecx int v18; // r8d int v19; // r9d void *v20[2]; // [rsp+8h] [rbp-50h] BYREF long long v21; // [rsp+18h] [rbp-40h] BYREF v10 = a2; std::vector<std::string>::vector((long long)v20, &testing::internal::g_argvs[abi:cxx11]); v11 = v20[0]; v12 = v20[1]; std::vector<std::string>::~vector(v20); if ( v11 == v12 && *(int *)this > 0 ) { std::vector<std::string>::_M_erase_at_end( &testing::internal::g_argvs[abi:cxx11], testing::internal::g_argvs[abi:cxx11]); if ( *(_DWORD *)this ) { v15 = 0LL; do { testing::internal::StreamableToString<char *>(v20, v10); std::vector<std::string>::emplace_back<std::string>(&testing::internal::g_argvs[abi:cxx11], v20); if ( v20[0] != &v21 ) operator delete(v20[0], v21 + 1); ++v15; v10 += 8; } while ( v15 != *(_DWORD *)this ); } testing::internal::ParseGoogleTestFlagsOnlyImpl<char>(this, a2, a3, a4, a5, a6, v13, v14, a9, a10); testing::UnitTest::GetInstance(this); testing::internal::UnitTestImpl::PostFlagParsingInit(qword_B4BE8, (long long)a2, v16, v17, v18, v19); } }
InitGoogleTestImpl<char>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R13,RSI MOV R14,RDI LEA RSI,[0x1b4b88] LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00173db2 MOV RBX,qword ptr [R15] MOV R12,qword ptr [R15 + 0x8] MOV RDI,R15 CALL 0x00173be2 CMP RBX,R12 JNZ 0x00177119 CMP dword ptr [R14],0x0 JLE 0x00177119 MOV qword ptr [RSP],R13 MOV RSI,qword ptr [0x001b4b88] LEA RDI,[0x1b4b88] CALL 0x0017e690 CMP dword ptr [R14],0x0 JZ 0x001770fc LEA RBP,[RSP + 0x18] XOR EBX,EBX LEA R15,[RSP + 0x8] LEA R12,[0x1b4b88] MOV R13,qword ptr [RSP] LAB_001770c0: MOV RDI,R15 MOV RSI,R13 CALL 0x0017e593 LAB_001770cb: MOV RDI,R12 MOV RSI,R15 CALL 0x0017bde2 LAB_001770d6: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001770ed MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00111120 LAB_001770ed: INC RBX MOV EAX,dword ptr [R14] ADD R13,0x8 CMP RBX,RAX JNZ 0x001770c0 LAB_001770fc: MOV RDI,R14 MOV RSI,qword ptr [RSP] CALL 0x00176cfa CALL 0x0015a66a MOV RDI,qword ptr [0x001b4be8] CALL 0x0016fff0 LAB_00177119: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* void testing::internal::InitGoogleTestImpl<char>(int*, char**) */ void testing::internal::InitGoogleTestImpl<char>(int *param_1,char **param_2) { long *plVar1; ulong uVar2; char **ppcVar3; long *local_50; long *local_48; long local_40 [2]; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_50, (vector *)&g_argvs_abi_cxx11_); plVar1 = local_50; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_50); if ((plVar1 == local_48) && (0 < *param_1)) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_erase_at_end ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) &g_argvs_abi_cxx11_,g_argvs_abi_cxx11_); if (*param_1 != 0) { uVar2 = 0; ppcVar3 = param_2; do { StreamableToString<char*>((internal *)&local_50,ppcVar3); /* try { // try from 001770cb to 001770d5 has its CatchHandler @ 00177128 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) &g_argvs_abi_cxx11_,(string *)&local_50); if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } uVar2 = uVar2 + 1; ppcVar3 = ppcVar3 + 1; } while (uVar2 != (uint)*param_1); } ParseGoogleTestFlagsOnlyImpl<char>(param_1,param_2); UnitTest::GetInstance(); UnitTestImpl::PostFlagParsingInit((UnitTestImpl *)UnitTest::GetInstance()::instance._64_8_); } return; }
58,266
testing::internal::DeathTestAbort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-death-test.cc
[[noreturn]] static void DeathTestAbort(const std::string& message) { // On a POSIX system, this function may be called from a threadsafe-style // death test child process, which operates on a very small stack. Use // the heap for any additional non-minuscule memory requirements. const InternalRunDeathTestFlag* const flag = GetUnitTestImpl()->internal_run_death_test_flag(); if (flag != nullptr) { FILE* parent = posix::FDOpen(flag->write_fd(), "w"); fputc(kDeathTestInternalError, parent); fprintf(parent, "%s", message.c_str()); fflush(parent); _Exit(1); } else { fprintf(stderr, "%s", message.c_str()); fflush(stderr); posix::Abort(); } }
O3
cpp
testing::internal::DeathTestAbort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x5a66a movq 0x64e50(%rip), %rax # 0xb4be8 movq 0x2a8(%rax), %rax testq %rax, %rax jne 0x4fdc3 movq 0x641bd(%rip), %r14 # 0xb3f68 movq (%r14), %rsi movq (%rbx), %rdi callq 0x113d0 movq (%r14), %rdi callq 0x11610 callq 0x73dab movl 0x28(%rax), %edi leaq 0x37def(%rip), %rsi # 0x87bbc callq 0x77953 movq %rax, %r14 movl $0x49, %edi movq %rax, %rsi callq 0x119f0 movq (%rbx), %rdi movq %r14, %rsi callq 0x113d0 movq %r14, %rdi callq 0x11610 movl $0x1, %edi callq 0x11230 nop
_ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov rbx, rdi call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rax, cs:qword_B4BE8 mov rax, [rax+2A8h] test rax, rax jnz short loc_4FDC3 mov r14, cs:stderr_ptr mov rsi, [r14] mov rdi, [rbx] call _fputs mov rdi, [r14]; this call _fflush call _ZN7testing8internal5posix5AbortEv; testing::internal::posix::Abort(void) loc_4FDC3: mov edi, [rax+28h]; this lea rsi, aW; "w" call _ZN7testing8internal5posix6FDOpenEiPKc; testing::internal::posix::FDOpen(int,char const*) mov r14, rax mov edi, 49h ; 'I' mov rsi, rax call _fputc mov rdi, [rbx] mov rsi, r14 call _fputs mov rdi, r14 call _fflush mov edi, 1 call __Exit nop
long long testing::internal::DeathTestAbort( testing::UnitTest *a1, long long a2, long long a3, long long a4, long long a5, long long a6, char a7) { const char *v7; // rdx long long v8; // rax testing::internal::posix *v9; // rdi long long v10; // r14 int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d testing::UnitTest::GetInstance(a1); v8 = *((_QWORD *)qword_B4BE8 + 85); if ( !v8 ) { fputs(*(_QWORD *)a1, stderr); v9 = (testing::internal::posix *)stderr; fflush(stderr); testing::internal::posix::Abort(v9); } v10 = testing::internal::posix::FDOpen((testing::internal::posix *)*(unsigned int *)(v8 + 40), (int)"w", v7); fputc(73LL, v10); fputs(*(_QWORD *)a1, v10); fflush(v10); _Exit(1LL); return testing::internal::DeathTest::Create(1, v10, v11, v12, v13, v14, a7); }
DeathTestAbort: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0015a66a MOV RAX,qword ptr [0x001b4be8] MOV RAX,qword ptr [RAX + 0x2a8] TEST RAX,RAX JNZ 0x0014fdc3 MOV R14,qword ptr [0x001b3f68] MOV RSI,qword ptr [R14] MOV RDI,qword ptr [RBX] CALL 0x001113d0 MOV RDI,qword ptr [R14] CALL 0x00111610 CALL 0x00173dab LAB_0014fdc3: MOV EDI,dword ptr [RAX + 0x28] LEA RSI,[0x187bbc] CALL 0x00177953 MOV R14,RAX MOV EDI,0x49 MOV RSI,RAX CALL 0x001119f0 MOV RDI,qword ptr [RBX] MOV RSI,R14 CALL 0x001113d0 MOV RDI,R14 CALL 0x00111610 MOV EDI,0x1 CALL 0x00111230 NOP
/* testing::internal::DeathTestAbort(std::__cxx11::string const&) */ int4 testing::internal::DeathTestAbort(string *param_1) { long *plVar1; int *puVar2; int4 uVar3; long lVar4; FILE *__stream; int4 in_ECX; int8 extraout_RDX; FILE *pFVar5; int8 uVar6; int8 in_R8; int **ppuStack_58; char *pcStack_50; char *pcStack_48; string *psStack_40; UnitTest::GetInstance(); puVar2 = PTR_stderr_001b3f68; lVar4 = *(long *)(UnitTest::GetInstance()::instance._64_8_ + 0x2a8); if (lVar4 == 0) { fputs(*(char **)param_1,*(FILE **)PTR_stderr_001b3f68); fflush(*(FILE **)puVar2); lVar4 = posix::Abort(); } __stream = (FILE *)posix::FDOpen(*(int *)(lVar4 + 0x28),"w"); fputc(0x49,__stream); pFVar5 = __stream; fputs(*(char **)param_1,__stream); fflush(__stream); uVar6 = 1; _Exit(1); psStack_40 = param_1; UnitTest::GetInstance(); plVar1 = *(long **)(UnitTest::GetInstance()::instance._64_8_ + 0x2b0); pcStack_50 = pFVar5->_IO_read_ptr; pcStack_48 = pFVar5->_IO_read_end; pFVar5->_IO_read_ptr = (char *)0x0; ppuStack_58 = &PTR__MatcherBase_001b3668; uVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,uVar6,&ppuStack_58,extraout_RDX,in_ECX,in_R8); MatcherBase<std::__cxx11::string_const&>::~MatcherBase ((MatcherBase<std::__cxx11::string_const&> *)&ppuStack_58); return uVar3; }
58,267
test_leaky_relu::vars[abi:cxx11]()
monkey531[P]llama/tests/test-backend-ops.cpp
std::string vars() override { return VARS_TO_STR3(type, ne_a, negative_slope); }
O2
cpp
test_leaky_relu::vars[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rsi, %r14 movq %rdi, %rbx movl 0x38(%rsi), %esi leaq 0x100(%rsp), %r15 movq %r15, %rdi callq 0x18e2b leaq 0x3ae0(%rip), %rsi # 0x30db6 leaq 0x80(%rsp), %rdi movq %r15, %rdx callq 0x1ca87 leaq 0x3a8a(%rip), %rdx # 0x30d77 leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x1cff2 leaq 0x40(%r14), %rsi leaq 0x40(%rsp), %rdi callq 0x18e53 leaq 0x3a62(%rip), %rsi # 0x30d79 leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rdx callq 0x1ca87 leaq 0xc0(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x1cf8b leaq 0x3a30(%rip), %rdx # 0x30d77 leaq 0xe0(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0x1cff2 addq $0x60, %r14 movq %rsp, %rdi movq %r14, %rsi callq 0x18fe5 leaq 0x3de7(%rip), %rsi # 0x31159 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x1ca87 leaq 0xe0(%rsp), %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi callq 0x1cf8b leaq 0x20(%rsp), %rdi callq 0xf280 movq %rsp, %rdi callq 0xf280 leaq 0xe0(%rsp), %rdi callq 0xf280 leaq 0xc0(%rsp), %rdi callq 0xf280 leaq 0x60(%rsp), %rdi callq 0xf280 leaq 0x40(%rsp), %rdi callq 0xf280 leaq 0xa0(%rsp), %rdi callq 0xf280 leaq 0x80(%rsp), %rdi callq 0xf280 leaq 0x100(%rsp), %rdi callq 0xf280 movq %rbx, %rax addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xf280 jmp 0x2d41d movq %rax, %rbx movq %rsp, %rdi callq 0xf280 jmp 0x2d42a movq %rax, %rbx leaq 0xe0(%rsp), %rdi callq 0xf280 jmp 0x2d43c movq %rax, %rbx leaq 0xc0(%rsp), %rdi callq 0xf280 jmp 0x2d44e movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0xf280 leaq 0x40(%rsp), %rdi callq 0xf280 leaq 0xa0(%rsp), %rdi callq 0xf280 leaq 0x80(%rsp), %rdi callq 0xf280 leaq 0x100(%rsp), %rdi callq 0xf280 movq %rbx, %rdi callq 0xfb30 movq %rax, %rbx jmp 0x2d458 movq %rax, %rbx jmp 0x2d462 movq %rax, %rbx jmp 0x2d46f movq %rax, %rbx jmp 0x2d47c nop
_ZN15test_leaky_relu4varsB5cxx11Ev: push r15 push r14 push rbx sub rsp, 120h mov r14, rsi mov rbx, rdi mov esi, [rsi+38h] lea r15, [rsp+138h+var_38] mov rdi, r15 call _ZL10var_to_strB5cxx119ggml_type; var_to_str(ggml_type) lea rsi, aPoolType+5; "type=" lea rdi, [rsp+138h+var_B8] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, asc_30D77; "," lea rdi, [rsp+138h+var_98] lea rsi, [rsp+138h+var_B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, [r14+40h] lea rdi, [rsp+138h+var_F8] call _ZL10var_to_strIlLm4EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt5arrayIT_XT0_EE; var_to_str<long,4ul>(std::array<long,4ul> const&) lea rsi, aNeA; "ne_a=" lea rdi, [rsp+138h+var_D8] lea rdx, [rsp+138h+var_F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+138h+var_78] lea rsi, [rsp+138h+var_98] lea rdx, [rsp+138h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_30D77; "," lea rdi, [rsp+138h+var_58] lea rsi, [rsp+138h+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) add r14, 60h ; '`' mov rdi, rsp mov rsi, r14 call _ZL10var_to_strIfENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<float>(float const&) lea rsi, aNegativeSlope; "negative_slope=" lea rdi, [rsp+138h+var_118] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rsi, [rsp+138h+var_58] lea rdx, [rsp+138h+var_118] mov rdi, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdi, [rsp+138h+var_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 120h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2D41D mov rbx, rax loc_2D41D: mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2D42A mov rbx, rax loc_2D42A: lea rdi, [rsp+arg_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2D43C mov rbx, rax loc_2D43C: lea rdi, [rsp+arg_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2D44E mov rbx, rax loc_2D44E: lea rdi, [rsp+arg_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D458: lea rdi, [rsp+arg_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D462: lea rdi, [rsp+arg_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D46F: lea rdi, [rsp+arg_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D47C: lea rdi, [rsp+arg_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume mov rbx, rax jmp short loc_2D458 mov rbx, rax jmp short loc_2D462 mov rbx, rax jmp short loc_2D46F mov rbx, rax jmp short loc_2D47C
long long test_leaky_relu::vars[abi:cxx11](long long a1, long long a2) { _BYTE v3[32]; // [rsp+0h] [rbp-138h] BYREF _QWORD v4[4]; // [rsp+20h] [rbp-118h] BYREF _BYTE v5[32]; // [rsp+40h] [rbp-F8h] BYREF _QWORD v6[4]; // [rsp+60h] [rbp-D8h] BYREF _BYTE v7[32]; // [rsp+80h] [rbp-B8h] BYREF _QWORD v8[4]; // [rsp+A0h] [rbp-98h] BYREF _BYTE v9[32]; // [rsp+C0h] [rbp-78h] BYREF _QWORD v10[4]; // [rsp+E0h] [rbp-58h] BYREF _BYTE v11[56]; // [rsp+100h] [rbp-38h] BYREF var_to_str[abi:cxx11]((long long)v11, *(_DWORD *)(a2 + 56)); std::operator+<char>((long long)v7, (long long)"type=", (long long)v11); std::operator+<char>((long long)v8, (long long)v7, (long long)","); var_to_str<long,4ul>((long long)v5, a2 + 64); std::operator+<char>((long long)v6, (long long)"ne_a=", (long long)v5); std::operator+<char>((long long)v9, v8, v6); std::operator+<char>((long long)v10, (long long)v9, (long long)","); var_to_str<float>((std::__cxx11 *)v3, (float *)(a2 + 96)); std::operator+<char>((long long)v4, (long long)"negative_slope=", (long long)v3); std::operator+<char>(a1, v10, v4); std::string::~string(v4); std::string::~string(v3); std::string::~string(v10); std::string::~string(v9); std::string::~string(v6); std::string::~string(v5); std::string::~string(v8); std::string::~string(v7); std::string::~string(v11); return a1; }
vars[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x120 MOV R14,RSI MOV RBX,RDI MOV ESI,dword ptr [RSI + 0x38] LEA R15,[RSP + 0x100] MOV RDI,R15 CALL 0x00118e2b LAB_0012d2cf: LEA RSI,[0x130db6] LEA RDI,[RSP + 0x80] MOV RDX,R15 CALL 0x0011ca87 LAB_0012d2e6: LEA RDX,[0x130d77] LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x80] CALL 0x0011cff2 LEA RSI,[R14 + 0x40] LAB_0012d306: LEA RDI,[RSP + 0x40] CALL 0x00118e53 LAB_0012d310: LEA RSI,[0x130d79] LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x40] CALL 0x0011ca87 LAB_0012d326: LEA RDI,[RSP + 0xc0] LEA RSI,[RSP + 0xa0] LEA RDX,[RSP + 0x60] CALL 0x0011cf8b LAB_0012d340: LEA RDX,[0x130d77] LEA RDI,[RSP + 0xe0] LEA RSI,[RSP + 0xc0] CALL 0x0011cff2 ADD R14,0x60 LAB_0012d360: MOV RDI,RSP MOV RSI,R14 CALL 0x00118fe5 LAB_0012d36b: LEA RSI,[0x131159] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0011ca87 LAB_0012d37f: LEA RSI,[RSP + 0xe0] LEA RDX,[RSP + 0x20] MOV RDI,RBX CALL 0x0011cf8b LAB_0012d394: LEA RDI,[RSP + 0x20] CALL 0x0010f280 MOV RDI,RSP CALL 0x0010f280 LEA RDI,[RSP + 0xe0] CALL 0x0010f280 LEA RDI,[RSP + 0xc0] CALL 0x0010f280 LEA RDI,[RSP + 0x60] CALL 0x0010f280 LEA RDI,[RSP + 0x40] CALL 0x0010f280 LEA RDI,[RSP + 0xa0] CALL 0x0010f280 LEA RDI,[RSP + 0x80] CALL 0x0010f280 LEA RDI,[RSP + 0x100] CALL 0x0010f280 MOV RAX,RBX ADD RSP,0x120 POP RBX POP R14 POP R15 RET
/* test_leaky_relu::vars[abi:cxx11]() */ void test_leaky_relu::vars_abi_cxx11_(void) { long in_RSI; string *in_RDI; string asStack_138 [32]; string local_118 [32]; string local_f8 [32]; string local_d8 [32]; string local_b8 [32]; string local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [32]; var_to_str_abi_cxx11_(local_38,*(int4 *)(in_RSI + 0x38)); /* try { // try from 0012d2cf to 0012d2e5 has its CatchHandler @ 0012d4a0 */ std::operator+((char *)local_b8,(string *)0x130db6); /* try { // try from 0012d2e6 to 0012d301 has its CatchHandler @ 0012d49b */ std::operator+(local_98,(char *)local_b8); /* try { // try from 0012d306 to 0012d30f has its CatchHandler @ 0012d496 */ var_to_str<long,4ul>(local_f8); /* try { // try from 0012d310 to 0012d325 has its CatchHandler @ 0012d491 */ std::operator+((char *)local_d8,(string *)"ne_a="); /* try { // try from 0012d326 to 0012d33f has its CatchHandler @ 0012d44b */ std::operator+(local_78,local_98); /* try { // try from 0012d340 to 0012d35b has its CatchHandler @ 0012d439 */ std::operator+(local_58,(char *)local_78); /* try { // try from 0012d360 to 0012d36a has its CatchHandler @ 0012d427 */ var_to_str<float>((float *)asStack_138); /* try { // try from 0012d36b to 0012d37e has its CatchHandler @ 0012d41a */ std::operator+((char *)local_118,(string *)"negative_slope="); /* try { // try from 0012d37f to 0012d393 has its CatchHandler @ 0012d40b */ std::operator+(in_RDI,local_58); std::__cxx11::string::~string(local_118); std::__cxx11::string::~string(asStack_138); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_d8); std::__cxx11::string::~string(local_f8); std::__cxx11::string::~string(local_98); std::__cxx11::string::~string(local_b8); std::__cxx11::string::~string(local_38); return; }
58,268
checkLine(Shape*, Line&)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/test/test.cpp
void checkLine(Shape* shape, Line& line) { Line* lineFromJson = dynamic_cast<Line*>(shape); REQUIRE(lineFromJson); REQUIRE(compareShapeWOid(*lineFromJson, line)); REQUIRE(lineFromJson->idFrom == line.idFrom); REQUIRE(lineFromJson->idTo == line.idTo); REQUIRE(lineFromJson->orientation == line.orientation); REQUIRE(lineFromJson->type == line.type); }
O2
cpp
checkLine(Shape*, Line&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %rbx testq %rdi, %rdi je 0x1393b movq 0x7a5ad(%rip), %rsi # 0x8ded8 movq 0x7a5b6(%rip), %rdx # 0x8dee8 xorl %ecx, %ecx callq 0x12670 jmp 0x1393d xorl %eax, %eax leaq 0x8(%rsp), %r12 movq %rax, (%r12) leaq 0x426db(%rip), %r13 # 0x56028 leaq 0x10(%rsp), %r14 movq %r13, (%r14) movq $0x33, 0x8(%r14) movl $0x1, (%rsp) leaq 0x426b5(%rip), %rsi # 0x56020 leaq 0x428bb(%rip), %r8 # 0x5622d leaq 0x40(%rsp), %r15 pushq $0x7 popq %rdx pushq $0xc popq %r9 movq %r15, %rdi movq %r14, %rcx callq 0x1cf74 movq %r12, (%r14) leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x1510a leaq 0x40(%rsp), %rdi callq 0x1cffc leaq 0x40(%rsp), %rdi callq 0x15000 leaq 0x10(%rsp), %r14 movq %r13, (%r14) movq $0x34, 0x8(%r14) movl $0x1, (%rsp) leaq 0x42655(%rip), %rsi # 0x56020 leaq 0x42868(%rip), %r8 # 0x5623a leaq 0x40(%rsp), %r15 pushq $0x7 popq %rdx pushq $0x25 popq %r9 movq %r15, %rdi movq %r14, %rcx callq 0x1cf74 movq 0x8(%rsp), %rdi movq %rbx, %rsi callq 0x12eec movb %al, (%r14) leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x15022 leaq 0x40(%rsp), %rdi callq 0x1cffc leaq 0x40(%rsp), %rdi callq 0x15000 leaq 0x10(%rsp), %r14 movq %r13, (%r14) movq $0x35, 0x8(%r14) movl $0x1, (%rsp) leaq 0x425e8(%rip), %rsi # 0x56020 leaq 0x42821(%rip), %r8 # 0x56260 leaq 0x40(%rsp), %r15 pushq $0x7 popq %rdx pushq $0x23 popq %r9 movq %r15, %rdi movq %r14, %rcx callq 0x1cf74 movq 0x8(%rsp), %r12 addq $0x60, %r12 leaq 0x60(%rbx), %r13 movq %r12, %rdi movq %r13, %rsi callq 0x14f7b movb $0x1, 0x8(%r14) movb %al, 0x9(%r14) leaq 0x76912(%rip), %rbp # 0x8a390 movq %rbp, (%r14) movq %r12, 0x10(%r14) leaq 0x42990(%rip), %rax # 0x5641c movq %rax, 0x18(%r14) movq $0x2, 0x20(%r14) movq %r13, 0x28(%r14) leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x1cfb2 leaq 0x10(%rsp), %rdi callq 0x26f44 leaq 0x40(%rsp), %rdi callq 0x1cffc leaq 0x40(%rsp), %rdi callq 0x15000 leaq 0x10(%rsp), %r14 leaq 0x42555(%rip), %rax # 0x56028 movq %rax, (%r14) movq $0x36, 0x8(%r14) movl $0x1, (%rsp) leaq 0x42534(%rip), %rsi # 0x56020 leaq 0x42791(%rip), %r8 # 0x56284 leaq 0x40(%rsp), %r15 pushq $0x7 popq %rdx pushq $0x1f popq %r9 movq %r15, %rdi movq %r14, %rcx callq 0x1cf74 movl $0x80, %r12d leaq (%rbx,%r12), %r13 addq 0x8(%rsp), %r12 movq %r12, %rdi movq %r13, %rsi callq 0x14f7b movb $0x1, 0x8(%r14) movb %al, 0x9(%r14) movq %rbp, (%r14) movq %r12, 0x10(%r14) leaq 0x428e1(%rip), %rbp # 0x5641c movq %rbp, 0x18(%r14) movq $0x2, 0x20(%r14) movq %r13, 0x28(%r14) leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x1cfb2 leaq 0x10(%rsp), %rdi callq 0x26f44 leaq 0x40(%rsp), %rdi callq 0x1cffc leaq 0x40(%rsp), %rdi callq 0x15000 leaq 0x10(%rsp), %r14 leaq 0x424a6(%rip), %r12 # 0x56028 movq %r12, (%r14) movq $0x37, 0x8(%r14) movl $0x1, (%rsp) leaq 0x42485(%rip), %rsi # 0x56020 leaq 0x42702(%rip), %r8 # 0x562a4 leaq 0x40(%rsp), %r15 pushq $0x7 popq %rdx pushq $0x2d popq %r9 movq %r15, %rdi movq %r14, %rcx callq 0x1cf74 movq 0x8(%rsp), %rax movl $0xa2, %ecx leaq (%rax,%rcx), %rdx addq %rbx, %rcx movzwl 0xa2(%rax), %eax cmpw 0xa2(%rbx), %ax movb $0x1, 0x8(%r14) sete 0x9(%r14) leaq 0x767e7(%rip), %rax # 0x8a3d0 movq %rax, (%r14) movq %rdx, 0x10(%r14) movq %rbp, 0x18(%r14) movq $0x2, 0x20(%r14) movq %rcx, 0x28(%r14) leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x1cfb2 leaq 0x10(%rsp), %rdi callq 0x26f44 leaq 0x40(%rsp), %rdi callq 0x1cffc leaq 0x40(%rsp), %rdi callq 0x15000 leaq 0x10(%rsp), %r14 movq %r12, (%r14) movq $0x38, 0x8(%r14) movl $0x1, (%rsp) leaq 0x423d7(%rip), %rsi # 0x56020 leaq 0x42682(%rip), %r8 # 0x562d2 leaq 0x40(%rsp), %r15 pushq $0x7 popq %rdx pushq $0x1f popq %r9 movq %r15, %rdi movq %r14, %rcx callq 0x1cf74 movq 0x8(%rsp), %rax movl $0xa0, %ecx leaq (%rax,%rcx), %rdx addq %rbx, %rcx movzwl 0xa0(%rax), %eax cmpw 0xa0(%rbx), %ax movb $0x1, 0x8(%r14) sete 0x9(%r14) leaq 0x76779(%rip), %rax # 0x8a410 movq %rax, (%r14) movq %rdx, 0x10(%r14) movq %rbp, 0x18(%r14) movq $0x2, 0x20(%r14) movq %rcx, 0x28(%r14) leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x1cfb2 leaq 0x10(%rsp), %rdi callq 0x26f44 leaq 0x40(%rsp), %rdi callq 0x1cffc leaq 0x40(%rsp), %rdi callq 0x15000 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x26f44 movq %rbx, %rdi callq 0x121e0 leaq 0x40(%rsp), %rdi callq 0x1d02c callq 0x12900 jmp 0x13cc5 movq %rax, %rbx callq 0x12900 jmp 0x13e3c jmp 0x13e39 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x26f44 movq %r14, %rdi callq 0x121e0 leaq 0x40(%rsp), %rdi callq 0x1d02c callq 0x12900 leaq 0x422da(%rip), %r12 # 0x56028 leaq 0x426c7(%rip), %rbp # 0x5641c jmp 0x13c17 movq %rax, %rbx callq 0x12900 jmp 0x13e3c jmp 0x13e39 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x26f44 movq %r14, %rdi callq 0x121e0 leaq 0x40(%rsp), %rdi callq 0x1d02c callq 0x12900 leaq 0x42685(%rip), %rbp # 0x5641c jmp 0x13b62 movq %rax, %rbx callq 0x12900 jmp 0x13e3c jmp 0x13e39 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x26f44 movq %r14, %rdi callq 0x121e0 leaq 0x40(%rsp), %rdi callq 0x1d02c callq 0x12900 jmp 0x13ab3 movq %rax, %rbx callq 0x12900 jmp 0x13e3c jmp 0x13e39 movq %rax, %rdi callq 0x121e0 leaq 0x40(%rsp), %rdi callq 0x1d02c callq 0x12900 jmp 0x13a06 movq %rax, %rbx callq 0x12900 jmp 0x13e3c jmp 0x13e39 movq %rax, %rdi callq 0x121e0 leaq 0x40(%rsp), %rdi callq 0x1d02c callq 0x12900 jmp 0x13999 movq %rax, %rbx callq 0x12900 jmp 0x13e3c movq %rax, %rdi callq 0x14ff5 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x15000 movq %rbx, %rdi callq 0x129c0
_Z9checkLineP5ShapeR4Line: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rsi test rdi, rdi jz short loc_1393B mov rsi, cs:lpstype; lpstype mov rdx, cs:_ZTI4Line_ptr; lpdtype xor ecx, ecx; s2d call ___dynamic_cast jmp short loc_1393D loc_1393B: xor eax, eax loc_1393D: lea r12, [rsp+0B8h+var_B0] mov [r12], rax lea r13, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea r14, [rsp+0B8h+var_A8] mov [r14], r13 mov qword ptr [r14+8], 33h ; '3' mov [rsp+0B8h+var_B8], 1 lea rsi, aRequire; "REQUIRE" lea r8, aLinefromjson; "lineFromJson" lea r15, [rsp+0B8h+var_78] push 7 pop rdx push 0Ch pop r9 mov rdi, r15 mov rcx, r14 call _ZN5Catch16AssertionHandlerC2ENS_9StringRefERKNS_14SourceLineInfoES1_NS_17ResultDisposition5FlagsE; Catch::AssertionHandler::AssertionHandler(Catch::StringRef,Catch::SourceLineInfo const&,Catch::StringRef,Catch::ResultDisposition::Flags) mov [r14], r12 lea rsi, [rsp+0B8h+var_A8] mov rdi, r15 call _ZN5Catch16AssertionHandler10handleExprIRP4LineEEvRKNS_7ExprLhsIT_EE; Catch::AssertionHandler::handleExpr<Line *&>(Catch::ExprLhs<Line *&> const&) loc_13999: lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler8completeEv; Catch::AssertionHandler::complete(void) lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandlerD2Ev; Catch::AssertionHandler::~AssertionHandler() lea r14, [rsp+0B8h+var_A8] mov [r14], r13 mov qword ptr [r14+8], 34h ; '4' mov [rsp+0B8h+var_B8], 1 lea rsi, aRequire; "REQUIRE" lea r8, aCompareshapewo; "compareShapeWOid(*lineFromJson, line)" lea r15, [rsp+0B8h+var_78] push 7 pop rdx push 25h ; '%' pop r9 mov rdi, r15 mov rcx, r14 call _ZN5Catch16AssertionHandlerC2ENS_9StringRefERKNS_14SourceLineInfoES1_NS_17ResultDisposition5FlagsE; Catch::AssertionHandler::AssertionHandler(Catch::StringRef,Catch::SourceLineInfo const&,Catch::StringRef,Catch::ResultDisposition::Flags) mov rdi, [rsp+0B8h+var_B0]; Shape * mov rsi, rbx; Shape * call _Z16compareShapeWOidRK5ShapeS1_; compareShapeWOid(Shape const&,Shape const&) mov [r14], al lea rsi, [rsp+0B8h+var_A8] mov rdi, r15 call _ZN5Catch16AssertionHandler10handleExprIbEEvRKNS_7ExprLhsIT_EE; Catch::AssertionHandler::handleExpr<bool>(Catch::ExprLhs<bool> const&) loc_13A06: lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler8completeEv; Catch::AssertionHandler::complete(void) lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandlerD2Ev; Catch::AssertionHandler::~AssertionHandler() lea r14, [rsp+0B8h+var_A8] mov [r14], r13 mov qword ptr [r14+8], 35h ; '5' mov [rsp+0B8h+var_B8], 1 lea rsi, aRequire; "REQUIRE" lea r8, aLinefromjsonId; "lineFromJson->idFrom == line.idFrom" lea r15, [rsp+0B8h+var_78] push 7 pop rdx push 23h ; '#' pop r9 mov rdi, r15 mov rcx, r14 call _ZN5Catch16AssertionHandlerC2ENS_9StringRefERKNS_14SourceLineInfoES1_NS_17ResultDisposition5FlagsE; Catch::AssertionHandler::AssertionHandler(Catch::StringRef,Catch::SourceLineInfo const&,Catch::StringRef,Catch::ResultDisposition::Flags) mov r12, [rsp+0B8h+var_B0] add r12, 60h ; '`' lea r13, [rbx+60h] mov rdi, r12 mov rsi, r13 call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ mov byte ptr [r14+8], 1 mov [r14+9], al lea rbp, off_8A390 mov [r14], rbp mov [r14+10h], r12 lea rax, asc_5641C; "==" mov [r14+18h], rax mov qword ptr [r14+20h], 2 mov [r14+28h], r13 lea rsi, [rsp+0B8h+var_A8] mov rdi, r15 call _ZN5Catch16AssertionHandler10handleExprERKNS_20ITransientExpressionE; Catch::AssertionHandler::handleExpr(Catch::ITransientExpression const&) lea rdi, [rsp+0B8h+var_A8]; this call _ZN5Catch20ITransientExpressionD2Ev; Catch::ITransientExpression::~ITransientExpression() loc_13AB3: lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler8completeEv; Catch::AssertionHandler::complete(void) lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandlerD2Ev; Catch::AssertionHandler::~AssertionHandler() lea r14, [rsp+0B8h+var_A8] lea rax, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov [r14], rax mov qword ptr [r14+8], 36h ; '6' mov [rsp+0B8h+var_B8], 1 lea rsi, aRequire; "REQUIRE" lea r8, aLinefromjsonId_0; "lineFromJson->idTo == line.idTo" lea r15, [rsp+0B8h+var_78] push 7 pop rdx push 1Fh pop r9 mov rdi, r15 mov rcx, r14 call _ZN5Catch16AssertionHandlerC2ENS_9StringRefERKNS_14SourceLineInfoES1_NS_17ResultDisposition5FlagsE; Catch::AssertionHandler::AssertionHandler(Catch::StringRef,Catch::SourceLineInfo const&,Catch::StringRef,Catch::ResultDisposition::Flags) mov r12d, 80h lea r13, [rbx+r12] add r12, [rsp+0B8h+var_B0] mov rdi, r12 mov rsi, r13 call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ mov byte ptr [r14+8], 1 mov [r14+9], al mov [r14], rbp mov [r14+10h], r12 lea rbp, asc_5641C; "==" mov [r14+18h], rbp mov qword ptr [r14+20h], 2 mov [r14+28h], r13 lea rsi, [rsp+0B8h+var_A8] mov rdi, r15 call _ZN5Catch16AssertionHandler10handleExprERKNS_20ITransientExpressionE; Catch::AssertionHandler::handleExpr(Catch::ITransientExpression const&) lea rdi, [rsp+0B8h+var_A8]; this call _ZN5Catch20ITransientExpressionD2Ev; Catch::ITransientExpression::~ITransientExpression() loc_13B62: lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler8completeEv; Catch::AssertionHandler::complete(void) lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandlerD2Ev; Catch::AssertionHandler::~AssertionHandler() lea r14, [rsp+0B8h+var_A8] lea r12, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov [r14], r12 mov qword ptr [r14+8], 37h ; '7' mov [rsp+0B8h+var_B8], 1 lea rsi, aRequire; "REQUIRE" lea r8, aLinefromjsonOr; "lineFromJson->orientation == line.orien"... lea r15, [rsp+0B8h+var_78] push 7 pop rdx push 2Dh ; '-' pop r9 mov rdi, r15 mov rcx, r14 call _ZN5Catch16AssertionHandlerC2ENS_9StringRefERKNS_14SourceLineInfoES1_NS_17ResultDisposition5FlagsE; Catch::AssertionHandler::AssertionHandler(Catch::StringRef,Catch::SourceLineInfo const&,Catch::StringRef,Catch::ResultDisposition::Flags) mov rax, [rsp+0B8h+var_B0] mov ecx, 0A2h lea rdx, [rax+rcx] add rcx, rbx movzx eax, word ptr [rax+0A2h] cmp ax, [rbx+0A2h] mov byte ptr [r14+8], 1 setz byte ptr [r14+9] lea rax, off_8A3D0 mov [r14], rax mov [r14+10h], rdx mov [r14+18h], rbp mov qword ptr [r14+20h], 2 mov [r14+28h], rcx lea rsi, [rsp+0B8h+var_A8] mov rdi, r15 call _ZN5Catch16AssertionHandler10handleExprERKNS_20ITransientExpressionE; Catch::AssertionHandler::handleExpr(Catch::ITransientExpression const&) lea rdi, [rsp+0B8h+var_A8]; this call _ZN5Catch20ITransientExpressionD2Ev; Catch::ITransientExpression::~ITransientExpression() loc_13C17: lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler8completeEv; Catch::AssertionHandler::complete(void) lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandlerD2Ev; Catch::AssertionHandler::~AssertionHandler() lea r14, [rsp+0B8h+var_A8] mov [r14], r12 mov qword ptr [r14+8], 38h ; '8' mov [rsp+0B8h+var_B8], 1 lea rsi, aRequire; "REQUIRE" lea r8, aLinefromjsonTy; "lineFromJson->type == line.type" lea r15, [rsp+0B8h+var_78] push 7 pop rdx push 1Fh pop r9 mov rdi, r15 mov rcx, r14 call _ZN5Catch16AssertionHandlerC2ENS_9StringRefERKNS_14SourceLineInfoES1_NS_17ResultDisposition5FlagsE; Catch::AssertionHandler::AssertionHandler(Catch::StringRef,Catch::SourceLineInfo const&,Catch::StringRef,Catch::ResultDisposition::Flags) mov rax, [rsp+0B8h+var_B0] mov ecx, 0A0h lea rdx, [rax+rcx] add rcx, rbx movzx eax, word ptr [rax+0A0h] cmp ax, [rbx+0A0h] mov byte ptr [r14+8], 1 setz byte ptr [r14+9] lea rax, off_8A410 mov [r14], rax mov [r14+10h], rdx mov [r14+18h], rbp mov qword ptr [r14+20h], 2 mov [r14+28h], rcx lea rsi, [rsp+0B8h+var_A8] mov rdi, r15 call _ZN5Catch16AssertionHandler10handleExprERKNS_20ITransientExpressionE; Catch::AssertionHandler::handleExpr(Catch::ITransientExpression const&) lea rdi, [rsp+0B8h+var_A8]; this call _ZN5Catch20ITransientExpressionD2Ev; Catch::ITransientExpression::~ITransientExpression() loc_13CC5: lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler8completeEv; Catch::AssertionHandler::complete(void) lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandlerD2Ev; Catch::AssertionHandler::~AssertionHandler() add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+0B8h+var_A8]; this call _ZN5Catch20ITransientExpressionD2Ev; Catch::ITransientExpression::~ITransientExpression() mov rdi, rbx; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler33handleUnexpectedInflightExceptionEv; Catch::AssertionHandler::handleUnexpectedInflightException(void) call ___cxa_end_catch jmp short loc_13CC5 mov rbx, rax call ___cxa_end_catch jmp loc_13E3C jmp loc_13E39 mov r14, rax lea rdi, [rsp+0B8h+var_A8]; this call _ZN5Catch20ITransientExpressionD2Ev; Catch::ITransientExpression::~ITransientExpression() mov rdi, r14; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler33handleUnexpectedInflightExceptionEv; Catch::AssertionHandler::handleUnexpectedInflightException(void) call ___cxa_end_catch lea r12, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rbp, asc_5641C; "==" jmp loc_13C17 mov rbx, rax call ___cxa_end_catch jmp loc_13E3C jmp loc_13E39 mov r14, rax lea rdi, [rsp+0B8h+var_A8]; this call _ZN5Catch20ITransientExpressionD2Ev; Catch::ITransientExpression::~ITransientExpression() mov rdi, r14; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler33handleUnexpectedInflightExceptionEv; Catch::AssertionHandler::handleUnexpectedInflightException(void) call ___cxa_end_catch lea rbp, asc_5641C; "==" jmp loc_13B62 mov rbx, rax call ___cxa_end_catch jmp loc_13E3C jmp loc_13E39 mov r14, rax lea rdi, [rsp+0B8h+var_A8]; this call _ZN5Catch20ITransientExpressionD2Ev; Catch::ITransientExpression::~ITransientExpression() mov rdi, r14; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler33handleUnexpectedInflightExceptionEv; Catch::AssertionHandler::handleUnexpectedInflightException(void) call ___cxa_end_catch jmp loc_13AB3 mov rbx, rax call ___cxa_end_catch jmp short loc_13E3C jmp short loc_13E39 mov rdi, rax; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler33handleUnexpectedInflightExceptionEv; Catch::AssertionHandler::handleUnexpectedInflightException(void) call ___cxa_end_catch jmp loc_13A06 mov rbx, rax call ___cxa_end_catch jmp short loc_13E3C jmp short loc_13E39 mov rdi, rax; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_78]; this call _ZN5Catch16AssertionHandler33handleUnexpectedInflightExceptionEv; Catch::AssertionHandler::handleUnexpectedInflightException(void) call ___cxa_end_catch jmp loc_13999 mov rbx, rax call ___cxa_end_catch jmp short loc_13E3C mov rdi, rax call __clang_call_terminate loc_13E39: mov rbx, rax loc_13E3C: lea rdi, [rsp+arg_38]; this call _ZN5Catch16AssertionHandlerD2Ev; Catch::AssertionHandler::~AssertionHandler() mov rdi, rbx call __Unwind_Resume
void checkLine(Shape *a1, Line *a2) { Shape *v2; // rax int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d char *v7; // r12 char v8; // al char *v9; // r12 char v10; // al bool v11; // zf char v12; // [rsp+0h] [rbp-B8h] Shape *v13; // [rsp+8h] [rbp-B0h] BYREF long long ( **v14)(int, int, int, int, int, int, char, int, int, int, char); // [rsp+10h] [rbp-A8h] BYREF long long v15; // [rsp+18h] [rbp-A0h] char *v16; // [rsp+20h] [rbp-98h] const char *v17; // [rsp+28h] [rbp-90h] long long v18; // [rsp+30h] [rbp-88h] char *v19; // [rsp+38h] [rbp-80h] _BYTE v20[120]; // [rsp+40h] [rbp-78h] BYREF if ( a1 ) v2 = (Shape *)__dynamic_cast( a1, (const struct __class_type_info *)&`typeinfo for'Shape, (const struct __class_type_info *)&`typeinfo for'Line, 0LL); else v2 = 0LL; v13 = v2; v14 = (long long ( **)(int, int, int, int, int, int, char, int, int, int, char))"/workspace/llm4binary/github/2" "025_star3/11AgReS1SoR11[P]Grap" "h/Common/FiguresStorage/test/test.cpp"; v15 = 51LL; Catch::AssertionHandler::AssertionHandler( (unsigned int)v20, (unsigned int)"REQUIRE", 7, (unsigned int)&v14, (unsigned int)"lineFromJson", 12, 1); v14 = (long long ( **)(int, int, int, int, int, int, char, int, int, int, char))&v13; Catch::AssertionHandler::handleExpr<Line *&>((unsigned int)v20, (unsigned int)&v14, v3, v4, v5, v6, v12); Catch::AssertionHandler::complete((Catch::AssertionHandler *)v20); Catch::AssertionHandler::~AssertionHandler((Catch::AssertionHandler *)v20); v14 = (long long ( **)(int, int, int, int, int, int, char, int, int, int, char))"/workspace/llm4binary/github/2" "025_star3/11AgReS1SoR11[P]Grap" "h/Common/FiguresStorage/test/test.cpp"; v15 = 52LL; Catch::AssertionHandler::AssertionHandler( (unsigned int)v20, (unsigned int)"REQUIRE", 7, (unsigned int)&v14, (unsigned int)"compareShapeWOid(*lineFromJson, line)", 37, 1); LOBYTE(v14) = compareShapeWOid(v13, a2); Catch::AssertionHandler::handleExpr<bool>(v20, &v14); Catch::AssertionHandler::complete((Catch::AssertionHandler *)v20); Catch::AssertionHandler::~AssertionHandler((Catch::AssertionHandler *)v20); v14 = (long long ( **)(int, int, int, int, int, int, char, int, int, int, char))"/workspace/llm4binary/github/2" "025_star3/11AgReS1SoR11[P]Grap" "h/Common/FiguresStorage/test/test.cpp"; v15 = 53LL; Catch::AssertionHandler::AssertionHandler( (unsigned int)v20, (unsigned int)"REQUIRE", 7, (unsigned int)&v14, (unsigned int)"lineFromJson->idFrom == line.idFrom", 35, 1); v7 = (char *)v13 + 96; v8 = std::operator==<char>((char *)v13 + 96, (char *)a2 + 96); LOBYTE(v15) = 1; BYTE1(v15) = v8; v14 = &off_8A390; v16 = v7; v17 = "=="; v18 = 2LL; v19 = (char *)a2 + 96; Catch::AssertionHandler::handleExpr((Catch::AssertionHandler *)v20, (const Catch::ITransientExpression *)&v14); Catch::ITransientExpression::~ITransientExpression((Catch::ITransientExpression *)&v14); Catch::AssertionHandler::complete((Catch::AssertionHandler *)v20); Catch::AssertionHandler::~AssertionHandler((Catch::AssertionHandler *)v20); v14 = (long long ( **)(int, int, int, int, int, int, char, int, int, int, char))"/workspace/llm4binary/github/2" "025_star3/11AgReS1SoR11[P]Grap" "h/Common/FiguresStorage/test/test.cpp"; v15 = 54LL; Catch::AssertionHandler::AssertionHandler( (unsigned int)v20, (unsigned int)"REQUIRE", 7, (unsigned int)&v14, (unsigned int)"lineFromJson->idTo == line.idTo", 31, 1); v9 = (char *)v13 + 128; v10 = std::operator==<char>((char *)v13 + 128, (char *)a2 + 128); LOBYTE(v15) = 1; BYTE1(v15) = v10; v14 = &off_8A390; v16 = v9; v17 = "=="; v18 = 2LL; v19 = (char *)a2 + 128; Catch::AssertionHandler::handleExpr((Catch::AssertionHandler *)v20, (const Catch::ITransientExpression *)&v14); Catch::ITransientExpression::~ITransientExpression((Catch::ITransientExpression *)&v14); Catch::AssertionHandler::complete((Catch::AssertionHandler *)v20); Catch::AssertionHandler::~AssertionHandler((Catch::AssertionHandler *)v20); v14 = (long long ( **)(int, int, int, int, int, int, char, int, int, int, char))"/workspace/llm4binary/github/2" "025_star3/11AgReS1SoR11[P]Grap" "h/Common/FiguresStorage/test/test.cpp"; v15 = 55LL; Catch::AssertionHandler::AssertionHandler( (unsigned int)v20, (unsigned int)"REQUIRE", 7, (unsigned int)&v14, (unsigned int)"lineFromJson->orientation == line.orientation", 45, 1); v11 = *((_WORD *)v13 + 81) == *((_WORD *)a2 + 81); LOBYTE(v15) = 1; BYTE1(v15) = v11; v14 = &off_8A3D0; v16 = (char *)v13 + 162; v17 = "=="; v18 = 2LL; v19 = (char *)a2 + 162; Catch::AssertionHandler::handleExpr((Catch::AssertionHandler *)v20, (const Catch::ITransientExpression *)&v14); Catch::ITransientExpression::~ITransientExpression((Catch::ITransientExpression *)&v14); Catch::AssertionHandler::complete((Catch::AssertionHandler *)v20); Catch::AssertionHandler::~AssertionHandler((Catch::AssertionHandler *)v20); v14 = (long long ( **)(int, int, int, int, int, int, char, int, int, int, char))"/workspace/llm4binary/github/2" "025_star3/11AgReS1SoR11[P]Grap" "h/Common/FiguresStorage/test/test.cpp"; v15 = 56LL; Catch::AssertionHandler::AssertionHandler( (unsigned int)v20, (unsigned int)"REQUIRE", 7, (unsigned int)&v14, (unsigned int)"lineFromJson->type == line.type", 31, 1); v11 = *((_WORD *)v13 + 80) == *((_WORD *)a2 + 80); LOBYTE(v15) = 1; BYTE1(v15) = v11; v14 = &off_8A410; v16 = (char *)v13 + 160; v17 = "=="; v18 = 2LL; v19 = (char *)a2 + 160; Catch::AssertionHandler::handleExpr((Catch::AssertionHandler *)v20, (const Catch::ITransientExpression *)&v14); Catch::ITransientExpression::~ITransientExpression((Catch::ITransientExpression *)&v14); Catch::AssertionHandler::complete((Catch::AssertionHandler *)v20); Catch::AssertionHandler::~AssertionHandler((Catch::AssertionHandler *)v20); }
checkLine: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RSI TEST RDI,RDI JZ 0x0011393b MOV RSI,qword ptr [0x0018ded8] MOV RDX,qword ptr [0x0018dee8] XOR ECX,ECX CALL 0x00112670 JMP 0x0011393d LAB_0011393b: XOR EAX,EAX LAB_0011393d: LEA R12,[RSP + 0x8] MOV qword ptr [R12],RAX LEA R13,[0x156028] LEA R14,[RSP + 0x10] MOV qword ptr [R14],R13 MOV qword ptr [R14 + 0x8],0x33 MOV dword ptr [RSP],0x1 LEA RSI,[0x156020] LEA R8,[0x15622d] LEA R15,[RSP + 0x40] PUSH 0x7 POP RDX PUSH 0xc POP R9 MOV RDI,R15 MOV RCX,R14 CALL 0x0011cf74 MOV qword ptr [R14],R12 LAB_0011398c: LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x0011510a LAB_00113999: LEA RDI,[RSP + 0x40] CALL 0x0011cffc LAB_001139a3: LEA RDI,[RSP + 0x40] CALL 0x00115000 LEA R14,[RSP + 0x10] MOV qword ptr [R14],R13 MOV qword ptr [R14 + 0x8],0x34 MOV dword ptr [RSP],0x1 LEA RSI,[0x156020] LEA R8,[0x15623a] LEA R15,[RSP + 0x40] PUSH 0x7 POP RDX PUSH 0x25 POP R9 MOV RDI,R15 MOV RCX,R14 CALL 0x0011cf74 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RBX CALL 0x00112eec MOV byte ptr [R14],AL LAB_001139f9: LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x00115022 LAB_00113a06: LEA RDI,[RSP + 0x40] CALL 0x0011cffc LAB_00113a10: LEA RDI,[RSP + 0x40] CALL 0x00115000 LEA R14,[RSP + 0x10] MOV qword ptr [R14],R13 MOV qword ptr [R14 + 0x8],0x35 MOV dword ptr [RSP],0x1 LEA RSI,[0x156020] LEA R8,[0x156260] LEA R15,[RSP + 0x40] PUSH 0x7 POP RDX PUSH 0x23 POP R9 MOV RDI,R15 MOV RCX,R14 CALL 0x0011cf74 MOV R12,qword ptr [RSP + 0x8] ADD R12,0x60 LEA R13,[RBX + 0x60] MOV RDI,R12 MOV RSI,R13 CALL 0x00114f7b MOV byte ptr [R14 + 0x8],0x1 MOV byte ptr [R14 + 0x9],AL LEA RBP,[0x18a390] MOV qword ptr [R14],RBP MOV qword ptr [R14 + 0x10],R12 LEA RAX,[0x15641c] MOV qword ptr [R14 + 0x18],RAX MOV qword ptr [R14 + 0x20],0x2 MOV qword ptr [R14 + 0x28],R13 LAB_00113a9c: LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x0011cfb2 LEA RDI,[RSP + 0x10] CALL 0x00126f44 LAB_00113ab3: LEA RDI,[RSP + 0x40] CALL 0x0011cffc LAB_00113abd: LEA RDI,[RSP + 0x40] CALL 0x00115000 LEA R14,[RSP + 0x10] LEA RAX,[0x156028] MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x8],0x36 MOV dword ptr [RSP],0x1 LEA RSI,[0x156020] LEA R8,[0x156284] LEA R15,[RSP + 0x40] PUSH 0x7 POP RDX PUSH 0x1f POP R9 MOV RDI,R15 MOV RCX,R14 CALL 0x0011cf74 MOV R12D,0x80 LEA R13,[RBX + R12*0x1] ADD R12,qword ptr [RSP + 0x8] MOV RDI,R12 MOV RSI,R13 CALL 0x00114f7b MOV byte ptr [R14 + 0x8],0x1 MOV byte ptr [R14 + 0x9],AL MOV qword ptr [R14],RBP MOV qword ptr [R14 + 0x10],R12 LEA RBP,[0x15641c] MOV qword ptr [R14 + 0x18],RBP MOV qword ptr [R14 + 0x20],0x2 MOV qword ptr [R14 + 0x28],R13 LAB_00113b4b: LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x0011cfb2 LEA RDI,[RSP + 0x10] CALL 0x00126f44 LAB_00113b62: LEA RDI,[RSP + 0x40] CALL 0x0011cffc LAB_00113b6c: LEA RDI,[RSP + 0x40] CALL 0x00115000 LEA R14,[RSP + 0x10] LEA R12,[0x156028] MOV qword ptr [R14],R12 MOV qword ptr [R14 + 0x8],0x37 MOV dword ptr [RSP],0x1 LEA RSI,[0x156020] LEA R8,[0x1562a4] LEA R15,[RSP + 0x40] PUSH 0x7 POP RDX PUSH 0x2d POP R9 MOV RDI,R15 MOV RCX,R14 CALL 0x0011cf74 MOV RAX,qword ptr [RSP + 0x8] MOV ECX,0xa2 LEA RDX,[RAX + RCX*0x1] ADD RCX,RBX MOVZX EAX,word ptr [RAX + 0xa2] CMP AX,word ptr [RBX + 0xa2] MOV byte ptr [R14 + 0x8],0x1 SETZ byte ptr [R14 + 0x9] LEA RAX,[0x18a3d0] MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x10],RDX MOV qword ptr [R14 + 0x18],RBP MOV qword ptr [R14 + 0x20],0x2 MOV qword ptr [R14 + 0x28],RCX LAB_00113c00: LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x0011cfb2 LEA RDI,[RSP + 0x10] CALL 0x00126f44 LAB_00113c17: LEA RDI,[RSP + 0x40] CALL 0x0011cffc LAB_00113c21: LEA RDI,[RSP + 0x40] CALL 0x00115000 LEA R14,[RSP + 0x10] MOV qword ptr [R14],R12 MOV qword ptr [R14 + 0x8],0x38 MOV dword ptr [RSP],0x1 LEA RSI,[0x156020] LEA R8,[0x1562d2] LEA R15,[RSP + 0x40] PUSH 0x7 POP RDX PUSH 0x1f POP R9 MOV RDI,R15 MOV RCX,R14 CALL 0x0011cf74 MOV RAX,qword ptr [RSP + 0x8] MOV ECX,0xa0 LEA RDX,[RAX + RCX*0x1] ADD RCX,RBX MOVZX EAX,word ptr [RAX + 0xa0] CMP AX,word ptr [RBX + 0xa0] MOV byte ptr [R14 + 0x8],0x1 SETZ byte ptr [R14 + 0x9] LEA RAX,[0x18a410] MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x10],RDX MOV qword ptr [R14 + 0x18],RBP MOV qword ptr [R14 + 0x20],0x2 MOV qword ptr [R14 + 0x28],RCX LAB_00113cae: LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x0011cfb2 LEA RDI,[RSP + 0x10] CALL 0x00126f44 LAB_00113cc5: LEA RDI,[RSP + 0x40] CALL 0x0011cffc LAB_00113ccf: LEA RDI,[RSP + 0x40] CALL 0x00115000 ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* checkLine(Shape*, Line&) */ void checkLine(Shape *param_1,Line *param_2) { int1 uVar1; string *psVar2; Shape *local_b0; Shape **local_a8; int8 local_a0; string *local_98; int *local_90; int8 local_88; string *local_80; AssertionHandler local_78 [72]; if (param_1 == (Shape *)0x0) { local_b0 = (Shape *)0x0; } else { local_b0 = (Shape *)__dynamic_cast(param_1,PTR_typeinfo_0018ded8,PTR_typeinfo_0018dee8,0); } local_a8 = (Shape **)0x156028; local_a0 = 0x33; Catch::AssertionHandler::AssertionHandler(local_78,"REQUIRE",7,&local_a8,"lineFromJson",0xc,1); /* try { // try from 0011398c to 00113998 has its CatchHandler @ 00113e0b */ local_a8 = &local_b0; Catch::AssertionHandler::handleExpr<Line*&>(local_78,(ExprLhs *)&local_a8); /* try { // try from 00113999 to 001139a2 has its CatchHandler @ 00113e39 */ Catch::AssertionHandler::complete(local_78); Catch::AssertionHandler::~AssertionHandler(local_78); local_a8 = (Shape **)0x156028; local_a0 = 0x34; Catch::AssertionHandler::AssertionHandler (local_78,"REQUIRE",7,&local_a8,"compareShapeWOid(*lineFromJson, line)",0x25,1); uVar1 = compareShapeWOid(local_b0,(Shape *)param_2); local_a8 = (Shape **)CONCAT71(local_a8._1_7_,uVar1); /* try { // try from 001139f9 to 00113a05 has its CatchHandler @ 00113de3 */ Catch::AssertionHandler::handleExpr<bool>(local_78,(ExprLhs *)&local_a8); /* try { // try from 00113a06 to 00113a0f has its CatchHandler @ 00113e09 */ Catch::AssertionHandler::complete(local_78); Catch::AssertionHandler::~AssertionHandler(local_78); local_a8 = (Shape **)0x156028; local_a0 = 0x35; Catch::AssertionHandler::AssertionHandler (local_78,"REQUIRE",7,&local_a8,"lineFromJson->idFrom == line.idFrom",0x23,1); psVar2 = (string *)(local_b0 + 0x60); uVar1 = std::operator==(psVar2,(string *)(param_2 + 0x60)); local_a0._0_2_ = CONCAT11(uVar1,1); local_a8 = (Shape **)&PTR_streamReconstructedExpression_0018a390; local_90 = &DAT_0015641c; local_88 = 2; /* try { // try from 00113a9c to 00113aa8 has its CatchHandler @ 00113dae */ local_98 = psVar2; local_80 = (string *)(param_2 + 0x60); Catch::AssertionHandler::handleExpr(local_78,(ITransientExpression *)&local_a8); Catch::ITransientExpression::~ITransientExpression((ITransientExpression *)&local_a8); /* try { // try from 00113ab3 to 00113abc has its CatchHandler @ 00113de1 */ Catch::AssertionHandler::complete(local_78); Catch::AssertionHandler::~AssertionHandler(local_78); local_a8 = (Shape **)0x156028; local_a0 = 0x36; Catch::AssertionHandler::AssertionHandler (local_78,"REQUIRE",7,&local_a8,"lineFromJson->idTo == line.idTo",0x1f,1); psVar2 = (string *)(local_b0 + 0x80); uVar1 = std::operator==(psVar2,(string *)(param_2 + 0x80)); local_a0._0_2_ = CONCAT11(uVar1,1); local_a8 = (Shape **)&PTR_streamReconstructedExpression_0018a390; local_90 = &DAT_0015641c; local_88 = 2; /* try { // try from 00113b4b to 00113b57 has its CatchHandler @ 00113d6c */ local_98 = psVar2; local_80 = (string *)(param_2 + 0x80); Catch::AssertionHandler::handleExpr(local_78,(ITransientExpression *)&local_a8); Catch::ITransientExpression::~ITransientExpression((ITransientExpression *)&local_a8); /* try { // try from 00113b62 to 00113b6b has its CatchHandler @ 00113da9 */ Catch::AssertionHandler::complete(local_78); Catch::AssertionHandler::~AssertionHandler(local_78); local_a8 = (Shape **)0x156028; local_a0 = 0x37; Catch::AssertionHandler::AssertionHandler (local_78,"REQUIRE",7,&local_a8,"lineFromJson->orientation == line.orientation",0x2d,1); local_98 = (string *)(local_b0 + 0xa2); local_80 = (string *)(param_2 + 0xa2); local_a0._0_2_ = CONCAT11(*(short *)(local_b0 + 0xa2) == *(short *)(param_2 + 0xa2),1); local_a8 = (Shape **)&PTR_streamReconstructedExpression_0018a3d0; local_90 = &DAT_0015641c; local_88 = 2; /* try { // try from 00113c00 to 00113c0c has its CatchHandler @ 00113d23 */ Catch::AssertionHandler::handleExpr(local_78,(ITransientExpression *)&local_a8); Catch::ITransientExpression::~ITransientExpression((ITransientExpression *)&local_a8); /* try { // try from 00113c17 to 00113c20 has its CatchHandler @ 00113d67 */ Catch::AssertionHandler::complete(local_78); Catch::AssertionHandler::~AssertionHandler(local_78); local_a8 = (Shape **)0x156028; local_a0 = 0x38; Catch::AssertionHandler::AssertionHandler (local_78,"REQUIRE",7,&local_a8,"lineFromJson->type == line.type",0x1f,1); local_98 = (string *)(local_b0 + 0xa0); local_80 = (string *)(param_2 + 0xa0); local_a0._0_2_ = CONCAT11(*(short *)(local_b0 + 0xa0) == *(short *)(param_2 + 0xa0),1); local_a8 = (Shape **)&PTR_streamReconstructedExpression_0018a410; local_90 = &DAT_0015641c; local_88 = 2; /* try { // try from 00113cae to 00113cba has its CatchHandler @ 00113ceb */ Catch::AssertionHandler::handleExpr(local_78,(ITransientExpression *)&local_a8); Catch::ITransientExpression::~ITransientExpression((ITransientExpression *)&local_a8); /* try { // try from 00113cc5 to 00113cce has its CatchHandler @ 00113d1e */ Catch::AssertionHandler::complete(local_78); Catch::AssertionHandler::~AssertionHandler(local_78); return; }
58,269
my_strndup
eloqsql/mysys/my_malloc.c
char *my_strndup(PSI_memory_key key, const char *from, size_t length, myf my_flags) { char *ptr; DBUG_ENTER("my_strndup"); if ((ptr= (char*) my_malloc(key, length+1, my_flags))) { memcpy(ptr, from, length); ptr[length]= 0; } DBUG_RETURN(ptr); }
O3
c
my_strndup: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 leaq 0x1(%rdx), %rsi movq %rcx, %rdx callq 0x2c995 movq %rax, %r15 testq %rax, %rax je 0x2cce3 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x24250 movb $0x0, (%r15,%rbx) movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nopl (%rax)
my_strndup: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rsi lea rsi, [rdx+1] mov rdx, rcx call my_malloc mov r15, rax test rax, rax jz short loc_2CCE3 mov rdi, r15 mov rsi, r14 mov rdx, rbx call _memcpy mov byte ptr [r15+rbx], 0 loc_2CCE3: mov rax, r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_strndup(unsigned int a1, long long a2, long long a3, int a4) { long long v5; // rax long long v6; // r15 v5 = my_malloc(a1, a3 + 1, a4); v6 = v5; if ( v5 ) { memcpy(v5, a2, a3); *(_BYTE *)(v6 + a3) = 0; } return v6; }
my_strndup: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI LEA RSI,[RDX + 0x1] MOV RDX,RCX CALL 0x0012c995 MOV R15,RAX TEST RAX,RAX JZ 0x0012cce3 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00124250 MOV byte ptr [R15 + RBX*0x1],0x0 LAB_0012cce3: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void * my_strndup(int8 param_1,void *param_2,size_t param_3,int8 param_4) { void *__dest; __dest = (void *)my_malloc(param_1,param_3 + 1,param_4); if (__dest != (void *)0x0) { memcpy(__dest,param_2,param_3); *(int1 *)((long)__dest + param_3) = 0; } return __dest; }
58,270
my_context_yield
eloqsql/libmariadb/libmariadb/ma_context.c
int my_context_yield(struct my_context *c) { uint64_t *save= &c->save[0]; __asm__ __volatile__ ( "movq (%[save]), %%rax\n\t" "movq %%rsp, (%[save])\n\t" "movq %%rax, %%rsp\n\t" "movq 8(%[save]), %%rax\n\t" "movq %%rbp, 8(%[save])\n\t" "movq %%rax, %%rbp\n\t" "movq 16(%[save]), %%rax\n\t" "movq %%rbx, 16(%[save])\n\t" "movq %%rax, %%rbx\n\t" "movq 24(%[save]), %%rax\n\t" "movq %%r12, 24(%[save])\n\t" "movq %%rax, %%r12\n\t" "movq 32(%[save]), %%rax\n\t" "movq %%r13, 32(%[save])\n\t" "movq %%rax, %%r13\n\t" "movq 40(%[save]), %%rax\n\t" "movq %%r14, 40(%[save])\n\t" "movq %%rax, %%r14\n\t" "movq 48(%[save]), %%rax\n\t" "movq %%r15, 48(%[save])\n\t" "movq %%rax, %%r15\n\t" "movq 64(%[save]), %%rax\n\t" "leaq 1f(%%rip), %%rcx\n\t" "movq %%rcx, 64(%[save])\n\t" "jmpq *%%rax\n" "1:\n" : [save] "+D" (save) : : "rax", "rcx", "rdx", "rsi", "r8", "r9", "r10", "r11", "memory", "cc" ); return 0; }
O3
c
my_context_yield: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq %rsp, (%rdi) movq %rax, %rsp movq 0x8(%rdi), %rax movq %rbp, 0x8(%rdi) movq %rax, %rbp movq 0x10(%rdi), %rax movq %rbx, 0x10(%rdi) movq %rax, %rbx movq 0x18(%rdi), %rax movq %r12, 0x18(%rdi) movq %rax, %r12 movq 0x20(%rdi), %rax movq %r13, 0x20(%rdi) movq %rax, %r13 movq 0x28(%rdi), %rax movq %r14, 0x28(%rdi) movq %rax, %r14 movq 0x30(%rdi), %rax movq %r15, 0x30(%rdi) movq %rax, %r15 movq 0x40(%rdi), %rax leaq 0x6(%rip), %rcx # 0x71a89 movq %rcx, 0x40(%rdi) jmpq *%rax xorl %eax, %eax popq %rbp retq
my_context_yield: push rbp mov rbp, rsp mov rax, [rdi] mov [rdi], rsp mov rsp, rax mov rax, [rdi+8] mov [rdi+8], rbp mov rbp, rax mov rax, [rdi+10h] mov [rdi+10h], rbx mov rbx, rax mov rax, [rdi+18h] mov [rdi+18h], r12 mov r12, rax mov rax, [rdi+20h] mov [rdi+20h], r13 mov r13, rax mov rax, [rdi+28h] mov [rdi+28h], r14 mov r14, rax mov rax, [rdi+30h] mov [rdi+30h], r15 mov r15, rax mov rax, [rdi+40h] lea rcx, sub_71A89 mov [rdi+40h], rcx jmp rax
long long my_context_yield(_QWORD *a1) { long long v1; // rbx long long v2; // r12 long long v3; // r13 long long v4; // r14 long long v5; // r15 long long (*v6)(void); // rax long long savedregs; // [rsp+0h] [rbp+0h] BYREF *a1 = &savedregs; a1[1] = &savedregs; a1[2] = v1; a1[3] = v2; a1[4] = v3; a1[5] = v4; a1[6] = v5; v6 = (long long (*)(void))a1[8]; a1[8] = sub_71A89; return v6(); }
my_context_yield: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV qword ptr [RDI],RSP MOV RSP,RAX MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RDI + 0x8],RBP MOV RBP,RAX MOV RAX,qword ptr [RDI + 0x10] MOV qword ptr [RDI + 0x10],RBX MOV RBX,RAX MOV RAX,qword ptr [RDI + 0x18] MOV qword ptr [RDI + 0x18],R12 MOV R12,RAX MOV RAX,qword ptr [RDI + 0x20] MOV qword ptr [RDI + 0x20],R13 MOV R13,RAX MOV RAX,qword ptr [RDI + 0x28] MOV qword ptr [RDI + 0x28],R14 MOV R14,RAX MOV RAX,qword ptr [RDI + 0x30] MOV qword ptr [RDI + 0x30],R15 MOV R15,RAX MOV RAX,qword ptr [RDI + 0x40] LEA RCX,[0x171a89] MOV qword ptr [RDI + 0x40],RCX JMP RAX
void my_context_yield(long param_1) { code *UNRECOVERED_JUMPTABLE; int8 unaff_RBX; int8 unaff_R12; int8 unaff_R13; int8 unaff_R14; int8 unaff_R15; *(int1 **)param_1 = &stack0xfffffffffffffff8; *(int1 **)(param_1 + 8) = &stack0xfffffffffffffff8; *(int8 *)(param_1 + 0x10) = unaff_RBX; *(int8 *)(param_1 + 0x18) = unaff_R12; *(int8 *)(param_1 + 0x20) = unaff_R13; *(int8 *)(param_1 + 0x28) = unaff_R14; *(int8 *)(param_1 + 0x30) = unaff_R15; UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x40); *(int1 **)(param_1 + 0x40) = &LAB_00171a89; /* WARNING: Could not recover jumptable at 0x00171a87. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(); return; }
58,271
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(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&)
llama.cpp/common/json.hpp
basic_json(const basic_json& other) : json_base_class_t(other) { m_data.m_type = other.m_data.m_type; // check of passed value is valid other.assert_invariant(); switch (m_data.m_type) { case value_t::object: { m_data.m_value = *other.m_data.m_value.object; break; } case value_t::array: { m_data.m_value = *other.m_data.m_value.array; break; } case value_t::string: { m_data.m_value = *other.m_data.m_value.string; break; } case value_t::boolean: { m_data.m_value = other.m_data.m_value.boolean; break; } case value_t::number_integer: { m_data.m_value = other.m_data.m_value.number_integer; break; } case value_t::number_unsigned: { m_data.m_value = other.m_data.m_value.number_unsigned; break; } case value_t::number_float: { m_data.m_value = other.m_data.m_value.number_float; break; } case value_t::binary: { m_data.m_value = *other.m_data.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
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>::basic_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> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movb (%rsi), %al movb %al, (%rdi) movq %rsi, %rdi movl $0x1, %esi callq 0x8538a movzbl (%rbx), %eax decl %eax cmpl $0x7, %eax ja 0x8964e leaq 0x8a1b6(%rip), %rcx # 0x1137c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%r14), %rax jmp 0x8964a movq 0x8(%r14), %rdi callq 0x89e52 jmp 0x8964a movq 0x8(%r14), %rdi callq 0x89ea2 jmp 0x8964a movzbl 0x8(%r14), %eax jmp 0x8964a movq 0x8(%r14), %rdi callq 0x89abc jmp 0x8964a movq 0x8(%r14), %rdi callq 0x89cde movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x8538a jmp 0x89668 jmp 0x89668 jmp 0x89668 movq %rax, %r14 movq %rbx, %rdi callq 0x89aa4 movq %r14, %rdi callq 0x20af0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov al, [rsi] mov [rdi], al mov rdi, rsi mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) movzx eax, byte ptr [rbx] dec eax; switch 8 cases cmp eax, 7 ja short def_89611; jumptable 0000000000089611 default case lea rcx, jpt_89611 movsxd rax, ds:(jpt_89611 - 1137C0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_89613: mov rax, [r14+8]; jumptable 0000000000089611 cases 5-7 jmp short loc_8964A loc_89619: mov rdi, [r14+8]; jumptable 0000000000089611 case 3 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,std::string const&>(std::string const&) jmp short loc_8964A loc_89624: mov rdi, [r14+8]; jumptable 0000000000089611 case 8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_8964A loc_8962F: movzx eax, byte ptr [r14+8]; jumptable 0000000000089611 case 4 jmp short loc_8964A loc_89636: mov rdi, [r14+8]; jumptable 0000000000089611 case 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&>(nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) jmp short loc_8964A loc_89641: mov rdi, [r14+8]; jumptable 0000000000089611 case 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,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&>(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_8964A: mov [rbx+8], rax def_89611: mov rdi, rbx; jumptable 0000000000089611 default case mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_89668 jmp short loc_89668 jmp short $+2 loc_89668: mov r14, rax mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( unsigned __int8 *a1, unsigned __int8 *a2) { long long result; // rax *(_OWORD *)a1 = 0LL; *a1 = *a2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a2); result = (unsigned int)*a1 - 1; switch ( *a1 ) { case 1u: 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>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>> const&>( *((_QWORD *)a2 + 1), 1LL); goto LABEL_8; case 2u: 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>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&>( *((_QWORD *)a2 + 1), 1LL); goto LABEL_8; case 3u: 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>::create<std::string,std::string const&>( *((_QWORD *)a2 + 1), 1LL); goto LABEL_8; case 4u: result = a2[8]; goto LABEL_8; case 5u: case 6u: case 7u: result = *((_QWORD *)a2 + 1); goto LABEL_8; case 8u: 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>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>> const&>( *((_QWORD *)a2 + 1), 1LL); LABEL_8: *((_QWORD *)a1 + 1) = result; break; default: break; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
basic_json: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV AL,byte ptr [RSI] MOV byte ptr [RDI],AL MOV RDI,RSI MOV ESI,0x1 CALL 0x0018538a MOVZX EAX,byte ptr [RBX] DEC EAX CMP EAX,0x7 JA 0x0018964e LEA RCX,[0x2137c0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [R14 + 0x8] JMP 0x0018964a caseD_3: MOV RDI,qword ptr [R14 + 0x8] LAB_0018961d: CALL 0x00189e52 JMP 0x0018964a caseD_8: MOV RDI,qword ptr [R14 + 0x8] LAB_00189628: CALL 0x00189ea2 JMP 0x0018964a caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x0018964a caseD_1: MOV RDI,qword ptr [R14 + 0x8] LAB_0018963a: CALL 0x00189abc JMP 0x0018964a caseD_2: MOV RDI,qword ptr [R14 + 0x8] LAB_00189645: CALL 0x00189cde LAB_0018964a: MOV qword ptr [RBX + 0x8],RAX default: MOV RDI,RBX MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x0018538a
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { string *psVar1; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )*param_1; assert_invariant(SUB81(param_1,0)); switch(*this) { case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1: /* try { // try from 0018963a to 0018963e has its CatchHandler @ 00189664 */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>const&> (*(ordered_map **)(param_1 + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: /* try { // try from 00189645 to 00189649 has its CatchHandler @ 00189662 */ psVar1 = (string *) create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,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>>>const&> (*(vector **)(param_1 + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3: /* try { // try from 0018961d to 00189621 has its CatchHandler @ 00189668 */ psVar1 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x4: psVar1 = (string *)(ulong)(byte)param_1[8]; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7: psVar1 = *(string **)(param_1 + 8); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8: /* try { // try from 00189628 to 0018962c has its CatchHandler @ 00189666 */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&> (*(byte_container_with_subtype **)(param_1 + 8)); break; default: goto switchD_00189611_default; } *(string **)(this + 8) = psVar1; switchD_00189611_default: assert_invariant(SUB81(this,0)); return; }
58,272
maria_rtree_get_next
eloqsql/storage/maria/ma_rt_index.c
int maria_rtree_get_next(MARIA_HA *info, uint keynr, uint key_length) { my_off_t root; MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr; uchar *keyread_buff= info->keyread_buff; if (!info->keyread_buff_used) { uint key_data_length= keyinfo->keylength - info->s->base.rec_reflength; /* rt_PAGE_NEXT_KEY(*info->last_rtree_keypos) */ uchar *key= keyread_buff + *info->last_rtree_keypos + keyinfo->keylength; /* rt_PAGE_NEXT_KEY(key) */ uchar *after_key= key + keyinfo->keylength; MARIA_KEY tmp_key; tmp_key.keyinfo= keyinfo; tmp_key.data= key; tmp_key.data_length= key_data_length; tmp_key.ref_length= info->s->base.rec_reflength; tmp_key.flag= 0; info->cur_row.lastpos= _ma_row_pos_from_key(&tmp_key); _ma_copy_key(&info->last_key, &tmp_key); *info->last_rtree_keypos= (uint) (key - keyread_buff); if (after_key >= info->int_maxpos) { info->keyread_buff_used= 1; } return 0; } else { if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR) { my_errno= HA_ERR_END_OF_FILE; return -1; } return maria_rtree_get_req(info, &keyinfo[keynr], key_length, root, 0); } }
O3
c
maria_rtree_get_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq (%rdi), %rax movl %esi, %edx imulq $0x118, %rdx, %rcx # imm = 0x118 movq 0x570(%rax), %rsi addq %rcx, %rsi cmpb $0x0, 0x685(%rdi) je 0x62fb0 movq 0x118(%rax), %rax movq (%rax,%rdx,8), %rdx cmpq $-0x1, %rdx je 0x63037 addq %rcx, %rsi movq %rbx, %rdi xorl %ecx, %ecx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x62c19 movq 0x380(%rbx), %r12 movzwl 0xaa(%rsi), %r15d movl 0x3e0(%rax), %eax movl %r15d, %ecx subl %eax, %ecx movq 0x638(%rbx), %rdx movl (%rdx), %r13d addq %r12, %r13 addq %r15, %r13 addq %r13, %r15 leaq -0x48(%rbp), %r14 movq %rsi, 0x8(%r14) movq %r13, (%r14) movl %ecx, 0x10(%r14) movl %eax, 0x14(%r14) movl $0x0, 0x18(%r14) movq %r14, %rdi callq 0x6e768 movq %rax, 0x98(%rbx) leaq 0x200(%rbx), %rdi movq %r14, %rsi callq 0x431a8 subl %r12d, %r13d movq 0x638(%rbx), %rax movl %r13d, (%rax) cmpq 0x3b8(%rbx), %r15 jb 0x63033 movb $0x1, 0x685(%rbx) xorl %eax, %eax jmp 0x63047 callq 0xa2f56 movl $0x89, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
maria_rtree_get_next: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov rax, [rdi] mov edx, esi imul rcx, rdx, 118h mov rsi, [rax+570h] add rsi, rcx cmp byte ptr [rdi+685h], 0 jz short loc_62FB0 mov rax, [rax+118h] mov rdx, [rax+rdx*8] cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_63037 add rsi, rcx mov rdi, rbx xor ecx, ecx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp maria_rtree_get_req loc_62FB0: mov r12, [rbx+380h] movzx r15d, word ptr [rsi+0AAh] mov eax, [rax+3E0h] mov ecx, r15d sub ecx, eax mov rdx, [rbx+638h] mov r13d, [rdx] add r13, r12 add r13, r15 add r15, r13 lea r14, [rbp+var_48] mov [r14+8], rsi mov [r14], r13 mov [r14+10h], ecx mov [r14+14h], eax mov dword ptr [r14+18h], 0 mov rdi, r14 call _ma_row_pos_from_key mov [rbx+98h], rax lea rdi, [rbx+200h] mov rsi, r14 call _ma_copy_key sub r13d, r12d mov rax, [rbx+638h] mov [rax], r13d cmp r15, [rbx+3B8h] jb short loc_63033 mov byte ptr [rbx+685h], 1 loc_63033: xor eax, eax jmp short loc_63047 loc_63037: call _my_thread_var mov dword ptr [rax], 89h mov eax, 0FFFFFFFFh loc_63047: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long maria_rtree_get_next(long long *a1, unsigned int a2) { long long v2; // rax long long v3; // rdx long long v4; // rcx long long v5; // rsi long long v6; // rdx long long v8; // r12 long long v9; // r15 unsigned int v10; // eax unsigned int v11; // ecx long long v12; // r13 _QWORD v13[2]; // [rsp+8h] [rbp-48h] BYREF unsigned int v14; // [rsp+18h] [rbp-38h] long long v15; // [rsp+1Ch] [rbp-34h] v2 = *a1; v3 = a2; v4 = 280LL * a2; v5 = v4 + *(_QWORD *)(*a1 + 1392); if ( *((_BYTE *)a1 + 1669) ) { v6 = *(_QWORD *)(*(_QWORD *)(v2 + 280) + 8 * v3); if ( v6 == -1 ) { *(_DWORD *)my_thread_var(a1) = 137; return 0xFFFFFFFFLL; } else { return maria_rtree_get_req(a1, v4 + v5, v6, 0LL); } } else { v8 = a1[112]; v9 = *(unsigned __int16 *)(v5 + 170); v10 = *(_DWORD *)(v2 + 992); v11 = *(unsigned __int16 *)(v5 + 170) - v10; v12 = v9 + v8 + *(unsigned int *)a1[199]; v13[1] = v5; v13[0] = v12; v14 = v11; v15 = v10; a1[19] = ma_row_pos_from_key(v13); ma_copy_key((long long)(a1 + 64), (long long)v13); *(_DWORD *)a1[199] = v12 - v8; if ( v12 + v9 >= (unsigned long long)a1[119] ) *((_BYTE *)a1 + 1669) = 1; return 0LL; } }
maria_rtree_get_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV EDX,ESI IMUL RCX,RDX,0x118 MOV RSI,qword ptr [RAX + 0x570] ADD RSI,RCX CMP byte ptr [RDI + 0x685],0x0 JZ 0x00162fb0 MOV RAX,qword ptr [RAX + 0x118] MOV RDX,qword ptr [RAX + RDX*0x8] CMP RDX,-0x1 JZ 0x00163037 ADD RSI,RCX MOV RDI,RBX XOR ECX,ECX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00162c19 LAB_00162fb0: MOV R12,qword ptr [RBX + 0x380] MOVZX R15D,word ptr [RSI + 0xaa] MOV EAX,dword ptr [RAX + 0x3e0] MOV ECX,R15D SUB ECX,EAX MOV RDX,qword ptr [RBX + 0x638] MOV R13D,dword ptr [RDX] ADD R13,R12 ADD R13,R15 ADD R15,R13 LEA R14,[RBP + -0x48] MOV qword ptr [R14 + 0x8],RSI MOV qword ptr [R14],R13 MOV dword ptr [R14 + 0x10],ECX MOV dword ptr [R14 + 0x14],EAX MOV dword ptr [R14 + 0x18],0x0 MOV RDI,R14 CALL 0x0016e768 MOV qword ptr [RBX + 0x98],RAX LEA RDI,[RBX + 0x200] MOV RSI,R14 CALL 0x001431a8 SUB R13D,R12D MOV RAX,qword ptr [RBX + 0x638] MOV dword ptr [RAX],R13D CMP R15,qword ptr [RBX + 0x3b8] JC 0x00163033 MOV byte ptr [RBX + 0x685],0x1 LAB_00163033: XOR EAX,EAX JMP 0x00163047 LAB_00163037: CALL 0x001a2f56 MOV dword ptr [RAX],0x89 MOV EAX,0xffffffff LAB_00163047: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 maria_rtree_get_next(long *param_1,ulong param_2) { ushort uVar1; int8 uVar2; long lVar3; int4 *puVar4; long lVar5; long lVar6; long local_50; long local_48; int local_40; int local_3c; int4 local_38; lVar3 = *param_1; lVar5 = (param_2 & 0xffffffff) * 0x118; local_48 = *(long *)(lVar3 + 0x570) + lVar5; if (*(char *)((long)param_1 + 0x685) == '\0') { lVar5 = param_1[0x70]; uVar1 = *(ushort *)(local_48 + 0xaa); local_3c = *(int *)(lVar3 + 0x3e0); local_40 = (uint)uVar1 - local_3c; lVar6 = (ulong)*(uint *)param_1[199] + lVar5 + (ulong)uVar1; local_38 = 0; local_50 = lVar6; lVar3 = _ma_row_pos_from_key(&local_50); param_1[0x13] = lVar3; _ma_copy_key(param_1 + 0x40,&local_50); *(int *)param_1[199] = (int)lVar6 - (int)lVar5; if ((ulong)param_1[0x77] <= (ulong)uVar1 + lVar6) { *(int1 *)((long)param_1 + 0x685) = 1; } uVar2 = 0; } else { lVar3 = *(long *)(*(long *)(lVar3 + 0x118) + (param_2 & 0xffffffff) * 8); if (lVar3 != -1) { uVar2 = maria_rtree_get_req(param_1,local_48 + lVar5,lVar3,0); return uVar2; } puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x89; uVar2 = 0xffffffff; } return uVar2; }
58,273
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const
llama.cpp/common/json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O3
cpp
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x8072f testq %rax, %rax je 0x8078d movzbl (%rax), %eax cmpl $0x2, %eax je 0x8070f cmpl $0x1, %eax jne 0x80719 movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x80721 movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x80721 movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x20640 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x9a16b(%rip), %rsi # 0x11a8b7 leaq 0x9a194(%rip), %rdx # 0x11a8e7 leaq 0x8(%rsp), %rdi callq 0x28870 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x807e2 xorl %ebp, %ebp leaq 0xdf882(%rip), %rsi # 0x160000 leaq -0xa175(%rip), %rdx # 0x76610 movq %rbx, %rdi callq 0x20a40 leaq 0x99124(%rip), %rdi # 0x1198b8 leaq 0x91a72(%rip), %rdx # 0x11220d leaq 0x9f476(%rip), %rcx # 0x11fc18 movl $0x3422, %esi # imm = 0x3422 xorl %eax, %eax callq 0x20e60 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x807c8 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0x807d2 jmp 0x807da movq %rax, %r14 movq %rbx, %rdi callq 0x20ef0 movq %r14, %rdi callq 0x20ae0
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: push rbp; void * push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_8072F test rax, rax jz loc_8078D movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_8070F cmp eax, 1 jnz short loc_80719 mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_80721 loc_8070F: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_80721 loc_80719: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_80721: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_8072F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdx, aCannotCompareI+30h; "" lea rdi, [rsp+48h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_8078D: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3422h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_807C8 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_807C8: test bpl, bpl jnz short loc_807D2 jmp short loc_807DA mov r14, rax loc_807D2: mov rdi, rbx; void * call ___cxa_free_exception loc_807DA: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RSI] JNZ 0x0018072f TEST RAX,RAX JZ 0x0018078d MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0018070f CMP EAX,0x1 JNZ 0x00180719 MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x00180721 LAB_0018070f: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x00180721 LAB_00180719: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_00180721: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0018072f: MOV EDI,0x20 CALL 0x00120640 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_00180745: LEA RSI,[0x21a8b7] LEA RDX,[0x21a8e7] LEA RDI,[RSP + 0x8] CALL 0x00128870 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_00180763: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x001807e2 XOR EBP,EBP LEA RSI,[0x260000] LEA RDX,[0x176610] MOV RDI,RBX CALL 0x00120a40 LAB_0018078d: LEA RDI,[0x2198b8] LEA RDX,[0x21220d] LEA RCX,[0x21fc18] MOV ESI,0x3422 XOR EAX,EAX CALL 0x00120e60
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ (int8 *param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; pcVar1 = (char *)*param_1; if (pcVar1 != (char *)*param_2) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 00180745 to 0018075c has its CatchHandler @ 001807cf */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 00180763 to 0018078c has its CatchHandler @ 001807ae */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (pcVar1 != (char *)0x0) { if (*pcVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (*pcVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x3422, "GGML_ASSERT(%s) failed","m_object != nullptr"); }
58,274
CLI::FailureMessage::simple[abi:cxx11](CLI::App const*, CLI::Error const&)
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE std::string simple(const App *app, const Error &e) { std::string header = std::string(e.what()) + "\n"; std::vector<std::string> names; // Collect names if(app->get_help_ptr() != nullptr) names.push_back(app->get_help_ptr()->get_name()); if(app->get_help_all_ptr() != nullptr) names.push_back(app->get_help_all_ptr()->get_name()); // If any names found, suggest those if(!names.empty()) header += "Run with " + detail::join(names, " or ") + " for more information.\n"; return header; }
O2
cpp
CLI::FailureMessage::simple[abi:cxx11](CLI::App const*, CLI::Error const&): pushq %r14 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %rbx movq (%rdx), %rax movq %rdx, %rdi callq *0x10(%rax) leaq 0x10(%rsp), %rdi leaq 0x48(%rsp), %rdx movq %rax, %rsi callq 0x8762 leaq 0x17832(%rip), %rdx # 0x29da5 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0xfaba leaq 0x10(%rsp), %rdi callq 0x7860 andq $0x0, 0x40(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movq 0x130(%r14), %rsi testq %rsi, %rsi je 0x125cb leaq 0x10(%rsp), %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0xf2c4 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xfba6 leaq 0x10(%rsp), %rdi callq 0x7860 movq 0x138(%r14), %rsi testq %rsi, %rsi je 0x125fe leaq 0x10(%rsp), %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0xf2c4 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xfba6 leaq 0x10(%rsp), %rdi callq 0x7860 movq 0x30(%rsp), %rax cmpq 0x38(%rsp), %rax je 0x126a2 leaq 0x16fbb(%rip), %rsi # 0x295d0 leaq 0x68(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x8762 leaq 0x88(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0xfafd leaq 0x16f84(%rip), %rsi # 0x295c6 leaq 0x48(%rsp), %rdi leaq 0x88(%rsp), %rdx callq 0xfad9 leaq 0x16f7a(%rip), %rdx # 0x295d5 leaq 0x10(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0xfaba leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x7800 leaq 0x10(%rsp), %rdi callq 0x7860 leaq 0x48(%rsp), %rdi callq 0x7860 leaq 0x88(%rsp), %rdi callq 0x7860 leaq 0x68(%rsp), %rdi callq 0x7860 leaq 0x30(%rsp), %rdi callq 0x99ca movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x7860 jmp 0x126cc movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x7860 jmp 0x126db movq %rax, %r14 leaq 0x88(%rsp), %rdi callq 0x7860 jmp 0x126ed movq %rax, %r14 leaq 0x68(%rsp), %rdi jmp 0x12702 jmp 0x12709 jmp 0x126fa jmp 0x12709 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x7860 jmp 0x1270c movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x99ca movq %rbx, %rdi callq 0x7860 movq %r14, %rdi callq 0x7770 movq %rax, %r14 leaq 0x10(%rsp), %rdi jmp 0x12719 movq %rax, %r14 jmp 0x1271e nop
_ZN3CLI14FailureMessage6simpleB5cxx11EPKNS_3AppERKNS_5ErrorE: push r14 push rbx sub rsp, 0A8h mov r14, rsi mov rbx, rdi mov rax, [rdx] mov rdi, rdx call qword ptr [rax+10h] lea rdi, [rsp+0B8h+var_A8] lea rdx, [rsp+0B8h+var_70] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdx, asc_29DA4+1; "\n" lea rsi, [rsp+0B8h+var_A8] mov rdi, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() and [rsp+0B8h+var_78], 0 xorps xmm0, xmm0 movaps [rsp+0B8h+var_88], xmm0 mov rsi, [r14+130h] test rsi, rsi jz short loc_125CB lea rdi, [rsp+0B8h+var_A8] xor edx, edx xor ecx, ecx call _ZNK3CLI6Option8get_nameB5cxx11Ebb; CLI::Option::get_name(bool,bool) lea rdi, [rsp+0B8h+var_88] lea rsi, [rsp+0B8h+var_A8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_125CB: mov rsi, [r14+138h] test rsi, rsi jz short loc_125FE lea rdi, [rsp+0B8h+var_A8] xor edx, edx xor ecx, ecx call _ZNK3CLI6Option8get_nameB5cxx11Ebb; CLI::Option::get_name(bool,bool) lea rdi, [rsp+0B8h+var_88] lea rsi, [rsp+0B8h+var_A8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_125FE: mov rax, qword ptr [rsp+0B8h+var_88] cmp rax, qword ptr [rsp+0B8h+var_88+8] jz loc_126A2 lea rsi, aOr; " or " lea rdi, [rsp+0B8h+var_50] lea rdx, [rsp+0B8h+var_A9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0B8h+var_30] lea rsi, [rsp+0B8h+var_88] lea rdx, [rsp+0B8h+var_50] call _ZN3CLI6detail4joinISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEEES8_RKT_S8_; CLI::detail::join<std::vector<std::string>>(std::vector<std::string> const&,std::string) lea rsi, aRunWith; "Run with " lea rdi, [rsp+0B8h+var_70] lea rdx, [rsp+0B8h+var_30] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, aForMoreInforma; " for more information.\n" lea rdi, [rsp+0B8h+var_A8] lea rsi, [rsp+0B8h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, [rsp+0B8h+var_A8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_126A2: lea rdi, [rsp+0B8h+var_88] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 0A8h pop rbx pop r14 retn mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_126CC mov r14, rax loc_126CC: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_126DB mov r14, rax loc_126DB: lea rdi, [rsp+arg_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_126ED mov r14, rax loc_126ED: lea rdi, [rsp+arg_60] jmp short loc_12702 jmp short loc_12709 jmp short loc_126FA jmp short loc_12709 loc_126FA: mov r14, rax lea rdi, [rsp+arg_8]; void * loc_12702: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1270C loc_12709: mov r14, rax loc_1270C: lea rdi, [rsp+arg_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbx; void * loc_12719: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1271E: mov rdi, r14 call __Unwind_Resume mov r14, rax lea rdi, [rsp+arg_8] jmp short loc_12719 mov r14, rax jmp short loc_1271E
long long CLI::FailureMessage::simple[abi:cxx11](long long a1, long long a2, long long a3) { long long v4; // rax long long v5; // rsi long long v6; // rsi _QWORD v8[4]; // [rsp+10h] [rbp-A8h] BYREF __int128 v9; // [rsp+30h] [rbp-88h] BYREF long long v10; // [rsp+40h] [rbp-78h] _BYTE v11[32]; // [rsp+48h] [rbp-70h] BYREF _QWORD v12[4]; // [rsp+68h] [rbp-50h] BYREF _BYTE v13[48]; // [rsp+88h] [rbp-30h] BYREF v4 = (*(long long ( **)(long long))(*(_QWORD *)a3 + 16LL))(a3); std::string::basic_string<std::allocator<char>>(v8, v4); std::operator+<char>(a1, (long long)v8, (long long)"\n"); std::string::~string(v8); v10 = 0LL; v9 = 0LL; v5 = *(_QWORD *)(a2 + 304); if ( v5 ) { CLI::Option::get_name[abi:cxx11]((long long)v8, v5, 0, 0); std::vector<std::string>::emplace_back<std::string>((long long)&v9, (long long)v8); std::string::~string(v8); } v6 = *(_QWORD *)(a2 + 312); if ( v6 ) { CLI::Option::get_name[abi:cxx11]((long long)v8, v6, 0, 0); std::vector<std::string>::emplace_back<std::string>((long long)&v9, (long long)v8); std::string::~string(v8); } if ( (_QWORD)v9 != *((_QWORD *)&v9 + 1) ) { std::string::basic_string<std::allocator<char>>(v12, (long long)" or "); CLI::detail::join<std::vector<std::string>>((long long)v13, &v9, (long long)v12); std::operator+<char>((long long)v11, (long long)"Run with ", (long long)v13); std::operator+<char>((long long)v8, (long long)v11, (long long)" for more information.\n"); std::string::append(a1, v8); std::string::~string(v8); std::string::~string(v11); std::string::~string(v13); std::string::~string(v12); } std::vector<std::string>::~vector((long long)&v9); return a1; }
simple[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDX] MOV RDI,RDX CALL qword ptr [RAX + 0x10] LAB_0011255a: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x48] MOV RSI,RAX CALL 0x00108762 LAB_0011256c: LEA RDX,[0x129da5] LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x0010faba LEA RDI,[RSP + 0x10] CALL 0x00107860 AND qword ptr [RSP + 0x40],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV RSI,qword ptr [R14 + 0x130] TEST RSI,RSI JZ 0x001125cb LAB_001125a4: LEA RDI,[RSP + 0x10] XOR EDX,EDX XOR ECX,ECX CALL 0x0010f2c4 LAB_001125b2: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] CALL 0x0010fba6 LEA RDI,[RSP + 0x10] CALL 0x00107860 LAB_001125cb: MOV RSI,qword ptr [R14 + 0x138] TEST RSI,RSI JZ 0x001125fe LAB_001125d7: LEA RDI,[RSP + 0x10] XOR EDX,EDX XOR ECX,ECX CALL 0x0010f2c4 LAB_001125e5: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] CALL 0x0010fba6 LEA RDI,[RSP + 0x10] CALL 0x00107860 LAB_001125fe: MOV RAX,qword ptr [RSP + 0x30] CMP RAX,qword ptr [RSP + 0x38] JZ 0x001126a2 LAB_0011260e: LEA RSI,[0x1295d0] LEA RDI,[RSP + 0x68] LEA RDX,[RSP + 0xf] CALL 0x00108762 LAB_00112624: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x68] CALL 0x0010fafd LAB_0011263b: LEA RSI,[0x1295c6] LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x88] CALL 0x0010fad9 LAB_00112654: LEA RDX,[0x1295d5] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x48] CALL 0x0010faba LAB_0011266a: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00107800 LAB_00112677: LEA RDI,[RSP + 0x10] CALL 0x00107860 LEA RDI,[RSP + 0x48] CALL 0x00107860 LEA RDI,[RSP + 0x88] CALL 0x00107860 LEA RDI,[RSP + 0x68] CALL 0x00107860 LAB_001126a2: LEA RDI,[RSP + 0x30] CALL 0x001099ca MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R14 RET
/* CLI::FailureMessage::simple[abi:cxx11](CLI::App const*, CLI::Error const&) */ FailureMessage * __thiscall CLI::FailureMessage::simple_abi_cxx11_(FailureMessage *this,App *param_1,Error *param_2) { char *pcVar1; allocator local_a9; string local_a8 [32]; long local_88; long lStack_80; int8 local_78; allocator local_70 [32]; string local_50 [32]; detail local_30 [32]; pcVar1 = (char *)(**(code **)(*(long *)param_2 + 0x10))(param_2); /* try { // try from 0011255a to 0011256b has its CatchHandler @ 00112730 */ std::__cxx11::string::string<std::allocator<char>>(local_a8,pcVar1,local_70); /* try { // try from 0011256c to 0011257f has its CatchHandler @ 00112726 */ std::operator+((string *)this,(char *)local_a8); std::__cxx11::string::~string(local_a8); local_78 = 0; local_88 = 0; lStack_80 = 0; if (*(long *)(param_1 + 0x130) != 0) { /* try { // try from 001125a4 to 001125b1 has its CatchHandler @ 00112709 */ Option::get_name_abi_cxx11_(SUB81(local_a8,0),SUB81(*(long *)(param_1 + 0x130),0)); /* try { // try from 001125b2 to 001125c0 has its CatchHandler @ 001126fa */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88, local_a8); std::__cxx11::string::~string(local_a8); } if (*(long *)(param_1 + 0x138) != 0) { /* try { // try from 001125d7 to 001125e4 has its CatchHandler @ 001126f8 */ Option::get_name_abi_cxx11_(SUB81(local_a8,0),SUB81(*(long *)(param_1 + 0x138),0)); /* try { // try from 001125e5 to 001125f3 has its CatchHandler @ 001126f6 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88, local_a8); std::__cxx11::string::~string(local_a8); } if (local_88 != lStack_80) { /* try { // try from 0011260e to 00112623 has its CatchHandler @ 001126f4 */ std::__cxx11::string::string<std::allocator<char>>(local_50," or ",&local_a9); /* try { // try from 00112624 to 0011263a has its CatchHandler @ 001126ea */ detail::join<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> (local_30,&local_88,local_50); /* try { // try from 0011263b to 00112653 has its CatchHandler @ 001126d8 */ std::operator+((char *)local_70,(string *)"Run with "); /* try { // try from 00112654 to 00112669 has its CatchHandler @ 001126c9 */ std::operator+(local_a8,(char *)local_70); /* try { // try from 0011266a to 00112676 has its CatchHandler @ 001126ba */ std::__cxx11::string::append((string *)this); std::__cxx11::string::~string(local_a8); std::__cxx11::string::~string((string *)local_70); std::__cxx11::string::~string((string *)local_30); std::__cxx11::string::~string(local_50); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88); return this; }
58,275
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; }
O0
c
lo0bits: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax je 0x8374d movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x83713 movl $0x0, -0x4(%rbp) jmp 0x83806 movl -0x18(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x83735 movl -0x18(%rbp), %ecx shrl %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x83806 movl -0x18(%rbp), %ecx shrl $0x2, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x83806 movl $0x0, -0x14(%rbp) movl -0x18(%rbp), %eax andl $0xffff, %eax # imm = 0xFFFF cmpl $0x0, %eax jne 0x83771 movl $0x10, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x10, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0xff, %eax cmpl $0x0, %eax jne 0x83790 movl -0x14(%rbp), %eax addl $0x8, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x8, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0xf, %eax cmpl $0x0, %eax jne 0x837ad movl -0x14(%rbp), %eax addl $0x4, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x4, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x3, %eax cmpl $0x0, %eax jne 0x837ca movl -0x14(%rbp), %eax addl $0x2, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x2, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x837f7 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl %eax movl %eax, -0x18(%rbp) cmpl $0x0, -0x18(%rbp) jne 0x837f5 movl $0x20, -0x4(%rbp) jmp 0x83806 jmp 0x837f7 movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
lo0bits: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_18], eax mov eax, [rbp+var_18] and eax, 7 cmp eax, 0 jz short loc_8374D mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jz short loc_83713 mov [rbp+var_4], 0 jmp loc_83806 loc_83713: mov eax, [rbp+var_18] and eax, 2 cmp eax, 0 jz short loc_83735 mov ecx, [rbp+var_18] shr ecx, 1 mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 1 jmp loc_83806 loc_83735: mov ecx, [rbp+var_18] shr ecx, 2 mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 2 jmp loc_83806 loc_8374D: mov [rbp+var_14], 0 mov eax, [rbp+var_18] and eax, 0FFFFh cmp eax, 0 jnz short loc_83771 mov [rbp+var_14], 10h mov eax, [rbp+var_18] shr eax, 10h mov [rbp+var_18], eax loc_83771: mov eax, [rbp+var_18] and eax, 0FFh cmp eax, 0 jnz short loc_83790 mov eax, [rbp+var_14] add eax, 8 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 8 mov [rbp+var_18], eax loc_83790: mov eax, [rbp+var_18] and eax, 0Fh cmp eax, 0 jnz short loc_837AD mov eax, [rbp+var_14] add eax, 4 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 4 mov [rbp+var_18], eax loc_837AD: mov eax, [rbp+var_18] and eax, 3 cmp eax, 0 jnz short loc_837CA mov eax, [rbp+var_14] add eax, 2 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 2 mov [rbp+var_18], eax loc_837CA: mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jnz short loc_837F7 mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 1 mov [rbp+var_18], eax cmp [rbp+var_18], 0 jnz short loc_837F5 mov [rbp+var_4], 20h ; ' ' jmp short loc_83806 loc_837F5: jmp short $+2 loc_837F7: mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], ecx mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_83806: mov eax, [rbp+var_4] pop rbp retn
long long lo0bits(unsigned int *a1) { unsigned int v2; // [rsp+0h] [rbp-18h] unsigned int v3; // [rsp+4h] [rbp-14h] v2 = *a1; if ( (*a1 & 7) != 0 ) { if ( (v2 & 1) != 0 ) { return 0; } else if ( (v2 & 2) != 0 ) { *a1 = v2 >> 1; return 1; } else { *a1 = v2 >> 2; return 2; } } else { v3 = 0; if ( !(_WORD)v2 ) { v3 = 16; v2 >>= 16; } if ( !(_BYTE)v2 ) { v3 += 8; v2 >>= 8; } if ( (v2 & 0xF) == 0 ) { v3 += 4; v2 >>= 4; } if ( (v2 & 3) == 0 ) { v3 += 2; v2 >>= 2; } if ( (v2 & 1) != 0 || (++v3, (v2 >>= 1) != 0) ) { *a1 = v2; return v3; } else { return 32; } } }
lo0bits: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x7 CMP EAX,0x0 JZ 0x0018374d MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JZ 0x00183713 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00183806 LAB_00183713: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x2 CMP EAX,0x0 JZ 0x00183735 MOV ECX,dword ptr [RBP + -0x18] SHR ECX,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00183806 LAB_00183735: MOV ECX,dword ptr [RBP + -0x18] SHR ECX,0x2 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00183806 LAB_0018374d: MOV dword ptr [RBP + -0x14],0x0 MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xffff CMP EAX,0x0 JNZ 0x00183771 MOV dword ptr [RBP + -0x14],0x10 MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x10 MOV dword ptr [RBP + -0x18],EAX LAB_00183771: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xff CMP EAX,0x0 JNZ 0x00183790 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x8 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x8 MOV dword ptr [RBP + -0x18],EAX LAB_00183790: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xf CMP EAX,0x0 JNZ 0x001837ad MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x4 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x4 MOV dword ptr [RBP + -0x18],EAX LAB_001837ad: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x3 CMP EAX,0x0 JNZ 0x001837ca MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x2 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x2 MOV dword ptr [RBP + -0x18],EAX LAB_001837ca: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001837f7 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x1 MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [RBP + -0x18],0x0 JNZ 0x001837f5 MOV dword ptr [RBP + -0x4],0x20 JMP 0x00183806 LAB_001837f5: JMP 0x001837f7 LAB_001837f7: MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_00183806: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int lo0bits(uint *param_1) { uint local_20; int local_1c; int local_c; local_20 = *param_1; if ((local_20 & 7) == 0) { local_1c = 0; if ((local_20 & 0xffff) == 0) { local_1c = 0x10; local_20 = local_20 >> 0x10; } if ((local_20 & 0xff) == 0) { local_1c = local_1c + 8; local_20 = local_20 >> 8; } if ((local_20 & 0xf) == 0) { local_1c = local_1c + 4; local_20 = local_20 >> 4; } if ((local_20 & 3) == 0) { local_1c = local_1c + 2; local_20 = local_20 >> 2; } if ((local_20 & 1) == 0) { local_1c = local_1c + 1; local_20 = local_20 >> 1; if (local_20 == 0) { return 0x20; } } *param_1 = local_20; local_c = local_1c; } else if ((local_20 & 1) == 0) { if ((local_20 & 2) == 0) { *param_1 = local_20 >> 2; local_c = 2; } else { *param_1 = local_20 >> 1; local_c = 1; } } else { local_c = 0; } return local_c; }
58,276
ma_cmp_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_cmp_static_record(register MARIA_HA *info, register const uchar *old) { DBUG_ENTER("_ma_cmp_static_record"); if (info->opt_flag & WRITE_CACHE_USED) { if (flush_io_cache(&info->rec_cache)) { DBUG_RETURN(1); } info->rec_cache.seek_not_done=1; /* We have done a seek */ } if ((info->opt_flag & READ_CHECK_USED)) { /* If check isn't disabled */ info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_read(info, info->rec_buff, info->s->base.reclength, info->cur_row.lastpos, MYF(MY_NABP))) DBUG_RETURN(1); if (memcmp(info->rec_buff, old, (uint) info->s->base.reclength)) { DBUG_DUMP("read",old,info->s->base.reclength); DBUG_DUMP("disk",info->rec_buff,info->s->base.reclength); my_errno=HA_ERR_RECORD_CHANGED; /* Record have changed */ DBUG_RETURN(1); } } DBUG_RETURN(0); }
O0
c
ma_cmp_static_record: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x9cef5 movq -0x10(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe2310 cmpl $0x0, %eax je 0x9cee7 jmp 0x9cede movb $0x1, -0x1(%rbp) jmp 0x9cfb1 movq -0x10(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x10(%rbp), %rax movl 0x61c(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x9cfab movq -0x10(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x6e0(%rax), %rax movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x3a0(%rcx), %rsi movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq 0x398(%rcx), %rdx movq -0x10(%rbp), %rcx movq 0x98(%rcx), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x9cf65 jmp 0x9cf5f movb $0x1, -0x1(%rbp) jmp 0x9cfb1 movq -0x10(%rbp), %rax movq 0x3a0(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x398(%rax), %rax movl %eax, %eax movl %eax, %edx callq 0x2a810 cmpl $0x0, %eax je 0x9cfa9 jmp 0x9cf92 jmp 0x9cf94 jmp 0x9cf96 jmp 0x9cf98 callq 0xf7a70 movl $0x7b, (%rax) movb $0x1, -0x1(%rbp) jmp 0x9cfb1 jmp 0x9cfab jmp 0x9cfad movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_cmp_static_record: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_9CEF5 mov rdi, [rbp+var_10] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_9CEE7 jmp short $+2 loc_9CEDE: mov [rbp+var_1], 1 jmp loc_9CFB1 loc_9CEE7: mov rax, [rbp+var_10] mov dword ptr [rax+598h], 1 loc_9CEF5: mov rax, [rbp+var_10] mov eax, [rax+61Ch] and eax, 4 cmp eax, 0 jz loc_9CFAB mov rax, [rbp+var_10] mov dword ptr [rax+598h], 1 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+6E0h] mov rdi, [rbp+var_10] mov rcx, [rbp+var_10] mov rsi, [rcx+3A0h] mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdx, [rcx+398h] mov rcx, [rbp+var_10] mov rcx, [rcx+98h] mov r8d, 4 call rax cmp rax, 0 jz short loc_9CF65 jmp short $+2 loc_9CF5F: mov [rbp+var_1], 1 jmp short loc_9CFB1 loc_9CF65: mov rax, [rbp+var_10] mov rdi, [rax+3A0h] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+398h] mov eax, eax mov edx, eax call _memcmp cmp eax, 0 jz short loc_9CFA9 jmp short $+2 loc_9CF92: jmp short $+2 loc_9CF94: jmp short $+2 loc_9CF96: jmp short $+2 loc_9CF98: call _my_thread_var mov dword ptr [rax], 7Bh ; '{' mov [rbp+var_1], 1 jmp short loc_9CFB1 loc_9CFA9: jmp short $+2 loc_9CFAB: jmp short $+2 loc_9CFAD: mov [rbp+var_1], 0 loc_9CFB1: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_cmp_static_record(long long a1, const char *a2) { long long v2; // rdi if ( (*(_DWORD *)(a1 + 1564) & 0x10) == 0 ) { LABEL_5: if ( (*(_DWORD *)(a1 + 1564) & 4) != 0 ) { *(_DWORD *)(a1 + 1432) = 1; if ( (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, long long))(*(_QWORD *)a1 + 1760LL))( a1, *(_QWORD *)(a1 + 928), *(_QWORD *)(*(_QWORD *)a1 + 920LL), *(_QWORD *)(a1 + 152), 4LL) ) { return 1; } v2 = *(_QWORD *)(a1 + 928); if ( (unsigned int)memcmp(v2, a2, (unsigned int)*(_QWORD *)(*(_QWORD *)a1 + 920LL)) ) { *(_DWORD *)my_thread_var(v2, a2) = 123; return 1; } } return 0; } if ( !(unsigned int)my_b_flush_io_cache(a1 + 1208, 1LL) ) { *(_DWORD *)(a1 + 1432) = 1; goto LABEL_5; } return 1; }
_ma_cmp_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x0019cef5 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e2310 CMP EAX,0x0 JZ 0x0019cee7 JMP 0x0019cede LAB_0019cede: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0019cfb1 LAB_0019cee7: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x598],0x1 LAB_0019cef5: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x4 CMP EAX,0x0 JZ 0x0019cfab MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x598],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e0] MOV RDI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x3a0] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x398] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x98] MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0019cf65 JMP 0x0019cf5f LAB_0019cf5f: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0019cfb1 LAB_0019cf65: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x3a0] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x398] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a810 CMP EAX,0x0 JZ 0x0019cfa9 JMP 0x0019cf92 LAB_0019cf92: JMP 0x0019cf94 LAB_0019cf94: JMP 0x0019cf96 LAB_0019cf96: JMP 0x0019cf98 LAB_0019cf98: CALL 0x001f7a70 MOV dword ptr [RAX],0x7b MOV byte ptr [RBP + -0x1],0x1 JMP 0x0019cfb1 LAB_0019cfa9: JMP 0x0019cfab LAB_0019cfab: JMP 0x0019cfad LAB_0019cfad: MOV byte ptr [RBP + -0x1],0x0 LAB_0019cfb1: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 _ma_cmp_static_record(long *param_1,void *param_2) { int iVar1; long lVar2; int4 *puVar3; if ((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) { iVar1 = my_b_flush_io_cache(param_1 + 0x97,1); if (iVar1 != 0) { return 1; } *(int4 *)(param_1 + 0xb3) = 1; } if ((*(uint *)((long)param_1 + 0x61c) & 4) != 0) { *(int4 *)(param_1 + 0xb3) = 1; lVar2 = (**(code **)(*param_1 + 0x6e0)) (param_1,param_1[0x74],*(int8 *)(*param_1 + 0x398),param_1[0x13],4); if (lVar2 != 0) { return 1; } iVar1 = memcmp((void *)param_1[0x74],param_2,*(ulong *)(*param_1 + 0x398) & 0xffffffff); if (iVar1 != 0) { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x7b; return 1; } } return 0; }
58,277
String::append_with_prefill(char const*, unsigned int, unsigned int, char)
eloqsql/sql/sql_string.cc
bool String::append_with_prefill(const char *s,uint32 arg_length, uint32 full_length, char fill_char) { int t_length= arg_length > full_length ? arg_length : full_length; if (realloc_with_extra_if_needed(str_length + t_length)) return TRUE; t_length= full_length - arg_length; if (t_length > 0) { bfill(Ptr+str_length, t_length, fill_char); str_length=str_length + t_length; } append(s, arg_length); return FALSE; }
O3
cpp
String::append_with_prefill(char const*, unsigned int, unsigned int, char): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r8d, %r13d movl %ecx, %r12d movl %edx, %r15d movq %rsi, %rbx movq %rdi, %r14 cmpl %ecx, %edx movl %ecx, %esi cmoval %edx, %esi addq $0x8, %rdi addl 0x10(%r14), %esi cmpl %esi, 0x14(%r14) jbe 0x273c1 movq (%rdi), %rax movb $0x0, (%rax,%rsi) jmp 0x273ce callq 0x27da8 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x273fe subl %r15d, %r12d testl %r12d, %r12d jle 0x273ee movl 0x10(%r14), %edi addq 0x8(%r14), %rdi movl %r12d, %edx movzbl %r13b, %esi callq 0x241e0 addl %r12d, 0x10(%r14) movl %r15d, %edx movq %r14, %rdi movq %rbx, %rsi callq 0x26f62 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN6String19append_with_prefillEPKcjjc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13d, r8d mov r12d, ecx mov r15d, edx mov rbx, rsi mov r14, rdi cmp edx, ecx mov esi, ecx cmova esi, edx add rdi, 8; this add esi, [r14+10h]; unsigned __int64 cmp [r14+14h], esi jbe short loc_273C1 mov rax, [rdi] mov byte ptr [rax+rsi], 0 jmp short loc_273CE loc_273C1: call _ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong) mov ecx, eax mov al, 1 test cl, cl jnz short loc_273FE loc_273CE: sub r12d, r15d test r12d, r12d jle short loc_273EE mov edi, [r14+10h] add rdi, [r14+8] mov edx, r12d movzx esi, r13b call _memset add [r14+10h], r12d loc_273EE: mov edx, r15d; unsigned __int64 mov rdi, r14; this mov rsi, rbx; char * call _ZN6String6appendEPKcm; String::append(char const*,ulong) xor eax, eax loc_273FE: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char String::append_with_prefill( String *this, const char *a2, unsigned int a3, unsigned int a4, unsigned __int8 a5) { unsigned int v10; // esi Binary_string *v11; // rdi unsigned long long v12; // rsi char v13; // cl char result; // al int v15; // r12d v10 = a4; if ( a3 > a4 ) v10 = a3; v11 = (String *)((char *)this + 8); v12 = *((_DWORD *)this + 4) + v10; if ( *((_DWORD *)this + 5) <= (unsigned int)v12 ) { v13 = Binary_string::realloc_with_extra(v11, v12); result = 1; if ( v13 ) return result; } else { *(_BYTE *)(*(_QWORD *)v11 + v12) = 0; } v15 = a4 - a3; if ( v15 > 0 ) { memset(*((_QWORD *)this + 1) + *((unsigned int *)this + 4), a5, (unsigned int)v15); *((_DWORD *)this + 4) += v15; } String::append(this, a2, a3); return 0; }
append_with_prefill: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13D,R8D MOV R12D,ECX MOV R15D,EDX MOV RBX,RSI MOV R14,RDI CMP EDX,ECX MOV ESI,ECX CMOVA ESI,EDX ADD RDI,0x8 ADD ESI,dword ptr [R14 + 0x10] CMP dword ptr [R14 + 0x14],ESI JBE 0x001273c1 MOV RAX,qword ptr [RDI] MOV byte ptr [RAX + RSI*0x1],0x0 JMP 0x001273ce LAB_001273c1: CALL 0x00127da8 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x001273fe LAB_001273ce: SUB R12D,R15D TEST R12D,R12D JLE 0x001273ee MOV EDI,dword ptr [R14 + 0x10] ADD RDI,qword ptr [R14 + 0x8] MOV EDX,R12D MOVZX ESI,R13B CALL 0x001241e0 ADD dword ptr [R14 + 0x10],R12D LAB_001273ee: MOV EDX,R15D MOV RDI,R14 MOV RSI,RBX CALL 0x00126f62 XOR EAX,EAX LAB_001273fe: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* String::append_with_prefill(char const*, unsigned int, unsigned int, char) */ int8 __thiscall String::append_with_prefill(String *this,char *param_1,uint param_2,uint param_3,char param_4) { char cVar1; uint uVar2; uVar2 = param_3; if (param_3 < param_2) { uVar2 = param_2; } uVar2 = uVar2 + *(int *)(this + 0x10); if (uVar2 < *(uint *)(this + 0x14)) { *(int1 *)(*(long *)(this + 8) + (ulong)uVar2) = 0; } else { cVar1 = Binary_string::realloc_with_extra((Binary_string *)(this + 8),(ulong)uVar2); if (cVar1 != '\0') { return 1; } } uVar2 = param_3 - param_2; if (0 < (int)uVar2) { memset((void *)((ulong)*(uint *)(this + 0x10) + *(long *)(this + 8)),(uint)(byte)param_4, (ulong)uVar2); *(uint *)(this + 0x10) = *(int *)(this + 0x10) + uVar2; } append(this,param_1,(ulong)param_2); return 0; }
58,278
js_string_at
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_at(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue val, ret; JSString *p; int idx, c; val = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(val)) return val; p = JS_VALUE_GET_STRING(val); if (JS_ToInt32Sat(ctx, &idx, argv[0])) { JS_FreeValue(ctx, val); return JS_EXCEPTION; } if (idx < 0) idx = p->len + idx; if (idx < 0 || idx >= p->len) { ret = JS_UNDEFINED; } else { c = string_get(p, idx); ret = js_new_string_char(ctx, c); } JS_FreeValue(ctx, val); return ret; }
O2
c
js_string_at: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %r8, %r12 movq %rdi, %r15 callq 0x3a290 movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx je 0x674ce movq (%r12), %rdx movq 0x8(%r12), %rcx leaq 0xc(%rsp), %rsi movq %r15, %rdi callq 0x2133d testl %eax, %eax je 0x6745e movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1801e pushq $0x6 popq %rbx xorl %r14d, %r14d jmp 0x674ce movl 0xc(%rsp), %ecx movq 0x4(%r14), %rax movl %eax, %edx andl $0x7fffffff, %edx # imm = 0x7FFFFFFF pushq $0x3 popq %r12 testl %ecx, %ecx jns 0x6747a addl %edx, %ecx js 0x6748c cmpl %edx, %ecx jae 0x6748c movl %ecx, %ecx testl %eax, %eax js 0x67493 movzbl 0x18(%r14,%rcx), %eax jmp 0x67499 xorl %r13d, %r13d xorl %ecx, %ecx jmp 0x674b7 movzwl 0x18(%r14,%rcx,2), %eax movzwl %ax, %esi movq %r15, %rdi callq 0x35e9c movq %rdx, %r12 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r13d orq %rcx, %r13 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1801e movq %r13, %r14 movq %r12, %rbx movq %r14, %rax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_string_at: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r12, r8 mov r15, rdi call JS_ToStringCheckObject mov r14, rax mov rbx, rdx cmp ebx, 6 jz loc_674CE mov rdx, [r12] mov rcx, [r12+8] lea rsi, [rsp+38h+var_2C] mov rdi, r15 call JS_ToInt32Sat test eax, eax jz short loc_6745E mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue push 6 pop rbx xor r14d, r14d jmp short loc_674CE loc_6745E: mov ecx, [rsp+38h+var_2C] mov rax, [r14+4] mov edx, eax and edx, 7FFFFFFFh push 3 pop r12 test ecx, ecx jns short loc_6747A add ecx, edx js short loc_6748C loc_6747A: cmp ecx, edx jnb short loc_6748C mov ecx, ecx test eax, eax js short loc_67493 movzx eax, byte ptr [r14+rcx+18h] jmp short loc_67499 loc_6748C: xor r13d, r13d xor ecx, ecx jmp short loc_674B7 loc_67493: movzx eax, word ptr [r14+rcx*2+18h] loc_67499: movzx esi, ax mov rdi, r15 call js_new_string_char mov r12, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r13d, eax loc_674B7: or r13, rcx mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue mov r14, r13 mov rbx, r12 loc_674CE: mov rax, r14 mov rdx, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_string_at( 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 unsigned int v18; // ecx long long v19; // rax unsigned int v20; // edx unsigned __int16 v21; // ax long long v22; // r13 unsigned long long v23; // rcx long long v24; // rax unsigned long long v25; // r13 int v27[11]; // [rsp+Ch] [rbp-2Ch] BYREF v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = v16; if ( (_DWORD)v16 != 6 ) { if ( (unsigned int)JS_ToInt32Sat(a1, (long long)v27, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) ) { JS_FreeValue(a1, v15, v17); return 0LL; } else { v18 = v27[0]; v19 = *(_QWORD *)(v15 + 4); v20 = v19 & 0x7FFFFFFF; if ( v27[0] < 0 && (v18 = v20 + v27[0], (int)(v20 + v27[0]) < 0) || v18 >= v20 ) { v22 = 0LL; v23 = 0LL; } else { if ( (int)v19 < 0 ) v21 = *(_WORD *)(v15 + 2LL * v18 + 24); else v21 = *(unsigned __int8 *)(v15 + v18 + 24); v24 = js_new_string_char(a1, v21); v23 = v24 & 0xFFFFFFFF00000000LL; v22 = (unsigned int)v24; } v25 = v23 | v22; JS_FreeValue(a1, v15, v17); return v25; } } return v15; }
js_string_at: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,R8 MOV R15,RDI CALL 0x0013a290 MOV R14,RAX MOV RBX,RDX CMP EBX,0x6 JZ 0x001674ce MOV RDX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] LEA RSI,[RSP + 0xc] MOV RDI,R15 CALL 0x0012133d TEST EAX,EAX JZ 0x0016745e MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011801e PUSH 0x6 POP RBX XOR R14D,R14D JMP 0x001674ce LAB_0016745e: MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [R14 + 0x4] MOV EDX,EAX AND EDX,0x7fffffff PUSH 0x3 POP R12 TEST ECX,ECX JNS 0x0016747a ADD ECX,EDX JS 0x0016748c LAB_0016747a: CMP ECX,EDX JNC 0x0016748c MOV ECX,ECX TEST EAX,EAX JS 0x00167493 MOVZX EAX,byte ptr [R14 + RCX*0x1 + 0x18] JMP 0x00167499 LAB_0016748c: XOR R13D,R13D XOR ECX,ECX JMP 0x001674b7 LAB_00167493: MOVZX EAX,word ptr [R14 + RCX*0x2 + 0x18] LAB_00167499: MOVZX ESI,AX MOV RDI,R15 CALL 0x00135e9c MOV R12,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV R13D,EAX LAB_001674b7: OR R13,RCX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011801e MOV R14,R13 MOV RBX,R12 LAB_001674ce: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_string_at(int8 param_1) { ushort uVar1; int iVar2; uint uVar3; ulong uVar5; uint uVar6; int8 *in_R8; int8 uVar8; ulong uVar9; int1 auVar10 [16]; uint local_2c; long lVar4; int8 uVar7; auVar10 = JS_ToStringCheckObject(); uVar7 = auVar10._8_8_; lVar4 = auVar10._0_8_; if (auVar10._8_4_ != 6) { iVar2 = JS_ToInt32Sat(param_1,&local_2c,*in_R8,in_R8[1]); if (iVar2 == 0) { uVar3 = (uint)*(int8 *)(lVar4 + 4); uVar6 = uVar3 & 0x7fffffff; uVar8 = 3; if ((((int)local_2c < 0) && (local_2c = local_2c + uVar6, (int)local_2c < 0)) || (uVar6 <= local_2c)) { uVar9 = 0; uVar5 = 0; } else { if ((int)uVar3 < 0) { uVar1 = *(ushort *)(lVar4 + 0x18 + (ulong)local_2c * 2); } else { uVar1 = (ushort)*(byte *)(lVar4 + 0x18 + (ulong)local_2c); } auVar10 = js_new_string_char(param_1,uVar1); uVar8 = auVar10._8_8_; uVar5 = auVar10._0_8_ & 0xffffffff00000000; uVar9 = auVar10._0_8_ & 0xffffffff; } auVar10._8_8_ = uVar8; auVar10._0_8_ = uVar9 | uVar5; JS_FreeValue(param_1,lVar4,uVar7); } else { JS_FreeValue(param_1,lVar4,uVar7); auVar10 = ZEXT816(6) << 0x40; } } return auVar10; }
58,279
google::protobuf::internal::ReflectionOps::IsInitialized(google::protobuf::Message const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/reflection_ops.cc
bool ReflectionOps::IsInitialized(const Message& message) { const Descriptor* descriptor = message.GetDescriptor(); const Reflection* reflection = GetReflectionOrDie(message); // Check required fields of this message. { const int field_count = descriptor->field_count(); for (int i = 0; i < field_count; i++) { if (descriptor->field(i)->is_required()) { if (!reflection->HasField(message, descriptor->field(i))) { return false; } } } } // Check that sub-messages are initialized. std::vector<const FieldDescriptor*> fields; // Should be safe to skip stripped fields because required fields are not // stripped. reflection->ListFieldsOmitStripped(message, &fields); for (const FieldDescriptor* field : fields) { if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { if (field->is_map()) { const FieldDescriptor* value_field = field->message_type()->field(1); if (value_field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { const MapFieldBase* map_field = reflection->GetMapData(message, field); if (map_field->IsMapValid()) { MapIterator iter(const_cast<Message*>(&message), field); MapIterator end(const_cast<Message*>(&message), field); for (map_field->MapBegin(&iter), map_field->MapEnd(&end); iter != end; ++iter) { if (!iter.GetValueRef().GetMessageValue().IsInitialized()) { return false; } } continue; } } else { continue; } } if (field->is_repeated()) { int size = reflection->FieldSize(message, field); for (int j = 0; j < size; j++) { if (!reflection->GetRepeatedMessage(message, field, j) .IsInitialized()) { return false; } } } else { if (!reflection->GetMessage(message, field).IsInitialized()) { return false; } } } } return true; }
O3
cpp
google::protobuf::internal::ReflectionOps::IsInitialized(google::protobuf::Message const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdi, %rbx movq (%rdi), %rax callq *0x80(%rax) movq %rax, %r15 movq %rbx, %rdi callq 0x7aa8d movq %rax, %r14 movslq 0x4(%r15), %rax testq %rax, %rax jle 0x7aeed shlq $0x3, %rax leaq (%rax,%rax,8), %r12 xorl %r13d, %r13d movq 0x28(%r15), %rdx movb 0x1(%rdx,%r13), %al andb $0x60, %al cmpb $0x40, %al jne 0x7aee4 addq %r13, %rdx movq %r14, %rdi movq %rbx, %rsi callq 0x659b6 testb %al, %al je 0x7b139 addq $0x48, %r13 cmpq %r13, %r12 jne 0x7aebf xorps %xmm0, %xmm0 leaq 0x50(%rsp), %rdx movaps %xmm0, (%rdx) movq $0x0, 0x10(%rdx) movq %r14, %rdi movq %rbx, %rsi callq 0x6666a movq 0x50(%rsp), %r15 movq 0x58(%rsp), %rax movq %rax, (%rsp) cmpq %rax, %r15 je 0x7b135 movq (%r15), %r12 movq 0x18(%r12), %rdi testq %rdi, %rdi je 0x7af4f leaq -0x40316(%rip), %rax # 0x3ac20 movq %rax, 0x8(%rsp) movq %r12, 0x70(%rsp) leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x3fc96 movzbl 0x2(%r12), %eax leaq 0x3acc4(%rip), %rcx # 0xb5c20 cmpl $0xa, (%rcx,%rax,4) jne 0x7b10f movq 0x18(%r12), %rdi testq %rdi, %rdi je 0x7af95 leaq -0x40357(%rip), %rax # 0x3ac20 movq %rax, 0x8(%rsp) movq %r12, 0x70(%rsp) leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x3fc96 movb 0x2(%r12), %al cmpb $0xb, %al jne 0x7b0a8 movq %r12, %rdi callq 0x1f720 testb %al, %al je 0x7b0a8 movq %r12, %rdi callq 0x1e7ba movq 0x28(%rax), %r13 movq 0x60(%r13), %rdi testq %rdi, %rdi je 0x7afe6 leaq 0x48(%r13), %rax leaq -0x403ad(%rip), %rcx # 0x3ac20 movq %rcx, 0x8(%rsp) movq %rax, 0x70(%rsp) leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x3fc96 movzbl 0x4a(%r13), %eax leaq 0x3ac2e(%rip), %rcx # 0xb5c20 cmpl $0xa, (%rcx,%rax,4) jne 0x7b10f movq %r14, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x6bed0 movq %rax, %rbp movq %rax, %rdi callq 0x72916 testb %al, %al je 0x7b0a8 leaq 0x8(%rsp), %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x6e6cc leaq 0x70(%rsp), %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x6e6cc movq (%rbp), %rax movq %rbp, %rdi leaq 0x8(%rsp), %rsi callq *0x28(%rax) movq (%rbp), %rax movq %rbp, %rdi leaq 0x70(%rsp), %rsi callq *0x30(%rax) movq 0x10(%rsp), %rdi movq (%rdi), %rax leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx callq *0x20(%rax) testb %al, %al jne 0x7b11f leaq 0x40(%rsp), %rdi callq 0x75534 movq (%rax), %rcx movq %rax, %rdi callq *0x28(%rcx) testb %al, %al je 0x7b141 movq 0x10(%rsp), %rdi movq (%rdi), %rax leaq 0x8(%rsp), %rsi callq *0x90(%rax) jmp 0x7b05b movb 0x1(%r12), %al notb %al testb $0x60, %al jne 0x7b0f2 movq %r14, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x65b70 movl %eax, %ebp testl %eax, %eax jle 0x7b10f xorl %r13d, %r13d movq %r14, %rdi movq %rbx, %rsi movq %r12, %rdx movl %r13d, %ecx callq 0x6ad42 movq (%rax), %rcx movq %rax, %rdi callq *0x28(%rcx) testb %al, %al je 0x7b155 incl %r13d cmpl %r13d, %ebp jne 0x7b0ca jmp 0x7b10f movq %r14, %rdi movq %rbx, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x6a4a8 movq (%rax), %rcx movq %rax, %rdi callq *0x28(%rcx) testb %al, %al je 0x7b155 addq $0x8, %r15 cmpq (%rsp), %r15 jne 0x7af22 jmp 0x7b13d leaq 0x70(%rsp), %rdi callq 0x6e7d8 leaq 0x8(%rsp), %rdi callq 0x6e7d8 jmp 0x7b10f movb $0x1, %bl jmp 0x7b15c xorl %ebx, %ebx jmp 0x7b169 movb $0x1, %bl jmp 0x7b157 leaq 0x70(%rsp), %rdi callq 0x6e7d8 leaq 0x8(%rsp), %rdi callq 0x6e7d8 xorl %ebx, %ebx movq 0x50(%rsp), %r15 testq %r15, %r15 je 0x7b169 movq %r15, %rdi callq 0xf330 movl %ebx, %eax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x7b19d jmp 0x7b1a9 jmp 0x7b190 jmp 0x7b1a9 jmp 0x7b1a9 jmp 0x7b1a9 jmp 0x7b1a9 jmp 0x7b1a9 movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x6e7d8 leaq 0x8(%rsp), %rdi callq 0x6e7d8 jmp 0x7b1ac movq %rax, %rbx movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x7b1bb callq 0xf330 movq %rbx, %rdi callq 0xf570 nop
_ZN6google8protobuf8internal13ReflectionOps13IsInitializedERKNS0_7MessageE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rbx, rdi mov rax, [rdi] call qword ptr [rax+80h] mov r15, rax mov rdi, rbx; this call _ZN6google8protobuf8internalL18GetReflectionOrDieERKNS0_7MessageE; google::protobuf::internal::GetReflectionOrDie(google::protobuf::Message const&) mov r14, rax movsxd rax, dword ptr [r15+4] test rax, rax jle short loc_7AEED shl rax, 3 lea r12, [rax+rax*8] xor r13d, r13d loc_7AEBF: mov rdx, [r15+28h] mov al, [rdx+r13+1] and al, 60h cmp al, 40h ; '@' jnz short loc_7AEE4 add rdx, r13; google::protobuf::FieldDescriptor * mov rdi, r14; this mov rsi, rbx; google::protobuf::Message * call _ZNK6google8protobuf10Reflection8HasFieldERKNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::Reflection::HasField(google::protobuf::Message const&,google::protobuf::FieldDescriptor const*) test al, al jz loc_7B139 loc_7AEE4: add r13, 48h ; 'H' cmp r12, r13 jnz short loc_7AEBF loc_7AEED: xorps xmm0, xmm0 lea rdx, [rsp+0E8h+var_98] movaps xmmword ptr [rdx], xmm0 mov qword ptr [rdx+10h], 0 mov rdi, r14 mov rsi, rbx call _ZNK6google8protobuf10Reflection22ListFieldsOmitStrippedERKNS0_7MessageEPSt6vectorIPKNS0_15FieldDescriptorESaIS8_EE; google::protobuf::Reflection::ListFieldsOmitStripped(google::protobuf::Message const&,std::vector<google::protobuf::FieldDescriptor const*> *) mov r15, [rsp+0E8h+var_98] mov rax, [rsp+0E8h+var_90] mov [rsp+0E8h+var_E8], rax cmp r15, rax jz loc_7B135 loc_7AF22: mov r12, [r15] mov rdi, [r12+18h] test rdi, rdi jz short loc_7AF4F lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) mov [rsp+0E8h+var_E0], rax mov [rsp+0E8h+var_78], r12 lea rsi, [rsp+0E8h+var_E0] lea rdx, [rsp+0E8h+var_78] call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_7AF4F: movzx eax, byte ptr [r12+2] lea rcx, _ZN6google8protobuf15FieldDescriptor17kTypeToCppTypeMapE; google::protobuf::FieldDescriptor::kTypeToCppTypeMap cmp dword ptr [rcx+rax*4], 0Ah jnz loc_7B10F mov rdi, [r12+18h] test rdi, rdi jz short loc_7AF95 lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) mov [rsp+0E8h+var_E0], rax mov [rsp+0E8h+var_78], r12 lea rsi, [rsp+0E8h+var_E0] lea rdx, [rsp+0E8h+var_78] call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) mov al, [r12+2] loc_7AF95: cmp al, 0Bh jnz loc_7B0A8 mov rdi, r12; this call _ZNK6google8protobuf15FieldDescriptor19is_map_message_typeEv; google::protobuf::FieldDescriptor::is_map_message_type(void) test al, al jz loc_7B0A8 mov rdi, r12; this call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) mov r13, [rax+28h] mov rdi, [r13+60h] test rdi, rdi jz short loc_7AFE6 lea rax, [r13+48h] lea rcx, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) mov [rsp+0E8h+var_E0], rcx mov [rsp+0E8h+var_78], rax lea rsi, [rsp+0E8h+var_E0] lea rdx, [rsp+0E8h+var_78] call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_7AFE6: movzx eax, byte ptr [r13+4Ah] lea rcx, _ZN6google8protobuf15FieldDescriptor17kTypeToCppTypeMapE; google::protobuf::FieldDescriptor::kTypeToCppTypeMap cmp dword ptr [rcx+rax*4], 0Ah jnz loc_7B10F mov rdi, r14; this mov rsi, rbx; google::protobuf::Message * mov rdx, r12; google::protobuf::FieldDescriptor * call _ZNK6google8protobuf10Reflection10GetMapDataERKNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::Reflection::GetMapData(google::protobuf::Message const&,google::protobuf::FieldDescriptor const*) mov rbp, rax mov rdi, rax; this call _ZNK6google8protobuf8internal12MapFieldBase10IsMapValidEv; google::protobuf::internal::MapFieldBase::IsMapValid(void) test al, al jz loc_7B0A8 lea rdi, [rsp+0E8h+var_E0]; this mov rsi, rbx; google::protobuf::Message * mov rdx, r12; google::protobuf::FieldDescriptor * call _ZN6google8protobuf11MapIteratorC2EPNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::MapIterator::MapIterator(google::protobuf::Message *,google::protobuf::FieldDescriptor const*) lea rdi, [rsp+0E8h+var_78]; this mov rsi, rbx; google::protobuf::Message * mov rdx, r12; google::protobuf::FieldDescriptor * call _ZN6google8protobuf11MapIteratorC2EPNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::MapIterator::MapIterator(google::protobuf::Message *,google::protobuf::FieldDescriptor const*) mov rax, [rbp+0] mov rdi, rbp lea rsi, [rsp+0E8h+var_E0] call qword ptr [rax+28h] mov rax, [rbp+0] mov rdi, rbp lea rsi, [rsp+0E8h+var_78] call qword ptr [rax+30h] loc_7B05B: mov rdi, [rsp+0E8h+var_D8] mov rax, [rdi] lea rsi, [rsp+0E8h+var_E0] lea rdx, [rsp+0E8h+var_78] call qword ptr [rax+20h] test al, al jnz loc_7B11F lea rdi, [rsp+0E8h+var_A8]; this call _ZNK6google8protobuf16MapValueConstRef15GetMessageValueEv; google::protobuf::MapValueConstRef::GetMessageValue(void) mov rcx, [rax] mov rdi, rax call qword ptr [rcx+28h] test al, al jz loc_7B141 mov rdi, [rsp+0E8h+var_D8] mov rax, [rdi] lea rsi, [rsp+0E8h+var_E0] call qword ptr [rax+90h] jmp short loc_7B05B loc_7B0A8: mov al, [r12+1] not al test al, 60h jnz short loc_7B0F2 mov rdi, r14; this mov rsi, rbx; google::protobuf::Message * mov rdx, r12; google::protobuf::FieldDescriptor * call _ZNK6google8protobuf10Reflection9FieldSizeERKNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::Reflection::FieldSize(google::protobuf::Message const&,google::protobuf::FieldDescriptor const*) mov ebp, eax test eax, eax jle short loc_7B10F xor r13d, r13d loc_7B0CA: mov rdi, r14; this mov rsi, rbx; google::protobuf::Message * mov rdx, r12; google::protobuf::FieldDescriptor * mov ecx, r13d; int call _ZNK6google8protobuf10Reflection18GetRepeatedMessageERKNS0_7MessageEPKNS0_15FieldDescriptorEi; google::protobuf::Reflection::GetRepeatedMessage(google::protobuf::Message const&,google::protobuf::FieldDescriptor const*,int) mov rcx, [rax] mov rdi, rax call qword ptr [rcx+28h] test al, al jz short loc_7B155 inc r13d cmp ebp, r13d jnz short loc_7B0CA jmp short loc_7B10F loc_7B0F2: mov rdi, r14; this mov rsi, rbx; google::protobuf::Message * mov rdx, r12; google::protobuf::FieldDescriptor * xor ecx, ecx; google::protobuf::MessageFactory * call _ZNK6google8protobuf10Reflection10GetMessageERKNS0_7MessageEPKNS0_15FieldDescriptorEPNS0_14MessageFactoryE; google::protobuf::Reflection::GetMessage(google::protobuf::Message const&,google::protobuf::FieldDescriptor const*,google::protobuf::MessageFactory *) mov rcx, [rax] mov rdi, rax call qword ptr [rcx+28h] test al, al jz short loc_7B155 loc_7B10F: add r15, 8 cmp r15, [rsp+0E8h+var_E8] jnz loc_7AF22 jmp short loc_7B13D loc_7B11F: lea rdi, [rsp+0E8h+var_78]; this call _ZN6google8protobuf11MapIteratorD2Ev; google::protobuf::MapIterator::~MapIterator() lea rdi, [rsp+0E8h+var_E0]; this call _ZN6google8protobuf11MapIteratorD2Ev; google::protobuf::MapIterator::~MapIterator() jmp short loc_7B10F loc_7B135: mov bl, 1 jmp short loc_7B15C loc_7B139: xor ebx, ebx jmp short loc_7B169 loc_7B13D: mov bl, 1 jmp short loc_7B157 loc_7B141: lea rdi, [rsp+0E8h+var_78]; this call _ZN6google8protobuf11MapIteratorD2Ev; google::protobuf::MapIterator::~MapIterator() lea rdi, [rsp+0E8h+var_E0]; this call _ZN6google8protobuf11MapIteratorD2Ev; google::protobuf::MapIterator::~MapIterator() loc_7B155: xor ebx, ebx loc_7B157: mov r15, [rsp+0E8h+var_98] loc_7B15C: test r15, r15 jz short loc_7B169 mov rdi, r15; void * call __ZdlPv; operator delete(void *) loc_7B169: mov eax, ebx add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_7B19D jmp short loc_7B1A9 jmp short loc_7B190 jmp short loc_7B1A9 jmp short loc_7B1A9 jmp short loc_7B1A9 jmp short loc_7B1A9 jmp short loc_7B1A9 loc_7B190: mov rbx, rax lea rdi, [rsp+arg_68]; this call _ZN6google8protobuf11MapIteratorD2Ev; google::protobuf::MapIterator::~MapIterator() loc_7B19D: lea rdi, [rsp+arg_0]; this call _ZN6google8protobuf11MapIteratorD2Ev; google::protobuf::MapIterator::~MapIterator() jmp short loc_7B1AC loc_7B1A9: mov rbx, rax loc_7B1AC: mov rdi, [rsp+arg_48]; void * test rdi, rdi jz short loc_7B1BB call __ZdlPv; operator delete(void *) loc_7B1BB: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::internal::ReflectionOps::IsInitialized( google::protobuf::internal::ReflectionOps *this, const google::protobuf::Message *a2) { const google::protobuf::Message *v2; // rbx long long v3; // r15 long long v4; // rcx const char *v5; // r8 google::protobuf::_anonymous_namespace_ **ReflectionOrDie; // r14 long long v7; // rax long long v8; // r12 long long v9; // r13 long long v10; // rdx _DWORD *v11; // rcx const char *v12; // r8 long long v13; // r9 char *v14; // r15 long long v15; // r12 long long v16; // rdi long long v17; // rax long long v18; // rdi long long v19; // r13 long long v20; // rdi char *MapData; // rbp long long MessageValue; // rax int v23; // ebp unsigned int v24; // r13d long long RepeatedMessage; // rax long long Message; // rax char *v28; // [rsp+0h] [rbp-E8h] long long ( *v29)(google::protobuf::FieldDescriptor *, const google::protobuf::FieldDescriptor *); // [rsp+8h] [rbp-E0h] BYREF long long v30; // [rsp+10h] [rbp-D8h] _BYTE v31[16]; // [rsp+40h] [rbp-A8h] BYREF void *v32[4]; // [rsp+50h] [rbp-98h] BYREF _QWORD v33[15]; // [rsp+70h] [rbp-78h] BYREF v2 = this; v3 = (*(long long ( **)(google::protobuf::internal::ReflectionOps *, const google::protobuf::Message *))(*(_QWORD *)this + 128LL))( this, a2); ReflectionOrDie = (google::protobuf::_anonymous_namespace_ **)google::protobuf::internal::GetReflectionOrDie(this, a2); v7 = *(int *)(v3 + 4); if ( v7 > 0 ) { v8 = 72 * v7; v9 = 0LL; do { v10 = *(_QWORD *)(v3 + 40); if ( (*(_BYTE *)(v10 + v9 + 1) & 0x60) == 0x40 && !google::protobuf::Reflection::HasField( ReflectionOrDie, this, (const google::protobuf::FieldDescriptor *)(v9 + v10), v4, v5) ) { LODWORD(v2) = 0; return (unsigned int)v2; } v9 += 72LL; } while ( v8 != v9 ); } memset(v32, 0, 24); google::protobuf::Reflection::ListFieldsOmitStripped( (google::protobuf::Reflection *)ReflectionOrDie, this, (long long *)v32); v14 = (char *)v32[0]; v28 = (char *)v32[1]; if ( v32[0] == v32[1] ) { LOBYTE(v2) = 1; goto LABEL_37; } while ( 1 ) { v15 = *(_QWORD *)v14; v16 = *(_QWORD *)(*(_QWORD *)v14 + 24LL); if ( v16 ) { v29 = google::protobuf::FieldDescriptor::TypeOnceInit; v33[0] = v15; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v16, (long long)&v29, (long long)v33, (long long)v11, (long long)v12, v13); } v17 = *(unsigned __int8 *)(v15 + 2); v11 = google::protobuf::FieldDescriptor::kTypeToCppTypeMap; if ( google::protobuf::FieldDescriptor::kTypeToCppTypeMap[v17] != 10 ) goto LABEL_29; v18 = *(_QWORD *)(v15 + 24); if ( v18 ) { v29 = google::protobuf::FieldDescriptor::TypeOnceInit; v33[0] = v15; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v18, (long long)&v29, (long long)v33, (long long)google::protobuf::FieldDescriptor::kTypeToCppTypeMap, (long long)v12, v13); LOBYTE(v17) = *(_BYTE *)(v15 + 2); } if ( (_BYTE)v17 == 11 && google::protobuf::FieldDescriptor::is_map_message_type((google::protobuf::FieldDescriptor *)v15) ) { v19 = *(_QWORD *)(google::protobuf::FieldDescriptor::message_type((google::protobuf::FieldDescriptor *)v15) + 40); v20 = *(_QWORD *)(v19 + 96); if ( v20 ) { v29 = google::protobuf::FieldDescriptor::TypeOnceInit; v33[0] = v19 + 72; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v20, (long long)&v29, (long long)v33, (long long)google::protobuf::FieldDescriptor::TypeOnceInit, (long long)v12, v13); } v11 = google::protobuf::FieldDescriptor::kTypeToCppTypeMap; if ( google::protobuf::FieldDescriptor::kTypeToCppTypeMap[*(unsigned __int8 *)(v19 + 74)] != 10 ) goto LABEL_29; MapData = google::protobuf::Reflection::GetMapData( ReflectionOrDie, v2, (const google::protobuf::FieldDescriptor *)v15, (long long)google::protobuf::FieldDescriptor::kTypeToCppTypeMap, (long long)v12, v13); if ( google::protobuf::internal::MapFieldBase::IsMapValid((google::protobuf::internal::MapFieldBase *)MapData) ) { google::protobuf::MapIterator::MapIterator( (google::protobuf::MapIterator *)&v29, v2, (const google::protobuf::FieldDescriptor *)v15); google::protobuf::MapIterator::MapIterator( (google::protobuf::MapIterator *)v33, v2, (const google::protobuf::FieldDescriptor *)v15); (*(void ( **)(char *, long long ( **)(google::protobuf::FieldDescriptor *, const google::protobuf::FieldDescriptor *)))(*(_QWORD *)MapData + 40LL))( MapData, &v29); (*(void ( **)(char *, _QWORD *))(*(_QWORD *)MapData + 48LL))(MapData, v33); while ( 1 ) { if ( (*(unsigned __int8 ( **)(long long, long long ( **)(google::protobuf::FieldDescriptor *, const google::protobuf::FieldDescriptor *), _QWORD *))(*(_QWORD *)v30 + 32LL))( v30, &v29, v33) ) { google::protobuf::MapIterator::~MapIterator((google::protobuf::MapIterator *)v33); google::protobuf::MapIterator::~MapIterator((google::protobuf::MapIterator *)&v29); goto LABEL_29; } MessageValue = google::protobuf::MapValueConstRef::GetMessageValue((google::protobuf::MapValueConstRef *)v31); if ( !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)MessageValue + 40LL))(MessageValue) ) break; (*(void ( **)(long long, long long ( **)(google::protobuf::FieldDescriptor *, const google::protobuf::FieldDescriptor *)))(*(_QWORD *)v30 + 144LL))( v30, &v29); } google::protobuf::MapIterator::~MapIterator((google::protobuf::MapIterator *)v33); google::protobuf::MapIterator::~MapIterator((google::protobuf::MapIterator *)&v29); goto LABEL_35; } } if ( (~*(_BYTE *)(v15 + 1) & 0x60) == 0 ) break; Message = google::protobuf::Reflection::GetMessage( ReflectionOrDie, v2, (const google::protobuf::FieldDescriptor *)v15, 0LL, v12, v13); if ( !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)Message + 40LL))(Message) ) goto LABEL_35; LABEL_29: v14 += 8; if ( v14 == v28 ) { LOBYTE(v2) = 1; goto LABEL_36; } } v23 = google::protobuf::Reflection::FieldSize( ReflectionOrDie, v2, (const google::protobuf::FieldDescriptor *)v15, (long long)v11, v12, v13); if ( v23 <= 0 ) goto LABEL_29; v24 = 0; while ( 1 ) { RepeatedMessage = google::protobuf::Reflection::GetRepeatedMessage( ReflectionOrDie, v2, (const google::protobuf::FieldDescriptor *)v15, v24, v12, v13); if ( !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)RepeatedMessage + 40LL))(RepeatedMessage) ) break; if ( v23 == ++v24 ) goto LABEL_29; } LABEL_35: LODWORD(v2) = 0; LABEL_36: v14 = (char *)v32[0]; LABEL_37: if ( v14 ) operator delete(v14); return (unsigned int)v2; }
IsInitialized: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RBX,RDI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x80] MOV R15,RAX MOV RDI,RBX CALL 0x0017aa8d MOV R14,RAX MOVSXD RAX,dword ptr [R15 + 0x4] TEST RAX,RAX JLE 0x0017aeed SHL RAX,0x3 LEA R12,[RAX + RAX*0x8] XOR R13D,R13D LAB_0017aebf: MOV RDX,qword ptr [R15 + 0x28] MOV AL,byte ptr [RDX + R13*0x1 + 0x1] AND AL,0x60 CMP AL,0x40 JNZ 0x0017aee4 ADD RDX,R13 MOV RDI,R14 MOV RSI,RBX CALL 0x001659b6 TEST AL,AL JZ 0x0017b139 LAB_0017aee4: ADD R13,0x48 CMP R12,R13 JNZ 0x0017aebf LAB_0017aeed: XORPS XMM0,XMM0 LEA RDX,[RSP + 0x50] MOVAPS xmmword ptr [RDX],XMM0 MOV qword ptr [RDX + 0x10],0x0 LAB_0017af00: MOV RDI,R14 MOV RSI,RBX CALL 0x0016666a MOV R15,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP],RAX CMP R15,RAX JZ 0x0017b135 LAB_0017af22: MOV R12,qword ptr [R15] MOV RDI,qword ptr [R12 + 0x18] TEST RDI,RDI JZ 0x0017af4f LEA RAX,[0x13ac20] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x70],R12 LAB_0017af40: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] CALL 0x0013fc96 LAB_0017af4f: MOVZX EAX,byte ptr [R12 + 0x2] LEA RCX,[0x1b5c20] CMP dword ptr [RCX + RAX*0x4],0xa JNZ 0x0017b10f MOV RDI,qword ptr [R12 + 0x18] TEST RDI,RDI JZ 0x0017af95 LEA RAX,[0x13ac20] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x70],R12 LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] CALL 0x0013fc96 MOV AL,byte ptr [R12 + 0x2] LAB_0017af95: CMP AL,0xb JNZ 0x0017b0a8 MOV RDI,R12 CALL 0x0011f720 TEST AL,AL JZ 0x0017b0a8 LAB_0017afad: MOV RDI,R12 CALL 0x0011e7ba MOV R13,qword ptr [RAX + 0x28] MOV RDI,qword ptr [R13 + 0x60] TEST RDI,RDI JZ 0x0017afe6 LEA RAX,[R13 + 0x48] LEA RCX,[0x13ac20] MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x70],RAX LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] CALL 0x0013fc96 LAB_0017afe6: MOVZX EAX,byte ptr [R13 + 0x4a] LEA RCX,[0x1b5c20] CMP dword ptr [RCX + RAX*0x4],0xa JNZ 0x0017b10f LAB_0017affc: MOV RDI,R14 MOV RSI,RBX MOV RDX,R12 CALL 0x0016bed0 MOV RBP,RAX MOV RDI,RAX CALL 0x00172916 TEST AL,AL JZ 0x0017b0a8 LAB_0017b01d: LEA RDI,[RSP + 0x8] MOV RSI,RBX MOV RDX,R12 CALL 0x0016e6cc LAB_0017b02d: LEA RDI,[RSP + 0x70] MOV RSI,RBX MOV RDX,R12 CALL 0x0016e6cc MOV RAX,qword ptr [RBP] LAB_0017b041: MOV RDI,RBP LEA RSI,[RSP + 0x8] CALL qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP] MOV RDI,RBP LEA RSI,[RSP + 0x70] CALL qword ptr [RAX + 0x30] LAB_0017b05b: MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RDI] LAB_0017b063: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] CALL qword ptr [RAX + 0x20] TEST AL,AL JNZ 0x0017b11f LEA RDI,[RSP + 0x40] CALL 0x00175534 MOV RCX,qword ptr [RAX] MOV RDI,RAX CALL qword ptr [RCX + 0x28] TEST AL,AL JZ 0x0017b141 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RDI] LEA RSI,[RSP + 0x8] CALL qword ptr [RAX + 0x90] JMP 0x0017b05b LAB_0017b0a8: MOV AL,byte ptr [R12 + 0x1] NOT AL TEST AL,0x60 JNZ 0x0017b0f2 LAB_0017b0b3: MOV RDI,R14 MOV RSI,RBX MOV RDX,R12 CALL 0x00165b70 MOV EBP,EAX TEST EAX,EAX JLE 0x0017b10f XOR R13D,R13D LAB_0017b0ca: MOV RDI,R14 MOV RSI,RBX MOV RDX,R12 MOV ECX,R13D CALL 0x0016ad42 MOV RCX,qword ptr [RAX] MOV RDI,RAX CALL qword ptr [RCX + 0x28] TEST AL,AL JZ 0x0017b155 INC R13D CMP EBP,R13D JNZ 0x0017b0ca JMP 0x0017b10f LAB_0017b0f2: MOV RDI,R14 MOV RSI,RBX MOV RDX,R12 XOR ECX,ECX CALL 0x0016a4a8 MOV RCX,qword ptr [RAX] MOV RDI,RAX CALL qword ptr [RCX + 0x28] LAB_0017b10b: TEST AL,AL JZ 0x0017b155 LAB_0017b10f: ADD R15,0x8 CMP R15,qword ptr [RSP] JNZ 0x0017af22 JMP 0x0017b13d LAB_0017b11f: LEA RDI,[RSP + 0x70] CALL 0x0016e7d8 LEA RDI,[RSP + 0x8] CALL 0x0016e7d8 JMP 0x0017b10f LAB_0017b135: MOV BL,0x1 JMP 0x0017b15c LAB_0017b139: XOR EBX,EBX JMP 0x0017b169 LAB_0017b13d: MOV BL,0x1 JMP 0x0017b157 LAB_0017b141: LEA RDI,[RSP + 0x70] CALL 0x0016e7d8 LEA RDI,[RSP + 0x8] CALL 0x0016e7d8 LAB_0017b155: XOR EBX,EBX LAB_0017b157: MOV R15,qword ptr [RSP + 0x50] LAB_0017b15c: TEST R15,R15 JZ 0x0017b169 MOV RDI,R15 CALL 0x0010f330 LAB_0017b169: MOV EAX,EBX ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::internal::ReflectionOps::IsInitialized(google::protobuf::Message const&) */ ulong google::protobuf::internal::ReflectionOps::IsInitialized(Message *param_1) { FieldDescriptor *this; int8 *puVar1; char cVar2; FieldDescriptor FVar3; int iVar4; long lVar5; Reflection *this_00; MapFieldBase *this_01; long *plVar6; int7 uVar8; ulong uVar7; int iVar9; long lVar10; int8 *puVar11; code *local_e0; long *local_d8; MapValueConstRef local_a8 [16]; int8 *local_98; int8 *puStack_90; int8 local_88; FieldDescriptor *local_78 [9]; lVar5 = (**(code **)(*(long *)param_1 + 0x80))(); this_00 = (Reflection *)GetReflectionOrDie(param_1); iVar4 = *(int *)(lVar5 + 4); if (0 < (long)iVar4) { lVar10 = 0; do { if (((*(byte *)(*(long *)(lVar5 + 0x28) + 1 + lVar10) & 0x60) == 0x40) && (cVar2 = Reflection::HasField (this_00,param_1,(FieldDescriptor *)(*(long *)(lVar5 + 0x28) + lVar10)), cVar2 == '\0')) { uVar7 = 0; goto LAB_0017b169; } lVar10 = lVar10 + 0x48; } while ((long)iVar4 * 0x48 != lVar10); } local_98 = (int8 *)0x0; puStack_90 = (int8 *)0x0; local_88 = 0; /* try { // try from 0017af00 to 0017af0a has its CatchHandler @ 0017b188 */ Reflection::ListFieldsOmitStripped(this_00,param_1,(vector *)&local_98); puVar1 = puStack_90; uVar8 = (int7)((ulong)param_1 >> 8); puVar11 = local_98; if (local_98 == puStack_90) { uVar7 = CONCAT71(uVar8,1); } else { do { this = (FieldDescriptor *)*puVar11; if (*(once_flag **)(this + 0x18) != (once_flag *)0x0) { local_e0 = FieldDescriptor::TypeOnceInit; /* try { // try from 0017af40 to 0017afa4 has its CatchHandler @ 0017b18e */ local_78[0] = this; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(this + 0x18),(_func_void_FieldDescriptor_ptr *)&local_e0,local_78 ); } FVar3 = this[2]; if (*(int *)(FieldDescriptor::kTypeToCppTypeMap + (ulong)(byte)FVar3 * 4) == 10) { if (*(once_flag **)(this + 0x18) != (once_flag *)0x0) { local_e0 = FieldDescriptor::TypeOnceInit; local_78[0] = this; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(this + 0x18),(_func_void_FieldDescriptor_ptr *)&local_e0, local_78); FVar3 = this[2]; } if ((FVar3 == (FieldDescriptor)0xb) && (cVar2 = FieldDescriptor::is_map_message_type(this), cVar2 != '\0')) { /* try { // try from 0017afad to 0017afe5 has its CatchHandler @ 0017b18c */ lVar5 = FieldDescriptor::message_type(this); lVar5 = *(long *)(lVar5 + 0x28); if (*(once_flag **)(lVar5 + 0x60) != (once_flag *)0x0) { local_78[0] = (FieldDescriptor *)(lVar5 + 0x48); local_e0 = FieldDescriptor::TypeOnceInit; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(lVar5 + 0x60),(_func_void_FieldDescriptor_ptr *)&local_e0, local_78); } if (*(int *)(FieldDescriptor::kTypeToCppTypeMap + (ulong)*(byte *)(lVar5 + 0x4a) * 4) == 10) { /* try { // try from 0017affc to 0017b014 has its CatchHandler @ 0017b186 */ this_01 = (MapFieldBase *)Reflection::GetMapData(this_00,param_1,this); cVar2 = MapFieldBase::IsMapValid(this_01); if (cVar2 == '\0') goto LAB_0017b0a8; /* try { // try from 0017b01d to 0017b02c has its CatchHandler @ 0017b182 */ MapIterator::MapIterator((MapIterator *)&local_e0,param_1,this); /* try { // try from 0017b02d to 0017b03c has its CatchHandler @ 0017b17d */ MapIterator::MapIterator((MapIterator *)local_78,param_1,this); /* try { // try from 0017b041 to 0017b05a has its CatchHandler @ 0017b184 */ (**(code **)(*(long *)this_01 + 0x28))(this_01,&local_e0); (**(code **)(*(long *)this_01 + 0x30))(this_01,local_78); /* try { // try from 0017b063 to 0017b0a5 has its CatchHandler @ 0017b190 */ while (cVar2 = (**(code **)(*local_d8 + 0x20))(local_d8,&local_e0,local_78), cVar2 == '\0') { plVar6 = (long *)MapValueConstRef::GetMessageValue(local_a8); cVar2 = (**(code **)(*plVar6 + 0x28))(plVar6); if (cVar2 == '\0') { MapIterator::~MapIterator((MapIterator *)local_78); MapIterator::~MapIterator((MapIterator *)&local_e0); goto LAB_0017b155; } (**(code **)(*local_d8 + 0x90))(local_d8,&local_e0); } MapIterator::~MapIterator((MapIterator *)local_78); MapIterator::~MapIterator((MapIterator *)&local_e0); } } else { LAB_0017b0a8: if ((~(byte)this[1] & 0x60) == 0) { /* try { // try from 0017b0b3 to 0017b0c0 has its CatchHandler @ 0017b18a */ iVar4 = Reflection::FieldSize(this_00,param_1,this); if (0 < iVar4) { iVar9 = 0; do { /* try { // try from 0017b0ca to 0017b0e3 has its CatchHandler @ 0017b1a9 */ plVar6 = (long *)Reflection::GetRepeatedMessage(this_00,param_1,this,iVar9); cVar2 = (**(code **)(*plVar6 + 0x28))(plVar6); if (cVar2 == '\0') goto LAB_0017b155; iVar9 = iVar9 + 1; } while (iVar4 != iVar9); } } else { /* try { // try from 0017b0f2 to 0017b10a has its CatchHandler @ 0017b18e */ plVar6 = (long *)Reflection::GetMessage(this_00,param_1,this,(MessageFactory *)0x0); cVar2 = (**(code **)(*plVar6 + 0x28))(plVar6); if (cVar2 == '\0') { LAB_0017b155: uVar7 = 0; goto LAB_0017b15c; } } } } puVar11 = puVar11 + 1; } while (puVar11 != puVar1); uVar7 = CONCAT71(uVar8,1); } LAB_0017b15c: if (local_98 != (int8 *)0x0) { operator_delete(local_98); } LAB_0017b169: return uVar7 & 0xffffffff; }
58,280
bool Config::Layer::Set<Common::Log::LogLevel>(Config::Location const&, Common::Log::LogLevel const&)
Dolphin-anty/Source/Core/Common/Config/Layer.h
bool Set(const Location& location, const T& value) { return Set(location, ValueToString(value)); }
O3
c
bool Config::Layer::Set<Common::Log::LogLevel>(Config::Location const&, Common::Log::LogLevel const&): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %rbx movq %rdi, %r14 movl (%rdx), %esi movq %rsp, %r15 movq %r15, %rdi callq 0x136bd movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0xdd28 movl %eax, %ebx movq (%r15), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xe388 movq 0x10(%rsp), %rsi incq %rsi callq 0x7560 movl %ebx, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN6Config5Layer3SetIN6Common3Log8LogLevelEEEbRKNS_8LocationERKT_: push r15 push r14 push rbx sub rsp, 20h mov rbx, rsi mov r14, rdi mov esi, [rdx] mov r15, rsp mov rdi, r15 call _Z13ValueToStringB5cxx11i; ValueToString(int) mov rdi, r14 mov rsi, rbx mov rdx, r15 call _ZN6Config5Layer3SetERKNS_8LocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Config::Layer::Set(Config::Location const&,std::string) mov ebx, eax mov rdi, [r15]; void * lea rax, [rsp+38h+var_28] cmp rdi, rax jz short loc_E388 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E388: mov eax, ebx add rsp, 20h pop rbx pop r14 pop r15 retn
long long Config::Layer::Set<Common::Log::LogLevel>(long long a1, long long a2, unsigned int *a3) { unsigned int v3; // eax unsigned int v4; // ebx void *v6[2]; // [rsp+0h] [rbp-38h] BYREF long long v7; // [rsp+10h] [rbp-28h] BYREF ValueToString[abi:cxx11](v6, *a3); LOBYTE(v3) = Config::Layer::Set(a1, a2, (long long)v6); v4 = v3; if ( v6[0] != &v7 ) operator delete(v6[0], v7 + 1); return v4; }
Set<Common::Log::LogLevel>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RSI MOV R14,RDI MOV ESI,dword ptr [RDX] MOV R15,RSP MOV RDI,R15 CALL 0x001136bd MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0010dd28 MOV EBX,EAX MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0010e388 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00107560 LAB_0010e388: MOV EAX,EBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* bool Config::Layer::Set<Common::Log::LogLevel>(Config::Location const&, Common::Log::LogLevel const&) */ bool Config::Layer::Set<Common::Log::LogLevel>(Location *param_1,LogLevel *param_2) { int1 uVar1; long *local_38 [2]; long local_28 [2]; ValueToString_abi_cxx11_((int)local_38); uVar1 = Set((Layer *)param_1,param_2,local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return (bool)uVar1; }
58,281
gather_available_ancestors
bluesky950520[P]quickjs/quickjs.c
static int gather_available_ancestors(JSContext *ctx, JSModuleDef *module, ExecModuleList *exec_list) { int i; if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); return -1; } for(i = 0; i < module->async_parent_modules_count; i++) { JSModuleDef *m = module->async_parent_modules[i]; if (!find_in_exec_module_list(exec_list, m) && !m->cycle_root->eval_has_exception) { assert(m->status == JS_MODULE_STATUS_EVALUATING_ASYNC); assert(!m->eval_has_exception); assert(m->async_evaluation); assert(m->pending_async_dependencies > 0); m->pending_async_dependencies--; if (m->pending_async_dependencies == 0) { if (js_resize_array(ctx, (void **)&exec_list->tab, sizeof(exec_list->tab[0]), &exec_list->size, exec_list->count + 1)) { return -1; } exec_list->tab[exec_list->count++] = m; if (!m->has_tla) { if (gather_available_ancestors(ctx, m, exec_list)) return -1; } } } } return 0; }
O1
c
gather_available_ancestors: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x18(%rdi), %rax cmpq %rbp, 0xe8(%rax) jbe 0x45201 leaq 0x59de9(%rip), %rsi # 0x9efd6 movq %rbx, %rdi xorl %eax, %eax callq 0x20add movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x452d1 movq %rsi, %r15 cmpl $0x0, 0xa0(%rsi) jle 0x452cf movq %rdx, %r14 leaq 0xc(%rdx), %rcx xorl %r12d, %r12d movq %rcx, -0x30(%rbp) movq 0x98(%r15), %rax movq (%rax,%r12,8), %r13 movslq 0x8(%r14), %r8 testq %r8, %r8 jle 0x45246 movq (%r14), %rax xorl %edx, %edx cmpq %r13, (%rax,%rdx,8) je 0x4529a incq %rdx cmpq %rdx, %r8 jne 0x45238 movq 0xb8(%r13), %rax cmpb $0x0, 0xf0(%rax) jne 0x4529a decl 0xa8(%r13) jne 0x4529a cmpl %r8d, (%rcx) jle 0x452af movq (%r14), %rax movslq 0x8(%r14), %rsi leal 0x1(%rsi), %edx movl %edx, 0x8(%r14) movq %r13, (%rax,%rsi,8) cmpb $0x0, 0x80(%r13) jne 0x4529a movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x451c8 movq -0x30(%rbp), %rcx testl %eax, %eax jne 0x451f7 incq %r12 movslq 0xa0(%r15), %rax cmpq %rax, %r12 jl 0x4521f jmp 0x452cf incl %r8d movq %rbx, %rdi movq %r14, %rsi movl $0x8, %edx callq 0x434ef movq -0x30(%rbp), %rcx testl %eax, %eax je 0x45264 jmp 0x451f7 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
gather_available_ancestors: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rax, [rdi+18h] cmp [rax+0E8h], rbp jbe short loc_45201 lea rsi, aMaximumCallSta; "Maximum call stack size exceeded" mov rdi, rbx xor eax, eax call JS_ThrowRangeError loc_451F7: mov eax, 0FFFFFFFFh jmp loc_452D1 loc_45201: mov r15, rsi cmp dword ptr [rsi+0A0h], 0 jle loc_452CF mov r14, rdx lea rcx, [rdx+0Ch] xor r12d, r12d mov [rbp+var_30], rcx loc_4521F: mov rax, [r15+98h] mov r13, [rax+r12*8] movsxd r8, dword ptr [r14+8] test r8, r8 jle short loc_45246 mov rax, [r14] xor edx, edx loc_45238: cmp [rax+rdx*8], r13 jz short loc_4529A inc rdx cmp r8, rdx jnz short loc_45238 loc_45246: mov rax, [r13+0B8h] cmp byte ptr [rax+0F0h], 0 jnz short loc_4529A dec dword ptr [r13+0A8h] jnz short loc_4529A cmp [rcx], r8d jle short loc_452AF loc_45264: mov rax, [r14] movsxd rsi, dword ptr [r14+8] lea edx, [rsi+1] mov [r14+8], edx mov [rax+rsi*8], r13 cmp byte ptr [r13+80h], 0 jnz short loc_4529A mov rdi, rbx mov rsi, r13 mov rdx, r14 call gather_available_ancestors mov rcx, [rbp+var_30] test eax, eax jnz loc_451F7 loc_4529A: inc r12 movsxd rax, dword ptr [r15+0A0h] cmp r12, rax jl loc_4521F jmp short loc_452CF loc_452AF: inc r8d mov rdi, rbx mov rsi, r14 mov edx, 8 call js_realloc_array mov rcx, [rbp+var_30] test eax, eax jz short loc_45264 jmp loc_451F7 loc_452CF: xor eax, eax loc_452D1: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long gather_available_ancestors( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al _DWORD *v18; // rcx long long v19; // r12 long long v20; // r13 long long v21; // r8 long long v22; // rdx long long v24; // rax long long v25; // rsi int v26; // eax int v27; // eax _DWORD *v28; // [rsp+0h] [rbp-30h] long long savedregs; // [rsp+30h] [rbp+0h] BYREF if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs ) { if ( *(int *)(a2 + 160) > 0 ) { v18 = (_DWORD *)(a3 + 12); v19 = 0LL; v28 = (_DWORD *)(a3 + 12); do { v20 = *(_QWORD *)(*(_QWORD *)(a2 + 152) + 8 * v19); v21 = *(int *)(a3 + 8); if ( v21 <= 0 ) { LABEL_10: if ( !*(_BYTE *)(*(_QWORD *)(v20 + 184) + 240LL) && (*(_DWORD *)(v20 + 168))-- == 1 ) { if ( *v18 <= (int)v21 ) { v27 = js_realloc_array(a1, (long long *)a3, 8u, v18, (int)v21 + 1); v18 = v28; if ( v27 ) return 0xFFFFFFFFLL; } v24 = *(_QWORD *)a3; v25 = *(int *)(a3 + 8); *(_DWORD *)(a3 + 8) = v25 + 1; *(_QWORD *)(v24 + 8 * v25) = v20; if ( !*(_BYTE *)(v20 + 128) ) { v26 = gather_available_ancestors(a1, v20, a3); v18 = v28; if ( v26 ) return 0xFFFFFFFFLL; } } } else { v22 = 0LL; while ( *(_QWORD *)(*(_QWORD *)a3 + 8 * v22) != v20 ) { if ( v21 == ++v22 ) goto LABEL_10; } } ++v19; } while ( v19 < *(int *)(a2 + 160) ); } return 0LL; } else { JS_ThrowRangeError( a1, (long long)"Maximum call stack size exceeded", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14); return 0xFFFFFFFFLL; } }
gather_available_ancestors: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x18] CMP qword ptr [RAX + 0xe8],RBP JBE 0x00145201 LEA RSI,[0x19efd6] MOV RDI,RBX XOR EAX,EAX CALL 0x00120add LAB_001451f7: MOV EAX,0xffffffff JMP 0x001452d1 LAB_00145201: MOV R15,RSI CMP dword ptr [RSI + 0xa0],0x0 JLE 0x001452cf MOV R14,RDX LEA RCX,[RDX + 0xc] XOR R12D,R12D MOV qword ptr [RBP + -0x30],RCX LAB_0014521f: MOV RAX,qword ptr [R15 + 0x98] MOV R13,qword ptr [RAX + R12*0x8] MOVSXD R8,dword ptr [R14 + 0x8] TEST R8,R8 JLE 0x00145246 MOV RAX,qword ptr [R14] XOR EDX,EDX LAB_00145238: CMP qword ptr [RAX + RDX*0x8],R13 JZ 0x0014529a INC RDX CMP R8,RDX JNZ 0x00145238 LAB_00145246: MOV RAX,qword ptr [R13 + 0xb8] CMP byte ptr [RAX + 0xf0],0x0 JNZ 0x0014529a DEC dword ptr [R13 + 0xa8] JNZ 0x0014529a CMP dword ptr [RCX],R8D JLE 0x001452af LAB_00145264: MOV RAX,qword ptr [R14] MOVSXD RSI,dword ptr [R14 + 0x8] LEA EDX,[RSI + 0x1] MOV dword ptr [R14 + 0x8],EDX MOV qword ptr [RAX + RSI*0x8],R13 CMP byte ptr [R13 + 0x80],0x0 JNZ 0x0014529a MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x001451c8 MOV RCX,qword ptr [RBP + -0x30] TEST EAX,EAX JNZ 0x001451f7 LAB_0014529a: INC R12 MOVSXD RAX,dword ptr [R15 + 0xa0] CMP R12,RAX JL 0x0014521f JMP 0x001452cf LAB_001452af: INC R8D MOV RDI,RBX MOV RSI,R14 MOV EDX,0x8 CALL 0x001434ef MOV RCX,qword ptr [RBP + -0x30] TEST EAX,EAX JZ 0x00145264 JMP 0x001451f7 LAB_001452cf: XOR EAX,EAX LAB_001452d1: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 gather_available_ancestors(long param_1,long param_2,long *param_3) { int *piVar1; long lVar2; int iVar3; int8 uVar4; long lVar5; long lVar6; if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) { JS_ThrowRangeError(param_1,"Maximum call stack size exceeded"); LAB_001451f7: uVar4 = 0xffffffff; } else { if (0 < *(int *)(param_2 + 0xa0)) { lVar6 = 0; do { lVar2 = *(long *)(*(long *)(param_2 + 0x98) + lVar6 * 8); iVar3 = (int)param_3[1]; if (0 < (long)iVar3) { lVar5 = 0; do { if (*(long *)(*param_3 + lVar5 * 8) == lVar2) goto LAB_0014529a; lVar5 = lVar5 + 1; } while (iVar3 != lVar5); } if (*(char *)(*(long *)(lVar2 + 0xb8) + 0xf0) == '\0') { piVar1 = (int *)(lVar2 + 0xa8); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { if ((*(int *)((long)param_3 + 0xc) <= iVar3) && (iVar3 = js_realloc_array(param_1,param_3,8,(int *)((long)param_3 + 0xc),iVar3 + 1), iVar3 != 0)) goto LAB_001451f7; lVar5 = param_3[1]; *(int *)(param_3 + 1) = (int)lVar5 + 1; *(long *)(*param_3 + (long)(int)lVar5 * 8) = lVar2; if ((*(char *)(lVar2 + 0x80) == '\0') && (iVar3 = gather_available_ancestors(param_1,lVar2,param_3), iVar3 != 0)) goto LAB_001451f7; } } LAB_0014529a: lVar6 = lVar6 + 1; } while (lVar6 < *(int *)(param_2 + 0xa0)); } uVar4 = 0; } return uVar4; }
58,282
my_scan_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_utf32(CHARSET_INFO *cs, const char *str, const char *end, int sequence_type) { const char *str0= str; switch (sequence_type) { case MY_SEQ_SPACES: for ( ; str < end; ) { my_wc_t wc; int res= my_utf32_uni(cs, &wc, (uchar*) str, (uchar*) end); if (res < 0 || wc != ' ') break; str+= res; } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O3
c
my_scan_utf32: cmpl $0x2, %ecx jne 0x803d5 pushq %rbp movq %rsp, %rbp movq %rsi, %rcx movq %rcx, %rax cmpq %rdx, %rcx jae 0x803d0 leaq 0x4(%rax), %rcx cmpq %rdx, %rcx ja 0x803d0 movzbl (%rax), %ecx shll $0x18, %ecx movzbl 0x1(%rax), %edi shll $0x10, %edi orl %ecx, %edi xorl %ecx, %ecx cmpl $0x110000, %edi # imm = 0x110000 setb %cl movzwl 0x2(%rax), %r8d rolw $0x8, %r8w movzwl %r8w, %r8d orl %edi, %r8d leaq (%rax,%rcx,4), %rcx cmpl $0x20, %r8d je 0x8038a subq %rsi, %rax popq %rbp retq xorl %eax, %eax retq
my_scan_utf32: cmp ecx, 2 jnz short loc_803D5 push rbp mov rbp, rsp mov rcx, rsi loc_8038A: mov rax, rcx cmp rcx, rdx jnb short loc_803D0 lea rcx, [rax+4] cmp rcx, rdx ja short loc_803D0 movzx ecx, byte ptr [rax] shl ecx, 18h movzx edi, byte ptr [rax+1] shl edi, 10h or edi, ecx xor ecx, ecx cmp edi, offset unk_110000 setb cl movzx r8d, word ptr [rax+2] rol r8w, 8 movzx r8d, r8w or r8d, edi lea rcx, [rax+rcx*4] cmp r8d, 20h ; ' ' jz short loc_8038A loc_803D0: sub rax, rsi pop rbp retn loc_803D5: xor eax, eax retn
long long my_scan_utf32(long long a1, unsigned __int8 *a2, unsigned long long a3, int a4) { unsigned __int8 *v4; // rcx unsigned __int8 *v5; // rax unsigned int v6; // edi if ( a4 != 2 ) return 0LL; v4 = a2; do { v5 = v4; if ( (unsigned long long)v4 >= a3 ) break; if ( (unsigned long long)(v4 + 4) > a3 ) break; v6 = (*v4 << 24) | (v4[1] << 16); v4 += 4 * (v6 < (unsigned int)&unk_110000); } while ( (v6 | (unsigned __int16)__ROL2__(*((_WORD *)v5 + 1), 8)) == 0x20 ); return v5 - a2; }
my_scan_utf32: CMP ECX,0x2 JNZ 0x001803d5 PUSH RBP MOV RBP,RSP MOV RCX,RSI LAB_0018038a: MOV RAX,RCX CMP RCX,RDX JNC 0x001803d0 LEA RCX,[RAX + 0x4] CMP RCX,RDX JA 0x001803d0 MOVZX ECX,byte ptr [RAX] SHL ECX,0x18 MOVZX EDI,byte ptr [RAX + 0x1] SHL EDI,0x10 OR EDI,ECX XOR ECX,ECX CMP EDI,0x110000 SETC CL MOVZX R8D,word ptr [RAX + 0x2] ROL R8W,0x8 MOVZX R8D,R8W OR R8D,EDI LEA RCX,[RAX + RCX*0x4] CMP R8D,0x20 JZ 0x0018038a LAB_001803d0: SUB RAX,RSI POP RBP RET LAB_001803d5: XOR EAX,EAX RET
long my_scan_utf32(int8 param_1,byte *param_2,byte *param_3,int param_4) { byte *pbVar1; byte *pbVar2; uint uVar3; pbVar1 = param_2; if (param_4 != 2) { return 0; } do { pbVar2 = pbVar1; if ((param_3 <= pbVar2) || (param_3 < pbVar2 + 4)) break; uVar3 = (uint)pbVar2[1] << 0x10 | (uint)*pbVar2 << 0x18; pbVar1 = pbVar2 + (ulong)(uVar3 < 0x110000) * 4; } while (((ushort)(*(ushort *)(pbVar2 + 2) << 8 | *(ushort *)(pbVar2 + 2) >> 8) | uVar3) == 0x20); return (long)pbVar2 - (long)param_2; }
58,283
r3d_frustum_is_point_in
r3d/src/details/r3d_frustum.c
bool r3d_frustum_is_point_in(const r3d_frustum_t* frustum, Vector3 position) { for (int i = 0; i < R3D_PLANE_COUNT; i++) { if (r3d_frustum_distance_to_plane(frustum->planes[i], position) <= 0) { return false; } } return true; }
O3
c
r3d_frustum_is_point_in: movsd (%rdi), %xmm2 movsd 0x8(%rdi), %xmm3 movaps %xmm2, %xmm4 mulps %xmm0, %xmm4 shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1] mulss %xmm0, %xmm2 addss %xmm4, %xmm2 movaps %xmm3, %xmm4 mulss %xmm1, %xmm4 addss %xmm2, %xmm4 shufps $0x55, %xmm3, %xmm3 # xmm3 = xmm3[1,1,1,1] addss %xmm4, %xmm3 xorps %xmm2, %xmm2 ucomiss %xmm3, %xmm2 jae 0xdfdf1 pushq %rbp movq %rsp, %rbp addq $0x18, %rdi xorl %ecx, %ecx movq %rcx, %rax cmpq $0x5, %rcx je 0xdfde8 movsd -0x8(%rdi), %xmm3 movsd (%rdi), %xmm4 movaps %xmm3, %xmm5 mulps %xmm0, %xmm5 shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1] mulss %xmm0, %xmm3 addss %xmm5, %xmm3 movaps %xmm4, %xmm5 mulss %xmm1, %xmm5 addss %xmm3, %xmm5 shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1] addss %xmm5, %xmm4 addq $0x10, %rdi leaq 0x1(%rax), %rcx ucomiss %xmm4, %xmm2 jb 0xdfda4 cmpq $0x5, %rax setae %al popq %rbp retq xorl %eax, %eax retq
r3d_frustum_is_point_in: movsd xmm2, qword ptr [rdi] movsd xmm3, qword ptr [rdi+8] movaps xmm4, xmm2 mulps xmm4, xmm0 shufps xmm4, xmm4, 55h ; 'U' mulss xmm2, xmm0 addss xmm2, xmm4 movaps xmm4, xmm3 mulss xmm4, xmm1 addss xmm4, xmm2 shufps xmm3, xmm3, 55h ; 'U' addss xmm3, xmm4 xorps xmm2, xmm2 ucomiss xmm2, xmm3 jnb short loc_DFDF1 push rbp mov rbp, rsp add rdi, 18h xor ecx, ecx loc_DFDA4: mov rax, rcx cmp rcx, 5 jz short loc_DFDE8 movsd xmm3, qword ptr [rdi-8] movsd xmm4, qword ptr [rdi] movaps xmm5, xmm3 mulps xmm5, xmm0 shufps xmm5, xmm5, 55h ; 'U' mulss xmm3, xmm0 addss xmm3, xmm5 movaps xmm5, xmm4 mulss xmm5, xmm1 addss xmm5, xmm3 shufps xmm4, xmm4, 55h ; 'U' addss xmm4, xmm5 add rdi, 10h lea rcx, [rax+1] ucomiss xmm2, xmm4 jb short loc_DFDA4 loc_DFDE8: cmp rax, 5 setnb al pop rbp retn loc_DFDF1: xor eax, eax retn
bool r3d_frustum_is_point_in(unsigned long long *a1, __m128 a2, float a3) { __m128 v3; // xmm4 unsigned long long *v4; // rdi unsigned long long v5; // rcx unsigned long long v6; // rax __m128 v7; // xmm5 float v8; // xmm4_4 v3 = _mm_mul_ps((__m128)*a1, a2); if ( (float)(_mm_shuffle_ps((__m128)a1[1], (__m128)a1[1], 85).m128_f32[0] + (float)((float)(COERCE_FLOAT(a1[1]) * a3) + (float)((float)(COERCE_FLOAT(*a1) * a2.m128_f32[0]) + _mm_shuffle_ps(v3, v3, 85).m128_f32[0]))) <= 0.0 ) return 0; v4 = a1 + 3; v5 = 0LL; do { v6 = v5; if ( v5 == 5 ) break; v7 = _mm_mul_ps((__m128)*(v4 - 1), a2); v8 = _mm_shuffle_ps((__m128)*v4, (__m128)*v4, 85).m128_f32[0] + (float)((float)(COERCE_FLOAT(*v4) * a3) + (float)((float)(COERCE_FLOAT(*(v4 - 1)) * a2.m128_f32[0]) + _mm_shuffle_ps(v7, v7, 85).m128_f32[0])); v4 += 2; ++v5; } while ( v8 > 0.0 ); return v6 >= 5; }
r3d_frustum_is_point_in: MOVSD XMM2,qword ptr [RDI] MOVSD XMM3,qword ptr [RDI + 0x8] MOVAPS XMM4,XMM2 MULPS XMM4,XMM0 SHUFPS XMM4,XMM4,0x55 MULSS XMM2,XMM0 ADDSS XMM2,XMM4 MOVAPS XMM4,XMM3 MULSS XMM4,XMM1 ADDSS XMM4,XMM2 SHUFPS XMM3,XMM3,0x55 ADDSS XMM3,XMM4 XORPS XMM2,XMM2 UCOMISS XMM2,XMM3 JNC 0x001dfdf1 PUSH RBP MOV RBP,RSP ADD RDI,0x18 XOR ECX,ECX LAB_001dfda4: MOV RAX,RCX CMP RCX,0x5 JZ 0x001dfde8 MOVSD XMM3,qword ptr [RDI + -0x8] MOVSD XMM4,qword ptr [RDI] MOVAPS XMM5,XMM3 MULPS XMM5,XMM0 SHUFPS XMM5,XMM5,0x55 MULSS XMM3,XMM0 ADDSS XMM3,XMM5 MOVAPS XMM5,XMM4 MULSS XMM5,XMM1 ADDSS XMM5,XMM3 SHUFPS XMM4,XMM4,0x55 ADDSS XMM4,XMM5 ADD RDI,0x10 LEA RCX,[RAX + 0x1] UCOMISS XMM2,XMM4 JC 0x001dfda4 LAB_001dfde8: CMP RAX,0x5 SETNC AL POP RBP RET LAB_001dfdf1: XOR EAX,EAX RET
int8 r3d_frustum_is_point_in(int8 param_1,float param_2,int8 *param_3) { int8 *puVar1; int8 uVar2; ulong uVar3; ulong uVar4; float fVar5; fVar5 = (float)((ulong)param_1 >> 0x20); if ((float)((ulong)param_3[1] >> 0x20) + (float)param_3[1] * param_2 + (float)*param_3 * (float)param_1 + (float)((ulong)*param_3 >> 0x20) * fVar5 <= 0.0) { return 0; } param_3 = param_3 + 3; uVar3 = 0; do { uVar4 = uVar3; if (uVar4 == 5) break; puVar1 = param_3 + -1; uVar2 = *param_3; param_3 = param_3 + 2; uVar3 = uVar4 + 1; } while (0.0 < (float)((ulong)uVar2 >> 0x20) + (float)uVar2 * param_2 + (float)*puVar1 * (float)param_1 + (float)((ulong)*puVar1 >> 0x20) * fVar5); return CONCAT71((int7)(uVar4 >> 8),4 < uVar4); }
58,284
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp
float FaceVertex::GetImplicitVertexSharpness() const { if (_isImpInfSharp) { return Sdc::Crease::SHARPNESS_INFINITE; } assert(_isImpSemiSharp); // // Since this will be applied at an inf-sharp crease, there will be // two inf-sharp edges in addition to the semi-sharp, so we only // need find the max of the semi-sharp edges and whatever explicit // vertex sharpness may have been assigned. Iterate through all // faces and inspect the sharpness of each leading interior edge: // float sharpness = GetVertexSharpness(); for (int i = 0; i < GetNumFaces(); ++i) { if (GetFacePrevious(i) >= 0) { sharpness = std::max(sharpness, GetFaceEdgeSharpness(2*i)); } } return sharpness; }
O0
cpp
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movb 0x9f(%rax), %al shrb $0x2, %al andb $0x1, %al cmpb $0x0, %al je 0x188ae5 movss 0x61531(%rip), %xmm0 # 0x1ea00c movss %xmm0, -0x4(%rbp) jmp 0x188b97 movq -0x28(%rbp), %rax movb 0x9f(%rax), %al shrb $0x3, %al andb $0x1, %al cmpb $0x0, %al je 0x188afa jmp 0x188b19 leaq 0x6df35(%rip), %rdi # 0x1f6a36 leaq 0x6de9a(%rip), %rsi # 0x1f69a2 movl $0xb4, %edx leaq 0x6df32(%rip), %rcx # 0x1f6a46 callq 0xc9440 movq -0x28(%rbp), %rdi callq 0xc31d0 movss %xmm0, -0x14(%rbp) movl $0x0, -0x18(%rbp) movq -0x28(%rbp), %rdi movl -0x18(%rbp), %eax movl %eax, -0x2c(%rbp) callq 0xd4690 movl %eax, %ecx movl -0x2c(%rbp), %eax cmpl %ecx, %eax jge 0x188b8d movq -0x28(%rbp), %rdi movl -0x18(%rbp), %esi callq 0xcfb40 cmpl $0x0, %eax jl 0x188b80 movq -0x28(%rbp), %rdi movl -0x18(%rbp), %esi shll %esi callq 0xd0d90 movss %xmm0, -0x1c(%rbp) leaq -0x14(%rbp), %rdi leaq -0x1c(%rbp), %rsi callq 0xd1e90 movss (%rax), %xmm0 movss %xmm0, -0x14(%rbp) jmp 0x188b82 movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0x188b2e movss -0x14(%rbp), %xmm0 movss %xmm0, -0x4(%rbp) movss -0x4(%rbp), %xmm0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex26GetImplicitVertexSharpnessEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov [rbp+var_28], rax mov al, [rax+9Fh] shr al, 2 and al, 1 cmp al, 0 jz short loc_188AE5 movss xmm0, cs:dword_1EA00C movss [rbp+var_4], xmm0 jmp loc_188B97 loc_188AE5: mov rax, [rbp+var_28] mov al, [rax+9Fh] shr al, 3 and al, 1 cmp al, 0 jz short loc_188AFA jmp short loc_188B19 loc_188AFA: lea rdi, aIsimpsemisharp; "_isImpSemiSharp" lea rsi, aWorkspaceLlm4b_31; "/workspace/llm4binary/github/2025_star3"... mov edx, 0B4h lea rcx, aFloatOpensubdi_1; "float OpenSubdiv::v3_6_0::Bfr::FaceVert"... call ___assert_fail loc_188B19: mov rdi, [rbp+var_28]; this call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex18GetVertexSharpnessEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSharpness(void) movss [rbp+var_14], xmm0 mov [rbp+var_18], 0 loc_188B2E: mov rdi, [rbp+var_28]; this mov eax, [rbp+var_18] mov [rbp+var_2C], eax call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex11GetNumFacesEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetNumFaces(void) mov ecx, eax mov eax, [rbp+var_2C] cmp eax, ecx jge short loc_188B8D mov rdi, [rbp+var_28]; this mov esi, [rbp+var_18]; int call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex15GetFacePreviousEi; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetFacePrevious(int) cmp eax, 0 jl short loc_188B80 mov rdi, [rbp+var_28]; this mov esi, [rbp+var_18] shl esi, 1; int call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex20GetFaceEdgeSharpnessEi; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetFaceEdgeSharpness(int) movss [rbp+var_1C], xmm0 lea rdi, [rbp+var_14] lea rsi, [rbp+var_1C] call __ZSt3maxIfERKT_S2_S2_; std::max<float>(float const&,float const&) movss xmm0, dword ptr [rax] movss [rbp+var_14], xmm0 loc_188B80: jmp short $+2 loc_188B82: mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_188B2E loc_188B8D: movss xmm0, [rbp+var_14] movss [rbp+var_4], xmm0 loc_188B97: movss xmm0, [rbp+var_4] add rsp, 30h pop rbp retn
float OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness( OpenSubdiv::v3_6_0::Bfr::FaceVertex *this, float a2) { int v3; // [rsp+4h] [rbp-2Ch] float v4; // [rsp+14h] [rbp-1Ch] BYREF int i; // [rsp+18h] [rbp-18h] float v6; // [rsp+1Ch] [rbp-14h] BYREF OpenSubdiv::v3_6_0::Bfr::FaceVertex *v7; // [rsp+20h] [rbp-10h] v7 = this; if ( (*((_BYTE *)this + 159) & 4) != 0 ) return 10.0; if ( (*((_BYTE *)this + 159) & 8) == 0 ) __assert_fail( "_isImpSemiSharp", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp", 180LL, "float OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const"); OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSharpness(this); v6 = a2; for ( i = 0; ; ++i ) { v3 = i; if ( v3 >= (int)OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetNumFaces(this) ) break; if ( (int)OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetFacePrevious(this, i) >= 0 ) { OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetFaceEdgeSharpness(this, 2 * i); v4 = a2; a2 = *(float *)std::max<float>(&v6, &v4); v6 = a2; } } return v6; }
58,285
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp
float FaceVertex::GetImplicitVertexSharpness() const { if (_isImpInfSharp) { return Sdc::Crease::SHARPNESS_INFINITE; } assert(_isImpSemiSharp); // // Since this will be applied at an inf-sharp crease, there will be // two inf-sharp edges in addition to the semi-sharp, so we only // need find the max of the semi-sharp edges and whatever explicit // vertex sharpness may have been assigned. Iterate through all // faces and inspect the sharpness of each leading interior edge: // float sharpness = GetVertexSharpness(); for (int i = 0; i < GetNumFaces(); ++i) { if (GetFacePrevious(i) >= 0) { sharpness = std::max(sharpness, GetFaceEdgeSharpness(2*i)); } } return sharpness; }
O1
cpp
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const: pushq %rax movb 0x9f(%rdi), %al testb $0x4, %al jne 0x87138 testb $0x8, %al je 0x87142 movss 0x4(%rdi), %xmm0 movswl 0x2(%rdi), %r8d testl %r8d, %r8d jle 0x87140 movzwl 0x98(%rdi), %eax movq 0x8(%rdi), %rcx movq 0xa8(%rdi), %rdx movl %eax, %edi andl $0x1, %edi leal -0x1(%r8), %r9d xorl %esi, %esi negw %di movl $0x0, %edi sbbl %edi, %edi orl %r9d, %edi movslq %r8d, %r8 btl $0x8, %eax jb 0x87118 movq %rsi, %r9 subq $0x1, %r9 cmovbl %edi, %r9d jmp 0x8711d movswl (%rdx,%rsi,4), %r9d testl %r9d, %r9d js 0x8712e movss (%rcx,%rsi,8), %xmm1 maxss %xmm0, %xmm1 movaps %xmm1, %xmm0 incq %rsi cmpq %rsi, %r8 jne 0x87105 jmp 0x87140 movss 0x2aec4(%rip), %xmm0 # 0xb2004 popq %rax retq leaq 0x3723c(%rip), %rdi # 0xbe385 leaq 0x371a1(%rip), %rsi # 0xbe2f1 leaq 0x3723e(%rip), %rcx # 0xbe395 movl $0xb4, %edx callq 0x39560 nop
_ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex26GetImplicitVertexSharpnessEv: push rax mov al, [rdi+9Fh] test al, 4 jnz short loc_87138 test al, 8 jz short loc_87142 movss xmm0, dword ptr [rdi+4] movsx r8d, word ptr [rdi+2] test r8d, r8d jle short loc_87140 movzx eax, word ptr [rdi+98h] mov rcx, [rdi+8] mov rdx, [rdi+0A8h] mov edi, eax and edi, 1 lea r9d, [r8-1] xor esi, esi neg di mov edi, 0 sbb edi, edi or edi, r9d movsxd r8, r8d loc_87105: bt eax, 8 jb short loc_87118 mov r9, rsi sub r9, 1 cmovb r9d, edi jmp short loc_8711D loc_87118: movsx r9d, word ptr [rdx+rsi*4] loc_8711D: test r9d, r9d js short loc_8712E movss xmm1, dword ptr [rcx+rsi*8] maxss xmm1, xmm0 movaps xmm0, xmm1 loc_8712E: inc rsi cmp r8, rsi jnz short loc_87105 jmp short loc_87140 loc_87138: movss xmm0, cs:dword_B2004 loc_87140: pop rax retn loc_87142: lea rdi, aIsimpsemisharp; "_isImpSemiSharp" lea rsi, aWorkspaceLlm4b_33; "/workspace/llm4binary/github/2025_star3"... lea rcx, aFloatOpensubdi_1; "float OpenSubdiv::v3_6_0::Bfr::FaceVert"... mov edx, 0B4h call ___assert_fail
float __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness( OpenSubdiv::v3_6_0::Bfr::FaceVertex *this) { char v1; // al float result; // xmm0_4 int v3; // r8d __int16 v4; // ax long long v5; // rsi int v6; // r9d v1 = *((_BYTE *)this + 159); if ( (v1 & 4) != 0 ) return 10.0; if ( (v1 & 8) == 0 ) __assert_fail( "_isImpSemiSharp", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp", 180LL, "float OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const"); result = *((float *)this + 1); v3 = *((__int16 *)this + 1); if ( v3 > 0 ) { v4 = *((_WORD *)this + 76); v5 = 0LL; do { if ( (v4 & 0x100) != 0 ) { v6 = *(__int16 *)(*((_QWORD *)this + 21) + 4 * v5); } else { v6 = v5 - 1; if ( !v5 ) v6 = (v4 & 1) != 0 ? -1 : v3 - 1; } if ( v6 >= 0 ) result = fmaxf(*(float *)(*((_QWORD *)this + 1) + 8 * v5), result); ++v5; } while ( *((__int16 *)this + 1) != v5 ); } return result; }
GetImplicitVertexSharpness: PUSH RAX MOV AL,byte ptr [RDI + 0x9f] TEST AL,0x4 JNZ 0x00187138 TEST AL,0x8 JZ 0x00187142 MOVSS XMM0,dword ptr [RDI + 0x4] MOVSX R8D,word ptr [RDI + 0x2] TEST R8D,R8D JLE 0x00187140 MOVZX EAX,word ptr [RDI + 0x98] MOV RCX,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI + 0xa8] MOV EDI,EAX AND EDI,0x1 LEA R9D,[R8 + -0x1] XOR ESI,ESI NEG DI MOV EDI,0x0 SBB EDI,EDI OR EDI,R9D MOVSXD R8,R8D LAB_00187105: BT EAX,0x8 JC 0x00187118 MOV R9,RSI SUB R9,0x1 CMOVC R9D,EDI JMP 0x0018711d LAB_00187118: MOVSX R9D,word ptr [RDX + RSI*0x4] LAB_0018711d: TEST R9D,R9D JS 0x0018712e MOVSS XMM1,dword ptr [RCX + RSI*0x8] MAXSS XMM1,XMM0 MOVAPS XMM0,XMM1 LAB_0018712e: INC RSI CMP R8,RSI JNZ 0x00187105 JMP 0x00187140 LAB_00187138: MOVSS XMM0,dword ptr [0x001b2004] LAB_00187140: POP RAX RET LAB_00187142: LEA RDI,[0x1be385] LEA RSI,[0x1be2f1] LEA RCX,[0x1be395] MOV EDX,0xb4 CALL 0x00139560
/* OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const */ int8 __thiscall OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness(FaceVertex *this) { short sVar1; int8 in_RAX; long lVar2; uint uVar3; float fVar4; float fVar5; if (((byte)this[0x9f] & 4) == 0) { if (((byte)this[0x9f] & 8) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("_isImpSemiSharp", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp" ,0xb4, "float OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const") ; } sVar1 = *(short *)(this + 2); if (0 < sVar1) { lVar2 = 0; fVar4 = *(float *)(this + 4); do { if ((*(ushort *)(this + 0x98) >> 8 & 1) == 0) { uVar3 = (int)lVar2 - 1; if (lVar2 == 0) { uVar3 = -(uint)((*(ushort *)(this + 0x98) & 1) != 0) | (int)sVar1 - 1U; } } else { uVar3 = (int)*(short *)(*(long *)(this + 0xa8) + lVar2 * 4); } fVar5 = fVar4; if ((-1 < (int)uVar3) && (fVar5 = *(float *)(*(long *)(this + 8) + lVar2 * 8), fVar5 <= fVar4)) { fVar5 = fVar4; } lVar2 = lVar2 + 1; fVar4 = fVar5; } while ((int)sVar1 != lVar2); } } return in_RAX; }
58,286
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp
float FaceVertex::GetImplicitVertexSharpness() const { if (_isImpInfSharp) { return Sdc::Crease::SHARPNESS_INFINITE; } assert(_isImpSemiSharp); // // Since this will be applied at an inf-sharp crease, there will be // two inf-sharp edges in addition to the semi-sharp, so we only // need find the max of the semi-sharp edges and whatever explicit // vertex sharpness may have been assigned. Iterate through all // faces and inspect the sharpness of each leading interior edge: // float sharpness = GetVertexSharpness(); for (int i = 0; i < GetNumFaces(); ++i) { if (GetFacePrevious(i) >= 0) { sharpness = std::max(sharpness, GetFaceEdgeSharpness(2*i)); } } return sharpness; }
O2
cpp
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const: pushq %r14 pushq %rbx pushq %rax movb 0x9f(%rdi), %al testb $0x4, %al jne 0x968c7 testb $0x8, %al je 0x968d7 movq %rdi, %rbx movss 0x4(%rdi), %xmm0 xorl %r14d, %r14d movswq 0x2(%rbx), %rax cmpq %rax, %r14 jge 0x968cf movss %xmm0, 0x4(%rsp) movq %rbx, %rdi movl %r14d, %esi callq 0x53450 testl %eax, %eax js 0x968bc movq 0x8(%rbx), %rax movss (%rax,%r14,8), %xmm0 maxss 0x4(%rsp), %xmm0 jmp 0x968c2 movss 0x4(%rsp), %xmm0 incq %r14 jmp 0x9688b movss 0x25735(%rip), %xmm0 # 0xbc004 addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x3233a(%rip), %rdi # 0xc8c18 leaq 0x3229f(%rip), %rsi # 0xc8b84 leaq 0x3233c(%rip), %rcx # 0xc8c28 movl $0xb4, %edx callq 0x512a0
_ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex26GetImplicitVertexSharpnessEv: push r14 push rbx push rax mov al, [rdi+9Fh] test al, 4 jnz short loc_968C7 test al, 8 jz short loc_968D7 mov rbx, rdi movss xmm0, dword ptr [rdi+4] xor r14d, r14d loc_9688B: movsx rax, word ptr [rbx+2] cmp r14, rax jge short loc_968CF movss [rsp+18h+var_14], xmm0 mov rdi, rbx; this mov esi, r14d; int call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex15GetFacePreviousEi; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetFacePrevious(int) test eax, eax js short loc_968BC mov rax, [rbx+8] movss xmm0, dword ptr [rax+r14*8] maxss xmm0, [rsp+18h+var_14] jmp short loc_968C2 loc_968BC: movss xmm0, [rsp+18h+var_14] loc_968C2: inc r14 jmp short loc_9688B loc_968C7: movss xmm0, cs:dword_BC004 loc_968CF: add rsp, 8 pop rbx pop r14 retn loc_968D7: lea rdi, aIsimpsemisharp; "_isImpSemiSharp" lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github/2025_star3"... lea rcx, aFloatOpensubdi_1; "float OpenSubdiv::v3_6_0::Bfr::FaceVert"... mov edx, 0B4h call ___assert_fail
float OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness( OpenSubdiv::v3_6_0::Bfr::FaceVertex *this) { char v1; // al float result; // xmm0_4 long long i; // r14 v1 = *((_BYTE *)this + 159); if ( (v1 & 4) != 0 ) return 10.0; if ( (v1 & 8) == 0 ) __assert_fail( "_isImpSemiSharp", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp", 180LL, "float OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const"); result = *((float *)this + 1); for ( i = 0LL; i < *((__int16 *)this + 1); ++i ) { if ( (int)OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetFacePrevious(this, i) >= 0 ) result = fmaxf(*(float *)(*((_QWORD *)this + 1) + 8 * i), result); } return result; }
GetImplicitVertexSharpness: PUSH R14 PUSH RBX PUSH RAX MOV AL,byte ptr [RDI + 0x9f] TEST AL,0x4 JNZ 0x001968c7 TEST AL,0x8 JZ 0x001968d7 MOV RBX,RDI MOVSS XMM0,dword ptr [RDI + 0x4] XOR R14D,R14D LAB_0019688b: MOVSX RAX,word ptr [RBX + 0x2] CMP R14,RAX JGE 0x001968cf MOVSS dword ptr [RSP + 0x4],XMM0 MOV RDI,RBX MOV ESI,R14D CALL 0x00153450 TEST EAX,EAX JS 0x001968bc MOV RAX,qword ptr [RBX + 0x8] MOVSS XMM0,dword ptr [RAX + R14*0x8] MAXSS XMM0,dword ptr [RSP + 0x4] JMP 0x001968c2 LAB_001968bc: MOVSS XMM0,dword ptr [RSP + 0x4] LAB_001968c2: INC R14 JMP 0x0019688b LAB_001968c7: MOVSS XMM0,dword ptr [0x001bc004] LAB_001968cf: ADD RSP,0x8 POP RBX POP R14 RET LAB_001968d7: LEA RDI,[0x1c8c18] LEA RSI,[0x1c8b84] LEA RCX,[0x1c8c28] MOV EDX,0xb4 CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const */ float __thiscall OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness(FaceVertex *this) { int iVar1; long lVar2; float fVar3; float fVar4; fVar3 = DAT_001bc004; if (((byte)this[0x9f] & 4) == 0) { if (((byte)this[0x9f] & 8) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("_isImpSemiSharp", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp" ,0xb4, "float OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness() const") ; } fVar3 = *(float *)(this + 4); for (lVar2 = 0; lVar2 < *(short *)(this + 2); lVar2 = lVar2 + 1) { iVar1 = GetFacePrevious(this,(int)lVar2); fVar4 = fVar3; if ((-1 < iVar1) && (fVar4 = *(float *)(*(long *)(this + 8) + lVar2 * 8), fVar4 <= fVar3)) { fVar4 = fVar3; } fVar3 = fVar4; } } return fVar3; }
58,287
testing::internal::CodePointToUtf8[abi:cxx11](unsigned int)
seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc
std::string CodePointToUtf8(uint32_t code_point) { if (code_point > kMaxCodePoint4) { return "(Invalid Unicode 0x" + String::FormatHexUInt32(code_point) + ")"; } char str[5]; // Big enough for the largest valid code point. if (code_point <= kMaxCodePoint1) { str[1] = '\0'; str[0] = static_cast<char>(code_point); // 0xxxxxxx } else if (code_point <= kMaxCodePoint2) { str[2] = '\0'; str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx } else if (code_point <= kMaxCodePoint3) { str[3] = '\0'; str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx } else { // code_point <= kMaxCodePoint4 str[4] = '\0'; str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx str[0] = static_cast<char>(0xF0 | code_point); // 11110xxx } return str; }
O0
cpp
testing::internal::CodePointToUtf8[abi:cxx11](unsigned int): pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x78(%rbp) movq %rdi, %rax movq %rax, -0x70(%rbp) movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpl $0x1fffff, -0xc(%rbp) # imm = 0x1FFFFF jbe 0x312be movl -0xc(%rbp), %esi leaq -0x50(%rbp), %rdi movq %rdi, -0x80(%rbp) callq 0x31400 movq -0x80(%rbp), %rdx leaq 0x433d6(%rip), %rsi # 0x7462b leaq -0x30(%rbp), %rdi callq 0x4b280 jmp 0x31260 movq -0x78(%rbp), %rdi leaq 0x437e5(%rip), %rdx # 0x74a50 leaq -0x30(%rbp), %rsi callq 0x4a7e0 jmp 0x31276 leaq -0x30(%rbp), %rdi callq 0xbe58 leaq -0x50(%rbp), %rdi callq 0xbe58 jmp 0x313e9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x312b0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x30(%rbp), %rdi callq 0xbe58 leaq -0x50(%rbp), %rdi callq 0xbe58 jmp 0x313f6 cmpl $0x7f, -0xc(%rbp) ja 0x312d3 movb $0x0, -0x60(%rbp) movl -0xc(%rbp), %eax movb %al, -0x61(%rbp) jmp 0x313a1 cmpl $0x7ff, -0xc(%rbp) # imm = 0x7FF ja 0x31306 movb $0x0, -0x5f(%rbp) leaq -0xc(%rbp), %rdi movl $0x6, %esi callq 0x4ef80 orl $0x80, %eax movb %al, -0x60(%rbp) movl -0xc(%rbp), %eax orl $0xc0, %eax movb %al, -0x61(%rbp) jmp 0x3139f cmpl $0xffff, -0xc(%rbp) # imm = 0xFFFF ja 0x3134c movb $0x0, -0x5e(%rbp) leaq -0xc(%rbp), %rdi movl $0x6, %esi callq 0x4ef80 orl $0x80, %eax movb %al, -0x5f(%rbp) leaq -0xc(%rbp), %rdi movl $0x6, %esi callq 0x4ef80 orl $0x80, %eax movb %al, -0x60(%rbp) movl -0xc(%rbp), %eax orl $0xe0, %eax movb %al, -0x61(%rbp) jmp 0x3139d movb $0x0, -0x5d(%rbp) leaq -0xc(%rbp), %rdi movl $0x6, %esi callq 0x4ef80 orl $0x80, %eax movb %al, -0x5e(%rbp) leaq -0xc(%rbp), %rdi movl $0x6, %esi callq 0x4ef80 orl $0x80, %eax movb %al, -0x5f(%rbp) leaq -0xc(%rbp), %rdi movl $0x6, %esi callq 0x4ef80 orl $0x80, %eax movb %al, -0x60(%rbp) movl -0xc(%rbp), %eax orl $0xf0, %eax movb %al, -0x61(%rbp) jmp 0x3139f jmp 0x313a1 leaq -0x62(%rbp), %rdi movq %rdi, -0x88(%rbp) callq 0xbce0 movq -0x78(%rbp), %rdi movq -0x88(%rbp), %rdx leaq -0x61(%rbp), %rsi callq 0x13a30 jmp 0x313c7 leaq -0x62(%rbp), %rdi callq 0xb730 jmp 0x313e9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x62(%rbp), %rdi callq 0xb730 jmp 0x313f6 movq -0x70(%rbp), %rax addq $0x90, %rsp popq %rbp retq movq -0x58(%rbp), %rdi callq 0xbcd0 nop
_ZN7testing8internal15CodePointToUtf8B5cxx11Ej: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_78], rdi mov rax, rdi mov [rbp+var_70], rax mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp [rbp+var_C], offset unk_1FFFFF jbe loc_312BE mov esi, [rbp+var_C] lea rdi, [rbp+var_50] mov [rbp+var_80], rdi call _ZN7testing8internal6String15FormatHexUInt32B5cxx11Ej; testing::internal::String::FormatHexUInt32(uint) mov rdx, [rbp+var_80] lea rsi, aInvalidUnicode; "(Invalid Unicode 0x" lea rdi, [rbp+var_30] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_31260: mov rdi, [rbp+var_78] lea rdx, aTeardowntestsu+12h; ")" lea rsi, [rbp+var_30] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_31276: lea rdi, [rbp+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_313E9 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_312B0 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_312B0: lea rdi, [rbp+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_313F6 loc_312BE: cmp [rbp+var_C], 7Fh ja short loc_312D3 mov [rbp+var_60], 0 mov eax, [rbp+var_C] mov [rbp+var_61], al jmp loc_313A1 loc_312D3: cmp [rbp+var_C], 7FFh ja short loc_31306 mov [rbp+var_5F], 0 lea rdi, [rbp+var_C]; this mov esi, offset byte_6; unsigned int * call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int) or eax, 80h mov [rbp+var_60], al mov eax, [rbp+var_C] or eax, 0C0h mov [rbp+var_61], al jmp loc_3139F loc_31306: cmp [rbp+var_C], 0FFFFh ja short loc_3134C mov [rbp+var_5E], 0 lea rdi, [rbp+var_C]; this mov esi, offset byte_6; unsigned int * call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int) or eax, 80h mov [rbp+var_5F], al lea rdi, [rbp+var_C]; this mov esi, offset byte_6; unsigned int * call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int) or eax, 80h mov [rbp+var_60], al mov eax, [rbp+var_C] or eax, 0E0h mov [rbp+var_61], al jmp short loc_3139D loc_3134C: mov [rbp+var_5D], 0 lea rdi, [rbp+var_C]; this mov esi, offset byte_6; unsigned int * call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int) or eax, 80h mov [rbp+var_5E], al lea rdi, [rbp+var_C]; this mov esi, offset byte_6; unsigned int * call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int) or eax, 80h mov [rbp+var_5F], al lea rdi, [rbp+var_C]; this mov esi, offset byte_6; unsigned int * call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int) or eax, 80h mov [rbp+var_60], al mov eax, [rbp+var_C] or eax, 0F0h mov [rbp+var_61], al loc_3139D: jmp short $+2 loc_3139F: jmp short $+2 loc_313A1: lea rdi, [rbp+var_62] mov [rbp+var_88], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_78] mov rdx, [rbp+var_88] lea rsi, [rbp+var_61] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_313C7: lea rdi, [rbp+var_62] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_313E9 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_62] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_313F6 loc_313E9: mov rax, [rbp+var_70] add rsp, 90h pop rbp retn loc_313F6: mov rdi, [rbp+var_58] call __Unwind_Resume
long long testing::internal::CodePointToUtf8[abi:cxx11](long long a1, unsigned int a2, int a3) { int v3; // edx int v4; // edx int v5; // edx char v7; // [rsp+2Eh] [rbp-62h] BYREF char v8; // [rsp+2Fh] [rbp-61h] BYREF char v9; // [rsp+30h] [rbp-60h] char v10; // [rsp+31h] [rbp-5Fh] char v11; // [rsp+32h] [rbp-5Eh] char v12; // [rsp+33h] [rbp-5Dh] _BYTE v13[32]; // [rsp+40h] [rbp-50h] BYREF _BYTE v14[36]; // [rsp+60h] [rbp-30h] BYREF unsigned int v15; // [rsp+84h] [rbp-Ch] BYREF long long v16; // [rsp+88h] [rbp-8h] v16 = a1; v15 = a2; if ( a2 <= (unsigned int)&unk_1FFFFF ) { if ( v15 > 0x7F ) { if ( v15 > 0x7FF ) { if ( v15 > 0xFFFF ) { v12 = 0; v11 = testing::internal::ChopLowBits((testing::internal *)&v15, (unsigned int *)&byte_6, a3) | 0x80; v10 = testing::internal::ChopLowBits((testing::internal *)&v15, (unsigned int *)&byte_6, v4) | 0x80; v9 = testing::internal::ChopLowBits((testing::internal *)&v15, (unsigned int *)&byte_6, v5) | 0x80; v8 = v15 | 0xF0; } else { v11 = 0; v10 = testing::internal::ChopLowBits((testing::internal *)&v15, (unsigned int *)&byte_6, a3) | 0x80; v9 = testing::internal::ChopLowBits((testing::internal *)&v15, (unsigned int *)&byte_6, v3) | 0x80; v8 = v15 | 0xE0; } } else { v10 = 0; v9 = testing::internal::ChopLowBits((testing::internal *)&v15, (unsigned int *)&byte_6, a3) | 0x80; v8 = v15 | 0xC0; } } else { v9 = 0; v8 = v15; } std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, (long long)&v8, (long long)&v7); std::allocator<char>::~allocator(&v7); } else { testing::internal::String::FormatHexUInt32[abi:cxx11](v13, v15); std::operator+<char>(v14, "(Invalid Unicode 0x", v13); std::operator+<char>(a1, v14, ")"); std::string::~string(v14); std::string::~string(v13); } return a1; }
CodePointToUtf8[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x78],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP dword ptr [RBP + -0xc],0x1fffff JBE 0x001312be MOV ESI,dword ptr [RBP + -0xc] LEA RDI,[RBP + -0x50] MOV qword ptr [RBP + -0x80],RDI CALL 0x00131400 MOV RDX,qword ptr [RBP + -0x80] LAB_0013124e: LEA RSI,[0x17462b] LEA RDI,[RBP + -0x30] CALL 0x0014b280 JMP 0x00131260 LAB_00131260: MOV RDI,qword ptr [RBP + -0x78] LEA RDX,[0x174a50] LEA RSI,[RBP + -0x30] CALL 0x0014a7e0 JMP 0x00131276 LAB_00131276: LEA RDI,[RBP + -0x30] CALL 0x0010be58 LEA RDI,[RBP + -0x50] CALL 0x0010be58 JMP 0x001313e9 LAB_001312be: CMP dword ptr [RBP + -0xc],0x7f JA 0x001312d3 MOV byte ptr [RBP + -0x60],0x0 MOV EAX,dword ptr [RBP + -0xc] MOV byte ptr [RBP + -0x61],AL JMP 0x001313a1 LAB_001312d3: CMP dword ptr [RBP + -0xc],0x7ff JA 0x00131306 MOV byte ptr [RBP + -0x5f],0x0 LEA RDI,[RBP + -0xc] MOV ESI,0x6 CALL 0x0014ef80 OR EAX,0x80 MOV byte ptr [RBP + -0x60],AL MOV EAX,dword ptr [RBP + -0xc] OR EAX,0xc0 MOV byte ptr [RBP + -0x61],AL JMP 0x0013139f LAB_00131306: CMP dword ptr [RBP + -0xc],0xffff JA 0x0013134c MOV byte ptr [RBP + -0x5e],0x0 LEA RDI,[RBP + -0xc] MOV ESI,0x6 CALL 0x0014ef80 OR EAX,0x80 MOV byte ptr [RBP + -0x5f],AL LEA RDI,[RBP + -0xc] MOV ESI,0x6 CALL 0x0014ef80 OR EAX,0x80 MOV byte ptr [RBP + -0x60],AL MOV EAX,dword ptr [RBP + -0xc] OR EAX,0xe0 MOV byte ptr [RBP + -0x61],AL JMP 0x0013139d LAB_0013134c: MOV byte ptr [RBP + -0x5d],0x0 LEA RDI,[RBP + -0xc] MOV ESI,0x6 CALL 0x0014ef80 OR EAX,0x80 MOV byte ptr [RBP + -0x5e],AL LEA RDI,[RBP + -0xc] MOV ESI,0x6 CALL 0x0014ef80 OR EAX,0x80 MOV byte ptr [RBP + -0x5f],AL LEA RDI,[RBP + -0xc] MOV ESI,0x6 CALL 0x0014ef80 OR EAX,0x80 MOV byte ptr [RBP + -0x60],AL MOV EAX,dword ptr [RBP + -0xc] OR EAX,0xf0 MOV byte ptr [RBP + -0x61],AL LAB_0013139d: JMP 0x0013139f LAB_0013139f: JMP 0x001313a1 LAB_001313a1: LEA RDI,[RBP + -0x62] MOV qword ptr [RBP + -0x88],RDI CALL 0x0010bce0 MOV RDI,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x88] LAB_001313bc: LEA RSI,[RBP + -0x61] CALL 0x00113a30 LAB_001313c5: JMP 0x001313c7 LAB_001313c7: LEA RDI,[RBP + -0x62] CALL 0x0010b730 JMP 0x001313e9 LAB_001313e9: MOV RAX,qword ptr [RBP + -0x70] ADD RSP,0x90 POP RBP RET
/* testing::internal::CodePointToUtf8[abi:cxx11](unsigned int) */ internal * __thiscall testing::internal::CodePointToUtf8_abi_cxx11_(internal *this,uint param_1) { allocator local_6a; byte local_69; byte local_68; byte local_67; byte local_66; int1 local_65; String local_58 [32]; string local_38 [36]; uint local_14; internal *local_10; local_14 = param_1; local_10 = this; if (param_1 < 0x200000) { if (param_1 < 0x80) { local_68 = 0; local_69 = (byte)param_1; } else { if (param_1 < 0x800) { local_67 = 0; local_68 = ChopLowBits(&local_14,6); local_69 = (byte)local_14 | 0xc0; } else if (param_1 < 0x10000) { local_66 = 0; local_67 = ChopLowBits(&local_14,6); local_67 = local_67 | 0x80; local_68 = ChopLowBits(&local_14,6); local_69 = (byte)local_14 | 0xe0; } else { local_65 = 0; local_66 = ChopLowBits(&local_14,6); local_66 = local_66 | 0x80; local_67 = ChopLowBits(&local_14,6); local_67 = local_67 | 0x80; local_68 = ChopLowBits(&local_14,6); local_69 = (byte)local_14 | 0xf0; } local_68 = local_68 | 0x80; } std::allocator<char>::allocator(); /* try { // try from 001313bc to 001313c4 has its CatchHandler @ 001313d2 */ std::__cxx11::string::string<std::allocator<char>>((string *)this,(char *)&local_69,&local_6a); std::allocator<char>::~allocator((allocator<char> *)&local_6a); } else { String::FormatHexUInt32_abi_cxx11_(local_58,param_1); /* try { // try from 0013124e to 0013125d has its CatchHandler @ 0013128d */ std::operator+((char *)local_38,(string *)"(Invalid Unicode 0x"); /* try { // try from 00131260 to 00131273 has its CatchHandler @ 0013129b */ std::operator+((string *)this,(char *)local_38); std::__cxx11::string::~string(local_38); std::__cxx11::string::~string((string *)local_58); } return this; }
58,288
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>::empty() const
llama.cpp/common/json.hpp
bool empty() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return true; } case value_t::array: { // delegate call to array_t::empty() return m_data.m_value.array->empty(); } case value_t::object: { // delegate call to object_t::empty() return m_data.m_value.object->empty(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types are nonempty return false; } } }
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>::empty() const: movzbl (%rdi), %eax testl %eax, %eax je 0x48174 cmpl $0x1, %eax je 0x48165 cmpl $0x2, %eax jne 0x48177 movq 0x8(%rdi), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx sete %al retq movb $0x1, %al retq xorl %eax, %eax retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv: movzx eax, byte ptr [rdi] test eax, eax jz short loc_48174 cmp eax, 1 jz short loc_48165 cmp eax, 2 jnz short loc_48177 loc_48165: mov rax, [rdi+8] mov rcx, [rax] cmp rcx, [rax+8] setz al retn loc_48174: mov al, 1 retn loc_48177: xor eax, eax retn
bool 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>::empty( unsigned __int8 *a1) { int v1; // eax v1 = *a1; if ( !*a1 ) return 1; if ( v1 == 1 || v1 == 2 ) return **((_QWORD **)a1 + 1) == *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL); return 0; }
empty: MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x00148174 CMP EAX,0x1 JZ 0x00148165 CMP EAX,0x2 JNZ 0x00148177 LAB_00148165: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] SETZ AL RET LAB_00148174: MOV AL,0x1 RET LAB_00148177: XOR EAX,EAX RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::empty() const */ int8 __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::empty(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; long *plVar2; bVar1 = *this; if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { return 1; } if ((bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) && (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2)) { return 0; } plVar2 = *(long **)(this + 8); return CONCAT71((int7)((ulong)plVar2 >> 8),*plVar2 == plVar2[1]); }
58,289
my_l10tostr_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_l10tostr_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t len, int radix, long int val) { char buffer[66]; register char *p, *db, *de; long int new_val; int sl= 0; unsigned long int uval = (unsigned long int) val; p= &buffer[sizeof(buffer) - 1]; *p= '\0'; if (radix < 0) { if (val < 0) { sl= 1; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (unsigned long int)0 - uval; } } new_val = (long) (uval / 10); *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); val= new_val; while (val != 0) { new_val= val / 10; *--p= '0' + (char) (val - new_val * 10); val= new_val; } if (sl) { *--p= '-'; } for ( db= dst, de= dst + len ; (dst < de) && *p ; p++) { int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de); if (cnvres > 0) dst+= cnvres; else break; } return (int) (dst - db); }
O3
c
my_l10tostr_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x40(%rbp), %r13 testl %ecx, %ecx setns %al testq %r8, %r8 setns %dil orb %al, %dil movq %r8, %rsi negq %rsi testb %dil, %dil cmovneq %r8, %rsi movabsq $-0x3333333333333333, %r8 # imm = 0xCCCCCCCCCCCCCCCD movq %rsi, %rax mulq %r8 movq %rdx, %rcx movb $0x0, 0x1(%r13) shrq $0x3, %rcx imull $0xf6, %ecx, %eax addl %esi, %eax addb $0x30, %al movb %al, (%r13) cmpq $0xa, %rsi jb 0xc33d6 movq %rcx, %rax mulq %r8 shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %ecx, %eax addb $0x30, %al movb %al, -0x1(%r13) decq %r13 cmpq $0x9, %rcx movq %rdx, %rcx ja 0xc33b2 testb %dil, %dil jne 0xc33e3 movb $0x2d, -0x1(%r13) decq %r13 movq %rbx, %r12 testq %r14, %r14 jle 0xc341f addq %rbx, %r14 movq %rbx, %r12 movsbq (%r13), %rsi testq %rsi, %rsi je 0xc341f movq 0xb8(%r15), %rax movq %r15, %rdi movq %r12, %rdx movq %r14, %rcx callq *0x30(%rax) testl %eax, %eax jle 0xc341f movl %eax, %eax addq %rax, %r12 incq %r13 cmpq %r14, %r12 jb 0xc33f1 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xc3443 subl %ebx, %r12d movslq %r12d, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
my_l10tostr_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rdx mov rbx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r13, [rbp+var_40] test ecx, ecx setns al test r8, r8 setns dil or dil, al mov rsi, r8 neg rsi test dil, dil cmovnz rsi, r8 mov r8, 0CCCCCCCCCCCCCCCDh mov rax, rsi mul r8 mov rcx, rdx mov byte ptr [r13+1], 0 shr rcx, 3 imul eax, ecx, 0F6h add eax, esi add al, 30h ; '0' mov [r13+0], al cmp rsi, 0Ah jb short loc_C33D6 loc_C33B2: mov rax, rcx mul r8 shr rdx, 3 imul eax, edx, 0F6h add eax, ecx add al, 30h ; '0' mov [r13-1], al dec r13 cmp rcx, 9 mov rcx, rdx ja short loc_C33B2 loc_C33D6: test dil, dil jnz short loc_C33E3 mov byte ptr [r13-1], 2Dh ; '-' dec r13 loc_C33E3: mov r12, rbx test r14, r14 jle short loc_C341F add r14, rbx mov r12, rbx loc_C33F1: movsx rsi, byte ptr [r13+0] test rsi, rsi jz short loc_C341F mov rax, [r15+0B8h] mov rdi, r15 mov rdx, r12 mov rcx, r14 call qword ptr [rax+30h] test eax, eax jle short loc_C341F mov eax, eax add r12, rax inc r13 cmp r12, r14 jb short loc_C33F1 loc_C341F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_C3443 sub r12d, ebx movsxd rax, r12d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C3443: call ___stack_chk_fail
long long my_l10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, signed long long a5) { _BYTE *v7; // r13 bool v8; // di unsigned long long v9; // rsi unsigned long long v10; // rcx bool v11; // cc unsigned long long v12; // r12 unsigned long long v13; // r14 int v14; // eax _BYTE v16[16]; // [rsp+40h] [rbp-40h] BYREF unsigned long long v17; // [rsp+50h] [rbp-30h] v17 = __readfsqword(0x28u); v7 = v16; v8 = a4 >= 0 || a5 >= 0; v9 = -a5; if ( v8 ) v9 = a5; v16[1] = 0; v10 = v9 / 0xA; v16[0] = v9 % 0xA + 48; if ( v9 >= 0xA ) { do { *--v7 = v10 % 0xA + 48; v11 = v10 <= 9; v10 /= 0xAuLL; } while ( !v11 ); } if ( !v8 ) *--v7 = 45; LODWORD(v12) = a2; if ( a3 > 0 ) { v13 = a2 + a3; v12 = a2; do { if ( !*v7 ) break; v14 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, (char)*v7, v12, v13); if ( v14 <= 0 ) break; v12 += (unsigned int)v14; ++v7; } while ( v12 < v13 ); } return (int)v12 - (int)a2; }
my_l10tostr_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R13,[RBP + -0x40] TEST ECX,ECX SETNS AL TEST R8,R8 SETNS DIL OR DIL,AL MOV RSI,R8 NEG RSI TEST DIL,DIL CMOVNZ RSI,R8 MOV R8,-0x3333333333333333 MOV RAX,RSI MUL R8 MOV RCX,RDX MOV byte ptr [R13 + 0x1],0x0 SHR RCX,0x3 IMUL EAX,ECX,0xf6 ADD EAX,ESI ADD AL,0x30 MOV byte ptr [R13],AL CMP RSI,0xa JC 0x001c33d6 LAB_001c33b2: MOV RAX,RCX MUL R8 SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,ECX ADD AL,0x30 MOV byte ptr [R13 + -0x1],AL DEC R13 CMP RCX,0x9 MOV RCX,RDX JA 0x001c33b2 LAB_001c33d6: TEST DIL,DIL JNZ 0x001c33e3 MOV byte ptr [R13 + -0x1],0x2d DEC R13 LAB_001c33e3: MOV R12,RBX TEST R14,R14 JLE 0x001c341f ADD R14,RBX MOV R12,RBX LAB_001c33f1: MOVSX RSI,byte ptr [R13] TEST RSI,RSI JZ 0x001c341f MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RAX + 0x30] TEST EAX,EAX JLE 0x001c341f MOV EAX,EAX ADD R12,RAX INC R13 CMP R12,R14 JC 0x001c33f1 LAB_001c341f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001c3443 SUB R12D,EBX MOVSXD RAX,R12D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c3443: CALL 0x00129270
long my_l10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5) { ulong uVar1; ulong uVar2; uint uVar3; ulong uVar4; char *pcVar5; long in_FS_OFFSET; char local_49 [17]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar5 = local_49 + 1; uVar4 = -param_5; if ((long)param_5 >= 0 || param_4 >= 0) { uVar4 = param_5; } local_49[2] = 0; local_49[1] = (char)(uVar4 / 10) * -10 + (char)uVar4 + '0'; uVar2 = uVar4 / 10; while (uVar1 = uVar2, 9 < uVar4) { pcVar5[-1] = (char)(uVar1 / 10) * -10 + (char)uVar1 + '0'; pcVar5 = pcVar5 + -1; uVar2 = uVar1 / 10; uVar4 = uVar1; } if ((long)param_5 < 0 && param_4 < 0) { pcVar5[-1] = '-'; pcVar5 = pcVar5 + -1; } uVar4 = param_2; if (0 < param_3) { do { if (((long)*pcVar5 == 0) || (uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,(long)*pcVar5,uVar4,param_3 + param_2), (int)uVar3 < 1)) break; uVar4 = uVar4 + uVar3; pcVar5 = pcVar5 + 1; } while (uVar4 < param_3 + param_2); } if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)((int)uVar4 - (int)param_2); }
58,290
xa_recover_get_fields(THD*, List<Item>*, char (**)(void*, void*))
eloqsql/sql/xa.cc
void xa_recover_get_fields(THD *thd, List<Item> *field_list, my_hash_walk_action *action) { MEM_ROOT *mem_root= thd->mem_root; field_list->push_back(new (mem_root) Item_int(thd, "formatID", 0, MY_INT32_NUM_DECIMAL_DIGITS), mem_root); field_list->push_back(new (mem_root) Item_int(thd, "gtrid_length", 0, MY_INT32_NUM_DECIMAL_DIGITS), mem_root); field_list->push_back(new (mem_root) Item_int(thd, "bqual_length", 0, MY_INT32_NUM_DECIMAL_DIGITS), mem_root); { uint len; CHARSET_INFO *cs; if (thd->lex->verbose) { len= SQL_XIDSIZE; cs= &my_charset_utf8mb3_general_ci; if (action) *action= (my_hash_walk_action) xa_recover_callback_verbose; } else { len= XIDDATASIZE; cs= &my_charset_bin; if (action) *action= (my_hash_walk_action) xa_recover_callback_short; } field_list->push_back(new (mem_root) Item_empty_string(thd, "data", len, cs), mem_root); } }
O0
cpp
xa_recover_get_fields(THD*, List<Item>*, char (**)(void*, void*)): pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xa8(%rbp) movq -0x20(%rbp), %rsi movq %rsi, -0xa0(%rbp) movl $0x78, %edi callq 0x87dea0 movq %rax, %rcx movq %rcx, -0x98(%rbp) movb $0x0, -0x21(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x90(%rbp) je 0xc3be87 movq -0x98(%rbp), %rdi movb $0x1, -0x21(%rbp) movq -0x8(%rbp), %rsi leaq 0x804964(%rip), %rdx # 0x14407ca xorl %eax, %eax movl %eax, %ecx movl $0xb, %r8d callq 0x884070 jmp 0xc3be77 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xc3be87 movq -0xa8(%rbp), %rdi movq -0x90(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x87de70 movq -0x10(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0x20(%rbp), %rsi movq %rsi, -0xc0(%rbp) movl $0x78, %edi callq 0x87dea0 movq %rax, %rcx movq %rcx, -0xb8(%rbp) movb $0x0, -0x49(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0xb0(%rbp) je 0xc3bf21 movq -0xb8(%rbp), %rdi movq -0xc0(%rbp), %rax movq %rdi, -0x40(%rbp) movq %rax, -0x48(%rbp) movb $0x1, -0x49(%rbp) movq -0x8(%rbp), %rsi leaq 0x8048d3(%rip), %rdx # 0x14407d3 xorl %eax, %eax movl %eax, %ecx movl $0xb, %r8d callq 0x884070 jmp 0xc3bf11 movq -0xb8(%rbp), %rax movq %rax, -0xb0(%rbp) jmp 0xc3bf21 movq -0xc8(%rbp), %rdi movq -0xb0(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x87de70 movq -0x10(%rbp), %rax movq %rax, -0xe8(%rbp) movq -0x20(%rbp), %rsi movq %rsi, -0xe0(%rbp) movl $0x78, %edi callq 0x87dea0 movq %rax, %rcx movq %rcx, -0xd8(%rbp) movb $0x0, -0x61(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0xd0(%rbp) je 0xc3bfbb movq -0xd8(%rbp), %rdi movq -0xe0(%rbp), %rax movq %rdi, -0x58(%rbp) movq %rax, -0x60(%rbp) movb $0x1, -0x61(%rbp) movq -0x8(%rbp), %rsi leaq 0x804846(%rip), %rdx # 0x14407e0 xorl %eax, %eax movl %eax, %ecx movl $0xb, %r8d callq 0x884070 jmp 0xc3bfab movq -0xd8(%rbp), %rax movq %rax, -0xd0(%rbp) jmp 0xc3bfbb movq -0xe8(%rbp), %rdi movq -0xd0(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x87de70 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movl 0x17c6(%rax), %eax shrl $0x9, %eax andl $0x1, %eax testl $0x1, %eax je 0xc3c098 movl $0x11d, -0x68(%rbp) # imm = 0x11D leaq 0x10fff01(%rip), %rax # 0x1d3bf00 movq %rax, -0x70(%rbp) cmpq $0x0, -0x18(%rbp) je 0xc3c096 movq -0x18(%rbp), %rax leaq 0x187(%rip), %rcx # 0xc3c1a0 movq %rcx, (%rax) jmp 0xc3c096 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) testb $0x1, -0x21(%rbp) jne 0xc3c032 jmp 0xc3c045 movq -0xa0(%rbp), %rsi movq -0x98(%rbp), %rdi callq 0x87df70 jmp 0xc3c18d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) testb $0x1, -0x49(%rbp) jne 0xc3c05e jmp 0xc3c06b movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x87df70 jmp 0xc3c18d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) testb $0x1, -0x61(%rbp) jne 0xc3c084 jmp 0xc3c091 movq -0x58(%rbp), %rdi movq -0x60(%rbp), %rsi callq 0x87df70 jmp 0xc3c18d jmp 0xc3c0c1 movl $0x80, -0x68(%rbp) leaq 0xf4fd6a(%rip), %rax # 0x1b8be10 movq %rax, -0x70(%rbp) cmpq $0x0, -0x18(%rbp) je 0xc3c0bf movq -0x18(%rbp), %rax leaq 0x184(%rip), %rcx # 0xc3c240 movq %rcx, (%rax) jmp 0xc3c0c1 movq -0x10(%rbp), %rax movq %rax, -0x108(%rbp) movq -0x20(%rbp), %rsi movq %rsi, -0x100(%rbp) movl $0x70, %edi callq 0x87dea0 movq %rax, %rcx movq %rcx, -0xf8(%rbp) movb $0x0, -0x81(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0xf0(%rbp) je 0xc3c147 movq -0xf8(%rbp), %rdi movq -0x100(%rbp), %rax movq %rdi, -0x78(%rbp) movq %rax, -0x80(%rbp) movb $0x1, -0x81(%rbp) movq -0x8(%rbp), %rsi movl -0x68(%rbp), %ecx movq -0x70(%rbp), %r8 leaq 0x7a96c3(%rip), %rdx # 0x13e57f3 callq 0x87dee0 jmp 0xc3c137 movq -0xf8(%rbp), %rax movq %rax, -0xf0(%rbp) jmp 0xc3c147 movq -0x108(%rbp), %rdi movq -0xf0(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x87de70 addq $0x110, %rsp # imm = 0x110 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) testb $0x1, -0x81(%rbp) jne 0xc3c17e jmp 0xc3c18b movq -0x78(%rbp), %rdi movq -0x80(%rbp), %rsi callq 0x87df70 jmp 0xc3c18d movq -0x30(%rbp), %rdi callq 0x775a20 nopw %cs:(%rax,%rax)
_Z21xa_recover_get_fieldsP3THDP4ListI4ItemEPPFcPvS5_E: push rbp mov rbp, rsp sub rsp, 110h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov [rbp+var_A8], rax mov rsi, [rbp+var_20] mov [rbp+var_A0], rsi mov edi, 78h ; 'x' call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_98], rcx mov [rbp+var_21], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_90], rax jz short loc_C3BE87 mov rdi, [rbp+var_98]; this mov [rbp+var_21], 1 mov rsi, [rbp+var_8]; THD * lea rdx, aFormatid; "formatID" xor eax, eax mov ecx, eax; __int64 mov r8d, 0Bh; unsigned __int64 call _ZN8Item_intC2EP3THDPKcxm; Item_int::Item_int(THD *,char const*,long long,ulong) jmp short $+2 loc_C3BE77: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short $+2 loc_C3BE87: mov rdi, [rbp+var_A8] mov rsi, [rbp+var_90] mov rdx, [rbp+var_20] call _ZN4ListI4ItemE9push_backEPS0_P11st_mem_root; List<Item>::push_back(Item*,st_mem_root *) mov rax, [rbp+var_10] mov [rbp+var_C8], rax mov rsi, [rbp+var_20] mov [rbp+var_C0], rsi mov edi, 78h ; 'x' call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_B8], rcx mov [rbp+var_49], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_B0], rax jz short loc_C3BF21 mov rdi, [rbp+var_B8]; this mov rax, [rbp+var_C0] mov [rbp+var_40], rdi mov [rbp+var_48], rax mov [rbp+var_49], 1 mov rsi, [rbp+var_8]; THD * lea rdx, aGtridLength; "gtrid_length" xor eax, eax mov ecx, eax; __int64 mov r8d, 0Bh; unsigned __int64 call _ZN8Item_intC2EP3THDPKcxm; Item_int::Item_int(THD *,char const*,long long,ulong) jmp short $+2 loc_C3BF11: mov rax, [rbp+var_B8] mov [rbp+var_B0], rax jmp short $+2 loc_C3BF21: mov rdi, [rbp+var_C8] mov rsi, [rbp+var_B0] mov rdx, [rbp+var_20] call _ZN4ListI4ItemE9push_backEPS0_P11st_mem_root; List<Item>::push_back(Item*,st_mem_root *) mov rax, [rbp+var_10] mov [rbp+var_E8], rax mov rsi, [rbp+var_20] mov [rbp+var_E0], rsi mov edi, 78h ; 'x' call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_D8], rcx mov [rbp+var_61], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_D0], rax jz short loc_C3BFBB mov rdi, [rbp+var_D8]; this mov rax, [rbp+var_E0] mov [rbp+var_58], rdi mov [rbp+var_60], rax mov [rbp+var_61], 1 mov rsi, [rbp+var_8]; THD * lea rdx, aBqualLength; "bqual_length" xor eax, eax mov ecx, eax; __int64 mov r8d, 0Bh; unsigned __int64 call _ZN8Item_intC2EP3THDPKcxm; Item_int::Item_int(THD *,char const*,long long,ulong) jmp short $+2 loc_C3BFAB: mov rax, [rbp+var_D8] mov [rbp+var_D0], rax jmp short $+2 loc_C3BFBB: mov rdi, [rbp+var_E8] mov rsi, [rbp+var_D0] mov rdx, [rbp+var_20] call _ZN4ListI4ItemE9push_backEPS0_P11st_mem_root; List<Item>::push_back(Item*,st_mem_root *) mov rax, [rbp+var_8] mov rax, [rax+58h] mov eax, [rax+17C6h] shr eax, 9 and eax, 1 test eax, 1 jz loc_C3C098 mov [rbp+var_68], 11Dh lea rax, my_charset_utf8mb3_general_ci mov [rbp+var_70], rax cmp [rbp+var_18], 0 jz loc_C3C096 mov rax, [rbp+var_18] lea rcx, _ZL27xa_recover_callback_verboseP17XID_cache_elementP8Protocol; xa_recover_callback_verbose(XID_cache_element *,Protocol *) mov [rax], rcx jmp short loc_C3C096 mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax test [rbp+var_21], 1 jnz short loc_C3C032 jmp short loc_C3C045 loc_C3C032: mov rsi, [rbp+var_A0] mov rdi, [rbp+var_98] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_C3C045: jmp loc_C3C18D mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax test [rbp+var_49], 1 jnz short loc_C3C05E jmp short loc_C3C06B loc_C3C05E: mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_C3C06B: jmp loc_C3C18D mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax test [rbp+var_61], 1 jnz short loc_C3C084 jmp short loc_C3C091 loc_C3C084: mov rdi, [rbp+var_58] mov rsi, [rbp+var_60] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_C3C091: jmp loc_C3C18D loc_C3C096: jmp short loc_C3C0C1 loc_C3C098: mov [rbp+var_68], 80h lea rax, my_charset_bin mov [rbp+var_70], rax cmp [rbp+var_18], 0 jz short loc_C3C0BF mov rax, [rbp+var_18] lea rcx, _ZL25xa_recover_callback_shortP17XID_cache_elementP8Protocol; xa_recover_callback_short(XID_cache_element *,Protocol *) mov [rax], rcx loc_C3C0BF: jmp short $+2 loc_C3C0C1: mov rax, [rbp+var_10] mov [rbp+var_108], rax mov rsi, [rbp+var_20] mov [rbp+var_100], rsi mov edi, 70h ; 'p' call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_F8], rcx mov [rbp+var_81], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_F0], rax jz short loc_C3C147 mov rdi, [rbp+var_F8]; this mov rax, [rbp+var_100] mov [rbp+var_78], rdi mov [rbp+var_80], rax mov [rbp+var_81], 1 mov rsi, [rbp+var_8]; THD * mov ecx, [rbp+var_68]; unsigned int mov r8, [rbp+var_70]; charset_info_st * lea rdx, aBackupRocksdbD+8Eh; char * call _ZN17Item_empty_stringC2EP3THDPKcjPK15charset_info_st; Item_empty_string::Item_empty_string(THD *,char const*,uint,charset_info_st const*) jmp short $+2 loc_C3C137: mov rax, [rbp+var_F8] mov [rbp+var_F0], rax jmp short $+2 loc_C3C147: mov rdi, [rbp+var_108] mov rsi, [rbp+var_F0] mov rdx, [rbp+var_20] call _ZN4ListI4ItemE9push_backEPS0_P11st_mem_root; List<Item>::push_back(Item*,st_mem_root *) add rsp, 110h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax test [rbp+var_81], 1 jnz short loc_C3C17E jmp short loc_C3C18B loc_C3C17E: mov rdi, [rbp+var_78] mov rsi, [rbp+var_80] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_C3C18B: jmp short $+2 loc_C3C18D: mov rdi, [rbp+var_30] call __Unwind_Resume
char xa_recover_get_fields(THD *a1, long long a2, _QWORD *a3) { Item_empty_string *v4; // [rsp+18h] [rbp-F8h] long long v5; // [rsp+20h] [rbp-F0h] Item_int *v6; // [rsp+38h] [rbp-D8h] long long v7; // [rsp+40h] [rbp-D0h] Item_int *v8; // [rsp+58h] [rbp-B8h] long long v9; // [rsp+60h] [rbp-B0h] Item_int *v10; // [rsp+78h] [rbp-98h] long long v11; // [rsp+80h] [rbp-90h] charset_info_st *v12; // [rsp+A0h] [rbp-70h] unsigned int v13; // [rsp+A8h] [rbp-68h] long long v14; // [rsp+F0h] [rbp-20h] v14 = *((_QWORD *)a1 + 5); v10 = (Item_int *)Item::operator new(120LL, v14); v11 = 0LL; if ( v10 ) { Item_int::Item_int(v10, a1, "formatID", 0LL, 11); v11 = (long long)v10; } List<Item>::push_back(a2, v11, v14); v8 = (Item_int *)Item::operator new(120LL, v14); v9 = 0LL; if ( v8 ) { Item_int::Item_int(v8, a1, "gtrid_length", 0LL, 11); v9 = (long long)v8; } List<Item>::push_back(a2, v9, v14); v6 = (Item_int *)Item::operator new(120LL, v14); v7 = 0LL; if ( v6 ) { Item_int::Item_int(v6, a1, "bqual_length", 0LL, 11); v7 = (long long)v6; } List<Item>::push_back(a2, v7, v14); if ( ((*(_DWORD *)(*((_QWORD *)a1 + 11) + 6086LL) >> 9) & 1) != 0 ) { v13 = 285; v12 = (charset_info_st *)&my_charset_utf8mb3_general_ci; if ( a3 ) *a3 = xa_recover_callback_verbose; } else { v13 = 128; v12 = (charset_info_st *)&my_charset_bin; if ( a3 ) *a3 = xa_recover_callback_short; } v4 = (Item_empty_string *)Item::operator new(112LL, v14); v5 = 0LL; if ( v4 ) { Item_empty_string::Item_empty_string(v4, a1, "data", v13, v12); v5 = (long long)v4; } return List<Item>::push_back(a2, v5, v14); }
type_handler_for_native_format: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
/* Type_handler::type_handler_for_native_format() const */ Type_handler * __thiscall Type_handler::type_handler_for_native_format(Type_handler *this) { return this; }
58,291
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O0
c
my_strerror: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movb $0x0, (%rax) cmpl $0x0, -0x1c(%rbp) jg 0x5d7be movq -0x10(%rbp), %rdi movl -0x1c(%rbp), %ecx leaq 0x219c1(%rip), %rsi # 0x7f157 leaq 0x21992(%rip), %rax # 0x7f12f cmpl $0x0, %ecx cmoveq %rax, %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x5e030 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x5d85a cmpl $0x78, -0x1c(%rbp) jl 0x5d7fc cmpl $0xc6, -0x1c(%rbp) jg 0x5d7fc movl -0x1c(%rbp), %eax subl $0x78, %eax movslq %eax, %rcx leaq 0x1ba2d3(%rip), %rax # 0x217ab0 movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x5e030 jmp 0x5d831 movl -0x1c(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x250d0 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x10(%rbp), %rax je 0x5d82f movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x5e030 jmp 0x5d831 movq -0x10(%rbp), %rax cmpb $0x0, (%rax) jne 0x5d852 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx subq $0x1, %rdx leaq 0x21930(%rip), %rsi # 0x7f17d callq 0x5e030 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strerror: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], 0 mov rax, [rbp+var_10] mov byte ptr [rax], 0 cmp [rbp+var_1C], 0 jg short loc_5D7BE mov rdi, [rbp+var_10] mov ecx, [rbp+var_1C] lea rsi, aInternalError0; "Internal error < 0 (Not system error)" lea rax, aInternalErrorC; "Internal error/check (Not system error)" cmp ecx, 0 cmovz rsi, rax mov rdx, [rbp+var_18] sub rdx, 1 call strmake mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_5D85A loc_5D7BE: cmp [rbp+var_1C], 78h ; 'x' jl short loc_5D7FC cmp [rbp+var_1C], 0C6h jg short loc_5D7FC mov eax, [rbp+var_1C] sub eax, 78h ; 'x' movsxd rcx, eax lea rax, handler_error_messages mov rax, [rax+rcx*8] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] sub rdx, 1 call strmake jmp short loc_5D831 loc_5D7FC: mov edi, [rbp+var_1C] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _strerror_r mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_10] jz short loc_5D82F mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_18] sub rdx, 1 call strmake loc_5D82F: jmp short $+2 loc_5D831: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jnz short loc_5D852 mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] sub rdx, 1 lea rsi, aUnknownError; "unknown error" call strmake loc_5D852: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_5D85A: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
_BYTE * my_strerror(_BYTE *a1, long long a2, int a3) { const char *v3; // rsi long long v5; // [rsp+0h] [rbp-30h] *a1 = 0; if ( a3 > 0 ) { if ( a3 < 120 || a3 > 198 ) { v5 = strerror_r((unsigned int)a3, a1, a2); if ( (_BYTE *)v5 != a1 ) strmake(a1, v5, a2 - 1); } else { strmake(a1, handler_error_messages[a3 - 120], a2 - 1); } if ( !*a1 ) strmake(a1, "unknown error", a2 - 1); return a1; } else { v3 = "Internal error < 0 (Not system error)"; if ( !a3 ) v3 = "Internal error/check (Not system error)"; strmake(a1, v3, a2 - 1); return a1; } }
my_strerror: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 CMP dword ptr [RBP + -0x1c],0x0 JG 0x0015d7be MOV RDI,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] LEA RSI,[0x17f157] LEA RAX,[0x17f12f] CMP ECX,0x0 CMOVZ RSI,RAX MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x0015e030 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x0015d85a LAB_0015d7be: CMP dword ptr [RBP + -0x1c],0x78 JL 0x0015d7fc CMP dword ptr [RBP + -0x1c],0xc6 JG 0x0015d7fc MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x78 MOVSXD RCX,EAX LEA RAX,[0x317ab0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x0015e030 JMP 0x0015d831 LAB_0015d7fc: MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001250d0 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x10] JZ 0x0015d82f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x0015e030 LAB_0015d82f: JMP 0x0015d831 LAB_0015d831: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JNZ 0x0015d852 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 LEA RSI,[0x17f17d] CALL 0x0015e030 LAB_0015d852: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0015d85a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * my_strerror(char *param_1,size_t param_2,int param_3) { char *pcVar1; *param_1 = '\0'; if (param_3 < 1) { pcVar1 = "Internal error < 0 (Not system error)"; if (param_3 == 0) { pcVar1 = "Internal error/check (Not system error)"; } strmake(param_1,pcVar1,param_2 - 1); } else { if ((param_3 < 0x78) || (0xc6 < param_3)) { pcVar1 = strerror_r(param_3,param_1,param_2); if (pcVar1 != param_1) { strmake(param_1,pcVar1,param_2 - 1); } } else { strmake(param_1,*(int8 *)(handler_error_messages + (long)(param_3 + -0x78) * 8), param_2 - 1); } if (*param_1 == '\0') { strmake(param_1,"unknown error",param_2 - 1); } } return param_1; }
58,292
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<unsigned char, 0>(unsigned char)
llama.cpp/common/json.hpp
void dump_integer(NumberType x) { static constexpr std::array<std::array<char, 2>, 100> digits_to_99 { { {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, } }; // special case for "0" if (x == 0) { o->write_character('0'); return; } // use a pointer to fill the buffer auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) number_unsigned_t abs_value; unsigned int n_chars{}; if (is_negative_number(x)) { *buffer_ptr = '-'; abs_value = remove_sign(static_cast<number_integer_t>(x)); // account one more byte for the minus sign n_chars = 1 + count_digits(abs_value); } else { abs_value = static_cast<number_unsigned_t>(x); n_chars = count_digits(abs_value); } // spare 1 byte for '\0' JSON_ASSERT(n_chars < number_buffer.size() - 1); // jump to the end to generate the string from backward, // so we later avoid reversing the result buffer_ptr += n_chars; // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu // See: https://www.youtube.com/watch?v=o4-CwDo2zpg while (abs_value >= 100) { const auto digits_index = static_cast<unsigned>((abs_value % 100)); abs_value /= 100; *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } if (abs_value >= 10) { const auto digits_index = static_cast<unsigned>(abs_value); *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } else { *(--buffer_ptr) = static_cast<char>('0' + abs_value); } o->write_characters(number_buffer.data(), n_chars); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<unsigned char, 0>(unsigned char): testl %esi, %esi je 0x50738 movl %esi, %eax leaq 0x10(%rdi), %rsi movzbl %al, %ecx movl $0x1, %edx cmpb $0xa, %cl jb 0x5071e movl $0x2, %edx cmpb $0x64, %al jae 0x50748 leaq (%rsi,%rdx), %r8 cmpb $0xa, %al jb 0x50773 leaq 0x118ff(%rip), %rax # 0x6202c movzwl (%rax,%rcx,2), %eax movw %ax, -0x2(%r8) jmp 0x50779 movq (%rdi), %rdi movq (%rdi), %rax movq (%rax), %rax movl $0x30, %esi jmpq *%rax leal (%rcx,%rcx,4), %edx leal (%rcx,%rdx,8), %ecx shrl $0xc, %ecx imull $0x64, %ecx, %edx subb %dl, %al movzbl %al, %eax leaq 0x118cc(%rip), %rdx # 0x6202c movzwl (%rdx,%rax,2), %eax leaq 0x11(%rdi), %r8 movw %ax, 0x11(%rdi) movl $0x3, %edx movl %ecx, %eax orb $0x30, %al movb %al, -0x1(%r8) movq (%rdi), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax jmpq *%rax nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: test esi, esi jz short loc_50738 mov eax, esi lea rsi, [rdi+10h] movzx ecx, al mov edx, 1 cmp cl, 0Ah jb short loc_5071E mov edx, 2 cmp al, 64h ; 'd' jnb short loc_50748 loc_5071E: lea r8, [rsi+rdx] cmp al, 0Ah jb short loc_50773 lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 movzx eax, word ptr [rax+rcx*2] mov [r8-2], ax jmp short loc_50779 loc_50738: mov rdi, [rdi] mov rax, [rdi] mov rax, [rax] mov esi, 30h ; '0' jmp rax loc_50748: lea edx, [rcx+rcx*4] lea ecx, [rcx+rdx*8] shr ecx, 0Ch imul edx, ecx, 64h ; 'd' sub al, dl movzx eax, al lea rdx, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 movzx eax, word ptr [rdx+rax*2] lea r8, [rdi+11h] mov [rdi+11h], ax mov edx, 3 mov eax, ecx loc_50773: or al, 30h mov [r8-1], al loc_50779: mov rdi, [rdi] mov rax, [rdi] mov rax, [rax+8] jmp rax
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_( _QWORD *a1, int a2) { char v2; // al long long v3; // rdx char *v4; // r8 if ( !a2 ) return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL); v2 = a2; v3 = 1LL; if ( (unsigned __int8)a2 >= 0xAu ) { v3 = 2LL; if ( (unsigned __int8)a2 >= 0x64u ) { v4 = (char *)a1 + 17; *(_WORD *)((char *)a1 + 17) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2 % 0x64u]; v2 = (unsigned __int8)a2 / 0x64u; goto LABEL_8; } } v4 = (char *)a1 + v3 + 16; if ( (unsigned __int8)a2 < 0xAu ) { LABEL_8: *(v4 - 1) = v2 | 0x30; return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1); } *((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2]; return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1); }
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: TEST ESI,ESI JZ 0x00150738 MOV EAX,ESI LEA RSI,[RDI + 0x10] MOVZX ECX,AL MOV EDX,0x1 CMP CL,0xa JC 0x0015071e MOV EDX,0x2 CMP AL,0x64 JNC 0x00150748 LAB_0015071e: LEA R8,[RSI + RDX*0x1] CMP AL,0xa JC 0x00150773 LEA RAX,[0x16202c] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV word ptr [R8 + -0x2],AX JMP 0x00150779 LAB_00150738: MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX] MOV ESI,0x30 JMP RAX LAB_00150748: LEA EDX,[RCX + RCX*0x4] LEA ECX,[RCX + RDX*0x8] SHR ECX,0xc IMUL EDX,ECX,0x64 SUB AL,DL MOVZX EAX,AL LEA RDX,[0x16202c] MOVZX EAX,word ptr [RDX + RAX*0x2] LEA R8,[RDI + 0x11] MOV word ptr [RDI + 0x11],AX MOV EDX,0x3 MOV EAX,ECX LAB_00150773: OR AL,0x30 MOV byte ptr [R8 + -0x1],AL LAB_00150779: MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] JMP RAX
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_ (int8 *param_1,uint param_2) { byte bVar1; byte bVar2; long lVar3; long lVar4; if (param_2 == 0) { /* WARNING: Could not recover jumptable at 0x00150746. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30); return; } bVar1 = (byte)param_2; lVar3 = 1; if ((bVar1 < 10) || (lVar3 = 2, bVar1 < 100)) { lVar4 = (long)(param_1 + 2) + lVar3; bVar2 = bVar1; if (9 < bVar1) { *(int2 *)(lVar4 + -2) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + (ulong)bVar1 * 2); goto LAB_00150779; } } else { bVar2 = (byte)((param_2 & 0xff) + ((param_2 & 0xff) + (param_2 & 0xff) * 4) * 8 >> 0xc); lVar4 = (long)param_1 + 0x11; *(int2 *)((long)param_1 + 0x11) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + (ulong)(byte)(bVar1 + bVar2 * -100) * 2); lVar3 = 3; } *(byte *)(lVar4 + -1) = bVar2 | 0x30; LAB_00150779: /* WARNING: Could not recover jumptable at 0x00150783. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)*param_1 + 8))((long *)*param_1,param_1 + 2,lVar3); return; }
58,293
minja::Parser::parseLogicalAnd()
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseLogicalAnd() { auto left = parseLogicalNot(); if (!left) throw std::runtime_error("Expected left side of 'logical and' expression"); static std::regex and_tok(R"(and\b)"); auto location = get_location(); while (!consumeToken(and_tok).empty()) { auto right = parseLogicalNot(); if (!right) throw std::runtime_error("Expected right side of 'and' expression"); left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And); } return left; }
O0
cpp
minja::Parser::parseLogicalAnd(): subq $0xb8, %rsp movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq 0xa8(%rsp), %rsi movq %rsi, 0x20(%rsp) movb $0x0, 0xa7(%rsp) callq 0x9dae0 movq 0x28(%rsp), %rdi callq 0x77a80 testb $0x1, %al jne 0x9d7b8 movl $0x10, %edi callq 0x50540 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x10(%rsp) leaq 0x12f07d(%rip), %rsi # 0x1cc7d5 callq 0x50340 jmp 0x9d75f movq 0x10(%rsp), %rdi movq 0x1b6845(%rip), %rsi # 0x253fb0 movq 0x1b6806(%rip), %rdx # 0x253f78 callq 0x508f0 jmp 0x9d9f1 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) callq 0x50c40 jmp 0x9d9da movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) jmp 0x9d9da cmpb $0x0, 0x1b77a9(%rip) # 0x254f68 jne 0x9d812 leaq 0x1b77a0(%rip), %rdi # 0x254f68 callq 0x504b0 cmpl $0x0, %eax je 0x9d812 leaq 0x1b776f(%rip), %rdi # 0x254f48 leaq 0x12f024(%rip), %rsi # 0x1cc804 movl $0x10, %edx callq 0x76c30 jmp 0x9d7ec leaq -0x26b13(%rip), %rdi # 0x76ce0 leaq 0x1b774e(%rip), %rsi # 0x254f48 leaq 0x1b7067(%rip), %rdx # 0x254868 callq 0x50c20 leaq 0x1b775b(%rip), %rdi # 0x254f68 callq 0x50820 movq 0x20(%rsp), %rsi leaq 0x78(%rsp), %rdi callq 0x76db0 jmp 0x9d823 jmp 0x9d825 movq 0x20(%rsp), %rsi leaq 0x1b7717(%rip), %rdx # 0x254f48 leaq 0x58(%rsp), %rdi movl $0x1, %ecx callq 0x778a0 jmp 0x9d842 leaq 0x58(%rsp), %rdi callq 0x503b0 xorb $-0x1, %al movb %al, 0xf(%rsp) leaq 0x58(%rsp), %rdi callq 0x510c0 movb 0xf(%rsp), %al testb $0x1, %al jne 0x9d869 jmp 0x9d999 movq 0x20(%rsp), %rsi leaq 0x48(%rsp), %rdi callq 0x9dae0 jmp 0x9d87a leaq 0x48(%rsp), %rdi callq 0x77a80 testb $0x1, %al jne 0x9d93d movl $0x10, %edi callq 0x50540 movq %rax, %rdi movq %rdi, %rax movq %rax, (%rsp) leaq 0x12ef63(%rip), %rsi # 0x1cc80a callq 0x50340 jmp 0x9d8ae movq (%rsp), %rdi movq 0x1b66f7(%rip), %rsi # 0x253fb0 movq 0x1b66b8(%rip), %rdx # 0x253f78 callq 0x508f0 jmp 0x9d9f1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) leaq 0x1b7683(%rip), %rdi # 0x254f68 callq 0x505d0 jmp 0x9d9da movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) jmp 0x9d9b7 movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) callq 0x50c40 jmp 0x9d98d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) jmp 0x9d98d movq 0x28(%rsp), %rdx movl $0xe, 0x34(%rsp) leaq 0x38(%rsp), %rdi leaq 0x78(%rsp), %rsi leaq 0x48(%rsp), %rcx leaq 0x34(%rsp), %r8 callq 0x9da00 jmp 0x9d965 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x9daa0 leaq 0x38(%rsp), %rdi callq 0x9dad0 leaq 0x48(%rsp), %rdi callq 0x77890 jmp 0x9d825 leaq 0x48(%rsp), %rdi callq 0x77890 jmp 0x9d9b7 movb $0x1, 0xa7(%rsp) leaq 0x78(%rsp), %rdi callq 0x7a6d0 testb $0x1, 0xa7(%rsp) jne 0x9d9cd jmp 0x9d9c3 leaq 0x78(%rsp), %rdi callq 0x7a6d0 jmp 0x9d9da movq 0x28(%rsp), %rdi callq 0x77890 movq 0x18(%rsp), %rax addq $0xb8, %rsp retq movq 0x28(%rsp), %rdi callq 0x77890 movq 0x98(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN5minja6Parser15parseLogicalAndEv: sub rsp, 0B8h mov [rsp+0B8h+var_90], rdi mov rax, rdi mov [rsp+0B8h+var_A0], rax mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov rsi, [rsp+0B8h+var_10] mov [rsp+0B8h+var_98], rsi mov [rsp+0B8h+var_11], 0 call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) mov rdi, [rsp+0B8h+var_90] call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_9D7B8 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0B8h+var_A8], rax lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"... call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_9D75F: mov rdi, [rsp+0B8h+var_A8]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_9D9F1 mov rdi, [rsp+arg_8]; void * mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax call ___cxa_free_exception jmp loc_9D9DA mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax jmp loc_9D9DA loc_9D7B8: cmp cs:_ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11, 0; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok jnz short loc_9D812 lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_9D812 lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok lea rsi, aAndB; "and\\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) jmp short $+2 loc_9D7EC: lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_release loc_9D812: mov rsi, [rsp+0B8h+var_98] lea rdi, [rsp+0B8h+var_40]; this call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) jmp short $+2 loc_9D823: jmp short $+2 loc_9D825: mov rsi, [rsp+0B8h+var_98] lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok lea rdi, [rsp+0B8h+var_60] mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) jmp short $+2 loc_9D842: lea rdi, [rsp+0B8h+var_60] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) xor al, 0FFh mov [rsp+0B8h+var_A9], al lea rdi, [rsp+0B8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov al, [rsp+0B8h+var_A9] test al, 1 jnz short loc_9D869 jmp loc_9D999 loc_9D869: mov rsi, [rsp+0B8h+var_98] lea rdi, [rsp+0B8h+var_70]; this call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) jmp short $+2 loc_9D87A: lea rdi, [rsp+0B8h+var_70] call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz loc_9D93D mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0B8h+var_B8], rax lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_9D8AE: mov rdi, [rsp+0B8h+var_B8]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_9D9F1 mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_abort jmp loc_9D9DA mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax jmp loc_9D9B7 mov rdi, [rsp+0]; void * mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax call ___cxa_free_exception jmp short loc_9D98D mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax jmp short loc_9D98D loc_9D93D: mov rdx, [rsp+0B8h+var_90] mov [rsp+0B8h+var_84], 0Eh lea rdi, [rsp+0B8h+var_80] lea rsi, [rsp+0B8h+var_40] lea rcx, [rsp+0B8h+var_70] lea r8, [rsp+0B8h+var_84] call _ZSt11make_sharedIN5minja12BinaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_NS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&) jmp short $+2 loc_9D965: mov rdi, [rsp+0B8h+var_90] lea rsi, [rsp+0B8h+var_80] call _ZNSt10shared_ptrIN5minja10ExpressionEEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_ lea rdi, [rsp+0B8h+var_80] call _ZNSt10shared_ptrIN5minja12BinaryOpExprEED2Ev; std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr() lea rdi, [rsp+0B8h+var_70] call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr() jmp loc_9D825 loc_9D98D: lea rdi, [rsp+arg_40] call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr() jmp short loc_9D9B7 loc_9D999: mov [rsp+0B8h+var_11], 1 lea rdi, [rsp+0B8h+var_40]; this call _ZN5minja8LocationD2Ev; minja::Location::~Location() test [rsp+0B8h+var_11], 1 jnz short loc_9D9CD jmp short loc_9D9C3 loc_9D9B7: lea rdi, [rsp+arg_70]; this call _ZN5minja8LocationD2Ev; minja::Location::~Location() jmp short loc_9D9DA loc_9D9C3: mov rdi, [rsp+0B8h+var_90] call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr() loc_9D9CD: mov rax, [rsp+0B8h+var_A0] add rsp, 0B8h retn loc_9D9DA: mov rdi, [rsp+arg_20] call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr() mov rdi, [rsp+arg_90] call __Unwind_Resume loc_9D9F1: nop word ptr [rax+rax+00000000h] nop dword ptr [rax+rax+00h]
minja::Parser * minja::Parser::parseLogicalAnd(minja::Parser *this, long long a2) { int v2; // r9d int v4; // [rsp+0h] [rbp-B8h] std::runtime_error *v5; // [rsp+0h] [rbp-B8h] int v6; // [rsp+8h] [rbp-B0h] char v7; // [rsp+Fh] [rbp-A9h] int v8; // [rsp+10h] [rbp-A8h] std::runtime_error *exception; // [rsp+10h] [rbp-A8h] minja::Parser *v10; // [rsp+18h] [rbp-A0h] long long v11; // [rsp+20h] [rbp-98h] int v12; // [rsp+34h] [rbp-84h] BYREF _BYTE v13[16]; // [rsp+38h] [rbp-80h] BYREF _QWORD v14[2]; // [rsp+48h] [rbp-70h] BYREF _BYTE v15[32]; // [rsp+58h] [rbp-60h] BYREF _BYTE v16[47]; // [rsp+78h] [rbp-40h] BYREF char v17; // [rsp+A7h] [rbp-11h] long long v18; // [rsp+A8h] [rbp-10h] minja::Parser *v19; // [rsp+B0h] [rbp-8h] v10 = this; v19 = this; v18 = a2; v11 = a2; v17 = 0; minja::Parser::parseLogicalNot(this); if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(this) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], (long long)"and\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]); } minja::Parser::get_location((minja::Parser *)v16, a2); while ( 1 ) { minja::Parser::consumeToken( (long long)v15, v11, (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], 1u); v7 = ~(unsigned __int8)std::string::empty(v15); std::string::~string(v15); if ( (v7 & 1) == 0 ) break; minja::Parser::parseLogicalNot((minja::Parser *)v14); if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v14) ) { v5 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v5, "Expected right side of 'and' expression"); __cxa_throw( v5, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v12 = 14; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>( (unsigned int)v13, (unsigned int)v16, (_DWORD)this, (unsigned int)v14, (unsigned int)&v12, v2, v4, v6, v8, (long long)v10, v11); std::shared_ptr<minja::Expression>::operator=<minja::BinaryOpExpr>(this, v13); std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr(v13); std::shared_ptr<minja::Expression>::~shared_ptr((long long)v14); } v17 = 1; minja::Location::~Location((minja::Location *)v16); if ( (v17 & 1) == 0 ) std::shared_ptr<minja::Expression>::~shared_ptr((long long)this); return v10; }
_Hashtable_base: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x0029d730 MOV RDI,qword ptr [RSP + 0x8] CALL 0x0029d740 ADD RSP,0x18 RET
/* std::__detail::_Hashtable_base<int, std::pair<int const, unsigned long>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<false, false, true> >::_Hashtable_base() */ void __thiscall std::__detail:: _Hashtable_base<int,std::pair<int_const,unsigned_long>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Hashtable_traits<false,false,true>> ::_Hashtable_base(_Hashtable_base<int,std::pair<int_const,unsigned_long>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Hashtable_traits<false,false,true>> *this) { _Hash_code_base<int,std::pair<int_const,unsigned_long>,std::__detail::_Select1st,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,false> ::_Hash_code_base((_Hash_code_base<int,std::pair<int_const,unsigned_long>,std::__detail::_Select1st,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,false> *)this); _Hashtable_ebo_helper<0,std::equal_to<int>,true>::_Hashtable_ebo_helper(); return; }
58,294
minja::Parser::parseLogicalAnd()
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseLogicalAnd() { auto left = parseLogicalNot(); if (!left) throw std::runtime_error("Expected left side of 'logical and' expression"); static std::regex and_tok(R"(and\b)"); auto location = get_location(); while (!consumeToken(and_tok).empty()) { auto right = parseLogicalNot(); if (!right) throw std::runtime_error("Expected right side of 'and' expression"); left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And); } return left; }
O2
cpp
minja::Parser::parseLogicalAnd(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x3a4a4 cmpq $0x0, (%rbx) je 0x3a392 movb 0xa8b21(%rip), %al # 0xe2dc8 testb %al, %al je 0x3a3c2 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x2efae leaq 0x28(%rsp), %rbp leaq 0x48(%rsp), %r12 leaq 0xc(%rsp), %r13 movq %rbp, %rdi movq %r14, %rsi leaq 0xa8ad0(%rip), %rdx # 0xe2da8 pushq $0x1 popq %rcx callq 0x2f3f2 movq 0x30(%rsp), %r15 movq %rbp, %rdi callq 0x20d78 testq %r15, %r15 je 0x3a344 movq %rbp, %rdi movq %r14, %rsi callq 0x3a4a4 cmpq $0x0, 0x28(%rsp) je 0x3a360 movl $0xe, 0xc(%rsp) movq %r12, %rdi leaq 0x10(%rsp), %rsi movq %rbx, %rdx movq %rbp, %rcx movq %r13, %r8 callq 0x3a47d movq %rbx, %rdi movq %r12, %rsi callq 0x51f68 leaq 0x50(%rsp), %rdi callq 0x2eeb2 leaq 0x30(%rsp), %rdi callq 0x2eeb2 jmp 0x3a2cb leaq 0x18(%rsp), %rdi callq 0x2eeb2 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r15 leaq 0x5f9aa(%rip), %rsi # 0x99d1c movq %rax, %rdi callq 0x20280 movq 0xa7c67(%rip), %rsi # 0xe1fe8 movq 0xa7be8(%rip), %rdx # 0xe1f70 movq %r15, %rdi callq 0x20b30 jmp 0x3a3c2 pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r15 leaq 0x5f943(%rip), %rsi # 0x99ce7 movq %rax, %rdi callq 0x20280 movq 0xa7c35(%rip), %rsi # 0xe1fe8 movq 0xa7bb6(%rip), %rdx # 0xe1f70 movq %r15, %rdi callq 0x20b30 leaq 0xa89ff(%rip), %rdi # 0xe2dc8 callq 0x20bf0 testl %eax, %eax je 0x3a2af leaq 0xa89cb(%rip), %rdi # 0xe2da8 leaq 0x5f932(%rip), %rsi # 0x99d16 pushq $0x10 popq %rdx callq 0x2ef2e leaq -0xb45f(%rip), %rdi # 0x2ef94 leaq 0xa89ae(%rip), %rsi # 0xe2da8 leaq 0xa82c7(%rip), %rdx # 0xe26c8 callq 0x205f0 leaq 0xa89bb(%rip), %rdi # 0xe2dc8 callq 0x20480 jmp 0x3a2af movq %rax, %r14 leaq 0xa89a7(%rip), %rdi # 0xe2dc8 callq 0x20470 jmp 0x3a469 jmp 0x3a437 movq %rax, %r14 movq %r15, %rdi callq 0x20520 jmp 0x3a469 movq %rax, %r14 jmp 0x3a469 jmp 0x3a44d movq %rax, %r14 movq %r15, %rdi callq 0x20520 jmp 0x3a450 jmp 0x3a45c movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x2eeb2 jmp 0x3a45f movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x2eeb2 addq $0x8, %rbx movq %rbx, %rdi callq 0x2eeb2 movq %r14, %rdi callq 0x20b90
_ZN5minja6Parser15parseLogicalAndEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp qword ptr [rbx], 0 jz loc_3A392 mov al, cs:_ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok test al, al jz loc_3A3C2 loc_3A2AF: lea rdi, [rsp+88h+var_78]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rbp, [rsp+88h+var_60] lea r12, [rsp+88h+var_40] lea r13, [rsp+88h+var_7C] loc_3A2CB: mov rdi, rbp mov rsi, r14 lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok push 1 pop rcx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov r15, [rsp+88h+var_58] mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r15, r15 jz short loc_3A344 mov rdi, rbp; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp [rsp+88h+var_60], 0 jz short loc_3A360 mov [rsp+88h+var_7C], 0Eh mov rdi, r12 lea rsi, [rsp+88h+var_78] mov rdx, rbx mov rcx, rbp mov r8, r13 call _ZSt11make_sharedIN5minja12BinaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_NS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&) mov rdi, rbx mov rsi, r12 call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE lea rdi, [rsp+88h+var_38] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_3A2CB loc_3A344: lea rdi, [rsp+88h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3A360: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression" 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, r15; void * call ___cxa_throw jmp short loc_3A3C2 loc_3A392: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"... 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, r15; void * call ___cxa_throw loc_3A3C2: lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_3A2AF lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok lea rsi, aAndB; "and\\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, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_3A2AF mov r14, rax lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_3A469 jmp short loc_3A437 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_3A469 loc_3A437: mov r14, rax jmp short loc_3A469 jmp short loc_3A44D mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_3A450 jmp short loc_3A45C loc_3A44D: mov r14, rax loc_3A450: lea rdi, [rsp+arg_28] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_3A45F loc_3A45C: mov r14, rax loc_3A45F: lea rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_3A469: add rbx, 8 mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalAnd(minja::Parser *this, _QWORD *a2) { long long v2; // r15 std::runtime_error *v4; // r15 std::runtime_error *exception; // r15 int v6; // [rsp+Ch] [rbp-7Ch] BYREF _BYTE v7[8]; // [rsp+10h] [rbp-78h] BYREF long long v8; // [rsp+18h] [rbp-70h] BYREF long long v9; // [rsp+28h] [rbp-60h] BYREF _QWORD v10[3]; // [rsp+30h] [rbp-58h] BYREF _BYTE v11[8]; // [rsp+48h] [rbp-40h] BYREF _QWORD v12[7]; // [rsp+50h] [rbp-38h] BYREF minja::Parser::parseLogicalNot(this); if ( !*(_QWORD *)this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], "and\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]); } minja::Parser::get_location((minja::Parser *)v7, a2); while ( 1 ) { minja::Parser::consumeToken(&v9, (long long)a2, (int)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], 1u); v2 = v10[0]; std::string::~string(&v9); if ( !v2 ) break; minja::Parser::parseLogicalNot((minja::Parser *)&v9); if ( !v9 ) { v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v4, "Expected right side of 'and' expression"); __cxa_throw( v4, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = 14; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>( v11, v7, this, &v9, &v6); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v11); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v8); return this; }
emplace_back<char>: PUSH RBX MOV RDX,RSI MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x8] CMP RSI,qword ptr [RDI + 0x10] JZ 0x0013a2a0 MOV AL,byte ptr [RDX] MOV byte ptr [RSI],AL MOV RAX,qword ptr [RBX + 0x8] INC RAX MOV qword ptr [RBX + 0x8],RAX JMP 0x0013a2ac LAB_0013a2a0: MOV RDI,RBX CALL 0x0013a2b2 MOV RAX,qword ptr [RBX + 0x8] LAB_0013a2ac: DEC RAX POP RBX RET
/* char& std::vector<char, std::allocator<char> >::emplace_back<char>(char&&) */ char * __thiscall std::vector<char,std::allocator<char>>::emplace_back<char> (vector<char,std::allocator<char>> *this,char *param_1) { long lVar1; if (*(char **)(this + 8) == *(char **)(this + 0x10)) { _M_realloc_insert<char>(this); lVar1 = *(long *)(this + 8); } else { **(char **)(this + 8) = *param_1; lVar1 = *(long *)(this + 8) + 1; *(long *)(this + 8) = lVar1; } return (char *)(lVar1 + -1); }
58,295
minja::Parser::parseLogicalAnd()
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseLogicalAnd() { auto left = parseLogicalNot(); if (!left) throw std::runtime_error("Expected left side of 'logical and' expression"); static std::regex and_tok(R"(and\b)"); auto location = get_location(); while (!consumeToken(and_tok).empty()) { auto right = parseLogicalNot(); if (!right) throw std::runtime_error("Expected right side of 'and' expression"); left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And); } return left; }
O3
cpp
minja::Parser::parseLogicalAnd(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x3c936 cmpq $0x0, (%rbx) je 0x3c83c movb 0xb46c1(%rip), %al # 0xf0d98 testb %al, %al je 0x3c86e movq (%r14), %rax movq %rax, 0x20(%rsp) movq 0x8(%r14), %rax movq %rax, 0x28(%rsp) testq %rax, %rax je 0x3c70a movq 0xb38a4(%rip), %rcx # 0xeffa0 cmpb $0x0, (%rcx) je 0x3c706 incl 0x8(%rax) jmp 0x3c70a lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax leaq 0x20(%rsp), %rcx movq %rax, 0x10(%rcx) movq %rsp, %r13 leaq 0xb2273(%rip), %r12 # 0xee998 movq %r13, %rdi movq %r14, %rsi leaq 0xb4646(%rip), %rdx # 0xf0d78 movl $0x1, %ecx callq 0x2fd6a movq (%rsp), %rdi movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x3c75c movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 testq %r15, %r15 je 0x3c7e7 movq %r13, %rdi movq %r14, %rsi callq 0x3c936 cmpq $0x0, (%rsp) je 0x3c808 movl $0x58, %edi callq 0x18690 movq %rax, %rbp movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbp) movq %r12, (%rbp) movq %rbp, %r15 addq $0x10, %r15 movq %r15, %rdi leaq 0x20(%rsp), %rsi movq %rbx, %rdx movq %r13, %rcx movl $0xe, %r8d callq 0x56e5a movq %r15, (%rbx) movq 0x8(%rbx), %rdi movq %rbp, 0x8(%rbx) testq %rdi, %rdi je 0x3c7cf callq 0x2f80e movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x3c725 callq 0x2f80e jmp 0x3c725 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x3c7f6 callq 0x2f80e movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x18360 movq %rax, %r15 leaq 0x7a378(%rip), %rsi # 0xb6b94 movq %rax, %rdi callq 0x18270 movq 0xb37c5(%rip), %rsi # 0xefff0 movq 0xb374e(%rip), %rdx # 0xeff80 movq %r15, %rdi callq 0x18b30 jmp 0x3c86e movl $0x10, %edi callq 0x18360 movq %rax, %r15 leaq 0x7a30f(%rip), %rsi # 0xb6b5f movq %rax, %rdi callq 0x18270 movq 0xb3791(%rip), %rsi # 0xefff0 movq 0xb371a(%rip), %rdx # 0xeff80 movq %r15, %rdi callq 0x18b30 leaq 0xb4523(%rip), %rdi # 0xf0d98 callq 0x18be0 testl %eax, %eax je 0x3c6df leaq 0xb44ef(%rip), %rdi # 0xf0d78 leaq 0x7a2fe(%rip), %rsi # 0xb6b8e movl $0x10, %edx callq 0x2f87e leaq -0xcfbb(%rip), %rdi # 0x2f8e6 leaq 0xb44d0(%rip), %rsi # 0xf0d78 leaq 0xb3de9(%rip), %rdx # 0xf0698 callq 0x185d0 leaq 0xb44dd(%rip), %rdi # 0xf0d98 callq 0x18450 jmp 0x3c6df movq %rax, %r14 leaq 0xb44c9(%rip), %rdi # 0xf0d98 callq 0x18440 jmp 0x3c91f movq %rax, %r14 jmp 0x3c91f movq %rax, %r14 movq %r15, %rdi callq 0x18500 jmp 0x3c91f jmp 0x3c8f9 movq %rax, %r14 movq %r15, %rdi callq 0x18500 jmp 0x3c8fc jmp 0x3c90d movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x3c910 callq 0x2f80e jmp 0x3c910 movq %rax, %r14 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x3c91f callq 0x2f80e movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3c92d callq 0x2f80e movq %r14, %rdi callq 0x18b90 nop
_ZN5minja6Parser15parseLogicalAndEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp qword ptr [rbx], 0 jz loc_3C83C mov al, cs:_ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok test al, al jz loc_3C86E loc_3C6DF: mov rax, [r14] mov [rsp+68h+var_48], rax mov rax, [r14+8] mov [rsp+68h+var_40], rax test rax, rax jz short loc_3C70A mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_3C706 inc dword ptr [rax+8] jmp short loc_3C70A loc_3C706: lock inc dword ptr [rax+8] loc_3C70A: mov rax, [r14+20h] sub rax, [r14+10h] lea rcx, [rsp+68h+var_48] mov [rcx+10h], rax mov r13, rsp lea r12, off_EE998 loc_3C725: mov rdi, r13 mov rsi, r14 lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, [rsp+68h+var_68]; void * mov r15, [rsp+68h+var_60] lea rax, [rsp+68h+var_58] cmp rdi, rax jz short loc_3C75C mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3C75C: test r15, r15 jz loc_3C7E7 mov rdi, r13; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp [rsp+68h+var_68], 0 jz loc_3C808 mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov rbp, rax mov rax, 100000001h mov [rbp+8], rax mov [rbp+0], r12 mov r15, rbp add r15, 10h mov rdi, r15 lea rsi, [rsp+68h+var_48] mov rdx, rbx mov rcx, r13 mov r8d, 0Eh call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbx], r15 mov rdi, [rbx+8] mov [rbx+8], rbp test rdi, rdi jz short loc_3C7CF call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C7CF: mov rdi, [rsp+68h+var_60] test rdi, rdi jz loc_3C725 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_3C725 loc_3C7E7: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_3C7F6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C7F6: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3C808: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression" 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, r15; void * call ___cxa_throw jmp short loc_3C86E loc_3C83C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"... 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, r15; void * call ___cxa_throw loc_3C86E: lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_3C6DF lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok lea rsi, aAndB; "and\\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, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_3C6DF mov r14, rax lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_3C91F mov r14, rax jmp short loc_3C91F mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_3C91F jmp short loc_3C8F9 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_3C8FC jmp short loc_3C90D loc_3C8F9: mov r14, rax loc_3C8FC: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_3C910 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_3C910 loc_3C90D: mov r14, rax loc_3C910: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_3C91F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C91F: mov rdi, [rbx+8] test rdi, rdi jz short loc_3C92D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C92D: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalAnd(volatile signed __int32 **this, long long *a2) { volatile signed __int32 *v3; // rax volatile signed __int32 *v4; // r15 volatile signed __int32 *v5; // rbp volatile signed __int32 *v6; // rdi std::runtime_error *v8; // r15 std::runtime_error *exception; // r15 void *v10; // [rsp+0h] [rbp-68h] BYREF volatile signed __int32 *v11; // [rsp+8h] [rbp-60h] long long v12; // [rsp+10h] [rbp-58h] BYREF long long v13; // [rsp+20h] [rbp-48h] BYREF volatile signed __int32 *v14; // [rsp+28h] [rbp-40h] long long v15; // [rsp+30h] [rbp-38h] minja::Parser::parseLogicalNot((minja::Parser *)this); if ( !*this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], "and\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]); } v13 = *a2; v3 = (volatile signed __int32 *)a2[1]; v14 = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v3 + 2); else _InterlockedIncrement(v3 + 2); } v15 = a2[4] - a2[2]; while ( 1 ) { minja::Parser::consumeToken( (long long)&v10, (long long)a2, (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], 1u); v4 = v11; if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( !v4 ) break; minja::Parser::parseLogicalNot((minja::Parser *)&v10); if ( !v10 ) { v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v8, "Expected right side of 'and' expression"); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v5 = (volatile signed __int32 *)operator new(0x58uLL); *((_QWORD *)v5 + 1) = 0x100000001LL; *(_QWORD *)v5 = off_EE998; minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v13, this, &v10, 14LL); *this = v5 + 4; v6 = this[1]; this[1] = v5; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); } if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); return (minja::Parser *)this; }
parseLogicalAnd: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RSI MOV RBX,RDI CALL 0x0013c936 CMP qword ptr [RBX],0x0 JZ 0x0013c83c MOV AL,byte ptr [0x001f0d98] TEST AL,AL JZ 0x0013c86e LAB_0013c6df: MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x0013c70a MOV RCX,qword ptr [0x001effa0] CMP byte ptr [RCX],0x0 JZ 0x0013c706 INC dword ptr [RAX + 0x8] JMP 0x0013c70a LAB_0013c706: INC.LOCK dword ptr [RAX + 0x8] LAB_0013c70a: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] LEA RCX,[RSP + 0x20] MOV qword ptr [RCX + 0x10],RAX MOV R13,RSP LEA R12,[0x1ee998] LAB_0013c725: MOV RDI,R13 MOV RSI,R14 LEA RDX,[0x1f0d78] MOV ECX,0x1 CALL 0x0012fd6a MOV RDI,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0013c75c MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001186a0 LAB_0013c75c: TEST R15,R15 JZ 0x0013c7e7 LAB_0013c765: MOV RDI,R13 MOV RSI,R14 CALL 0x0013c936 CMP qword ptr [RSP],0x0 JZ 0x0013c808 LAB_0013c77b: MOV EDI,0x58 CALL 0x00118690 LAB_0013c785: MOV RBP,RAX MOV RAX,0x100000001 MOV qword ptr [RBP + 0x8],RAX MOV qword ptr [RBP],R12 MOV R15,RBP ADD R15,0x10 MOV RDI,R15 LEA RSI,[RSP + 0x20] MOV RDX,RBX MOV RCX,R13 MOV R8D,0xe CALL 0x00156e5a MOV qword ptr [RBX],R15 MOV RDI,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RBP TEST RDI,RDI JZ 0x0013c7cf CALL 0x0012f80e LAB_0013c7cf: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0013c725 CALL 0x0012f80e JMP 0x0013c725 LAB_0013c7e7: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0013c7f6 CALL 0x0012f80e LAB_0013c7f6: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013c808: MOV EDI,0x10 CALL 0x00118360 MOV R15,RAX LAB_0013c815: LEA RSI,[0x1b6b94] MOV RDI,RAX CALL 0x00118270 LAB_0013c824: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,R15 CALL 0x00118b30 LAB_0013c83c: MOV EDI,0x10 CALL 0x00118360 MOV R15,RAX LAB_0013c849: LEA RSI,[0x1b6b5f] MOV RDI,RAX CALL 0x00118270 LAB_0013c858: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,R15 CALL 0x00118b30 LAB_0013c86e: LEA RDI,[0x1f0d98] CALL 0x00118be0 TEST EAX,EAX JZ 0x0013c6df LAB_0013c882: LEA RDI,[0x1f0d78] LEA RSI,[0x1b6b8e] MOV EDX,0x10 CALL 0x0012f87e LAB_0013c89a: LEA RDI,[0x12f8e6] LEA RSI,[0x1f0d78] LEA RDX,[0x1f0698] CALL 0x001185d0 LEA RDI,[0x1f0d98] CALL 0x00118450 JMP 0x0013c6df
/* minja::Parser::parseLogicalAnd() */ void minja::Parser::parseLogicalAnd(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int iVar2; int8 *puVar3; runtime_error *prVar4; int8 *in_RSI; long *in_RDI; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58 [2]; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; parseLogicalNot(); if (*in_RDI == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013c849 to 0013c857 has its CatchHandler @ 0013c8db */ std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical and\' expression"); /* try { // try from 0013c858 to 0013c86d has its CatchHandler @ 0013c8d6 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); } if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 0013c882 to 0013c899 has its CatchHandler @ 0013c8c5 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_); } } local_48 = *in_RSI; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } local_38 = in_RSI[4] - in_RSI[2]; while( true ) { /* try { // try from 0013c725 to 0013c73b has its CatchHandler @ 0013c90d */ consumeToken(&local_68); p_Var1 = local_60; if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break; /* try { // try from 0013c765 to 0013c76f has its CatchHandler @ 0013c8f7 */ parseLogicalNot(); if (local_68 == (long *)0x0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013c815 to 0013c823 has its CatchHandler @ 0013c8ea */ std::runtime_error::runtime_error(prVar4,"Expected right side of \'and\' expression"); /* try { // try from 0013c824 to 0013c839 has its CatchHandler @ 0013c8e8 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); } /* try { // try from 0013c77b to 0013c784 has its CatchHandler @ 0013c8f9 */ puVar3 = (int8 *)operator_new(0x58); puVar3[1] = 0x100000001; *puVar3 = &PTR___Sp_counted_ptr_inplace_001ee998; BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar3 + 2),&local_48); *in_RDI = (long)(puVar3 + 2); p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar3; if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } return; }
58,296
common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static void common_params_handle_model_default( std::string & model, const std::string & model_url, std::string & hf_repo, std::string & hf_file, const std::string & hf_token, const std::string & model_default) { if (!hf_repo.empty()) { // short-hand to avoid specifying --hf-file -> default it to --model if (hf_file.empty()) { if (model.empty()) { auto auto_detected = common_get_hf_file(hf_repo, hf_token); if (auto_detected.first.empty() || auto_detected.second.empty()) { exit(1); // built without CURL, error message already printed } hf_repo = auto_detected.first; hf_file = auto_detected.second; } else { hf_file = model; } } // make sure model path is present (for caching purposes) if (model.empty()) { // this is to avoid different repo having same file name, or same file name in different subdirs std::string filename = hf_repo + "_" + hf_file; // to make sure we don't have any slashes in the filename string_replace_all(filename, "/", "_"); model = fs_get_cache_file(filename); } } else if (!model_url.empty()) { if (model.empty()) { auto f = string_split<std::string>(model_url, '#').front(); f = string_split<std::string>(f, '?').front(); model = fs_get_cache_file(string_split<std::string>(f, '/').back()); } } else if (model.empty()) { model = model_default; } }
O1
cpp
common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdi, %rbx cmpq $0x0, 0x8(%rdx) je 0x4f5ca movq %rcx, %r14 movq %rdx, %r15 cmpq $0x0, 0x8(%rcx) jne 0x4f748 cmpq $0x0, 0x8(%rbx) je 0x4f6cd movq %r14, %rdi movq %rbx, %rsi callq 0x1b4b0 jmp 0x4f748 cmpq $0x0, 0x8(%rsi) movq 0x8(%rbx), %rax je 0x4f6ab testq %rax, %rax jne 0x4f8ba leaq 0x8(%rsp), %r14 movq %r14, %rdi movl $0x23, %edx callq 0x4f980 movq (%r14), %rax leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %rdi callq 0x2344a leaq 0x8(%rsp), %rdi callq 0x22fba leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi movl $0x3f, %edx callq 0x4f980 movq 0x8(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0x1b4b0 leaq 0x8(%rsp), %rdi callq 0x22fba leaq 0x68(%rsp), %rdi leaq 0x28(%rsp), %rsi movl $0x2f, %edx callq 0x4f980 movq 0x70(%rsp), %rsi addq $-0x20, %rsi leaq 0x8(%rsp), %rdi callq 0x7509a leaq 0x8(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x1bab0 movq (%r14), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4f69c movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 leaq 0x68(%rsp), %rdi callq 0x22fba jmp 0x4f8a3 testq %rax, %rax jne 0x4f8ba movq %rbx, %rdi movq %r9, %rsi addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x1b4b0 leaq 0x28(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r8, %rdx callq 0x767d2 cmpq $0x0, 0x8(%r12) je 0x4f8c9 cmpq $0x0, 0x50(%rsp) je 0x4f8c9 leaq 0x28(%rsp), %rsi movq %r15, %rdi callq 0x1b4b0 leaq 0x48(%rsp), %rsi movq %r14, %rdi callq 0x1b4b0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4f72d movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8e0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4f748 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8e0 cmpq $0x0, 0x8(%rbx) jne 0x4f8ba leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x2344a leaq 0xa2f52(%rip), %rsi # 0xf26cd movq %r15, %rdi callq 0x1c110 movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x1b250 leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x4f7bb movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0x4f7c2 movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4f7f1 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 leaq 0x8(%rsp), %rdi movq %r12, (%rdi) leaq 0xa8299(%rip), %rsi # 0xf7a99 leaq 0xa8293(%rip), %rdx # 0xf7a9a callq 0x23580 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xa2eb1(%rip), %rsi # 0xf26cd leaq 0xa2eab(%rip), %rdx # 0xf26ce leaq 0x68(%rsp), %rdi callq 0x23580 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0x73368 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x4f858 movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8e0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4f86f movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x7509a leaq 0x8(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x1bab0 movq (%r14), %rdi cmpq %r12, %rdi je 0x4f8a3 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x4f8ba movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8e0 addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x1, %edi callq 0x1ba80 movq %rax, %rbx leaq 0x68(%rsp), %rdi jmp 0x4f8e7 jmp 0x4f948 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x22fba jmp 0x4f94b jmp 0x4f948 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x22fba jmp 0x4f978 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x56aae jmp 0x4f978 jmp 0x4f948 movq %rax, %rbx movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x4f92f movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x4f92f movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4f94b movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x4f94b movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x4f978 movq 0x38(%rsp), %rsi jmp 0x4f970 jmp 0x4f95e movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4f978 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 movq %rbx, %rdi callq 0x1bfb0
_ZL34common_params_handle_model_defaultRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S5_S5_S7_S7_: push r15 push r14 push r12 push rbx sub rsp, 88h mov rbx, rdi cmp qword ptr [rdx+8], 0 jz short loc_4F5CA mov r14, rcx mov r15, rdx cmp qword ptr [rcx+8], 0 jnz loc_4F748 cmp qword ptr [rbx+8], 0 jz loc_4F6CD mov rdi, r14 mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp loc_4F748 loc_4F5CA: cmp qword ptr [rsi+8], 0 mov rax, [rbx+8] jz loc_4F6AB test rax, rax jnz loc_4F8BA lea r14, [rsp+0A8h+var_A0] mov rdi, r14; int mov edx, 23h ; '#'; int call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char) mov rax, [r14] lea r15, [rsp+0A8h+var_70] mov [r15-10h], r15 mov rsi, [rax] mov rdx, [rax+8] add rdx, rsi lea rdi, [rsp+0A8h+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_A0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+0A8h+var_A0]; int lea rsi, [rsp+0A8h+var_80]; int mov edx, 3Fh ; '?'; int call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char) mov rsi, [rsp+0A8h+var_A0] lea rdi, [rsp+0A8h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rsp+0A8h+var_A0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+0A8h+var_40]; int lea rsi, [rsp+0A8h+var_80]; int mov edx, 2Fh ; '/'; int call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char) mov rsi, [rsp+0A8h+var_38] add rsi, 0FFFFFFFFFFFFFFE0h lea rdi, [rsp+0A8h+var_A0] call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&) lea r14, [rsp+0A8h+var_A0] mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+0A8h+var_90] cmp rdi, rax jz short loc_4F69C mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F69C: lea rdi, [rsp+0A8h+var_40] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp loc_4F8A3 loc_4F6AB: test rax, rax jnz loc_4F8BA mov rdi, rbx mov rsi, r9 add rsp, 88h pop rbx pop r12 pop r14 pop r15 jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_4F6CD: lea r12, [rsp+0A8h+var_80] mov rdi, r12 mov rsi, r15 mov rdx, r8 call _Z18common_get_hf_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; common_get_hf_file(std::string const&,std::string const&) cmp qword ptr [r12+8], 0 jz loc_4F8C9 cmp [rsp+0A8h+var_58], 0 jz loc_4F8C9 lea rsi, [rsp+0A8h+var_80] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rsi, [rsp+0A8h+var_60] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rax, [rsp+0A8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4F72D mov rsi, [rsp+0A8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F72D: lea rax, [rsp+0A8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4F748 mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F748: cmp qword ptr [rbx+8], 0 jnz loc_4F8BA lea r12, [rsp+0A8h+var_90] mov [r12-10h], r12 mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi lea r15, [rsp+0A8h+var_A0] mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aCall911+8; "_" mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] lea rdi, [rsp+0A8h+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea r15, [rsp+0A8h+var_70] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_4F7BB mov [rsp+0A8h+var_80], rdx mov rdx, [rcx] mov [rsp+0A8h+var_70], rdx jmp short loc_4F7C2 loc_4F7BB: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_4F7C2: mov rdx, [rax+8] mov [rsp+0A8h+var_78], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, [rsp+0A8h+var_A0]; void * cmp rdi, r12 jz short loc_4F7F1 mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F7F1: lea rdi, [rsp+0A8h+var_A0] mov [rdi], r12 lea rsi, asc_F7A98+1; "/" lea rdx, asc_F7A98+2; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+0A8h+var_30] mov [r14-10h], r14 lea rsi, aCall911+8; "_" lea rdx, aCall911+9; "" lea rdi, [rsp+0A8h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_80]; int lea rsi, [rsp+0A8h+var_A0]; int lea rdx, [rsp+0A8h+var_40]; int call _Z18string_replace_allRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S7_; string_replace_all(std::string &,std::string const&,std::string const&) mov rdi, [rsp+0A8h+var_40]; void * cmp rdi, r14 jz short loc_4F858 mov rsi, [rsp+0A8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F858: mov rdi, [rsp+0A8h+var_A0]; void * cmp rdi, r12 jz short loc_4F86F mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F86F: lea rdi, [rsp+0A8h+var_A0] lea rsi, [rsp+0A8h+var_80] call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&) lea r14, [rsp+0A8h+var_A0] mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * cmp rdi, r12 jz short loc_4F8A3 mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F8A3: mov rdi, [rsp+0A8h+var_80]; void * cmp rdi, r15 jz short loc_4F8BA mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F8BA: add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn loc_4F8C9: mov edi, 1 call _exit mov rbx, rax lea rdi, [rsp+0A8h+var_40] jmp short loc_4F8E7 jmp short loc_4F948 mov rbx, rax lea rdi, [rsp+0A8h+var_A0] loc_4F8E7: call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_4F94B jmp short loc_4F948 mov rbx, rax lea rdi, [rsp+0A8h+var_A0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_4F978 mov rbx, rax lea rdi, [rsp+0A8h+var_80] call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string,std::string>::~pair() jmp short loc_4F978 jmp short loc_4F948 mov rbx, rax mov rdi, [rsp+0A8h+var_40]; void * cmp rdi, r14 jz short loc_4F92F mov rsi, [rsp+0A8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4F92F mov rbx, rax loc_4F92F: mov rdi, [rsp+0A8h+var_A0]; void * cmp rdi, r12 jz short loc_4F94B mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4F94B loc_4F948: mov rbx, rax loc_4F94B: mov rdi, [rsp+0A8h+var_80] cmp rdi, r15 jz short loc_4F978 mov rsi, [rsp+0A8h+var_70] jmp short loc_4F970 jmp short $+2 loc_4F95E: mov rbx, rax mov rdi, [rsp+0A8h+var_A0]; void * cmp rdi, r12 jz short loc_4F978 mov rsi, [rsp+0A8h+var_90] loc_4F970: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F978: mov rdi, rbx call __Unwind_Resume
void common_params_handle_model_default( long long a1, long long a2, long long a3, _QWORD *a4, long long a5, long long a6) { long long v8; // rax int v9; // ecx int v10; // r8d int v11; // r9d int v12; // ecx int v13; // r8d int v14; // r9d long long v15; // rax __int128 *v16; // rcx int v17; // ecx int v18; // r8d int v19; // r9d void *v20; // [rsp+0h] [rbp-A8h] void *v21; // [rsp+0h] [rbp-A8h] void *v22; // [rsp+0h] [rbp-A8h] void *v23; // [rsp+8h] [rbp-A0h] BYREF long long v24; // [rsp+10h] [rbp-98h] _QWORD v25[2]; // [rsp+18h] [rbp-90h] BYREF void *v26; // [rsp+28h] [rbp-80h] BYREF long long v27; // [rsp+30h] [rbp-78h] __int128 v28; // [rsp+38h] [rbp-70h] BYREF void *v29[2]; // [rsp+48h] [rbp-60h] BYREF long long v30; // [rsp+58h] [rbp-50h] BYREF void *v31[2]; // [rsp+68h] [rbp-40h] BYREF _QWORD v32[6]; // [rsp+78h] [rbp-30h] BYREF if ( *(_QWORD *)(a3 + 8) ) { if ( !a4[1] ) { if ( *(_QWORD *)(a1 + 8) ) { std::string::_M_assign(a4, a1); } else { common_get_hf_file(&v26, a3, a5); if ( !v27 || !v29[1] ) exit(1LL); std::string::_M_assign(a3, &v26); std::string::_M_assign(a4, v29); if ( v29[0] != &v30 ) operator delete(v29[0], v30 + 1); if ( v26 != &v28 ) operator delete(v26, v28 + 1); } } if ( !*(_QWORD *)(a1 + 8) ) { v23 = v25; std::string::_M_construct<char *>(&v23, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); std::string::append(&v23, "_"); v15 = std::string::_M_append(&v23, *a4, a4[1]); v26 = &v28; v16 = (__int128 *)(v15 + 16); if ( *(_QWORD *)v15 == v15 + 16 ) { v28 = *v16; } else { v26 = *(void **)v15; *(_QWORD *)&v28 = *(_QWORD *)v16; } v27 = *(_QWORD *)(v15 + 8); *(_QWORD *)v15 = v16; *(_QWORD *)(v15 + 8) = 0LL; *(_BYTE *)(v15 + 16) = 0; if ( v23 != v25 ) operator delete(v23, v25[0] + 1LL); v23 = v25; std::string::_M_construct<char const*>(&v23, "/", (long long)""); v31[0] = v32; std::string::_M_construct<char const*>(v31, "_", (long long)""); string_replace_all((int)&v26, (int)&v23, (int)v31, v17, v18, v19, v20, (int)v23, v24); if ( v31[0] != v32 ) operator delete(v31[0], v32[0] + 1LL); if ( v23 != v25 ) operator delete(v23, v25[0] + 1LL); fs_get_cache_file(&v23, &v26); std::string::operator=(a1, &v23); if ( v23 != v25 ) operator delete(v23, v25[0] + 1LL); LABEL_30: if ( v26 != &v28 ) operator delete(v26, v28 + 1); } } else { v8 = *(_QWORD *)(a1 + 8); if ( *(_QWORD *)(a2 + 8) ) { if ( v8 ) return; string_split<std::string>((int)&v23, a2, 35, (int)a4, a5, a6, v20, (int)v23, v24); v26 = &v28; std::string::_M_construct<char *>(&v26, *(_BYTE **)v23, *(_QWORD *)v23 + *((_QWORD *)v23 + 1)); std::vector<std::string>::~vector(&v23); string_split<std::string>((int)&v23, (int)&v26, 63, v9, v10, v11, v21, (int)v23, v24); std::string::_M_assign(&v26, v23); std::vector<std::string>::~vector(&v23); string_split<std::string>((int)v31, (int)&v26, 47, v12, v13, v14, v22, (int)v23, v24); fs_get_cache_file(&v23, (char *)v31[1] - 32); std::string::operator=(a1, &v23); if ( v23 != v25 ) operator delete(v23, v25[0] + 1LL); std::vector<std::string>::~vector(v31); goto LABEL_30; } if ( !v8 ) std::string::_M_assign(a1, a6); } }
common_params_handle_model_default: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDI CMP qword ptr [RDX + 0x8],0x0 JZ 0x0014f5ca MOV R14,RCX MOV R15,RDX CMP qword ptr [RCX + 0x8],0x0 JNZ 0x0014f748 CMP qword ptr [RBX + 0x8],0x0 JZ 0x0014f6cd MOV RDI,R14 MOV RSI,RBX CALL 0x0011b4b0 JMP 0x0014f748 LAB_0014f5ca: CMP qword ptr [RSI + 0x8],0x0 MOV RAX,qword ptr [RBX + 0x8] JZ 0x0014f6ab TEST RAX,RAX JNZ 0x0014f8ba LEA R14,[RSP + 0x8] MOV RDI,R14 MOV EDX,0x23 CALL 0x0014f980 MOV RAX,qword ptr [R14] LEA R15,[RSP + 0x38] MOV qword ptr [R15 + -0x10],R15 MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] ADD RDX,RSI LAB_0014f60a: LEA RDI,[RSP + 0x28] CALL 0x0012344a LEA RDI,[RSP + 0x8] CALL 0x00122fba LAB_0014f61e: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] MOV EDX,0x3f CALL 0x0014f980 MOV RSI,qword ptr [RSP + 0x8] LAB_0014f637: LEA RDI,[RSP + 0x28] CALL 0x0011b4b0 LEA RDI,[RSP + 0x8] CALL 0x00122fba LAB_0014f64b: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x28] MOV EDX,0x2f CALL 0x0014f980 MOV RSI,qword ptr [RSP + 0x70] ADD RSI,-0x20 LAB_0014f668: LEA RDI,[RSP + 0x8] CALL 0x0017509a LAB_0014f672: LEA R14,[RSP + 0x8] MOV RDI,RBX MOV RSI,R14 CALL 0x0011bab0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0014f69c MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_0014f69c: LEA RDI,[RSP + 0x68] CALL 0x00122fba JMP 0x0014f8a3 LAB_0014f6ab: TEST RAX,RAX JNZ 0x0014f8ba MOV RDI,RBX MOV RSI,R9 ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 JMP 0x0011b4b0 LAB_0014f6cd: LEA R12,[RSP + 0x28] MOV RDI,R12 MOV RSI,R15 MOV RDX,R8 CALL 0x001767d2 CMP qword ptr [R12 + 0x8],0x0 JZ 0x0014f8c9 CMP qword ptr [RSP + 0x50],0x0 JZ 0x0014f8c9 LAB_0014f6f8: LEA RSI,[RSP + 0x28] MOV RDI,R15 CALL 0x0011b4b0 LEA RSI,[RSP + 0x48] MOV RDI,R14 CALL 0x0011b4b0 LAB_0014f712: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0014f72d MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011b8e0 LAB_0014f72d: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0014f748 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b8e0 LAB_0014f748: CMP qword ptr [RBX + 0x8],0x0 JNZ 0x0014f8ba LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0012344a LAB_0014f774: LEA RSI,[0x1f26cd] MOV RDI,R15 CALL 0x0011c110 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_0014f78a: LEA RDI,[RSP + 0x8] CALL 0x0011b250 LEA R15,[RSP + 0x38] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0014f7bb MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0014f7c2 LAB_0014f7bb: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_0014f7c2: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0014f7f1 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_0014f7f1: LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R12 LAB_0014f7f9: LEA RSI,[0x1f7a99] LEA RDX,[0x1f7a9a] CALL 0x00123580 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 LAB_0014f815: LEA RSI,[0x1f26cd] LEA RDX,[0x1f26ce] LEA RDI,[RSP + 0x68] CALL 0x00123580 LAB_0014f82d: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x68] CALL 0x00173368 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0014f858 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011b8e0 LAB_0014f858: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0014f86f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_0014f86f: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] CALL 0x0017509a LAB_0014f87e: LEA R14,[RSP + 0x8] MOV RDI,RBX MOV RSI,R14 CALL 0x0011bab0 MOV RDI,qword ptr [R14] CMP RDI,R12 JZ 0x0014f8a3 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_0014f8a3: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R15 JZ 0x0014f8ba MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b8e0 LAB_0014f8ba: ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET LAB_0014f8c9: MOV EDI,0x1 CALL 0x0011ba80
/* common_params_handle_model_default(std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string&, std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string const&) */ void common_params_handle_model_default (string *param_1,string *param_2,string *param_3,string *param_4,string *param_5, string *param_6) { long *plVar1; long *plVar2; long *local_a0 [2]; long local_90 [2]; long *local_80; long local_78; long local_70; long lStack_68; long *local_60; long local_58; long local_50 [2]; long *local_40 [2]; long local_30 [2]; if (*(long *)(param_3 + 8) == 0) { if (*(long *)(param_2 + 8) == 0) { if (*(long *)(param_1 + 8) != 0) { return; } std::__cxx11::string::_M_assign(param_1); return; } if (*(long *)(param_1 + 8) != 0) { return; } string_split<std::__cxx11::string>((string *)local_a0,(char)param_2); local_80 = &local_70; /* try { // try from 0014f60a to 0014f613 has its CatchHandler @ 0014f8f0 */ std::__cxx11::string::_M_construct<char*>(&local_80,*local_a0[0],local_a0[0][1] + *local_a0[0]); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a0); /* try { // try from 0014f61e to 0014f631 has its CatchHandler @ 0014f8ee */ string_split<std::__cxx11::string>((string *)local_a0,(char)&local_80); /* try { // try from 0014f637 to 0014f640 has its CatchHandler @ 0014f8df */ std::__cxx11::string::_M_assign((string *)&local_80); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a0); /* try { // try from 0014f64b to 0014f65e has its CatchHandler @ 0014f8dd */ string_split<std::__cxx11::string>((string *)local_40,(char)&local_80); /* try { // try from 0014f668 to 0014f671 has its CatchHandler @ 0014f8d3 */ fs_get_cache_file((string *)local_a0); std::__cxx11::string::operator=(param_1,(string *)local_a0); if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_40); } else { if (*(long *)(param_4 + 8) == 0) { if (*(long *)(param_1 + 8) == 0) { common_get_hf_file((string *)&local_80,param_3); if ((local_78 == 0) || (local_58 == 0)) { /* WARNING: Subroutine does not return */ exit(1); } /* try { // try from 0014f6f8 to 0014f711 has its CatchHandler @ 0014f8ff */ std::__cxx11::string::_M_assign(param_3); std::__cxx11::string::_M_assign(param_4); if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } } else { std::__cxx11::string::_M_assign(param_4); } } if (*(long *)(param_1 + 8) != 0) { return; } local_a0[0] = local_90; std::__cxx11::string::_M_construct<char*> (local_a0,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); /* try { // try from 0014f774 to 0014f782 has its CatchHandler @ 0014f95e */ std::__cxx11::string::append((char *)local_a0); /* try { // try from 0014f78a to 0014f793 has its CatchHandler @ 0014f95c */ plVar1 = (long *)std::__cxx11::string::_M_append((char *)local_a0,*(ulong *)param_4); local_80 = &local_70; plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_70 = *plVar2; lStack_68 = plVar1[3]; } else { local_70 = *plVar2; local_80 = (long *)*plVar1; } local_78 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } local_a0[0] = local_90; /* try { // try from 0014f7f9 to 0014f80b has its CatchHandler @ 0014f948 */ std::__cxx11::string::_M_construct<char_const*>(local_a0,&DAT_001f7a99,&DAT_001f7a9a); /* try { // try from 0014f815 to 0014f82c has its CatchHandler @ 0014f92c */ local_40[0] = local_30; std::__cxx11::string::_M_construct<char_const*>(local_40,&DAT_001f26cd,&DAT_001f26ce); /* try { // try from 0014f82d to 0014f840 has its CatchHandler @ 0014f910 */ string_replace_all((string *)&local_80,(string *)local_a0,(string *)local_40); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0014f86f to 0014f87d has its CatchHandler @ 0014f90e */ fs_get_cache_file((string *)local_a0); std::__cxx11::string::operator=(param_1,(string *)local_a0); if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } } if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } return; }
58,297
ggml_easy::debug::print_tensor_shape(ggml_tensor*)
ngxson[P]ggml-easy/ggml-easy.h
static void print_tensor_shape(ggml_tensor * t) { printf("%s.shape = [", t->name); for (int i = 0; i < ggml_n_dims(t); ++i) { printf("%" PRId64, t->ne[i]); if (i < ggml_n_dims(t) - 1) { printf(", "); } } printf("]\n"); }
O2
c
ggml_easy::debug::print_tensor_shape(ggml_tensor*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x100(%rdi), %rsi leaq 0x5699(%rip), %rdi # 0xc4b6 xorl %eax, %eax callq 0x5050 leaq 0x5698(%rip), %r14 # 0xc4c3 leaq 0x5a92(%rip), %r15 # 0xc8c4 xorl %r12d, %r12d movq %rbx, %rdi callq 0x5070 cltq cmpq %rax, %r12 jge 0x6e73 movq 0x10(%rbx,%r12,8), %rsi movq %r14, %rdi xorl %eax, %eax callq 0x5050 movq %rbx, %rdi callq 0x5070 decl %eax cltq cmpq %rax, %r12 jge 0x6e6e movq %r15, %rdi xorl %eax, %eax callq 0x5050 incq %r12 jmp 0x6e35 leaq 0x5a37(%rip), %rdi # 0xc8b1 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x5640
_ZN9ggml_easy5debugL18print_tensor_shapeEP11ggml_tensor: push r15 push r14 push r12 push rbx push rax mov rbx, rdi lea rsi, [rdi+100h] lea rdi, aSShape; "%s.shape = [" xor eax, eax call _printf lea r14, aLd; "%ld" lea r15, asc_C8BB+9; ", " xor r12d, r12d loc_6E35: mov rdi, rbx call _ggml_n_dims cdqe cmp r12, rax jge short loc_6E73 mov rsi, [rbx+r12*8+10h] mov rdi, r14 xor eax, eax call _printf mov rdi, rbx call _ggml_n_dims dec eax cdqe cmp r12, rax jge short loc_6E6E mov rdi, r15 xor eax, eax call _printf loc_6E6E: inc r12 jmp short loc_6E35 loc_6E73: lea rdi, asc_C8AD+4; "]" add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _puts
long long ggml_easy::debug::print_tensor_shape(long long a1) { long long i; // r12 printf("%s.shape = [", (const char *)(a1 + 256)); for ( i = 0LL; i < (int)ggml_n_dims(a1); ++i ) { printf("%ld", *(_QWORD *)(a1 + 8 * i + 16)); if ( i < (int)(ggml_n_dims(a1) - 1) ) printf(", "); } return puts("]"); }
print_tensor_shape: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA RSI,[RDI + 0x100] LEA RDI,[0x10c4b6] XOR EAX,EAX CALL 0x00105050 LEA R14,[0x10c4c3] LEA R15,[0x10c8c4] XOR R12D,R12D LAB_00106e35: MOV RDI,RBX CALL 0x00105070 CDQE CMP R12,RAX JGE 0x00106e73 MOV RSI,qword ptr [RBX + R12*0x8 + 0x10] MOV RDI,R14 XOR EAX,EAX CALL 0x00105050 MOV RDI,RBX CALL 0x00105070 DEC EAX CDQE CMP R12,RAX JGE 0x00106e6e MOV RDI,R15 XOR EAX,EAX CALL 0x00105050 LAB_00106e6e: INC R12 JMP 0x00106e35 LAB_00106e73: LEA RDI,[0x10c8b1] ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00105640
/* ggml_easy::debug::print_tensor_shape(ggml_tensor*) */ void ggml_easy::debug::print_tensor_shape(ggml_tensor *param_1) { int iVar1; long lVar2; printf("%s.shape = [",param_1 + 0x100); lVar2 = 0; while( true ) { iVar1 = ggml_n_dims(param_1); if (iVar1 <= lVar2) break; printf("%ld",*(int8 *)(param_1 + lVar2 * 8 + 0x10)); iVar1 = ggml_n_dims(param_1); if (lVar2 < iVar1 + -1) { printf(", "); } lVar2 = lVar2 + 1; } puts("]"); return; }
58,298
u64toa_pair_1pass
bluesky950520[P]quickjs/tests/test_conv.c
size_t u64toa_pair_1pass(char buf[minimum_length(21)], uint64_t n) { if (likely(n < 0x100000000)) return u32toa_pair_1pass(buf, n); char *p = buf; /* division by known base uses multiplication */ if (n >= 100000000) { uint64_t n1 = n / 100000000; n -= n1 * 100000000; if (n1 >= 100000000) { uint32_t n2 = n1 / 100000000; n1 -= n2 * 100000000; // 1 <= n2 <= 1844 p = u4toa(p, n2); p = u08toa(p, n1); p = u08toa(p, n); } else { p = u8toa(p, n1); p = u08toa(p, n); } } else { p = u8toa(p, n); } *p = '\0'; return p - buf; }
O0
c
u64toa_pair_1pass: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movabsq $0x100000000, %rax # imm = 0x100000000 cmpq %rax, 0x20(%rsp) setb %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x2d1c movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rax movl %eax, %esi callq 0x2af0 movq %rax, 0x30(%rsp) jmp 0x2e35 movq 0x28(%rsp), %rax movq %rax, 0x18(%rsp) cmpq $0x5f5e100, 0x20(%rsp) # imm = 0x5F5E100 jb 0x2e05 movq 0x20(%rsp), %rax movl $0x5f5e100, %ecx # imm = 0x5F5E100 xorl %edx, %edx divq %rcx movq %rax, 0x10(%rsp) imulq $0x5f5e100, 0x10(%rsp), %rcx # imm = 0x5F5E100 movq 0x20(%rsp), %rax subq %rcx, %rax movq %rax, 0x20(%rsp) cmpq $0x5f5e100, 0x10(%rsp) # imm = 0x5F5E100 jb 0x2dd7 movq 0x10(%rsp), %rax movl $0x5f5e100, %ecx # imm = 0x5F5E100 xorl %edx, %edx divq %rcx movl %eax, 0xc(%rsp) imull $0x5f5e100, 0xc(%rsp), %eax # imm = 0x5F5E100 movl %eax, %eax movl %eax, %ecx movq 0x10(%rsp), %rax subq %rcx, %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x2e40 movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rax movl %eax, %esi callq 0x2bf0 movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movl %eax, %esi callq 0x2bf0 movq %rax, 0x18(%rsp) jmp 0x2e03 movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rax movl %eax, %esi callq 0x2c50 movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movl %eax, %esi callq 0x2bf0 movq %rax, 0x18(%rsp) jmp 0x2e1b movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movl %eax, %esi callq 0x2c50 movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movb $0x0, (%rax) movq 0x18(%rsp), %rax movq 0x28(%rsp), %rcx subq %rcx, %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
u64toa_pair_1pass: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rax, 100000000h cmp [rsp+38h+var_18], rax setb al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_2D1C mov rdi, [rsp+38h+var_10] mov rax, [rsp+38h+var_18] mov esi, eax call u32toa_pair_1pass mov [rsp+38h+var_8], rax jmp loc_2E35 loc_2D1C: mov rax, [rsp+38h+var_10] mov [rsp+38h+var_20], rax cmp [rsp+38h+var_18], 5F5E100h jb loc_2E05 mov rax, [rsp+38h+var_18] mov ecx, 5F5E100h xor edx, edx div rcx mov [rsp+38h+var_28], rax imul rcx, [rsp+38h+var_28], 5F5E100h mov rax, [rsp+38h+var_18] sub rax, rcx mov [rsp+38h+var_18], rax cmp [rsp+38h+var_28], 5F5E100h jb short loc_2DD7 mov rax, [rsp+38h+var_28] mov ecx, 5F5E100h xor edx, edx div rcx mov [rsp+38h+var_2C], eax imul eax, [rsp+38h+var_2C], 5F5E100h mov eax, eax mov ecx, eax mov rax, [rsp+38h+var_28] sub rax, rcx mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_20] mov esi, [rsp+38h+var_2C] call u4toa mov [rsp+38h+var_20], rax mov rdi, [rsp+38h+var_20] mov rax, [rsp+38h+var_28] mov esi, eax call u08toa mov [rsp+38h+var_20], rax mov rdi, [rsp+38h+var_20] mov rax, [rsp+38h+var_18] mov esi, eax call u08toa mov [rsp+38h+var_20], rax jmp short loc_2E03 loc_2DD7: mov rdi, [rsp+38h+var_20] mov rax, [rsp+38h+var_28] mov esi, eax call u8toa mov [rsp+38h+var_20], rax mov rdi, [rsp+38h+var_20] mov rax, [rsp+38h+var_18] mov esi, eax call u08toa mov [rsp+38h+var_20], rax loc_2E03: jmp short loc_2E1B loc_2E05: mov rdi, [rsp+38h+var_20] mov rax, [rsp+38h+var_18] mov esi, eax call u8toa mov [rsp+38h+var_20], rax loc_2E1B: mov rax, [rsp+38h+var_20] mov byte ptr [rax], 0 mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_10] sub rax, rcx mov [rsp+38h+var_8], rax loc_2E35: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long u64toa_pair_1pass(_BYTE *a1, unsigned long long a2) { long long v2; // rax long long v3; // rax unsigned long long v5; // [rsp+10h] [rbp-28h] _BYTE *v6; // [rsp+18h] [rbp-20h] if ( a2 < 0x100000000LL ) return u32toa_pair_1pass(a1, a2); v5 = a2 / 0x5F5E100; if ( a2 / 0x5F5E100 < 0x5F5E100 ) { v3 = u8toa((long long)a1, v5); } else { v2 = u4toa(a1, (unsigned int)(v5 / 0x5F5E100)); v3 = u08toa(v2, v5 % 0x5F5E100); } v6 = (_BYTE *)u08toa(v3, a2 % 0x5F5E100); *v6 = 0; return v6 - a1; }
u64toa_pair_1pass: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RAX,0x100000000 CMP qword ptr [RSP + 0x20],RAX SETC AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00102d1c MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x20] MOV ESI,EAX CALL 0x00102af0 MOV qword ptr [RSP + 0x30],RAX JMP 0x00102e35 LAB_00102d1c: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x20],0x5f5e100 JC 0x00102e05 MOV RAX,qword ptr [RSP + 0x20] MOV ECX,0x5f5e100 XOR EDX,EDX DIV RCX MOV qword ptr [RSP + 0x10],RAX IMUL RCX,qword ptr [RSP + 0x10],0x5f5e100 MOV RAX,qword ptr [RSP + 0x20] SUB RAX,RCX MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x10],0x5f5e100 JC 0x00102dd7 MOV RAX,qword ptr [RSP + 0x10] MOV ECX,0x5f5e100 XOR EDX,EDX DIV RCX MOV dword ptr [RSP + 0xc],EAX IMUL EAX,dword ptr [RSP + 0xc],0x5f5e100 MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x10] SUB RAX,RCX MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] CALL 0x00102e40 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,EAX CALL 0x00102bf0 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV ESI,EAX CALL 0x00102bf0 MOV qword ptr [RSP + 0x18],RAX JMP 0x00102e03 LAB_00102dd7: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,EAX CALL 0x00102c50 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV ESI,EAX CALL 0x00102bf0 MOV qword ptr [RSP + 0x18],RAX LAB_00102e03: JMP 0x00102e1b LAB_00102e05: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV ESI,EAX CALL 0x00102c50 MOV qword ptr [RSP + 0x18],RAX LAB_00102e1b: MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x28] SUB RAX,RCX MOV qword ptr [RSP + 0x30],RAX LAB_00102e35: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
long u64toa_pair_1pass(long param_1,ulong param_2) { int1 auVar1 [16]; int iVar2; ulong uVar3; int8 uVar4; int8 local_20; int8 local_8; if (param_2 < 0x100000000) { local_8 = u32toa_pair_1pass(param_1,param_2 & 0xffffffff); } else { if (param_2 < 100000000) { local_20 = (int1 *)u8toa(param_1,param_2 & 0xffffffff); } else { uVar3 = param_2 / 100000000; if (uVar3 < 100000000) { uVar4 = u8toa(param_1,uVar3 & 0xffffffff); local_20 = (int1 *)u08toa(uVar4,param_2 % 100000000); } else { auVar1._8_8_ = 0; auVar1._0_8_ = uVar3; iVar2 = SUB164(auVar1 / ZEXT816(100000000),0); uVar4 = u4toa(param_1,iVar2,uVar3 % 100000000); uVar4 = u08toa(uVar4,uVar3 - (uint)(iVar2 * 100000000) & 0xffffffff); local_20 = (int1 *)u08toa(uVar4,param_2 % 100000000); } } *local_20 = 0; local_8 = (long)local_20 - param_1; } return local_8; }
58,299
u64toa_pair_1pass
bluesky950520[P]quickjs/tests/test_conv.c
size_t u64toa_pair_1pass(char buf[minimum_length(21)], uint64_t n) { if (likely(n < 0x100000000)) return u32toa_pair_1pass(buf, n); char *p = buf; /* division by known base uses multiplication */ if (n >= 100000000) { uint64_t n1 = n / 100000000; n -= n1 * 100000000; if (n1 >= 100000000) { uint32_t n2 = n1 / 100000000; n1 -= n2 * 100000000; // 1 <= n2 <= 1844 p = u4toa(p, n2); p = u08toa(p, n1); p = u08toa(p, n); } else { p = u8toa(p, n1); p = u08toa(p, n); } } else { p = u8toa(p, n); } *p = '\0'; return p - buf; }
O2
c
u64toa_pair_1pass: pushq %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq %rsi, %rax shrq $0x20, %rax jne 0x259f movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x24cc movl $0xfa0a1f00, %edi # imm = 0xFA0A1F00 movl $0x5f5e100, %ecx # imm = 0x5F5E100 movq %rsi, %rax xorl %edx, %edx divq %rcx movq %rax, %rcx movq %rax, %r14 imulq %rdi, %r14 addq %rsi, %r14 movabsq $0x2386f26fc10000, %r8 # imm = 0x2386F26FC10000 cmpq %r8, %rsi jb 0x25f1 movq %rsi, %rax xorl %edx, %edx divq %r8 imull %eax, %edi leal (%rcx,%rdi), %ebp movq %rbx, %rdi movl %eax, %esi callq 0x2611 movq %rax, %rdi movl %ebp, %esi callq 0x2529 jmp 0x25fb movq %rbx, %rdi movl %ecx, %esi callq 0x2551 movq %rax, %rdi movl %r14d, %esi callq 0x2529 movb $0x0, (%rax) subq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
u64toa_pair_1pass: push rbp push r14 push rbx mov rbx, rdi mov rax, rsi shr rax, 20h jnz short loc_259F mov rdi, rbx pop rbx pop r14 pop rbp jmp u32toa_pair_1pass loc_259F: mov edi, 0FA0A1F00h mov ecx, 5F5E100h mov rax, rsi xor edx, edx div rcx mov rcx, rax mov r14, rax imul r14, rdi add r14, rsi mov r8, 2386F26FC10000h cmp rsi, r8 jb short loc_25F1 mov rax, rsi xor edx, edx div r8 imul edi, eax lea ebp, [rcx+rdi] mov rdi, rbx mov esi, eax call u4toa mov rdi, rax mov esi, ebp call u08toa jmp short loc_25FB loc_25F1: mov rdi, rbx mov esi, ecx call u8toa loc_25FB: mov rdi, rax mov esi, r14d call u08toa mov byte ptr [rax], 0 sub rax, rbx pop rbx pop r14 pop rbp retn
long long u64toa_pair_1pass(char *a1, unsigned long long a2) { unsigned long long v3; // rcx unsigned int v4; // ebp long long v5; // rax long long v6; // rax _BYTE *v7; // rax if ( !HIDWORD(a2) ) return u32toa_pair_1pass(a1, a2); v3 = a2 / 0x5F5E100; if ( a2 < 0x2386F26FC10000LL ) { v6 = u8toa((long long)a1, v3); } else { v4 = v3 - 100000000 * (a2 / 0x2386F26FC10000LL); v5 = u4toa(a1, a2 / 0x2386F26FC10000LL, a2 % 0x2386F26FC10000LL); v6 = u08toa(v5, v4); } v7 = (_BYTE *)u08toa(v6, a2 % 0x5F5E100); *v7 = 0; return v7 - a1; }
u64toa_pair_1pass: PUSH RBP PUSH R14 PUSH RBX MOV RBX,RDI MOV RAX,RSI SHR RAX,0x20 JNZ 0x0010259f MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001024cc LAB_0010259f: MOV EDI,0xfa0a1f00 MOV ECX,0x5f5e100 MOV RAX,RSI XOR EDX,EDX DIV RCX MOV RCX,RAX MOV R14,RAX IMUL R14,RDI ADD R14,RSI MOV R8,0x2386f26fc10000 CMP RSI,R8 JC 0x001025f1 MOV RAX,RSI XOR EDX,EDX DIV R8 IMUL EDI,EAX LEA EBP,[RCX + RDI*0x1] MOV RDI,RBX MOV ESI,EAX CALL 0x00102611 MOV RDI,RAX MOV ESI,EBP CALL 0x00102529 JMP 0x001025fb LAB_001025f1: MOV RDI,RBX MOV ESI,ECX CALL 0x00102551 LAB_001025fb: MOV RDI,RAX MOV ESI,R14D CALL 0x00102529 MOV byte ptr [RAX],0x0 SUB RAX,RBX POP RBX POP R14 POP RBP RET
long u64toa_pair_1pass(long param_1,ulong param_2) { int1 auVar1 [16]; int1 auVar2 [16]; int iVar3; long lVar4; ulong uVar5; int8 uVar6; int1 *puVar7; if (param_2 >> 0x20 == 0) { lVar4 = u32toa_pair_1pass(param_1); return lVar4; } auVar1._8_8_ = 0; auVar1._0_8_ = param_2; uVar5 = SUB168(auVar1 / ZEXT816(100000000),0); if (param_2 < 10000000000000000) { uVar6 = u8toa(param_1,uVar5 & 0xffffffff); } else { auVar2._8_8_ = 0; auVar2._0_8_ = param_2; iVar3 = SUB164(auVar2 / ZEXT816(10000000000000000),0); uVar6 = u4toa(param_1,iVar3,param_2 % 10000000000000000); uVar6 = u08toa(uVar6,SUB164(auVar1 / ZEXT816(100000000),0) + iVar3 * -100000000); } puVar7 = (int1 *)u08toa(uVar6,uVar5 * 0xfa0a1f00 + param_2 & 0xffffffff); *puVar7 = 0; return (long)puVar7 - param_1; }