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
25,300
my_interval_timer
eloqsql/mysys/my_getsystime.c
ulonglong my_interval_timer() { #ifdef HAVE_CLOCK_GETTIME struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp); return tp.tv_sec*1000000000ULL+tp.tv_nsec; #elif defined(HAVE_GETHRTIME) return gethrtime(); #elif defined(_WIN32) DBUG_ASSERT(query_performance_frequency); LARGE_INTEGER t_cnt; QueryPerformanceCounter(&t_cnt); return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) + ((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL / query_performance_frequency); #else /* TODO: check for other possibilities for hi-res timestamping */ struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL; #endif }
O0
c
my_interval_timer: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x1, %edi leaq -0x10(%rbp), %rsi callq 0x24260 imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00 addq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
my_interval_timer: push rbp mov rbp, rsp sub rsp, 10h mov edi, 1 lea rsi, [rbp+var_10] call _clock_gettime imul rax, [rbp+var_10], 3B9ACA00h add rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long my_interval_timer() { _QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF clock_gettime(1LL, v1); return v1[1] + 1000000000LL * v1[0]; }
my_interval_timer: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV EDI,0x1 LEA RSI,[RBP + -0x10] CALL 0x00124260 IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00 ADD RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
long my_interval_timer(void) { timespec local_18; clock_gettime(1,&local_18); return local_18.tv_sec * 1000000000 + local_18.tv_nsec; }
25,301
mysql_client_find_plugin
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
struct st_mysql_client_plugin * STDCALL mysql_client_find_plugin(MYSQL *mysql, const char *name, int type) { struct st_mysql_client_plugin *p; int plugin_nr= get_plugin_nr(type); if (is_not_initialized(mysql, name)) return NULL; if (plugin_nr == -1) { my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, "invalid type"); } if ((p= find_plugin(name, type))) return p; /* not found, load it */ return mysql_load_plugin(mysql, name, type, 0); }
O0
c
mysql_client_find_plugin: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl -0x1c(%rbp), %edi callq 0x36140 movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x35ad0 cmpl $0x0, %eax je 0x360ba movq $0x0, -0x8(%rbp) jmp 0x3612b cmpl $-0x1, -0x2c(%rbp) jne 0x360f3 movq -0x10(%rbp), %rdi leaq 0x29e15(%rip), %rax # 0x5fee0 movq (%rax), %rdx leaq 0x29e1b(%rip), %rax # 0x5fef0 movq 0x1d8(%rax), %rcx movq -0x18(%rbp), %r8 movl $0x80b, %esi # imm = 0x80B leaq 0x15f18(%rip), %r9 # 0x4c004 movb $0x0, %al callq 0x15e40 movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi callq 0x35b40 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0x36113 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x3612b movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx xorl %ecx, %ecx movb $0x0, %al callq 0x35fe0 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_client_find_plugin: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov edi, [rbp+var_1C] call get_plugin_nr mov [rbp+var_2C], eax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call is_not_initialized cmp eax, 0 jz short loc_360BA mov [rbp+var_8], 0 jmp short loc_3612B loc_360BA: cmp [rbp+var_2C], 0FFFFFFFFh jnz short loc_360F3 mov rdi, [rbp+var_10] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+1D8h] mov r8, [rbp+var_18] mov esi, 80Bh lea r9, aInvalidType; "invalid type" mov al, 0 call my_set_error loc_360F3: mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] call find_plugin mov [rbp+var_28], rax cmp rax, 0 jz short loc_36113 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_3612B loc_36113: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] xor ecx, ecx mov al, 0 call mysql_load_plugin mov [rbp+var_8], rax loc_3612B: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
void (** mysql_client_find_plugin(long long a1, const char *a2, unsigned int a3))(void) { int plugin_nr; // [rsp+4h] [rbp-2Ch] long long plugin; // [rsp+8h] [rbp-28h] plugin_nr = get_plugin_nr(a3); if ( (unsigned int)is_not_initialized(a1, (long long)a2) ) return 0LL; if ( plugin_nr == -1 ) my_set_error(a1, 0x80Bu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[59], a2, "invalid type"); plugin = find_plugin((long long)a2, a3); if ( plugin ) return (void (**)(void))plugin; else return mysql_load_plugin(a1, a2, a3, 0); }
mysql_client_find_plugin: 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 EDI,dword ptr [RBP + -0x1c] CALL 0x00136140 MOV dword ptr [RBP + -0x2c],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00135ad0 CMP EAX,0x0 JZ 0x001360ba MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013612b LAB_001360ba: CMP dword ptr [RBP + -0x2c],-0x1 JNZ 0x001360f3 MOV RDI,qword ptr [RBP + -0x10] LEA RAX,[0x15fee0] MOV RDX,qword ptr [RAX] LEA RAX,[0x15fef0] MOV RCX,qword ptr [RAX + 0x1d8] MOV R8,qword ptr [RBP + -0x18] MOV ESI,0x80b LEA R9,[0x14c004] MOV AL,0x0 CALL 0x00115e40 LAB_001360f3: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x1c] CALL 0x00135b40 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x00136113 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013612b LAB_00136113: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] XOR ECX,ECX MOV AL,0x0 CALL 0x00135fe0 MOV qword ptr [RBP + -0x8],RAX LAB_0013612b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long mysql_client_find_plugin(int8 param_1,int8 param_2,int4 param_3) { int iVar1; int iVar2; long local_10; iVar1 = get_plugin_nr(param_3); iVar2 = is_not_initialized(param_1,param_2); if (iVar2 == 0) { if (iVar1 == -1) { my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____001600c8, param_2,"invalid type"); } local_10 = find_plugin(param_2,param_3); if (local_10 == 0) { local_10 = mysql_load_plugin(param_1,param_2,param_3,0); } } else { local_10 = 0; } return local_10; }
25,302
to_printable_8bit
eloqsql/strings/ctype.c
static uint to_printable_8bit(uchar *dst, my_wc_t wc, uint bs) { /* This function is used only in context of error messages for now. All non-BMP characters are currently replaced to question marks when a message is put into diagnostics area. */ DBUG_ASSERT(wc < 0x10000); *dst++= (char) bs; *dst++= _dig_vec_upper[(wc >> 12) & 0x0F]; *dst++= _dig_vec_upper[(wc >> 8) & 0x0F]; *dst++= _dig_vec_upper[(wc >> 4) & 0x0F]; *dst++= _dig_vec_upper[wc & 0x0F]; return MY_CS_PRINTABLE_CHAR_LENGTH; }
O0
c
to_printable_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) jmp 0xcc151 movl -0x14(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0xc, %rcx andq $0xf, %rcx leaq 0x14c7e6(%rip), %rax # 0x218960 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0x8, %rcx andq $0xf, %rcx leaq 0x14c7bf(%rip), %rax # 0x218960 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0x4, %rcx andq $0xf, %rcx leaq 0x14c798(%rip), %rax # 0x218960 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx andq $0xf, %rcx leaq 0x14c775(%rip), %rax # 0x218960 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movl $0x5, %eax popq %rbp retq nopw %cs:(%rax,%rax)
to_printable_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx jmp short $+2 loc_CC151: mov eax, [rbp+var_14] mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 0Ch and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 8 and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 4 and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov eax, 5 pop rbp retn
long long to_printable_8bit(_BYTE *a1, unsigned long long a2, char a3) { *a1 = a3; a1[1] = dig_vec_upper[(unsigned __int16)a2 >> 12]; a1[2] = dig_vec_upper[(a2 >> 8) & 0xF]; a1[3] = dig_vec_upper[(unsigned __int8)a2 >> 4]; a1[4] = dig_vec_upper[a2 & 0xF]; return 5LL; }
to_printable_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX JMP 0x001cc151 LAB_001cc151: MOV EAX,dword ptr [RBP + -0x14] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0xc AND RCX,0xf LEA RAX,[0x318960] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x8 AND RCX,0xf LEA RAX,[0x318960] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x4 AND RCX,0xf LEA RAX,[0x318960] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] AND RCX,0xf LEA RAX,[0x318960] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV EAX,0x5 POP RBP RET
int8 to_printable_8bit(int1 *param_1,ulong param_2,int1 param_3) { *param_1 = param_3; param_1[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 0xc & 0xf]; param_1[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 8 & 0xf]; param_1[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 4 & 0xf]; param_1[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 & 0xf]; return 5; }
25,303
get_rdlock
eloqsql/storage/maria/ma_pagecache.c
static my_bool get_rdlock(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block) { PAGECACHE_FILE file= block->hash_link->file; pgcache_page_no_t pageno= block->hash_link->pageno; pthread_t locker= pthread_self(); DBUG_ENTER("get_rdlock"); DBUG_PRINT("info", ("the block %p " "files %d(%d) pages %lu(%lu)", block, file.file, block->hash_link->file.file, (ulong) pageno, (ulong) block->hash_link->pageno)); PCBLOCK_INFO(block); while (block->wlocks && !pthread_equal(block->write_locker, locker)) { /* Lock failed we will wait */ if (pagecache_wait_lock(pagecache, block, file, pageno, MY_PTHREAD_LOCK_READ)) DBUG_RETURN(1); } /* we are doing it by global cache mutex protection, so it is OK */ if (block->wlocks) { DBUG_ASSERT(pthread_equal(block->write_locker, locker)); block->rlocks_queue++; DBUG_PRINT("info", ("RD lock put into queue, block %p", block)); } else { block->rlocks++; DBUG_PRINT("info", ("RD lock set, block %p", block)); } DBUG_RETURN(0); }
O0
c
get_rdlock: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rsi addq $0x18, %rsi leaq -0x60(%rbp), %rdi movl $0x48, %edx callq 0x2a0b0 movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq 0x60(%rax), %rax movq %rax, -0x68(%rbp) callq 0x2a540 movq %rax, -0x70(%rbp) jmp 0x9cd78 jmp 0x9cd7a jmp 0x9cd7c jmp 0x9cd7e movq -0x18(%rbp), %rcx xorl %eax, %eax cmpl $0x0, 0x68(%rcx) movb %al, -0x71(%rbp) je 0x9cda9 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi movq -0x70(%rbp), %rsi callq 0x2a950 cmpl $0x0, %eax setne %al xorb $-0x1, %al movb %al, -0x71(%rbp) movb -0x71(%rbp), %al testb $0x1, %al jne 0x9cdb2 jmp 0x9ce02 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x68(%rbp), %rdx xorl %eax, %eax movq -0x20(%rbp), %rcx movq %rsp, %rax movq %rcx, 0x40(%rax) movups -0x60(%rbp), %xmm0 movups -0x50(%rbp), %xmm1 movups -0x40(%rbp), %xmm2 movups -0x30(%rbp), %xmm3 movups %xmm3, 0x30(%rax) movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) xorl %ecx, %ecx callq 0x9ce50 cmpb $0x0, %al je 0x9cdfd jmp 0x9cdf7 movb $0x1, -0x1(%rbp) jmp 0x9ce38 jmp 0x9cd7e movq -0x18(%rbp), %rax cmpl $0x0, 0x68(%rax) je 0x9ce21 jmp 0x9ce0e jmp 0x9ce10 movq -0x18(%rbp), %rax movl 0x70(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x70(%rax) jmp 0x9ce1f jmp 0x9ce32 movq -0x18(%rbp), %rax movl 0x6c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x6c(%rax) jmp 0x9ce30 jmp 0x9ce32 jmp 0x9ce34 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xc0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_rdlock: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov rsi, [rax+20h] add rsi, 18h lea rdi, [rbp+var_60] mov edx, 48h ; 'H' call _memcpy mov rax, [rbp+var_18] mov rax, [rax+20h] mov rax, [rax+60h] mov [rbp+var_68], rax call _pthread_self mov [rbp+var_70], rax jmp short $+2 loc_9CD78: jmp short $+2 loc_9CD7A: jmp short $+2 loc_9CD7C: jmp short $+2 loc_9CD7E: mov rcx, [rbp+var_18] xor eax, eax cmp dword ptr [rcx+68h], 0 mov [rbp+var_71], al jz short loc_9CDA9 mov rax, [rbp+var_18] mov rdi, [rax+38h] mov rsi, [rbp+var_70] call _pthread_equal cmp eax, 0 setnz al xor al, 0FFh mov [rbp+var_71], al loc_9CDA9: mov al, [rbp+var_71] test al, 1 jnz short loc_9CDB2 jmp short loc_9CE02 loc_9CDB2: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_68] xor eax, eax mov rcx, [rbp+var_20] mov rax, rsp mov [rax+40h], rcx movups xmm0, [rbp+var_60] movups xmm1, [rbp+var_50] movups xmm2, [rbp+var_40] movups xmm3, [rbp+var_30] movups xmmword ptr [rax+30h], xmm3 movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 xor ecx, ecx call pagecache_wait_lock cmp al, 0 jz short loc_9CDFD jmp short $+2 loc_9CDF7: mov [rbp+var_1], 1 jmp short loc_9CE38 loc_9CDFD: jmp loc_9CD7E loc_9CE02: mov rax, [rbp+var_18] cmp dword ptr [rax+68h], 0 jz short loc_9CE21 jmp short $+2 loc_9CE0E: jmp short $+2 loc_9CE10: mov rax, [rbp+var_18] mov ecx, [rax+70h] add ecx, 1 mov [rax+70h], ecx jmp short $+2 loc_9CE1F: jmp short loc_9CE32 loc_9CE21: mov rax, [rbp+var_18] mov ecx, [rax+6Ch] add ecx, 1 mov [rax+6Ch], ecx jmp short $+2 loc_9CE30: jmp short $+2 loc_9CE32: jmp short $+2 loc_9CE34: mov [rbp+var_1], 0 loc_9CE38: mov al, [rbp+var_1] add rsp, 0C0h pop rbp retn
char get_rdlock(long long a1, long long a2) { int v2; // r8d int v3; // r9d char v5; // [rsp+4Fh] [rbp-71h] long long v6; // [rsp+50h] [rbp-70h] long long v7; // [rsp+58h] [rbp-68h] _OWORD v8[4]; // [rsp+60h] [rbp-60h] BYREF long long v9; // [rsp+A0h] [rbp-20h] long long v10; // [rsp+A8h] [rbp-18h] long long v11; // [rsp+B0h] [rbp-10h] v11 = a1; v10 = a2; memcpy(v8, *(_QWORD *)(a2 + 32) + 24LL, 72LL); v7 = *(_QWORD *)(*(_QWORD *)(v10 + 32) + 96LL); v6 = pthread_self(); while ( 1 ) { v5 = 0; if ( *(_DWORD *)(v10 + 104) ) v5 = ~((unsigned int)pthread_equal(*(_QWORD *)(v10 + 56), v6) != 0); if ( (v5 & 1) == 0 ) break; if ( (unsigned __int8)pagecache_wait_lock(v11, v10, v7, 0, v2, v3, v8[0], v8[1], v8[2], v8[3], v9) ) return 1; } if ( *(_DWORD *)(v10 + 104) ) ++*(_DWORD *)(v10 + 112); else ++*(_DWORD *)(v10 + 108); return 0; }
get_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x20] ADD RSI,0x18 LEA RDI,[RBP + -0x60] MOV EDX,0x48 CALL 0x0012a0b0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x68],RAX CALL 0x0012a540 MOV qword ptr [RBP + -0x70],RAX JMP 0x0019cd78 LAB_0019cd78: JMP 0x0019cd7a LAB_0019cd7a: JMP 0x0019cd7c LAB_0019cd7c: JMP 0x0019cd7e LAB_0019cd7e: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP dword ptr [RCX + 0x68],0x0 MOV byte ptr [RBP + -0x71],AL JZ 0x0019cda9 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x70] CALL 0x0012a950 CMP EAX,0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x71],AL LAB_0019cda9: MOV AL,byte ptr [RBP + -0x71] TEST AL,0x1 JNZ 0x0019cdb2 JMP 0x0019ce02 LAB_0019cdb2: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x68] XOR EAX,EAX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,RSP MOV qword ptr [RAX + 0x40],RCX MOVUPS XMM0,xmmword ptr [RBP + -0x60] MOVUPS XMM1,xmmword ptr [RBP + -0x50] MOVUPS XMM2,xmmword ptr [RBP + -0x40] MOVUPS XMM3,xmmword ptr [RBP + -0x30] MOVUPS xmmword ptr [RAX + 0x30],XMM3 MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 XOR ECX,ECX CALL 0x0019ce50 CMP AL,0x0 JZ 0x0019cdfd JMP 0x0019cdf7 LAB_0019cdf7: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0019ce38 LAB_0019cdfd: JMP 0x0019cd7e LAB_0019ce02: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x68],0x0 JZ 0x0019ce21 JMP 0x0019ce0e LAB_0019ce0e: JMP 0x0019ce10 LAB_0019ce10: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x70] ADD ECX,0x1 MOV dword ptr [RAX + 0x70],ECX JMP 0x0019ce1f LAB_0019ce1f: JMP 0x0019ce32 LAB_0019ce21: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x6c] ADD ECX,0x1 MOV dword ptr [RAX + 0x6c],ECX JMP 0x0019ce30 LAB_0019ce30: JMP 0x0019ce32 LAB_0019ce32: JMP 0x0019ce34 LAB_0019ce34: MOV byte ptr [RBP + -0x1],0x0 LAB_0019ce38: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xc0 POP RBP RET
int1 get_rdlock(int8 param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, int8 param_6) { int8 uVar1; char cVar2; int iVar3; pthread_t __thread2; bool bVar4; int4 local_68 [2]; int4 uStack_60; int4 local_58; int4 uStack_50; int4 local_48; int4 uStack_40; int4 local_38; int4 uStack_30; int8 local_28; long local_20; int8 local_18; local_20 = param_2; local_18 = param_1; memcpy(local_68,(void *)(*(long *)(param_2 + 0x20) + 0x18),0x48); uVar1 = *(int8 *)(*(long *)(local_20 + 0x20) + 0x60); __thread2 = pthread_self(); while( true ) { bVar4 = false; if (*(int *)(local_20 + 0x68) != 0) { iVar3 = pthread_equal(*(pthread_t *)(local_20 + 0x38),__thread2); bVar4 = iVar3 == 0; } if (!bVar4) break; cVar2 = pagecache_wait_lock(local_18,local_20,uVar1,0,param_5,param_6,local_68[0],uStack_60, local_58,uStack_50,local_48,uStack_40,local_38,uStack_30,local_28); if (cVar2 != '\0') { return 1; } } if (*(int *)(local_20 + 0x68) == 0) { *(int *)(local_20 + 0x6c) = *(int *)(local_20 + 0x6c) + 1; } else { *(int *)(local_20 + 0x70) = *(int *)(local_20 + 0x70) + 1; } return 0; }
25,304
main
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCache.cpp
int main(int argc, char **argv) { if (!parseParameters(argc, argv)) { return -1; } // Open CSV file and write header std::ofstream csvFile(std::string(traceFilePath) + ".csv"); csvFile << "cacheSize,blockSize,associativity,writeBack,writeAllocate," "missRate,totalCycles\n"; // Cache Size: 32 Kb to 32 Mb for (uint32_t cacheSize = 32 * 1024; cacheSize <= 32 * 1024 * 1024; cacheSize *= 2) { // Block Size: 1 byte to 4096 byte // The maximum block size is imposed by VM page size for (uint32_t blockSize = 1; blockSize <= 4096; blockSize *= 2) { for (uint32_t associativity = 1; associativity <= 32; associativity *= 2) { uint32_t blockNum = cacheSize / blockSize; if (blockNum % associativity != 0) continue; simulateCache(csvFile, cacheSize, blockSize, associativity, true, true); simulateCache(csvFile, cacheSize, blockSize, associativity, true, false); simulateCache(csvFile, cacheSize, blockSize, associativity, false, true); simulateCache(csvFile, cacheSize, blockSize, associativity, false, false); } } } printf("Result has been written to %s\n", (std::string(traceFilePath) + ".csv").c_str()); csvFile.close(); return 0; }
O0
cpp
main: subq $0x2e8, %rsp # imm = 0x2E8 movl $0x0, 0x2e4(%rsp) movl %edi, 0x2e0(%rsp) movq %rsi, 0x2d8(%rsp) movl 0x2e0(%rsp), %edi movq 0x2d8(%rsp), %rsi callq 0x68e0 testb $0x1, %al jne 0x6529 movl $0xffffffff, 0x2e4(%rsp) # imm = 0xFFFFFFFF jmp 0x68b6 movq 0x9c88(%rip), %rax # 0x101b8 movq %rax, 0x18(%rsp) leaq 0x97(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x62d0 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x98(%rsp), %rdi callq 0x6200 jmp 0x6560 leaq 0x5a9d(%rip), %rdx # 0xc004 leaq 0xb8(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x7020 jmp 0x657e leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rsi movl $0x10, %edx callq 0x6310 jmp 0x659a leaq 0xb8(%rsp), %rdi callq 0x6110 leaq 0x98(%rsp), %rdi callq 0x6110 leaq 0x97(%rsp), %rdi callq 0x61a0 leaq 0x5a41(%rip), %rsi # 0xc009 leaq 0xd8(%rsp), %rdi callq 0x6170 jmp 0x65d7 movl $0x8000, 0x80(%rsp) # imm = 0x8000 cmpl $0x2000000, 0x80(%rsp) # imm = 0x2000000 ja 0x679c movl $0x1, 0x7c(%rsp) cmpl $0x1000, 0x7c(%rsp) # imm = 0x1000 ja 0x6785 movl $0x1, 0x78(%rsp) cmpl $0x20, 0x78(%rsp) ja 0x6774 movl 0x80(%rsp), %eax xorl %edx, %edx divl 0x7c(%rsp) movl %eax, 0x74(%rsp) movl 0x74(%rsp), %eax xorl %edx, %edx divl 0x78(%rsp) cmpl $0x0, %edx je 0x66ca jmp 0x6765 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x669f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x6692 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0xb8(%rsp), %rdi callq 0x6110 leaq 0x98(%rsp), %rdi callq 0x6110 leaq 0x97(%rsp), %rdi callq 0x61a0 jmp 0x68c5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x68a7 movl 0x80(%rsp), %esi movl 0x7c(%rsp), %edx movl 0x78(%rsp), %ecx leaq 0xd8(%rsp), %rdi movl $0x1, %r9d movl %r9d, %r8d callq 0x69c0 jmp 0x66f1 movl 0x80(%rsp), %esi movl 0x7c(%rsp), %edx movl 0x78(%rsp), %ecx leaq 0xd8(%rsp), %rdi movl $0x1, %r8d xorl %r9d, %r9d callq 0x69c0 jmp 0x6718 movl 0x80(%rsp), %esi movl 0x7c(%rsp), %edx movl 0x78(%rsp), %ecx leaq 0xd8(%rsp), %rdi xorl %r8d, %r8d movl $0x1, %r9d callq 0x69c0 jmp 0x673f movl 0x80(%rsp), %esi movl 0x7c(%rsp), %edx movl 0x78(%rsp), %ecx leaq 0xd8(%rsp), %rdi xorl %r9d, %r9d movl %r9d, %r8d callq 0x69c0 jmp 0x6763 jmp 0x6765 movl 0x78(%rsp), %eax shll %eax movl %eax, 0x78(%rsp) jmp 0x6611 jmp 0x6776 movl 0x7c(%rsp), %eax shll %eax movl %eax, 0x7c(%rsp) jmp 0x65fb jmp 0x6787 movl 0x80(%rsp), %eax shll %eax movl %eax, 0x80(%rsp) jmp 0x65e2 movq 0x9a15(%rip), %rax # 0x101b8 movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x62d0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x6200 jmp 0x67cd leaq 0x5830(%rip), %rdx # 0xc004 leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x7020 jmp 0x67e5 leaq 0x50(%rsp), %rdi callq 0x60c0 movq %rax, %rsi leaq 0x5860(%rip), %rdi # 0xc059 xorl %eax, %eax callq 0x6040 jmp 0x6802 leaq 0x50(%rsp), %rdi callq 0x6110 leaq 0x30(%rsp), %rdi callq 0x6110 leaq 0x2f(%rsp), %rdi callq 0x61a0 leaq 0xd8(%rsp), %rdi callq 0x6230 jmp 0x682f movl $0x0, 0x2e4(%rsp) leaq 0xd8(%rsp), %rdi callq 0x6260 jmp 0x68b6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x689d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x6893 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x6110 leaq 0x30(%rsp), %rdi callq 0x6110 leaq 0x2f(%rsp), %rdi callq 0x61a0 leaq 0xd8(%rsp), %rdi callq 0x6260 jmp 0x68c5 movl 0x2e4(%rsp), %eax addq $0x2e8, %rsp # imm = 0x2E8 retq movq 0x88(%rsp), %rdi callq 0x62c0 nopw %cs:(%rax,%rax)
main: sub rsp, 2E8h mov [rsp+2E8h+var_4], 0 mov [rsp+2E8h+var_8], edi mov [rsp+2E8h+var_10], rsi mov edi, [rsp+2E8h+var_8]; int mov rsi, [rsp+2E8h+var_10]; char ** call _Z15parseParametersiPPc; parseParameters(int,char **) test al, 1 jnz short loc_6529 mov [rsp+2E8h+var_4], 0FFFFFFFFh jmp loc_68B6 loc_6529: mov rax, cs:traceFilePath mov [rsp+2E8h+var_2D0], rax lea rdi, [rsp+2E8h+var_251] mov [rsp+2E8h+var_2C8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+2E8h+var_2D0] mov rdx, [rsp+2E8h+var_2C8] lea rdi, [rsp+2E8h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_6560: lea rdx, aCsv; ".csv" lea rdi, [rsp+2E8h+var_230] lea rsi, [rsp+2E8h+var_250] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_657E: lea rdi, [rsp+2E8h+var_210] lea rsi, [rsp+2E8h+var_230] mov edx, 10h call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) jmp short $+2 loc_659A: lea rdi, [rsp+2E8h+var_230] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+2E8h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+2E8h+var_251] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rsi, aCachesizeBlock; "cacheSize,blockSize,associativity,write"... lea rdi, [rsp+2E8h+var_210] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_65D7: mov [rsp+2E8h+var_268], 8000h loc_65E2: cmp [rsp+2E8h+var_268], 2000000h ja loc_679C mov [rsp+2E8h+var_26C], 1 loc_65FB: cmp [rsp+2E8h+var_26C], 1000h ja loc_6785 mov [rsp+2E8h+var_270], 1 loc_6611: cmp [rsp+2E8h+var_270], 20h ; ' ' ja loc_6774 mov eax, [rsp+2E8h+var_268] xor edx, edx div [rsp+2E8h+var_26C] mov [rsp+2E8h+var_274], eax mov eax, [rsp+2E8h+var_274] xor edx, edx div [rsp+2E8h+var_270] cmp edx, 0 jz loc_66CA jmp loc_6765 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_669F mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_6692 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_6692: lea rdi, [rsp+arg_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_669F: lea rdi, [rsp+arg_8F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_68C5 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp loc_68A7 loc_66CA: mov esi, [rsp+2E8h+var_268] mov edx, [rsp+2E8h+var_26C] mov ecx, [rsp+2E8h+var_270] lea rdi, [rsp+2E8h+var_210] mov r9d, 1 mov r8d, r9d call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) jmp short $+2 loc_66F1: mov esi, [rsp+2E8h+var_268] mov edx, [rsp+2E8h+var_26C] mov ecx, [rsp+2E8h+var_270] lea rdi, [rsp+2E8h+var_210] mov r8d, 1 xor r9d, r9d call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) jmp short $+2 loc_6718: mov esi, [rsp+2E8h+var_268] mov edx, [rsp+2E8h+var_26C] mov ecx, [rsp+2E8h+var_270] lea rdi, [rsp+2E8h+var_210] xor r8d, r8d mov r9d, 1 call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) jmp short $+2 loc_673F: mov esi, [rsp+2E8h+var_268] mov edx, [rsp+2E8h+var_26C] mov ecx, [rsp+2E8h+var_270] lea rdi, [rsp+2E8h+var_210] xor r9d, r9d mov r8d, r9d call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) jmp short $+2 loc_6763: jmp short $+2 loc_6765: mov eax, [rsp+2E8h+var_270] shl eax, 1 mov [rsp+2E8h+var_270], eax jmp loc_6611 loc_6774: jmp short $+2 loc_6776: mov eax, [rsp+2E8h+var_26C] shl eax, 1 mov [rsp+2E8h+var_26C], eax jmp loc_65FB loc_6785: jmp short $+2 loc_6787: mov eax, [rsp+2E8h+var_268] shl eax, 1 mov [rsp+2E8h+var_268], eax jmp loc_65E2 loc_679C: mov rax, cs:traceFilePath mov [rsp+2E8h+var_2E0], rax lea rdi, [rsp+2E8h+var_2B9] mov [rsp+2E8h+var_2D8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+2E8h+var_2E0] mov rdx, [rsp+2E8h+var_2D8] lea rdi, [rsp+2E8h+var_2B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_67CD: lea rdx, aCsv; ".csv" lea rdi, [rsp+2E8h+var_298] lea rsi, [rsp+2E8h+var_2B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_67E5: lea rdi, [rsp+2E8h+var_298] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rsi, rax lea rdi, aResultHasBeenW; "Result has been written to %s\n" xor eax, eax call _printf jmp short $+2 loc_6802: lea rdi, [rsp+2E8h+var_298] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+2E8h+var_2B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+2E8h+var_2B9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+2E8h+var_210] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void) jmp short $+2 loc_682F: mov [rsp+2E8h+var_4], 0 lea rdi, [rsp+2E8h+var_210] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() jmp short loc_68B6 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_689D mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_6893 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_6893: lea rdi, [rsp+arg_28] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_689D: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_68A7: lea rdi, [rsp+arg_D0] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() jmp short loc_68C5 loc_68B6: mov eax, [rsp+2E8h+var_4] add rsp, 2E8h retn loc_68C5: mov rdi, [rsp+arg_80] call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { const char *v3; // rax long long v5; // [rsp+8h] [rbp-2E0h] long long v6; // [rsp+18h] [rbp-2D0h] char v7; // [rsp+2Fh] [rbp-2B9h] BYREF _BYTE v8[32]; // [rsp+30h] [rbp-2B8h] BYREF _BYTE v9[36]; // [rsp+50h] [rbp-298h] BYREF int v10; // [rsp+74h] [rbp-274h] unsigned int k; // [rsp+78h] [rbp-270h] unsigned int j; // [rsp+7Ch] [rbp-26Ch] unsigned int i; // [rsp+80h] [rbp-268h] char v14; // [rsp+97h] [rbp-251h] BYREF _BYTE v15[32]; // [rsp+98h] [rbp-250h] BYREF _BYTE v16[32]; // [rsp+B8h] [rbp-230h] BYREF _BYTE v17[512]; // [rsp+D8h] [rbp-210h] BYREF char **v18; // [rsp+2D8h] [rbp-10h] int v19; // [rsp+2E0h] [rbp-8h] int v20; // [rsp+2E4h] [rbp-4h] v20 = 0; v19 = argc; v18 = (char **)argv; if ( (parseParameters(argc, (char **)argv) & 1) == 0 ) return -1; v6 = traceFilePath; std::allocator<char>::allocator(); std::string::basic_string(v15, v6, &v14); std::operator+<char>(v16, v15, ".csv"); std::ofstream::basic_ofstream(v17, v16, 16LL); std::string::~string(v16); std::string::~string(v15); std::allocator<char>::~allocator(&v14); std::operator<<<std::char_traits<char>>( v17, "cacheSize,blockSize,associativity,writeBack,writeAllocate,missRate,totalCycles\n"); for ( i = 0x8000; i <= 0x2000000; i *= 2 ) { for ( j = 1; j <= 0x1000; j *= 2 ) { for ( k = 1; k <= 0x20; k *= 2 ) { v10 = i / j; if ( !(i / j % k) ) { simulateCache(v17, i, j, k, 1LL); simulateCache(v17, i, j, k, 1LL); simulateCache(v17, i, j, k, 0LL); simulateCache(v17, i, j, k, 0LL); } } } } v5 = traceFilePath; std::allocator<char>::allocator(); std::string::basic_string(v8, v5, &v7); std::operator+<char>(v9, v8, ".csv"); v3 = (const char *)std::string::c_str(v9); printf("Result has been written to %s\n", v3); std::string::~string(v9); std::string::~string(v8); std::allocator<char>::~allocator(&v7); std::ofstream::close(v17); v20 = 0; std::ofstream::~ofstream(v17); return v20; }
main: SUB RSP,0x2e8 MOV dword ptr [RSP + 0x2e4],0x0 MOV dword ptr [RSP + 0x2e0],EDI MOV qword ptr [RSP + 0x2d8],RSI MOV EDI,dword ptr [RSP + 0x2e0] MOV RSI,qword ptr [RSP + 0x2d8] CALL 0x001068e0 TEST AL,0x1 JNZ 0x00106529 MOV dword ptr [RSP + 0x2e4],0xffffffff JMP 0x001068b6 LAB_00106529: MOV RAX,qword ptr [0x001101b8] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x97] MOV qword ptr [RSP + 0x20],RDI CALL 0x001062d0 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_00106551: LEA RDI,[RSP + 0x98] CALL 0x00106200 JMP 0x00106560 LAB_00106560: LEA RDX,[0x10c004] LEA RDI,[RSP + 0xb8] LEA RSI,[RSP + 0x98] CALL 0x00107020 JMP 0x0010657e LAB_0010657e: LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0xb8] MOV EDX,0x10 CALL 0x00106310 JMP 0x0010659a LAB_0010659a: LEA RDI,[RSP + 0xb8] CALL 0x00106110 LEA RDI,[RSP + 0x98] CALL 0x00106110 LEA RDI,[RSP + 0x97] CALL 0x001061a0 LAB_001065c1: LEA RSI,[0x10c009] LEA RDI,[RSP + 0xd8] CALL 0x00106170 JMP 0x001065d7 LAB_001065d7: MOV dword ptr [RSP + 0x80],0x8000 LAB_001065e2: CMP dword ptr [RSP + 0x80],0x2000000 JA 0x0010679c MOV dword ptr [RSP + 0x7c],0x1 LAB_001065fb: CMP dword ptr [RSP + 0x7c],0x1000 JA 0x00106785 MOV dword ptr [RSP + 0x78],0x1 LAB_00106611: CMP dword ptr [RSP + 0x78],0x20 JA 0x00106774 MOV EAX,dword ptr [RSP + 0x80] XOR EDX,EDX DIV dword ptr [RSP + 0x7c] MOV dword ptr [RSP + 0x74],EAX MOV EAX,dword ptr [RSP + 0x74] XOR EDX,EDX DIV dword ptr [RSP + 0x78] CMP EDX,0x0 JZ 0x001066ca JMP 0x00106765 LAB_001066ca: MOV ESI,dword ptr [RSP + 0x80] MOV EDX,dword ptr [RSP + 0x7c] MOV ECX,dword ptr [RSP + 0x78] LEA RDI,[RSP + 0xd8] MOV R9D,0x1 MOV R8D,R9D CALL 0x001069c0 JMP 0x001066f1 LAB_001066f1: MOV ESI,dword ptr [RSP + 0x80] MOV EDX,dword ptr [RSP + 0x7c] MOV ECX,dword ptr [RSP + 0x78] LEA RDI,[RSP + 0xd8] MOV R8D,0x1 XOR R9D,R9D CALL 0x001069c0 JMP 0x00106718 LAB_00106718: MOV ESI,dword ptr [RSP + 0x80] MOV EDX,dword ptr [RSP + 0x7c] MOV ECX,dword ptr [RSP + 0x78] LEA RDI,[RSP + 0xd8] XOR R8D,R8D MOV R9D,0x1 CALL 0x001069c0 JMP 0x0010673f LAB_0010673f: MOV ESI,dword ptr [RSP + 0x80] MOV EDX,dword ptr [RSP + 0x7c] MOV ECX,dword ptr [RSP + 0x78] LEA RDI,[RSP + 0xd8] XOR R9D,R9D MOV R8D,R9D CALL 0x001069c0 JMP 0x00106763 LAB_00106763: JMP 0x00106765 LAB_00106765: MOV EAX,dword ptr [RSP + 0x78] SHL EAX,0x1 MOV dword ptr [RSP + 0x78],EAX JMP 0x00106611 LAB_00106774: JMP 0x00106776 LAB_00106776: MOV EAX,dword ptr [RSP + 0x7c] SHL EAX,0x1 MOV dword ptr [RSP + 0x7c],EAX JMP 0x001065fb LAB_00106785: JMP 0x00106787 LAB_00106787: MOV EAX,dword ptr [RSP + 0x80] SHL EAX,0x1 MOV dword ptr [RSP + 0x80],EAX JMP 0x001065e2 LAB_0010679c: MOV RAX,qword ptr [0x001101b8] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x2f] MOV qword ptr [RSP + 0x10],RDI CALL 0x001062d0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001067c1: LEA RDI,[RSP + 0x30] CALL 0x00106200 JMP 0x001067cd LAB_001067cd: LEA RDX,[0x10c004] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x30] CALL 0x00107020 JMP 0x001067e5 LAB_001067e5: LEA RDI,[RSP + 0x50] CALL 0x001060c0 MOV RSI,RAX LAB_001067f2: LEA RDI,[0x10c059] XOR EAX,EAX CALL 0x00106040 JMP 0x00106802 LAB_00106802: LEA RDI,[RSP + 0x50] CALL 0x00106110 LEA RDI,[RSP + 0x30] CALL 0x00106110 LEA RDI,[RSP + 0x2f] CALL 0x001061a0 LAB_00106820: LEA RDI,[RSP + 0xd8] CALL 0x00106230 LAB_0010682d: JMP 0x0010682f LAB_0010682f: MOV dword ptr [RSP + 0x2e4],0x0 LEA RDI,[RSP + 0xd8] CALL 0x00106260 JMP 0x001068b6 LAB_001068b6: MOV EAX,dword ptr [RSP + 0x2e4] ADD RSP,0x2e8 RET
int4 main(int param_1,char **param_2) { char *pcVar1; ulong uVar2; int8 uVar3; allocator local_2b9; string local_2b8 [32]; string local_298 [36]; uint local_274; uint local_270; uint local_26c; uint local_268; allocator local_251; string local_250 [32]; string local_230 [32]; ofstream local_210 [512]; char **local_10; int local_8; int4 local_4; local_4 = 0; local_10 = param_2; local_8 = param_1; uVar2 = parseParameters(param_1,param_2); pcVar1 = traceFilePath; if ((uVar2 & 1) == 0) { local_4 = 0xffffffff; } else { std::allocator<char>::allocator(); /* try { // try from 00106551 to 0010655d has its CatchHandler @ 00106645 */ std::__cxx11::string::string(local_250,pcVar1,&local_251); /* try { // try from 00106560 to 0010657b has its CatchHandler @ 0010665b */ std::operator+(local_230,(char *)local_250); /* try { // try from 0010657e to 00106597 has its CatchHandler @ 00106671 */ std::ofstream::ofstream(local_210,local_230,0x10); std::__cxx11::string::~string(local_230); std::__cxx11::string::~string(local_250); std::allocator<char>::~allocator((allocator<char> *)&local_251); /* try { // try from 001065c1 to 00106760 has its CatchHandler @ 001066b1 */ std::operator<<((ostream *)local_210, "cacheSize,blockSize,associativity,writeBack,writeAllocate,missRate,totalCycles\n" ); for (local_268 = 0x8000; pcVar1 = traceFilePath, local_268 < 0x2000001; local_268 = local_268 << 1) { for (local_26c = 1; local_26c < 0x1001; local_26c = local_26c << 1) { for (local_270 = 1; local_270 < 0x21; local_270 = local_270 << 1) { local_274 = local_268 / local_26c; if (local_274 % local_270 == 0) { simulateCache(local_210,local_268,local_26c,local_270,true,true); simulateCache(local_210,local_268,local_26c,local_270,true,false); simulateCache(local_210,local_268,local_26c,local_270,false,true); simulateCache(local_210,local_268,local_26c,local_270,false,false); } } } } std::allocator<char>::allocator(); /* try { // try from 001067c1 to 001067ca has its CatchHandler @ 00106849 */ std::__cxx11::string::string(local_2b8,pcVar1,&local_2b9); /* try { // try from 001067cd to 001067e2 has its CatchHandler @ 0010685f */ std::operator+(local_298,(char *)local_2b8); uVar3 = std::__cxx11::string::c_str(); /* try { // try from 001067f2 to 001067ff has its CatchHandler @ 00106875 */ printf("Result has been written to %s\n",uVar3); std::__cxx11::string::~string(local_298); std::__cxx11::string::~string(local_2b8); std::allocator<char>::~allocator((allocator<char> *)&local_2b9); /* try { // try from 00106820 to 0010682c has its CatchHandler @ 001066b1 */ std::ofstream::close(); local_4 = 0; std::ofstream::~ofstream(local_210); } return local_4; }
25,305
main
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCache.cpp
int main(int argc, char **argv) { if (!parseParameters(argc, argv)) { return -1; } // Open CSV file and write header std::ofstream csvFile(std::string(traceFilePath) + ".csv"); csvFile << "cacheSize,blockSize,associativity,writeBack,writeAllocate," "missRate,totalCycles\n"; // Cache Size: 32 Kb to 32 Mb for (uint32_t cacheSize = 32 * 1024; cacheSize <= 32 * 1024 * 1024; cacheSize *= 2) { // Block Size: 1 byte to 4096 byte // The maximum block size is imposed by VM page size for (uint32_t blockSize = 1; blockSize <= 4096; blockSize *= 2) { for (uint32_t associativity = 1; associativity <= 32; associativity *= 2) { uint32_t blockNum = cacheSize / blockSize; if (blockNum % associativity != 0) continue; simulateCache(csvFile, cacheSize, blockSize, associativity, true, true); simulateCache(csvFile, cacheSize, blockSize, associativity, true, false); simulateCache(csvFile, cacheSize, blockSize, associativity, false, true); simulateCache(csvFile, cacheSize, blockSize, associativity, false, false); } } } printf("Result has been written to %s\n", (std::string(traceFilePath) + ".csv").c_str()); csvFile.close(); return 0; }
O1
cpp
main: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x248, %rsp # imm = 0x248 callq 0x38f3 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl je 0x3856 movq 0x5b78(%rip), %rsi # 0x9180 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x30b0 leaq 0x29e6(%rip), %rsi # 0x6004 leaq 0x28(%rsp), %rdi callq 0x3280 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x364f movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x3657 movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx leaq 0x8(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x48(%rsp), %rdi movl $0x10, %edx callq 0x3290 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x3691 callq 0x3150 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x36a4 callq 0x3150 leaq 0x295e(%rip), %rsi # 0x6009 leaq 0x48(%rsp), %rdi movl $0x4f, %edx callq 0x3190 movl $0x8000, %ebx # imm = 0x8000 leaq 0x48(%rsp), %r14 movl $0x1, %r15d movl %ebx, %eax xorl %edx, %edx divl %r15d movl %eax, %ebp movl $0x1, %r12d leal -0x1(%r12), %eax testl %eax, %ebp jne 0x3746 movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx movl $0x1, %r8d movl $0x1, %r9d callq 0x397d movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx movl $0x1, %r8d xorl %r9d, %r9d callq 0x397d movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx xorl %r8d, %r8d movl $0x1, %r9d callq 0x397d movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x397d leal (%r12,%r12), %eax cmpl $0x11, %r12d movl %eax, %r12d jb 0x36d9 leal (%r15,%r15), %eax cmpl $0x801, %r15d # imm = 0x801 movl %eax, %r15d jb 0x36ca leal (%rbx,%rbx), %eax cmpl $0x1000001, %ebx # imm = 0x1000001 movl %eax, %ebx jb 0x36c4 movq 0x5a01(%rip), %rsi # 0x9180 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x30b0 leaq 0x286f(%rip), %rsi # 0x6004 leaq 0x28(%rsp), %rdi callq 0x3280 movq %r13, 0x8(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x37c2 movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x37ca movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x8(%rsp), %rsi leaq 0x286b(%rip), %rdi # 0x6059 xorl %eax, %eax callq 0x3050 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x3804 callq 0x3150 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3818 callq 0x3150 leaq 0x48(%rsp), %rdi callq 0x31e0 movq 0x57a7(%rip), %rax # 0x8fd0 movq (%rax), %rcx movq 0x18(%rax), %rax leaq 0x50(%rsp), %rdi movq %rcx, -0x8(%rdi) movq -0x18(%rcx), %rcx movq %rax, 0x48(%rsp,%rcx) callq 0x3130 leaq 0x140(%rsp), %rdi callq 0x3090 xorl %eax, %eax addq $0x248, %rsp # imm = 0x248 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x38b9 callq 0x3150 jmp 0x38b9 jmp 0x38b6 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x389a callq 0x3150 jmp 0x389a movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x38eb callq 0x3150 jmp 0x38eb movq %rax, %rbx jmp 0x38eb jmp 0x38b6 movq %rax, %rbx movq 0x5710(%rip), %rax # 0x8fd0 movq (%rax), %rcx movq 0x18(%rax), %rax leaq 0x50(%rsp), %rdi movq %rcx, -0x8(%rdi) movq -0x18(%rcx), %rcx movq %rax, 0x48(%rsp,%rcx) callq 0x3130 leaq 0x140(%rsp), %rdi callq 0x3090 movq %rbx, %rdi callq 0x3260
main: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 248h call _Z15parseParametersiPPc; parseParameters(int,char **) mov ecx, eax mov eax, 0FFFFFFFFh test cl, cl jz loc_3856 mov rsi, cs:traceFilePath lea rdi, [rsp+278h+var_250] lea rdx, [rsp+278h+var_271] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea rsi, aCsv; ".csv" lea rdi, [rsp+278h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+278h+var_260] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_364F mov [rsp+278h+var_270], rdx mov rdx, [rcx] mov [rsp+278h+var_260], rdx jmp short loc_3657 loc_364F: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_3657: mov rdx, [rax+8] lea rsi, [rsp+278h+var_270] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+278h+var_230] mov edx, 10h call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) mov rdi, [rsp+278h+var_270]; void * cmp rdi, r13 jz short loc_3691 call __ZdlPv; operator delete(void *) loc_3691: lea rax, [rsp+278h+var_240] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_36A4 call __ZdlPv; operator delete(void *) loc_36A4: lea rsi, aCachesizeBlock_0; "cacheSize,blockSize,associativity,write"... lea rdi, [rsp+278h+var_230] mov edx, 4Fh ; 'O' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov ebx, 8000h lea r14, [rsp+278h+var_230] loc_36C4: mov r15d, 1 loc_36CA: mov eax, ebx xor edx, edx div r15d mov ebp, eax mov r12d, 1 loc_36D9: lea eax, [r12-1] test ebp, eax jnz short loc_3746 mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d mov r8d, 1 mov r9d, 1 call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d mov r8d, 1 xor r9d, r9d call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d xor r8d, r8d mov r9d, 1 call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d xor r8d, r8d xor r9d, r9d call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) loc_3746: lea eax, [r12+r12] cmp r12d, 11h mov r12d, eax jb short loc_36D9 lea eax, [r15+r15] cmp r15d, 801h mov r15d, eax jb loc_36CA lea eax, [rbx+rbx] cmp ebx, 1000001h mov ebx, eax jb loc_36C4 mov rsi, cs:traceFilePath lea rdi, [rsp+278h+var_250] lea rdx, [rsp+278h+var_271] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea rsi, aCsv; ".csv" lea rdi, [rsp+278h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+278h+var_270], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_37C2 mov [rsp+278h+var_270], rdx mov rdx, [rcx] mov [rsp+278h+var_260], rdx jmp short loc_37CA loc_37C2: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_37CA: mov rdx, [rax+8] mov [rsp+278h+var_268], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [rsp+278h+var_270] lea rdi, aResultHasBeenW; "Result has been written to %s\n" xor eax, eax call _printf mov rdi, [rsp+278h+var_270]; void * cmp rdi, r13 jz short loc_3804 call __ZdlPv; operator delete(void *) loc_3804: mov rdi, [rsp+278h+var_250]; void * lea rax, [rsp+278h+var_240] cmp rdi, rax jz short loc_3818 call __ZdlPv; operator delete(void *) loc_3818: lea rdi, [rsp+278h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void) mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr mov rcx, [rax] mov rax, [rax+18h] lea rdi, [rsp+278h+var_228] mov [rdi-8], rcx mov rcx, [rcx-18h] mov [rsp+rcx+278h+var_230], rax call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf() lea rdi, [rsp+278h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() xor eax, eax loc_3856: add rsp, 248h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_38B9 call __ZdlPv; operator delete(void *) jmp short loc_38B9 jmp short loc_38B6 mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_389A call __ZdlPv; operator delete(void *) jmp short loc_389A mov rbx, rax loc_389A: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_38EB call __ZdlPv; operator delete(void *) jmp short loc_38EB mov rbx, rax jmp short loc_38EB jmp short $+2 loc_38B6: mov rbx, rax loc_38B9: mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr mov rcx, [rax] mov rax, [rax+18h] lea rdi, [rsp+arg_48] mov [rdi-8], rcx mov rcx, [rcx-18h] mov [rsp+rcx+arg_40], rax call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf() lea rdi, [rsp+arg_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_38EB: mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { char v3; // cl int result; // eax long long v5; // rax __int128 *v6; // rcx unsigned int v7; // ebx unsigned int v8; // r15d unsigned int v9; // r12d bool v10; // cf long long v11; // rax __int128 *v12; // rcx long long v13; // rax int v14; // [rsp+0h] [rbp-278h] int v15; // [rsp+0h] [rbp-278h] int v16; // [rsp+0h] [rbp-278h] int v17; // [rsp+0h] [rbp-278h] char v18; // [rsp+7h] [rbp-271h] BYREF void *v19; // [rsp+8h] [rbp-270h] BYREF long long v20; // [rsp+10h] [rbp-268h] __int128 v21; // [rsp+18h] [rbp-260h] BYREF void *v22; // [rsp+28h] [rbp-250h] BYREF int v23; // [rsp+30h] [rbp-248h] int v24; // [rsp+38h] [rbp-240h] BYREF int v25; // [rsp+40h] [rbp-238h] long long v26; // [rsp+48h] [rbp-230h] BYREF int v27; // [rsp+50h] [rbp-228h] char v28; // [rsp+58h] [rbp-220h] _BYTE v29[312]; // [rsp+140h] [rbp-138h] BYREF v3 = parseParameters(argc, (char **)argv); result = -1; if ( v3 ) { std::string::basic_string(&v22, traceFilePath, &v18); v5 = std::string::append(&v22, ".csv"); v19 = &v21; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v21 = *v6; } else { v19 = *(void **)v5; *(_QWORD *)&v21 = *(_QWORD *)v6; } v20 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; std::ofstream::basic_ofstream(&v26, &v19, 16LL); if ( v19 != &v21 ) operator delete(v19); if ( v22 != &v24 ) operator delete(v22); std::__ostream_insert<char,std::char_traits<char>>( &v26, "cacheSize,blockSize,associativity,writeBack,writeAllocate,missRate,totalCycles\n", 79LL); v7 = 0x8000; do { v8 = 1; do { v9 = 1; do { if ( ((v9 - 1) & (v7 / v8)) == 0 ) { simulateCache( (unsigned int)&v26, v7, v8, v9, 1, 1, v14, (_DWORD)v19, v20, v21, DWORD2(v21), (_DWORD)v22, v23, v24, v25, v26, v27, v28); simulateCache( (unsigned int)&v26, v7, v8, v9, 1, 0, v15, (_DWORD)v19, v20, v21, DWORD2(v21), (_DWORD)v22, v23, v24, v25, v26, v27, v28); simulateCache( (unsigned int)&v26, v7, v8, v9, 0, 1, v16, (_DWORD)v19, v20, v21, DWORD2(v21), (_DWORD)v22, v23, v24, v25, v26, v27, v28); simulateCache( (unsigned int)&v26, v7, v8, v9, 0, 0, v17, (_DWORD)v19, v20, v21, DWORD2(v21), (_DWORD)v22, v23, v24, v25, v26, v27, v28); } v10 = v9 < 0x11; v9 *= 2; } while ( v10 ); v10 = v8 < 0x801; v8 *= 2; } while ( v10 ); v10 = v7 < 0x1000001; v7 *= 2; } while ( v10 ); std::string::basic_string(&v22, traceFilePath, &v18); v11 = std::string::append(&v22, ".csv"); v19 = &v21; v12 = (__int128 *)(v11 + 16); if ( *(_QWORD *)v11 == v11 + 16 ) { v21 = *v12; } else { v19 = *(void **)v11; *(_QWORD *)&v21 = *(_QWORD *)v12; } v20 = *(_QWORD *)(v11 + 8); *(_QWORD *)v11 = v12; *(_QWORD *)(v11 + 8) = 0LL; *(_BYTE *)(v11 + 16) = 0; printf("Result has been written to %s\n", (const char *)v19); if ( v19 != &v21 ) operator delete(v19); if ( v22 != &v24 ) operator delete(v22); std::ofstream::close(&v26); v13 = `VTT for'std::ofstream[3]; v26 = `VTT for'std::ofstream[0]; *(long long *)((char *)&v26 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL)) = v13; std::filebuf::~filebuf(); std::ios_base::~ios_base((std::ios_base *)v29); return 0; } return result; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x248 CALL 0x001038f3 MOV ECX,EAX MOV EAX,0xffffffff TEST CL,CL JZ 0x00103856 MOV RSI,qword ptr [0x00109180] LAB_00103608: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x001030b0 LAB_00103617: LEA RSI,[0x106004] LEA RDI,[RSP + 0x28] CALL 0x00103280 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0010364f MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00103657 LAB_0010364f: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_00103657: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_00103673: LEA RDI,[RSP + 0x48] MOV EDX,0x10 CALL 0x00103290 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00103691 CALL 0x00103150 LAB_00103691: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001036a4 CALL 0x00103150 LAB_001036a4: LEA RSI,[0x106009] LEA RDI,[RSP + 0x48] MOV EDX,0x4f CALL 0x00103190 MOV EBX,0x8000 LEA R14,[RSP + 0x48] LAB_001036c4: MOV R15D,0x1 LAB_001036ca: MOV EAX,EBX XOR EDX,EDX DIV R15D MOV EBP,EAX MOV R12D,0x1 LAB_001036d9: LEA EAX,[R12 + -0x1] TEST EBP,EAX JNZ 0x00103746 LAB_001036e2: MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D MOV R8D,0x1 MOV R9D,0x1 CALL 0x0010397d MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D MOV R8D,0x1 XOR R9D,R9D CALL 0x0010397d MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D XOR R8D,R8D MOV R9D,0x1 CALL 0x0010397d MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D XOR R8D,R8D XOR R9D,R9D CALL 0x0010397d LAB_00103746: LEA EAX,[R12 + R12*0x1] CMP R12D,0x11 MOV R12D,EAX JC 0x001036d9 LEA EAX,[R15 + R15*0x1] CMP R15D,0x801 MOV R15D,EAX JC 0x001036ca LEA EAX,[RBX + RBX*0x1] CMP EBX,0x1000001 MOV EBX,EAX JC 0x001036c4 MOV RSI,qword ptr [0x00109180] LAB_0010377f: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x001030b0 LAB_0010378e: LEA RSI,[0x106004] LEA RDI,[RSP + 0x28] CALL 0x00103280 MOV qword ptr [RSP + 0x8],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001037c2 MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x001037ca LAB_001037c2: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_001037ca: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RSI,qword ptr [RSP + 0x8] LEA RDI,[0x106059] XOR EAX,EAX CALL 0x00103050 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00103804 CALL 0x00103150 LAB_00103804: MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x00103818 CALL 0x00103150 LAB_00103818: LEA RDI,[RSP + 0x48] CALL 0x001031e0 LAB_00103822: MOV RAX,qword ptr [0x00108fd0] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] LEA RDI,[RSP + 0x50] MOV qword ptr [RDI + -0x8],RCX MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RSP + RCX*0x1 + 0x48],RAX CALL 0x00103130 LEA RDI,[RSP + 0x140] CALL 0x00103090 XOR EAX,EAX LAB_00103856: ADD RSP,0x248 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 main(int param_1,char **param_2) { char cVar1; int8 uVar2; long *plVar3; long *plVar4; uint uVar5; uint uVar6; uint uVar7; ulong uVar8; bool bVar9; allocator local_271; long *local_270; long local_268; long local_260; int4 uStack_258; int4 uStack_254; int1 *local_250 [2]; int1 local_240 [16]; long local_230; filebuf local_228 [240]; ios_base local_138 [264]; cVar1 = parseParameters(param_1,param_2); uVar2 = 0xffffffff; if (cVar1 != '\0') { /* try { // try from 00103608 to 00103616 has its CatchHandler @ 001038af */ std::__cxx11::string::string((string *)local_250,traceFilePath,&local_271); /* try { // try from 00103617 to 00103627 has its CatchHandler @ 00103897 */ plVar3 = (long *)std::__cxx11::string::append((char *)local_250); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_260 = *plVar4; uStack_258 = (int4)plVar3[3]; uStack_254 = *(int4 *)((long)plVar3 + 0x1c); local_270 = &local_260; } else { local_260 = *plVar4; local_270 = (long *)*plVar3; } local_268 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 00103673 to 00103681 has its CatchHandler @ 00103883 */ std::ofstream::ofstream((ofstream *)&local_230,&local_270,0x10); if (local_270 != &local_260) { operator_delete(local_270); } if (local_250[0] != local_240) { operator_delete(local_250[0]); } /* try { // try from 001036a4 to 001036b9 has its CatchHandler @ 001038b4 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)&local_230, "cacheSize,blockSize,associativity,writeBack,writeAllocate,missRate,totalCycles\n", 0x4f); uVar5 = 0x8000; do { uVar8 = 1; do { uVar6 = 1; do { uVar7 = (uint)uVar8; if (((uint)(uVar5 / uVar8) & uVar6 - 1) == 0) { /* try { // try from 001036e2 to 00103745 has its CatchHandler @ 001038b6 */ simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6,true,true); simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6,true,false); simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6,false,true); simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6,false,false); } bVar9 = uVar6 < 0x11; uVar6 = uVar6 * 2; } while (bVar9); uVar8 = (ulong)(uVar7 * 2); } while (uVar7 < 0x801); bVar9 = uVar5 < 0x1000001; uVar5 = uVar5 * 2; } while (bVar9); /* try { // try from 0010377f to 0010378d has its CatchHandler @ 00103881 */ std::__cxx11::string::string((string *)local_250,traceFilePath,&local_271); /* try { // try from 0010378e to 0010379e has its CatchHandler @ 00103868 */ plVar3 = (long *)std::__cxx11::string::append((char *)local_250); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_260 = *plVar4; uStack_258 = (int4)plVar3[3]; uStack_254 = *(int4 *)((long)plVar3 + 0x1c); local_270 = &local_260; } else { local_260 = *plVar4; local_270 = (long *)*plVar3; } local_268 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; printf("Result has been written to %s\n",local_270); if (local_270 != &local_260) { operator_delete(local_270); } if (local_250[0] != local_240) { operator_delete(local_250[0]); } /* try { // try from 00103818 to 00103821 has its CatchHandler @ 001038b4 */ std::ofstream::close(); local_230 = *(long *)PTR_VTT_00108fd0; *(int8 *)(local_228 + *(long *)(local_230 + -0x18) + -8) = *(int8 *)(PTR_VTT_00108fd0 + 0x18); std::filebuf::~filebuf(local_228); std::ios_base::~ios_base(local_138); uVar2 = 0; } return uVar2; }
25,306
main
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCache.cpp
int main(int argc, char **argv) { if (!parseParameters(argc, argv)) { return -1; } // Open CSV file and write header std::ofstream csvFile(std::string(traceFilePath) + ".csv"); csvFile << "cacheSize,blockSize,associativity,writeBack,writeAllocate," "missRate,totalCycles\n"; // Cache Size: 32 Kb to 32 Mb for (uint32_t cacheSize = 32 * 1024; cacheSize <= 32 * 1024 * 1024; cacheSize *= 2) { // Block Size: 1 byte to 4096 byte // The maximum block size is imposed by VM page size for (uint32_t blockSize = 1; blockSize <= 4096; blockSize *= 2) { for (uint32_t associativity = 1; associativity <= 32; associativity *= 2) { uint32_t blockNum = cacheSize / blockSize; if (blockNum % associativity != 0) continue; simulateCache(csvFile, cacheSize, blockSize, associativity, true, true); simulateCache(csvFile, cacheSize, blockSize, associativity, true, false); simulateCache(csvFile, cacheSize, blockSize, associativity, false, true); simulateCache(csvFile, cacheSize, blockSize, associativity, false, false); } } } printf("Result has been written to %s\n", (std::string(traceFilePath) + ".csv").c_str()); csvFile.close(); return 0; }
O3
cpp
main: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x248, %rsp # imm = 0x248 callq 0x38f1 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl je 0x3854 movq 0x5b78(%rip), %rsi # 0x9180 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x30b0 leaq 0x29e6(%rip), %rsi # 0x6004 leaq 0x28(%rsp), %rdi callq 0x3280 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x364f movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x3657 movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx leaq 0x8(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x48(%rsp), %rdi movl $0x10, %edx callq 0x3290 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x3691 callq 0x3150 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x36a4 callq 0x3150 leaq 0x295e(%rip), %rsi # 0x6009 leaq 0x48(%rsp), %rdi movl $0x4f, %edx callq 0x3190 movl $0x8000, %ebx # imm = 0x8000 leaq 0x48(%rsp), %r14 movl $0x1, %r15d movl %ebx, %eax xorl %edx, %edx divl %r15d movl %eax, %ebp movl $0x1, %r12d leal -0x1(%r12), %eax testl %eax, %ebp jne 0x3746 movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx movl $0x1, %r8d movl $0x1, %r9d callq 0x394e movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx movl $0x1, %r8d xorl %r9d, %r9d callq 0x394e movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx xorl %r8d, %r8d movl $0x1, %r9d callq 0x394e movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x394e leal (%r12,%r12), %eax cmpl $0x11, %r12d movl %eax, %r12d jb 0x36d9 leal (%r15,%r15), %eax cmpl $0x801, %r15d # imm = 0x801 movl %eax, %r15d jb 0x36ca leal (%rbx,%rbx), %eax cmpl $0x1000001, %ebx # imm = 0x1000001 movl %eax, %ebx jb 0x36c4 movq 0x5a01(%rip), %rsi # 0x9180 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x30b0 leaq 0x286f(%rip), %rsi # 0x6004 leaq 0x28(%rsp), %rdi callq 0x3280 movq %r13, 0x8(%rsp) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0x37c2 movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x37cd movups (%rcx), %xmm0 movups %xmm0, (%r13) movq %r13, %rsi movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x286d(%rip), %rdi # 0x6059 xorl %eax, %eax callq 0x3050 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x3802 callq 0x3150 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3816 callq 0x3150 leaq 0x48(%rsp), %rdi callq 0x31e0 movq 0x57a9(%rip), %rax # 0x8fd0 movq (%rax), %rcx movq 0x18(%rax), %rax leaq 0x50(%rsp), %rdi movq %rcx, -0x8(%rdi) movq -0x18(%rcx), %rcx movq %rax, 0x48(%rsp,%rcx) callq 0x3130 leaq 0x140(%rsp), %rdi callq 0x3090 xorl %eax, %eax addq $0x248, %rsp # imm = 0x248 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x38b7 callq 0x3150 jmp 0x38b7 jmp 0x38b4 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x3898 callq 0x3150 jmp 0x3898 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x38e9 callq 0x3150 jmp 0x38e9 movq %rax, %rbx jmp 0x38e9 jmp 0x38b4 movq %rax, %rbx movq 0x5712(%rip), %rax # 0x8fd0 movq (%rax), %rcx movq 0x18(%rax), %rax leaq 0x50(%rsp), %rdi movq %rcx, -0x8(%rdi) movq -0x18(%rcx), %rcx movq %rax, 0x48(%rsp,%rcx) callq 0x3130 leaq 0x140(%rsp), %rdi callq 0x3090 movq %rbx, %rdi callq 0x3260
main: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 248h call _Z15parseParametersiPPc; parseParameters(int,char **) mov ecx, eax mov eax, 0FFFFFFFFh test cl, cl jz loc_3854 mov rsi, cs:traceFilePath lea rdi, [rsp+278h+var_250] lea rdx, [rsp+278h+var_271] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea rsi, aCsv; ".csv" lea rdi, [rsp+278h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+278h+var_260] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_364F mov [rsp+278h+var_270], rdx mov rdx, [rcx] mov [rsp+278h+var_260], rdx jmp short loc_3657 loc_364F: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_3657: mov rdx, [rax+8] lea rsi, [rsp+278h+var_270] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+278h+var_230] mov edx, 10h call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) mov rdi, [rsp+278h+var_270]; void * cmp rdi, r13 jz short loc_3691 call __ZdlPv; operator delete(void *) loc_3691: lea rax, [rsp+278h+var_240] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_36A4 call __ZdlPv; operator delete(void *) loc_36A4: lea rsi, aCachesizeBlock_0; "cacheSize,blockSize,associativity,write"... lea rdi, [rsp+278h+var_230] mov edx, 4Fh ; 'O' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov ebx, 8000h lea r14, [rsp+278h+var_230] loc_36C4: mov r15d, 1 loc_36CA: mov eax, ebx xor edx, edx div r15d mov ebp, eax mov r12d, 1 loc_36D9: lea eax, [r12-1] test ebp, eax jnz short loc_3746 mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d mov r8d, 1 mov r9d, 1 call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d mov r8d, 1 xor r9d, r9d call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d xor r8d, r8d mov r9d, 1 call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d xor r8d, r8d xor r9d, r9d call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb; simulateCache(std::ofstream &,uint,uint,uint,bool,bool) loc_3746: lea eax, [r12+r12] cmp r12d, 11h mov r12d, eax jb short loc_36D9 lea eax, [r15+r15] cmp r15d, 801h mov r15d, eax jb loc_36CA lea eax, [rbx+rbx] cmp ebx, 1000001h mov ebx, eax jb loc_36C4 mov rsi, cs:traceFilePath lea rdi, [rsp+278h+var_250] lea rdx, [rsp+278h+var_271] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea rsi, aCsv; ".csv" lea rdi, [rsp+278h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+278h+var_270], r13 mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_37C2 mov [rsp+278h+var_270], rsi mov rdx, [rcx] mov [rsp+278h+var_260], rdx jmp short loc_37CD loc_37C2: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 mov rsi, r13 loc_37CD: mov rdx, [rax+8] mov [rsp+278h+var_268], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, aResultHasBeenW; "Result has been written to %s\n" xor eax, eax call _printf mov rdi, [rsp+278h+var_270]; void * cmp rdi, r13 jz short loc_3802 call __ZdlPv; operator delete(void *) loc_3802: mov rdi, [rsp+278h+var_250]; void * lea rax, [rsp+278h+var_240] cmp rdi, rax jz short loc_3816 call __ZdlPv; operator delete(void *) loc_3816: lea rdi, [rsp+278h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void) mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr mov rcx, [rax] mov rax, [rax+18h] lea rdi, [rsp+278h+var_228] mov [rdi-8], rcx mov rcx, [rcx-18h] mov [rsp+rcx+278h+var_230], rax call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf() lea rdi, [rsp+278h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() xor eax, eax loc_3854: add rsp, 248h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_38B7 call __ZdlPv; operator delete(void *) jmp short loc_38B7 jmp short loc_38B4 mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_3898 call __ZdlPv; operator delete(void *) jmp short loc_3898 mov rbx, rax loc_3898: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_38E9 call __ZdlPv; operator delete(void *) jmp short loc_38E9 mov rbx, rax jmp short loc_38E9 jmp short $+2 loc_38B4: mov rbx, rax loc_38B7: mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr mov rcx, [rax] mov rax, [rax+18h] lea rdi, [rsp+arg_48] mov [rdi-8], rcx mov rcx, [rcx-18h] mov [rsp+rcx+arg_40], rax call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf() lea rdi, [rsp+arg_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_38E9: mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { char v3; // cl int result; // eax long long v5; // rax __int128 *v6; // rcx unsigned int v7; // ebx unsigned int v8; // r15d unsigned int v9; // r12d bool v10; // cf long long v11; // rax const char *v12; // rsi __int128 *v13; // rcx long long v14; // rax int v15; // [rsp+0h] [rbp-278h] int v16; // [rsp+0h] [rbp-278h] int v17; // [rsp+0h] [rbp-278h] int v18; // [rsp+0h] [rbp-278h] char v19; // [rsp+7h] [rbp-271h] BYREF void *v20; // [rsp+8h] [rbp-270h] BYREF long long v21; // [rsp+10h] [rbp-268h] __int128 v22; // [rsp+18h] [rbp-260h] BYREF void *v23; // [rsp+28h] [rbp-250h] BYREF int v24; // [rsp+30h] [rbp-248h] int v25; // [rsp+38h] [rbp-240h] BYREF int v26; // [rsp+40h] [rbp-238h] long long v27; // [rsp+48h] [rbp-230h] BYREF int v28; // [rsp+50h] [rbp-228h] char v29; // [rsp+58h] [rbp-220h] _BYTE v30[312]; // [rsp+140h] [rbp-138h] BYREF v3 = parseParameters(argc, (char **)argv); result = -1; if ( v3 ) { std::string::basic_string(&v23, traceFilePath, &v19); v5 = std::string::append(&v23, ".csv"); v20 = &v22; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v22 = *v6; } else { v20 = *(void **)v5; *(_QWORD *)&v22 = *(_QWORD *)v6; } v21 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; std::ofstream::basic_ofstream(&v27, &v20, 16LL); if ( v20 != &v22 ) operator delete(v20); if ( v23 != &v25 ) operator delete(v23); std::__ostream_insert<char,std::char_traits<char>>( &v27, "cacheSize,blockSize,associativity,writeBack,writeAllocate,missRate,totalCycles\n", 79LL); v7 = 0x8000; do { v8 = 1; do { v9 = 1; do { if ( ((v9 - 1) & (v7 / v8)) == 0 ) { simulateCache( (unsigned int)&v27, v7, v8, v9, 1, 1, v15, (_DWORD)v20, v21, v22, DWORD2(v22), (_DWORD)v23, v24, v25, v26, v27, v28, v29); simulateCache( (unsigned int)&v27, v7, v8, v9, 1, 0, v16, (_DWORD)v20, v21, v22, DWORD2(v22), (_DWORD)v23, v24, v25, v26, v27, v28, v29); simulateCache( (unsigned int)&v27, v7, v8, v9, 0, 1, v17, (_DWORD)v20, v21, v22, DWORD2(v22), (_DWORD)v23, v24, v25, v26, v27, v28, v29); simulateCache( (unsigned int)&v27, v7, v8, v9, 0, 0, v18, (_DWORD)v20, v21, v22, DWORD2(v22), (_DWORD)v23, v24, v25, v26, v27, v28, v29); } v10 = v9 < 0x11; v9 *= 2; } while ( v10 ); v10 = v8 < 0x801; v8 *= 2; } while ( v10 ); v10 = v7 < 0x1000001; v7 *= 2; } while ( v10 ); std::string::basic_string(&v23, traceFilePath, &v19); v11 = std::string::append(&v23, ".csv"); v20 = &v22; v12 = *(const char **)v11; v13 = (__int128 *)(v11 + 16); if ( *(_QWORD *)v11 == v11 + 16 ) { v22 = *v13; v12 = (const char *)&v22; } else { v20 = *(void **)v11; *(_QWORD *)&v22 = *(_QWORD *)v13; } v21 = *(_QWORD *)(v11 + 8); *(_QWORD *)v11 = v13; *(_QWORD *)(v11 + 8) = 0LL; *(_BYTE *)(v11 + 16) = 0; printf("Result has been written to %s\n", v12); if ( v20 != &v22 ) operator delete(v20); if ( v23 != &v25 ) operator delete(v23); std::ofstream::close(&v27); v14 = `VTT for'std::ofstream[3]; v27 = `VTT for'std::ofstream[0]; *(long long *)((char *)&v27 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL)) = v14; std::filebuf::~filebuf(); std::ios_base::~ios_base((std::ios_base *)v30); return 0; } return result; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x248 CALL 0x001038f1 MOV ECX,EAX MOV EAX,0xffffffff TEST CL,CL JZ 0x00103854 MOV RSI,qword ptr [0x00109180] LAB_00103608: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x001030b0 LAB_00103617: LEA RSI,[0x106004] LEA RDI,[RSP + 0x28] CALL 0x00103280 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0010364f MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00103657 LAB_0010364f: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_00103657: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_00103673: LEA RDI,[RSP + 0x48] MOV EDX,0x10 CALL 0x00103290 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00103691 CALL 0x00103150 LAB_00103691: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001036a4 CALL 0x00103150 LAB_001036a4: LEA RSI,[0x106009] LEA RDI,[RSP + 0x48] MOV EDX,0x4f CALL 0x00103190 MOV EBX,0x8000 LEA R14,[RSP + 0x48] LAB_001036c4: MOV R15D,0x1 LAB_001036ca: MOV EAX,EBX XOR EDX,EDX DIV R15D MOV EBP,EAX MOV R12D,0x1 LAB_001036d9: LEA EAX,[R12 + -0x1] TEST EBP,EAX JNZ 0x00103746 LAB_001036e2: MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D MOV R8D,0x1 MOV R9D,0x1 CALL 0x0010394e MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D MOV R8D,0x1 XOR R9D,R9D CALL 0x0010394e MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D XOR R8D,R8D MOV R9D,0x1 CALL 0x0010394e MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D XOR R8D,R8D XOR R9D,R9D CALL 0x0010394e LAB_00103746: LEA EAX,[R12 + R12*0x1] CMP R12D,0x11 MOV R12D,EAX JC 0x001036d9 LEA EAX,[R15 + R15*0x1] CMP R15D,0x801 MOV R15D,EAX JC 0x001036ca LEA EAX,[RBX + RBX*0x1] CMP EBX,0x1000001 MOV EBX,EAX JC 0x001036c4 MOV RSI,qword ptr [0x00109180] LAB_0010377f: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x001030b0 LAB_0010378e: LEA RSI,[0x106004] LEA RDI,[RSP + 0x28] CALL 0x00103280 MOV qword ptr [RSP + 0x8],R13 MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x001037c2 MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x001037cd LAB_001037c2: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 MOV RSI,R13 LAB_001037cd: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RDI,[0x106059] XOR EAX,EAX CALL 0x00103050 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00103802 CALL 0x00103150 LAB_00103802: MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x00103816 CALL 0x00103150 LAB_00103816: LEA RDI,[RSP + 0x48] CALL 0x001031e0 LAB_00103820: MOV RAX,qword ptr [0x00108fd0] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] LEA RDI,[RSP + 0x50] MOV qword ptr [RDI + -0x8],RCX MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RSP + RCX*0x1 + 0x48],RAX CALL 0x00103130 LEA RDI,[RSP + 0x140] CALL 0x00103090 XOR EAX,EAX LAB_00103854: ADD RSP,0x248 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 main(int param_1,char **param_2) { char cVar1; int8 uVar2; long *plVar3; long *plVar4; uint uVar5; uint uVar6; uint uVar7; ulong uVar8; bool bVar9; allocator local_271; long *local_270; long local_268; long local_260; int4 uStack_258; int4 uStack_254; int1 *local_250 [2]; int1 local_240 [16]; long local_230; filebuf local_228 [240]; ios_base local_138 [264]; cVar1 = parseParameters(param_1,param_2); uVar2 = 0xffffffff; if (cVar1 != '\0') { /* try { // try from 00103608 to 00103616 has its CatchHandler @ 001038ad */ std::__cxx11::string::string((string *)local_250,traceFilePath,&local_271); /* try { // try from 00103617 to 00103627 has its CatchHandler @ 00103895 */ plVar3 = (long *)std::__cxx11::string::append((char *)local_250); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_260 = *plVar4; uStack_258 = (int4)plVar3[3]; uStack_254 = *(int4 *)((long)plVar3 + 0x1c); local_270 = &local_260; } else { local_260 = *plVar4; local_270 = (long *)*plVar3; } local_268 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 00103673 to 00103681 has its CatchHandler @ 00103881 */ std::ofstream::ofstream((ofstream *)&local_230,&local_270,0x10); if (local_270 != &local_260) { operator_delete(local_270); } if (local_250[0] != local_240) { operator_delete(local_250[0]); } /* try { // try from 001036a4 to 001036b9 has its CatchHandler @ 001038b2 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)&local_230, "cacheSize,blockSize,associativity,writeBack,writeAllocate,missRate,totalCycles\n", 0x4f); uVar5 = 0x8000; do { uVar8 = 1; do { uVar6 = 1; do { uVar7 = (uint)uVar8; if (((uint)(uVar5 / uVar8) & uVar6 - 1) == 0) { /* try { // try from 001036e2 to 00103745 has its CatchHandler @ 001038b4 */ simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6,true,true); simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6,true,false); simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6,false,true); simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6,false,false); } bVar9 = uVar6 < 0x11; uVar6 = uVar6 * 2; } while (bVar9); uVar8 = (ulong)(uVar7 * 2); } while (uVar7 < 0x801); bVar9 = uVar5 < 0x1000001; uVar5 = uVar5 * 2; } while (bVar9); /* try { // try from 0010377f to 0010378d has its CatchHandler @ 0010387f */ std::__cxx11::string::string((string *)local_250,traceFilePath,&local_271); /* try { // try from 0010378e to 0010379e has its CatchHandler @ 00103866 */ plVar3 = (long *)std::__cxx11::string::append((char *)local_250); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_260 = *plVar4; uStack_258 = (int4)plVar3[3]; uStack_254 = *(int4 *)((long)plVar3 + 0x1c); local_270 = &local_260; } else { local_260 = *plVar4; local_270 = (long *)*plVar3; } local_268 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; printf("Result has been written to %s\n",local_270); if (local_270 != &local_260) { operator_delete(local_270); } if (local_250[0] != local_240) { operator_delete(local_250[0]); } /* try { // try from 00103816 to 0010381f has its CatchHandler @ 001038b2 */ std::ofstream::close(); local_230 = *(long *)PTR_VTT_00108fd0; *(int8 *)(local_228 + *(long *)(local_230 + -0x18) + -8) = *(int8 *)(PTR_VTT_00108fd0 + 0x18); std::filebuf::~filebuf(local_228); std::ios_base::~ios_base(local_138); uVar2 = 0; } return uVar2; }
25,307
translog_read_record_header
eloqsql/storage/maria/ma_loghandler.c
int translog_read_record_header(LSN lsn, TRANSLOG_HEADER_BUFFER *buff) { TRANSLOG_PAGE_SIZE_BUFF psize_buff; uchar *page; translog_size_t res, page_offset= LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE; PAGECACHE_BLOCK_LINK *direct_link; TRANSLOG_ADDRESS addr; TRANSLOG_VALIDATOR_DATA data; DBUG_ENTER("translog_read_record_header"); DBUG_PRINT("enter", ("LSN: " LSN_FMT, LSN_IN_PARTS(lsn))); DBUG_ASSERT(LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE != 0); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); buff->lsn= lsn; buff->groups_no= 0; data.addr= &addr; data.was_recovered= 0; addr= lsn; addr-= page_offset; /* offset decreasing */ res= (!(page= translog_get_page(&data, psize_buff.buffer, &direct_link))) ? RECHEADER_READ_ERROR : translog_read_record_header_from_buffer(page, page_offset, buff, 0); translog_free_link(direct_link); DBUG_RETURN(res); }
O3
c
translog_read_record_header: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x2030, %rsp # imm = 0x2030 movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movq %rdi, (%rsi) movl $0x0, 0x418(%rsi) leaq -0x2028(%rbp), %rax leaq -0x2038(%rbp), %rdi movq %rax, (%rdi) movb $0x0, 0x8(%rdi) movq %r14, %rcx andq $-0x2000, %rcx # imm = 0xE000 movq %rcx, (%rax) leaq -0x2018(%rbp), %rsi leaq -0x2020(%rbp), %rdx callq 0x6755c testq %rax, %rax je 0x67f0d andl $0x1fff, %r14d # imm = 0x1FFF movq %rax, %rdi movl %r14d, %esi movq %rbx, %rdx xorl %ecx, %ecx callq 0x69050 movl %eax, %ebx jmp 0x67f12 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movq -0x2020(%rbp), %rdi callq 0x6901e movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x67f3b movl %ebx, %eax addq $0x2030, %rsp # imm = 0x2030 popq %rbx popq %r14 popq %rbp retq callq 0x29220
translog_read_record_header: push rbp mov rbp, rsp push r14 push rbx sub rsp, 2030h mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_18], rax mov [rsi], rdi mov dword ptr [rsi+418h], 0 lea rax, [rbp+var_2028] lea rdi, [rbp+var_2038] mov [rdi], rax mov byte ptr [rdi+8], 0 mov rcx, r14 and rcx, 0FFFFFFFFFFFFE000h mov [rax], rcx lea rsi, [rbp+var_2018] lea rdx, [rbp+var_2020] call translog_get_page test rax, rax jz short loc_67F0D and r14d, 1FFFh mov rdi, rax mov esi, r14d mov rdx, rbx xor ecx, ecx call translog_read_record_header_from_buffer mov ebx, eax jmp short loc_67F12 loc_67F0D: mov ebx, 0FFFFFFFFh loc_67F12: mov rdi, [rbp+var_2020] call translog_free_link mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_67F3B mov eax, ebx add rsp, 2030h pop rbx pop r14 pop rbp retn loc_67F3B: call ___stack_chk_fail
long long translog_read_record_header(long long a1, long long a2) { long long page; // rax unsigned int record_header_from_buffer; // ebx unsigned long long *v5; // [rsp+8h] [rbp-2038h] BYREF char v6; // [rsp+10h] [rbp-2030h] unsigned long long v7; // [rsp+18h] [rbp-2028h] BYREF long long v8; // [rsp+20h] [rbp-2020h] BYREF _BYTE v9[8192]; // [rsp+28h] [rbp-2018h] BYREF unsigned long long v10; // [rsp+2028h] [rbp-18h] v10 = __readfsqword(0x28u); *(_QWORD *)a2 = a1; *(_DWORD *)(a2 + 1048) = 0; v5 = &v7; v6 = 0; v7 = a1 & 0xFFFFFFFFFFFFE000LL; page = translog_get_page((long long **)&v5, (long long)v9, &v8); if ( page ) record_header_from_buffer = translog_read_record_header_from_buffer(page, a1 & 0x1FFF, a2, 0LL); else record_header_from_buffer = -1; translog_free_link(v8); return record_header_from_buffer; }
translog_read_record_header: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x2030 MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV qword ptr [RSI],RDI MOV dword ptr [RSI + 0x418],0x0 LEA RAX,[RBP + -0x2028] LEA RDI,[RBP + -0x2038] MOV qword ptr [RDI],RAX MOV byte ptr [RDI + 0x8],0x0 MOV RCX,R14 AND RCX,-0x2000 MOV qword ptr [RAX],RCX LEA RSI,[RBP + -0x2018] LEA RDX,[RBP + -0x2020] CALL 0x0016755c TEST RAX,RAX JZ 0x00167f0d AND R14D,0x1fff MOV RDI,RAX MOV ESI,R14D MOV RDX,RBX XOR ECX,ECX CALL 0x00169050 MOV EBX,EAX JMP 0x00167f12 LAB_00167f0d: MOV EBX,0xffffffff LAB_00167f12: MOV RDI,qword ptr [RBP + -0x2020] CALL 0x0016901e MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00167f3b MOV EAX,EBX ADD RSP,0x2030 POP RBX POP R14 POP RBP RET LAB_00167f3b: CALL 0x00129220
int4 translog_read_record_header(ulong param_1,ulong *param_2) { int4 uVar1; long lVar2; long in_FS_OFFSET; ulong *local_2040; int1 local_2038; ulong local_2030; int8 local_2028; int1 local_2020 [8192]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); *param_2 = param_1; *(int4 *)(param_2 + 0x83) = 0; local_2040 = &local_2030; local_2038 = 0; local_2030 = param_1 & 0xffffffffffffe000; lVar2 = translog_get_page(&local_2040,local_2020,&local_2028); if (lVar2 == 0) { uVar1 = 0xffffffff; } else { uVar1 = translog_read_record_header_from_buffer(lVar2,(uint)param_1 & 0x1fff,param_2,0); } translog_free_link(local_2028); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return uVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,308
google::protobuf::DescriptorPool::DescriptorPool()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
DescriptorPool::DescriptorPool() : mutex_(nullptr), fallback_database_(nullptr), default_error_collector_(nullptr), underlay_(nullptr), tables_(new Tables), enforce_dependencies_(true), lazily_build_dependencies_(false), allow_unknown_(false), enforce_weak_(false), disallow_enforce_utf8_(false) {}
O3
cpp
google::protobuf::DescriptorPool::DescriptorPool(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movl $0x228, %edi # imm = 0x228 callq 0xf350 movq %rax, %r14 movq %rax, %rdi callq 0x1b8b6 movq %r14, 0x20(%rbx) movb $0x1, 0x28(%rbx) leaq 0x38(%rbx), %rax xorl %ecx, %ecx movl %ecx, 0x38(%rbx) movq %rcx, 0x40(%rbx) movl %ecx, 0x29(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0xf330 movq %rbx, %rdi callq 0xf570 nop
_ZN6google8protobuf14DescriptorPoolC2Ev: push r14 push rbx push rax mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov edi, 228h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rdi, rax; this call _ZN6google8protobuf14DescriptorPool6TablesC2Ev; google::protobuf::DescriptorPool::Tables::Tables(void) mov [rbx+20h], r14 mov byte ptr [rbx+28h], 1 lea rax, [rbx+38h] xor ecx, ecx mov [rbx+38h], ecx mov [rbx+40h], rcx mov [rbx+29h], ecx mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx add rsp, 8 pop rbx pop r14 retn mov rbx, rax mov rdi, r14; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
long long google::protobuf::DescriptorPool::DescriptorPool(google::protobuf::DescriptorPool *this) { google::protobuf::DescriptorPool::Tables *v1; // r14 long long result; // rax *((_OWORD *)this + 1) = 0LL; *(_OWORD *)this = 0LL; v1 = (google::protobuf::DescriptorPool::Tables *)operator new(0x228uLL); google::protobuf::DescriptorPool::Tables::Tables(v1); *((_QWORD *)this + 4) = v1; *((_BYTE *)this + 40) = 1; result = (long long)this + 56; *((_DWORD *)this + 14) = 0; *((_QWORD *)this + 8) = 0LL; *(_DWORD *)((char *)this + 41) = 0; *((_QWORD *)this + 9) = (char *)this + 56; *((_QWORD *)this + 10) = (char *)this + 56; *((_QWORD *)this + 11) = 0LL; return result; }
DescriptorPool: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV EDI,0x228 CALL 0x0010f350 MOV R14,RAX LAB_0011dad6: MOV RDI,RAX CALL 0x0011b8b6 LAB_0011dade: MOV qword ptr [RBX + 0x20],R14 MOV byte ptr [RBX + 0x28],0x1 LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV dword ptr [RBX + 0x38],ECX MOV qword ptr [RBX + 0x40],RCX MOV dword ptr [RBX + 0x29],ECX MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX ADD RSP,0x8 POP RBX POP R14 RET
/* google::protobuf::DescriptorPool::DescriptorPool() */ void __thiscall google::protobuf::DescriptorPool::DescriptorPool(DescriptorPool *this) { Tables *this_00; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; this_00 = (Tables *)operator_new(0x228); /* try { // try from 0011dad6 to 0011dadd has its CatchHandler @ 0011db0a */ Tables::Tables(this_00); *(Tables **)(this + 0x20) = this_00; this[0x28] = (DescriptorPool)0x1; *(int4 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int4 *)(this + 0x29) = 0; *(DescriptorPool **)(this + 0x48) = this + 0x38; *(DescriptorPool **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; return; }
25,309
ma_crypt_read
eloqsql/storage/maria/ma_crypt.c
uchar* ma_crypt_read(MARIA_SHARE* share, uchar *buff) { uchar type= buff[0]; uchar iv_length= buff[1]; /* currently only supported type */ if (type != CRYPT_SCHEME_1 || iv_length != sizeof(((MARIA_CRYPT_DATA*)1)->scheme.iv) + 4) { my_printf_error(HA_ERR_UNSUPPORTED, "Unsupported crypt scheme! type: %d iv_length: %d\n", MYF(ME_FATAL|ME_ERROR_LOG), type, iv_length); return 0; } if (share->crypt_data == NULL) { /* opening a table */ MARIA_CRYPT_DATA *crypt_data= (MARIA_CRYPT_DATA*)my_malloc(PSI_INSTRUMENT_ME, sizeof(MARIA_CRYPT_DATA), MYF(MY_ZEROFILL)); crypt_data->scheme.type= type; mysql_mutex_init(key_CRYPT_DATA_lock, &crypt_data->lock, MY_MUTEX_INIT_FAST); crypt_data->scheme.locker= crypt_data_scheme_locker; crypt_data->scheme.key_id= get_encryption_key_id(share); crypt_data->space= uint4korr(buff + 2); memcpy(crypt_data->scheme.iv, buff + 6, sizeof(crypt_data->scheme.iv)); share->crypt_data= crypt_data; } share->crypt_page_header_space= CRYPT_SCHEME_1_KEY_VERSION_SIZE; return buff + 2 + iv_length; }
O3
c
ma_crypt_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movzbl (%rsi), %ecx movb 0x1(%rsi), %al movl %ecx, %edx xorb $0x1, %dl movl %eax, %esi xorb $0x14, %sil orb %dl, %sil je 0x50760 movzbl %al, %r8d leaq 0x890f1(%rip), %rsi # 0xd9839 xorl %ebx, %ebx movl $0x1040, %edx # imm = 0x1040 movl $0x8a, %edi xorl %eax, %eax callq 0x9dc21 jmp 0x5082b movq %rdi, %r14 cmpq $0x0, 0xc20(%rdi) jne 0x5081c movl $0xb0, %esi movl $0x20, %edx xorl %edi, %edi callq 0x9f6e1 movq %rax, %r15 movl $0x1, 0x54(%rax) movl 0xbada22(%rip), %edi # 0xbfe1b4 leaq 0x68(%rax), %r12 leaq 0x334873(%rip), %rax # 0x385010 movq (%rax), %rax movq %r12, %rsi callq *0x40(%rax) movq %rax, 0xa8(%r15) movq %r12, 0xa0(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x90(%r15) leaq 0xbb6c1a(%rip), %rsi # 0xc073e0 movq %r12, %rdi callq 0x29330 leaq -0x244(%rip), %rax # 0x50591 movq %rax, 0x58(%r15) testb $0x10, 0x720(%r14) je 0x507fc leaq 0x332826(%rip), %rax # 0x383010 movl $0x2, %r12d movl $0x2, %edi callq *(%rax) cmpl $-0x1, %eax jne 0x50802 movl $0x1, %r12d movl %r12d, 0x50(%r15) movl 0x2(%rbx), %eax movl %eax, 0x60(%r15) movups 0x6(%rbx), %xmm0 movups %xmm0, (%r15) movq %r15, 0xc20(%r14) movl $0x4, 0xc18(%r14) addq $0x16, %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
ma_crypt_read: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi movzx ecx, byte ptr [rsi] mov al, [rsi+1] mov edx, ecx xor dl, 1 mov esi, eax xor sil, 14h or sil, dl jz short loc_50760 movzx r8d, al lea rsi, aUnsupportedCry; "Unsupported crypt scheme! type: %d iv_l"... xor ebx, ebx mov edx, 1040h mov edi, 8Ah xor eax, eax call my_printf_error jmp loc_5082B loc_50760: mov r14, rdi cmp qword ptr [rdi+0C20h], 0 jnz loc_5081C mov esi, 0B0h mov edx, 20h ; ' ' xor edi, edi call my_malloc mov r15, rax mov dword ptr [rax+54h], 1 mov edi, cs:key_CRYPT_DATA_lock lea r12, [rax+68h] lea rax, PSI_server mov rax, [rax] mov rsi, r12 call qword ptr [rax+40h] mov [r15+0A8h], rax mov [r15+0A0h], r12 xorps xmm0, xmm0 movups xmmword ptr [r15+90h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r12 call _pthread_mutex_init lea rax, crypt_data_scheme_locker mov [r15+58h], rax test byte ptr [r14+720h], 10h jz short loc_507FC lea rax, encryption_handler mov r12d, 2 mov edi, 2 call qword ptr [rax] cmp eax, 0FFFFFFFFh jnz short loc_50802 loc_507FC: mov r12d, 1 loc_50802: mov [r15+50h], r12d mov eax, [rbx+2] mov [r15+60h], eax movups xmm0, xmmword ptr [rbx+6] movups xmmword ptr [r15], xmm0 mov [r14+0C20h], r15 loc_5081C: mov dword ptr [r14+0C18h], 4 add rbx, 16h loc_5082B: mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
unsigned __int8 * ma_crypt_read(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5, int a6) { unsigned __int8 v6; // al long long v7; // rbx long long v8; // r15 int v9; // r12d v6 = a2[1]; if ( *a2 ^ 1 | v6 ^ 0x14 ) { v7 = 0LL; my_printf_error(138, (unsigned int)"Unsupported crypt scheme! type: %d iv_length: %d\n", 4160, *a2, v6, a6); } else { if ( !*(_QWORD *)(a1 + 3104) ) { v8 = my_malloc(0LL, 176LL, 32LL); *(_DWORD *)(v8 + 84) = 1; *(_QWORD *)(v8 + 168) = ((long long ( *)(_QWORD, long long))PSI_server[8])( (unsigned int)key_CRYPT_DATA_lock, v8 + 104); *(_QWORD *)(v8 + 160) = v8 + 104; *(_OWORD *)(v8 + 144) = 0LL; pthread_mutex_init(v8 + 104, &my_fast_mutexattr); *(_QWORD *)(v8 + 88) = crypt_data_scheme_locker; if ( (*(_BYTE *)(a1 + 1824) & 0x10) == 0 || (v9 = 2, (unsigned int)encryption_handler() == -1) ) v9 = 1; *(_DWORD *)(v8 + 80) = v9; *(_DWORD *)(v8 + 96) = *(_DWORD *)(a2 + 2); *(_OWORD *)v8 = *(_OWORD *)(a2 + 6); *(_QWORD *)(a1 + 3104) = v8; } *(_DWORD *)(a1 + 3096) = 4; return a2 + 22; } return (unsigned __int8 *)v7; }
ma_crypt_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOVZX ECX,byte ptr [RSI] MOV AL,byte ptr [RSI + 0x1] MOV EDX,ECX XOR DL,0x1 MOV ESI,EAX XOR SIL,0x14 OR SIL,DL JZ 0x00150760 MOVZX R8D,AL LEA RSI,[0x1d9839] XOR EBX,EBX MOV EDX,0x1040 MOV EDI,0x8a XOR EAX,EAX CALL 0x0019dc21 JMP 0x0015082b LAB_00150760: MOV R14,RDI CMP qword ptr [RDI + 0xc20],0x0 JNZ 0x0015081c MOV ESI,0xb0 MOV EDX,0x20 XOR EDI,EDI CALL 0x0019f6e1 MOV R15,RAX MOV dword ptr [RAX + 0x54],0x1 MOV EDI,dword ptr [0x00cfe1b4] LEA R12,[RAX + 0x68] LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] MOV RSI,R12 CALL qword ptr [RAX + 0x40] MOV qword ptr [R15 + 0xa8],RAX MOV qword ptr [R15 + 0xa0],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x90],XMM0 LEA RSI,[0xd073e0] MOV RDI,R12 CALL 0x00129330 LEA RAX,[0x150591] MOV qword ptr [R15 + 0x58],RAX TEST byte ptr [R14 + 0x720],0x10 JZ 0x001507fc LEA RAX,[0x483010] MOV R12D,0x2 MOV EDI,0x2 CALL qword ptr [RAX] CMP EAX,-0x1 JNZ 0x00150802 LAB_001507fc: MOV R12D,0x1 LAB_00150802: MOV dword ptr [R15 + 0x50],R12D MOV EAX,dword ptr [RBX + 0x2] MOV dword ptr [R15 + 0x60],EAX MOVUPS XMM0,xmmword ptr [RBX + 0x6] MOVUPS xmmword ptr [R15],XMM0 MOV qword ptr [R14 + 0xc20],R15 LAB_0015081c: MOV dword ptr [R14 + 0xc18],0x4 ADD RBX,0x16 LAB_0015082b: MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
char * ma_crypt_read(long param_1,char *param_2) { pthread_mutex_t *__mutex; int iVar1; int8 *puVar2; int8 uVar3; int4 uVar4; if (param_2[1] != '\x14' || *param_2 != '\x01') { my_printf_error(0x8a,"Unsupported crypt scheme! type: %d iv_length: %d\n",0x1040,*param_2, param_2[1]); return (char *)0x0; } if (*(long *)(param_1 + 0xc20) != 0) goto LAB_0015081c; puVar2 = (int8 *)my_malloc(0,0xb0,0x20); *(int4 *)((long)puVar2 + 0x54) = 1; __mutex = (pthread_mutex_t *)(puVar2 + 0xd); uVar3 = (**(code **)(PSI_server + 0x40))(key_CRYPT_DATA_lock,__mutex); puVar2[0x15] = uVar3; puVar2[0x14] = __mutex; puVar2[0x12] = 0; puVar2[0x13] = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); puVar2[0xb] = crypt_data_scheme_locker; if ((*(byte *)(param_1 + 0x720) & 0x10) == 0) { LAB_001507fc: uVar4 = 1; } else { uVar4 = 2; iVar1 = (*(code *)encryption_handler)(2); if (iVar1 == -1) goto LAB_001507fc; } *(int4 *)(puVar2 + 10) = uVar4; *(int4 *)(puVar2 + 0xc) = *(int4 *)(param_2 + 2); uVar3 = *(int8 *)(param_2 + 0xe); *puVar2 = *(int8 *)(param_2 + 6); puVar2[1] = uVar3; *(int8 **)(param_1 + 0xc20) = puVar2; LAB_0015081c: *(int4 *)(param_1 + 0xc18) = 4; return param_2 + 0x16; }
25,310
string_from[abi:cxx11](llama_context const*, llama_batch const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const struct llama_context * ctx, const struct llama_batch & batch) { std::stringstream buf; buf << "[ "; bool first = true; for (int i = 0; i < batch.n_tokens; ++i) { if (!first) { buf << ", "; } else { first = false; } auto detokenized = common_token_to_piece(ctx, batch.token[i]); detokenized.erase( std::remove_if( detokenized.begin(), detokenized.end(), [](const unsigned char c) { return !std::isprint(c); }), detokenized.end()); buf << "\n" << std::to_string(i) << ", token '" << detokenized << "'" << ", pos " << std::to_string(batch.pos[i]) << ", n_seq_id " << std::to_string(batch.n_seq_id[i]) << ", seq_id " << std::to_string(batch.seq_id[i][0]) << ", logits " << std::to_string(batch.logits[i]); } buf << " ]"; return buf.str(); }
O0
cpp
string_from[abi:cxx11](llama_context const*, llama_batch const&): subq $0x348, %rsp # imm = 0x348 movq %rdi, 0x80(%rsp) movq %rdi, %rax movq %rax, 0x88(%rsp) movq %rdi, 0x340(%rsp) movq %rsi, 0x338(%rsp) movq %rdx, 0x330(%rsp) leaq 0x1a8(%rsp), %rdi callq 0x59530 leaq 0x1b8(%rsp), %rdi leaq 0x121ef5(%rip), %rsi # 0x2119d3 callq 0x59a00 jmp 0xefae5 movb $0x1, 0x19b(%rsp) movl $0x0, 0x194(%rsp) movl 0x194(%rsp), %eax movq 0x330(%rsp), %rcx cmpl (%rcx), %eax jge 0xeff74 testb $0x1, 0x19b(%rsp) jne 0xefb4a leaq 0x1b8(%rsp), %rdi leaq 0x122862(%rip), %rsi # 0x21238a callq 0x59a00 jmp 0xefb2f jmp 0xefb52 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0xeffbe movb $0x0, 0x19b(%rsp) movq 0x338(%rsp), %rsi movq 0x330(%rsp), %rax movq 0x8(%rax), %rax movslq 0x194(%rsp), %rcx movl (%rax,%rcx,4), %edx leaq 0x170(%rsp), %rdi movl $0x1, %ecx callq 0xef9d0 jmp 0xefb85 leaq 0x170(%rsp), %rdi movq %rdi, 0x70(%rsp) callq 0x59830 movq 0x70(%rsp), %rdi movq %rax, 0x158(%rsp) callq 0x59930 movq %rax, 0x150(%rsp) movq 0x158(%rsp), %rdi movq 0x150(%rsp), %rsi callq 0xeffe0 movq %rax, 0x78(%rsp) jmp 0xefbcd movq 0x78(%rsp), %rax movq %rax, 0x160(%rsp) leaq 0x168(%rsp), %rdi leaq 0x160(%rsp), %rsi callq 0xc06e0 leaq 0x170(%rsp), %rdi movq %rdi, 0x60(%rsp) callq 0x59930 movq %rax, 0x138(%rsp) leaq 0x140(%rsp), %rdi leaq 0x138(%rsp), %rsi callq 0xc06e0 movq 0x60(%rsp), %rdi movq 0x168(%rsp), %rsi movq 0x140(%rsp), %rdx callq 0x59770 movq %rax, 0x68(%rsp) jmp 0xefc3f movq 0x68(%rsp), %rax movq %rax, 0x130(%rsp) leaq 0x1b8(%rsp), %rdi leaq 0x118846(%rip), %rsi # 0x2084a1 callq 0x59a00 movq %rax, 0x58(%rsp) jmp 0xefc67 movl 0x194(%rsp), %esi leaq 0x110(%rsp), %rdi callq 0xa4980 jmp 0xefc7d movq 0x58(%rsp), %rdi leaq 0x110(%rsp), %rsi callq 0x59520 movq %rax, 0x50(%rsp) jmp 0xefc96 movq 0x50(%rsp), %rdi leaq 0x121d37(%rip), %rsi # 0x2119d9 callq 0x59a00 movq %rax, 0x48(%rsp) jmp 0xefcae movq 0x48(%rsp), %rdi leaq 0x170(%rsp), %rsi callq 0x59520 movq %rax, 0x40(%rsp) jmp 0xefcc7 movq 0x40(%rsp), %rdi leaq 0x12096f(%rip), %rsi # 0x210642 callq 0x59a00 movq %rax, 0x38(%rsp) jmp 0xefcdf movq 0x38(%rsp), %rdi leaq 0x121cf8(%rip), %rsi # 0x2119e3 callq 0x59a00 movq %rax, 0x30(%rsp) jmp 0xefcf7 movq 0x330(%rsp), %rax movq 0x18(%rax), %rax movslq 0x194(%rsp), %rcx movl (%rax,%rcx,4), %esi leaq 0xf0(%rsp), %rdi callq 0xa4980 jmp 0xefd1d movq 0x30(%rsp), %rdi leaq 0xf0(%rsp), %rsi callq 0x59520 movq %rax, 0x28(%rsp) jmp 0xefd36 movq 0x28(%rsp), %rdi leaq 0x121ca8(%rip), %rsi # 0x2119ea callq 0x59a00 movq %rax, 0x20(%rsp) jmp 0xefd4e movq 0x330(%rsp), %rax movq 0x20(%rax), %rax movslq 0x194(%rsp), %rcx movl (%rax,%rcx,4), %esi leaq 0xd0(%rsp), %rdi callq 0xa4980 jmp 0xefd74 movq 0x20(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0x59520 movq %rax, 0x18(%rsp) jmp 0xefd8d movq 0x18(%rsp), %rdi leaq 0x121c5d(%rip), %rsi # 0x2119f6 callq 0x59a00 movq %rax, 0x10(%rsp) jmp 0xefda5 movq 0x330(%rsp), %rax movq 0x28(%rax), %rax movslq 0x194(%rsp), %rcx movq (%rax,%rcx,8), %rax movl (%rax), %esi leaq 0xb0(%rsp), %rdi callq 0xa4980 jmp 0xefdce movq 0x10(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x59520 movq %rax, 0x8(%rsp) jmp 0xefde7 movq 0x8(%rsp), %rdi leaq 0x121c0d(%rip), %rsi # 0x211a00 callq 0x59a00 movq %rax, (%rsp) jmp 0xefdfe movq 0x330(%rsp), %rax movq 0x30(%rax), %rax movslq 0x194(%rsp), %rcx movsbl (%rax,%rcx), %esi leaq 0x90(%rsp), %rdi callq 0xa4980 jmp 0xefe25 movq (%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0x59520 jmp 0xefe38 leaq 0x90(%rsp), %rdi callq 0x5a4d8 leaq 0xb0(%rsp), %rdi callq 0x5a4d8 leaq 0xd0(%rsp), %rdi callq 0x5a4d8 leaq 0xf0(%rsp), %rdi callq 0x5a4d8 leaq 0x110(%rsp), %rdi callq 0x5a4d8 leaq 0x170(%rsp), %rdi callq 0x5a4d8 movl 0x194(%rsp), %eax addl $0x1, %eax movl %eax, 0x194(%rsp) jmp 0xefaf8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0xeff65 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0xeff58 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0xeff4b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0xeff3e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0xeff31 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) leaq 0x90(%rsp), %rdi callq 0x5a4d8 leaq 0xb0(%rsp), %rdi callq 0x5a4d8 leaq 0xd0(%rsp), %rdi callq 0x5a4d8 leaq 0xf0(%rsp), %rdi callq 0x5a4d8 leaq 0x110(%rsp), %rdi callq 0x5a4d8 leaq 0x170(%rsp), %rdi callq 0x5a4d8 jmp 0xeffbe leaq 0x1b8(%rsp), %rdi leaq 0x121a53(%rip), %rsi # 0x2119d6 callq 0x59a00 jmp 0xeff8a movq 0x80(%rsp), %rdi leaq 0x1a8(%rsp), %rsi callq 0x59c60 jmp 0xeffa1 leaq 0x1a8(%rsp), %rdi callq 0x59650 movq 0x88(%rsp), %rax addq $0x348, %rsp # imm = 0x348 retq leaq 0x1a8(%rsp), %rdi callq 0x59650 movq 0x1a0(%rsp), %rdi callq 0x59b90 nopl (%rax,%rax)
_Z11string_fromB5cxx11PK13llama_contextRK11llama_batch: sub rsp, 348h mov [rsp+348h+var_2C8], rdi mov rax, rdi mov [rsp+348h+var_2C0], rax mov [rsp+348h+var_8], rdi mov [rsp+348h+var_10], rsi mov [rsp+348h+var_18], rdx lea rdi, [rsp+348h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+348h+var_190] lea rsi, asc_2119D3; "[ " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_EFAE5: mov [rsp+348h+var_1AD], 1 mov [rsp+348h+var_1B4], 0 loc_EFAF8: mov eax, [rsp+348h+var_1B4] mov rcx, [rsp+348h+var_18] cmp eax, [rcx] jge loc_EFF74 test [rsp+348h+var_1AD], 1 jnz short loc_EFB4A lea rdi, [rsp+348h+var_190] lea rsi, aZuD+6; ", " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_EFB2F: jmp short loc_EFB52 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp loc_EFFBE loc_EFB4A: mov [rsp+348h+var_1AD], 0 loc_EFB52: mov rsi, [rsp+348h+var_10] mov rax, [rsp+348h+var_18] mov rax, [rax+8] movsxd rcx, [rsp+348h+var_1B4] mov edx, [rax+rcx*4] lea rdi, [rsp+348h+var_1D8] mov ecx, 1 call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool) jmp short $+2 loc_EFB85: lea rdi, [rsp+348h+var_1D8] mov [rsp+348h+var_2D8], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov rdi, [rsp+348h+var_2D8] mov [rsp+348h+var_1F0], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+348h+var_1F8], rax mov rdi, [rsp+348h+var_1F0] mov rsi, [rsp+348h+var_1F8] call _ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZ11string_fromPK13llama_contextRK11llama_batchE3$_0ET_SH_SH_T0_; std::remove_if<__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,llama_batch const&)::$_0>(__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,llama_batch const&)::$_0) mov [rsp+348h+var_2D0], rax jmp short $+2 loc_EFBCD: mov rax, [rsp+348h+var_2D0] mov [rsp+348h+var_1E8], rax lea rdi, [rsp+348h+var_1E0] lea rsi, [rsp+348h+var_1E8] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE lea rdi, [rsp+348h+var_1D8] mov [rsp+348h+var_2E8], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+348h+var_210], rax lea rdi, [rsp+348h+var_208] lea rsi, [rsp+348h+var_210] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE mov rdi, [rsp+348h+var_2E8] mov rsi, [rsp+348h+var_1E0] mov rdx, [rsp+348h+var_208] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_; std::string::erase(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>) mov [rsp+348h+var_2E0], rax jmp short $+2 loc_EFC3F: mov rax, [rsp+348h+var_2E0] mov [rsp+348h+var_218], rax lea rdi, [rsp+348h+var_190] lea rsi, aTestArgParserT_1+45h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_2F0], rax jmp short $+2 loc_EFC67: mov esi, [rsp+348h+var_1B4]; int lea rdi, [rsp+348h+var_238]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_EFC7D: mov rdi, [rsp+348h+var_2F0] lea rsi, [rsp+348h+var_238] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_2F8], rax jmp short $+2 loc_EFC96: mov rdi, [rsp+348h+var_2F8] lea rsi, aToken; ", token '" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_300], rax jmp short $+2 loc_EFCAE: mov rdi, [rsp+348h+var_300] lea rsi, [rsp+348h+var_1D8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_308], rax jmp short $+2 loc_EFCC7: mov rdi, [rsp+348h+var_308] lea rsi, asc_210640+2; "'" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_310], rax jmp short $+2 loc_EFCDF: mov rdi, [rsp+348h+var_310] lea rsi, aPos_0; ", pos " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_318], rax jmp short $+2 loc_EFCF7: mov rax, [rsp+348h+var_18] mov rax, [rax+18h] movsxd rcx, [rsp+348h+var_1B4] mov esi, [rax+rcx*4]; int lea rdi, [rsp+348h+var_258]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_EFD1D: mov rdi, [rsp+348h+var_318] lea rsi, [rsp+348h+var_258] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_320], rax jmp short $+2 loc_EFD36: mov rdi, [rsp+348h+var_320] lea rsi, aNSeqId; ", n_seq_id " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_328], rax jmp short $+2 loc_EFD4E: mov rax, [rsp+348h+var_18] mov rax, [rax+20h] movsxd rcx, [rsp+348h+var_1B4] mov esi, [rax+rcx*4]; int lea rdi, [rsp+348h+var_278]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_EFD74: mov rdi, [rsp+348h+var_328] lea rsi, [rsp+348h+var_278] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_330], rax jmp short $+2 loc_EFD8D: mov rdi, [rsp+348h+var_330] lea rsi, aSeqId; ", seq_id " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_338], rax jmp short $+2 loc_EFDA5: mov rax, [rsp+348h+var_18] mov rax, [rax+28h] movsxd rcx, [rsp+348h+var_1B4] mov rax, [rax+rcx*8] mov esi, [rax]; int lea rdi, [rsp+348h+var_298]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_EFDCE: mov rdi, [rsp+348h+var_338] lea rsi, [rsp+348h+var_298] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_340], rax jmp short $+2 loc_EFDE7: mov rdi, [rsp+348h+var_340] lea rsi, aLogits; ", logits " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_348], rax jmp short $+2 loc_EFDFE: mov rax, [rsp+348h+var_18] mov rax, [rax+30h] movsxd rcx, [rsp+348h+var_1B4] movsx esi, byte ptr [rax+rcx]; int lea rdi, [rsp+348h+var_2B8]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_EFE25: mov rdi, [rsp+348h+var_348] lea rsi, [rsp+348h+var_2B8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_EFE38: lea rdi, [rsp+348h+var_2B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_298]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_278]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_258]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_238]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_1D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+348h+var_1B4] add eax, 1 mov [rsp+348h+var_1B4], eax jmp loc_EFAF8 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp loc_EFF65 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp loc_EFF58 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp short loc_EFF4B mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp short loc_EFF3E mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp short loc_EFF31 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EFF31: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EFF3E: lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EFF4B: lea rdi, [rsp+arg_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EFF58: lea rdi, [rsp+arg_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EFF65: lea rdi, [rsp+arg_168]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_EFFBE loc_EFF74: lea rdi, [rsp+348h+var_190] lea rsi, asc_2119D6; " ]" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_EFF8A: mov rdi, [rsp+348h+var_2C8] lea rsi, [rsp+348h+var_1A0] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_EFFA1: lea rdi, [rsp+348h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rsp+348h+var_2C0] add rsp, 348h retn loc_EFFBE: lea rdi, [rsp+arg_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rsp+arg_198] call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-348h] long long v5; // [rsp+8h] [rbp-340h] long long v6; // [rsp+10h] [rbp-338h] long long v7; // [rsp+18h] [rbp-330h] long long v8; // [rsp+20h] [rbp-328h] long long v9; // [rsp+28h] [rbp-320h] long long v10; // [rsp+30h] [rbp-318h] long long v11; // [rsp+38h] [rbp-310h] long long v12; // [rsp+40h] [rbp-308h] long long v13; // [rsp+48h] [rbp-300h] long long v14; // [rsp+50h] [rbp-2F8h] long long v15; // [rsp+58h] [rbp-2F0h] _BYTE v16[32]; // [rsp+90h] [rbp-2B8h] BYREF _BYTE v17[32]; // [rsp+B0h] [rbp-298h] BYREF _BYTE v18[32]; // [rsp+D0h] [rbp-278h] BYREF _BYTE v19[32]; // [rsp+F0h] [rbp-258h] BYREF _BYTE v20[32]; // [rsp+110h] [rbp-238h] BYREF long long v21; // [rsp+130h] [rbp-218h] long long v22; // [rsp+138h] [rbp-210h] BYREF long long v23; // [rsp+140h] [rbp-208h] BYREF long long v24; // [rsp+150h] [rbp-1F8h] long long v25; // [rsp+158h] [rbp-1F0h] long long v26; // [rsp+160h] [rbp-1E8h] BYREF long long v27; // [rsp+168h] [rbp-1E0h] BYREF _BYTE v28[36]; // [rsp+170h] [rbp-1D8h] BYREF int i; // [rsp+194h] [rbp-1B4h] char v30; // [rsp+19Bh] [rbp-1ADh] _BYTE v31[16]; // [rsp+1A8h] [rbp-1A0h] BYREF _BYTE v32[376]; // [rsp+1B8h] [rbp-190h] BYREF long long v33; // [rsp+330h] [rbp-18h] long long v34; // [rsp+338h] [rbp-10h] long long v35; // [rsp+340h] [rbp-8h] v35 = a1; v34 = a2; v33 = a3; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v31); std::operator<<<std::char_traits<char>>(v32, "[ "); v30 = 1; for ( i = 0; i < *(_DWORD *)v33; ++i ) { if ( (v30 & 1) != 0 ) v30 = 0; else std::operator<<<std::char_traits<char>>(v32, ", "); common_token_to_piece[abi:cxx11]((long long)v28, v34, *(_DWORD *)(*(_QWORD *)(v33 + 8) + 4LL * i), 1); v25 = std::string::begin(v28); v24 = std::string::end(v28); v26 = std::remove_if<__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,llama_batch const&)::$_0>( v25, v24); __gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v27, (long long)&v26); v22 = std::string::end(v28); __gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v23, (long long)&v22); v21 = std::string::erase(v28, v27, v23); v15 = std::operator<<<std::char_traits<char>>(v32, "\n"); std::to_string((std::__cxx11 *)v20, i); v14 = std::operator<<<char>(v15, v20); v13 = std::operator<<<std::char_traits<char>>(v14, ", token '"); v12 = std::operator<<<char>(v13, v28); v11 = std::operator<<<std::char_traits<char>>(v12, "'"); v10 = std::operator<<<std::char_traits<char>>(v11, ", pos "); std::to_string((std::__cxx11 *)v19, *(_DWORD *)(*(_QWORD *)(v33 + 24) + 4LL * i)); v9 = std::operator<<<char>(v10, v19); v8 = std::operator<<<std::char_traits<char>>(v9, ", n_seq_id "); std::to_string((std::__cxx11 *)v18, *(_DWORD *)(*(_QWORD *)(v33 + 32) + 4LL * i)); v7 = std::operator<<<char>(v8, v18); v6 = std::operator<<<std::char_traits<char>>(v7, ", seq_id "); std::to_string((std::__cxx11 *)v17, **(_DWORD **)(*(_QWORD *)(v33 + 40) + 8LL * i)); v5 = std::operator<<<char>(v6, v17); v4 = std::operator<<<std::char_traits<char>>(v5, ", logits "); std::to_string((std::__cxx11 *)v16, *(char *)(*(_QWORD *)(v33 + 48) + i)); std::operator<<<char>(v4, v16); std::string::~string(v16); std::string::~string(v17); std::string::~string(v18); std::string::~string(v19); std::string::~string(v20); std::string::~string(v28); } std::operator<<<std::char_traits<char>>(v32, " ]"); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v31); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v31); return a1; }
string_from[abi:cxx11]: SUB RSP,0x348 MOV qword ptr [RSP + 0x80],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x340],RDI MOV qword ptr [RSP + 0x338],RSI MOV qword ptr [RSP + 0x330],RDX LEA RDI,[RSP + 0x1a8] CALL 0x00159530 LEA RDI,[RSP + 0x1b8] LAB_001efad7: LEA RSI,[0x3119d3] CALL 0x00159a00 JMP 0x001efae5 LAB_001efae5: MOV byte ptr [RSP + 0x19b],0x1 MOV dword ptr [RSP + 0x194],0x0 LAB_001efaf8: MOV EAX,dword ptr [RSP + 0x194] MOV RCX,qword ptr [RSP + 0x330] CMP EAX,dword ptr [RCX] JGE 0x001eff74 TEST byte ptr [RSP + 0x19b],0x1 JNZ 0x001efb4a LEA RDI,[RSP + 0x1b8] LEA RSI,[0x31238a] CALL 0x00159a00 JMP 0x001efb2f LAB_001efb2f: JMP 0x001efb52 LAB_001efb4a: MOV byte ptr [RSP + 0x19b],0x0 LAB_001efb52: MOV RSI,qword ptr [RSP + 0x338] MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RSP + 0x194] MOV EDX,dword ptr [RAX + RCX*0x4] LEA RDI,[RSP + 0x170] MOV ECX,0x1 CALL 0x001ef9d0 JMP 0x001efb85 LAB_001efb85: LEA RDI,[RSP + 0x170] MOV qword ptr [RSP + 0x70],RDI CALL 0x00159830 MOV RDI,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x158],RAX CALL 0x00159930 MOV qword ptr [RSP + 0x150],RAX MOV RDI,qword ptr [RSP + 0x158] MOV RSI,qword ptr [RSP + 0x150] LAB_001efbc1: CALL 0x001effe0 MOV qword ptr [RSP + 0x78],RAX JMP 0x001efbcd LAB_001efbcd: MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x160],RAX LEA RDI,[RSP + 0x168] LEA RSI,[RSP + 0x160] CALL 0x001c06e0 LEA RDI,[RSP + 0x170] MOV qword ptr [RSP + 0x60],RDI CALL 0x00159930 MOV qword ptr [RSP + 0x138],RAX LEA RDI,[RSP + 0x140] LEA RSI,[RSP + 0x138] CALL 0x001c06e0 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x168] MOV RDX,qword ptr [RSP + 0x140] CALL 0x00159770 MOV qword ptr [RSP + 0x68],RAX JMP 0x001efc3f LAB_001efc3f: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x130],RAX LEA RDI,[RSP + 0x1b8] LEA RSI,[0x3084a1] CALL 0x00159a00 MOV qword ptr [RSP + 0x58],RAX JMP 0x001efc67 LAB_001efc67: MOV ESI,dword ptr [RSP + 0x194] LEA RDI,[RSP + 0x110] CALL 0x001a4980 JMP 0x001efc7d LAB_001efc7d: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[RSP + 0x110] CALL 0x00159520 MOV qword ptr [RSP + 0x50],RAX JMP 0x001efc96 LAB_001efc96: MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[0x3119d9] CALL 0x00159a00 MOV qword ptr [RSP + 0x48],RAX JMP 0x001efcae LAB_001efcae: MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0x170] CALL 0x00159520 MOV qword ptr [RSP + 0x40],RAX JMP 0x001efcc7 LAB_001efcc7: MOV RDI,qword ptr [RSP + 0x40] LEA RSI,[0x310642] CALL 0x00159a00 MOV qword ptr [RSP + 0x38],RAX JMP 0x001efcdf LAB_001efcdf: MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[0x3119e3] CALL 0x00159a00 MOV qword ptr [RSP + 0x30],RAX JMP 0x001efcf7 LAB_001efcf7: MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x18] MOVSXD RCX,dword ptr [RSP + 0x194] MOV ESI,dword ptr [RAX + RCX*0x4] LEA RDI,[RSP + 0xf0] CALL 0x001a4980 JMP 0x001efd1d LAB_001efd1d: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0xf0] CALL 0x00159520 MOV qword ptr [RSP + 0x28],RAX JMP 0x001efd36 LAB_001efd36: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[0x3119ea] CALL 0x00159a00 MOV qword ptr [RSP + 0x20],RAX JMP 0x001efd4e LAB_001efd4e: MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x20] MOVSXD RCX,dword ptr [RSP + 0x194] MOV ESI,dword ptr [RAX + RCX*0x4] LEA RDI,[RSP + 0xd0] CALL 0x001a4980 JMP 0x001efd74 LAB_001efd74: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0xd0] CALL 0x00159520 MOV qword ptr [RSP + 0x18],RAX JMP 0x001efd8d LAB_001efd8d: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x3119f6] CALL 0x00159a00 MOV qword ptr [RSP + 0x10],RAX JMP 0x001efda5 LAB_001efda5: MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x28] MOVSXD RCX,dword ptr [RSP + 0x194] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ESI,dword ptr [RAX] LEA RDI,[RSP + 0xb0] CALL 0x001a4980 JMP 0x001efdce LAB_001efdce: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0xb0] CALL 0x00159520 MOV qword ptr [RSP + 0x8],RAX JMP 0x001efde7 LAB_001efde7: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x311a00] CALL 0x00159a00 MOV qword ptr [RSP],RAX JMP 0x001efdfe LAB_001efdfe: MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x30] MOVSXD RCX,dword ptr [RSP + 0x194] MOVSX ESI,byte ptr [RAX + RCX*0x1] LEA RDI,[RSP + 0x90] CALL 0x001a4980 JMP 0x001efe25 LAB_001efe25: MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x90] CALL 0x00159520 JMP 0x001efe38 LAB_001efe38: LEA RDI,[RSP + 0x90] CALL 0x0015a4d8 LEA RDI,[RSP + 0xb0] CALL 0x0015a4d8 LEA RDI,[RSP + 0xd0] CALL 0x0015a4d8 LEA RDI,[RSP + 0xf0] CALL 0x0015a4d8 LEA RDI,[RSP + 0x110] CALL 0x0015a4d8 LEA RDI,[RSP + 0x170] CALL 0x0015a4d8 MOV EAX,dword ptr [RSP + 0x194] ADD EAX,0x1 MOV dword ptr [RSP + 0x194],EAX JMP 0x001efaf8 LAB_001eff74: LEA RDI,[RSP + 0x1b8] LAB_001eff7c: LEA RSI,[0x3119d6] CALL 0x00159a00 JMP 0x001eff8a LAB_001eff8a: MOV RDI,qword ptr [RSP + 0x80] LEA RSI,[RSP + 0x1a8] CALL 0x00159c60 LAB_001eff9f: JMP 0x001effa1 LAB_001effa1: LEA RDI,[RSP + 0x1a8] CALL 0x00159650 MOV RAX,qword ptr [RSP + 0x88] ADD RSP,0x348 RET
/* string_from[abi:cxx11](llama_context const*, llama_batch const&) */ llama_context * string_from_abi_cxx11_(llama_context *param_1,llama_batch *param_2) { ostream *poVar1; int *in_RDX; __cxx11 local_2b8 [32]; __cxx11 local_298 [32]; __cxx11 local_278 [32]; __cxx11 local_258 [32]; __cxx11 local_238 [32]; int8 local_218; int8 local_210; int8 local_208 [2]; int8 local_1f8; int8 local_1f0; int8 local_1e8; int8 local_1e0; llama_context local_1d8 [36]; int local_1b4; byte local_1ad; stringstream local_1a0 [16]; ostream local_190 [376]; int *local_18; llama_batch *local_10; llama_context *local_8; local_18 = in_RDX; local_10 = param_2; local_8 = param_1; std::__cxx11::stringstream::stringstream(local_1a0); /* try { // try from 001efad7 to 001efb82 has its CatchHandler @ 001efb31 */ std::operator<<(local_190,"[ "); local_1ad = 1; for (local_1b4 = 0; local_1b4 < *local_18; local_1b4 = local_1b4 + 1) { if ((local_1ad & 1) == 0) { std::operator<<(local_190,", "); } else { local_1ad = 0; } common_token_to_piece_abi_cxx11_ (local_1d8,(int)local_10, SUB41(*(int4 *)(*(long *)(local_18 + 2) + (long)local_1b4 * 4),0)); local_1f0 = std::__cxx11::string::begin(); local_1f8 = std::__cxx11::string::end(); /* try { // try from 001efbc1 to 001efc7a has its CatchHandler @ 001efe9c */ local_1e8 = std:: remove_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,string_from(llama_context_const*,llama_batch_const&)::__0> (local_1f0,local_1f8); __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*> ((__normal_iterator<char_const*,std::__cxx11::string> *)&local_1e0, (__normal_iterator *)&local_1e8); local_210 = std::__cxx11::string::end(); __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*> ((__normal_iterator<char_const*,std::__cxx11::string> *)local_208, (__normal_iterator *)&local_210); local_218 = std::__cxx11::string::erase(local_1d8,local_1e0,local_208[0]); poVar1 = std::operator<<(local_190,"\n"); std::__cxx11::to_string(local_238,local_1b4); /* try { // try from 001efc7d to 001efd1a has its CatchHandler @ 001efeb5 */ poVar1 = std::operator<<(poVar1,(string *)local_238); poVar1 = std::operator<<(poVar1,", token \'"); poVar1 = std::operator<<(poVar1,(string *)local_1d8); poVar1 = std::operator<<(poVar1,"\'"); poVar1 = std::operator<<(poVar1,", pos "); std::__cxx11::to_string(local_258,*(int *)(*(long *)(local_18 + 6) + (long)local_1b4 * 4)); /* try { // try from 001efd1d to 001efd71 has its CatchHandler @ 001efece */ poVar1 = std::operator<<(poVar1,(string *)local_258); poVar1 = std::operator<<(poVar1,", n_seq_id "); std::__cxx11::to_string(local_278,*(int *)(*(long *)(local_18 + 8) + (long)local_1b4 * 4)); /* try { // try from 001efd74 to 001efdcb has its CatchHandler @ 001efee4 */ poVar1 = std::operator<<(poVar1,(string *)local_278); poVar1 = std::operator<<(poVar1,", seq_id "); std::__cxx11::to_string(local_298,**(int **)(*(long *)(local_18 + 10) + (long)local_1b4 * 8)); /* try { // try from 001efdce to 001efe22 has its CatchHandler @ 001efefa */ poVar1 = std::operator<<(poVar1,(string *)local_298); poVar1 = std::operator<<(poVar1,", logits "); std::__cxx11::to_string(local_2b8,(int)*(char *)(*(long *)(local_18 + 0xc) + (long)local_1b4)); /* try { // try from 001efe25 to 001efe35 has its CatchHandler @ 001eff10 */ std::operator<<(poVar1,(string *)local_2b8); std::__cxx11::string::~string((string *)local_2b8); std::__cxx11::string::~string((string *)local_298); std::__cxx11::string::~string((string *)local_278); std::__cxx11::string::~string((string *)local_258); std::__cxx11::string::~string((string *)local_238); std::__cxx11::string::~string((string *)local_1d8); } /* try { // try from 001eff7c to 001eff9e has its CatchHandler @ 001efb31 */ std::operator<<(local_190," ]"); std::__cxx11::stringstream::str(); std::__cxx11::stringstream::~stringstream(local_1a0); return param_1; }
25,311
my_open
eloqsql/mysys/my_open.c
File my_open(const char *FileName, int Flags, myf MyFlags) /* Path-name of file */ /* Read | write .. */ /* Special flags */ { File fd; DBUG_ENTER("my_open"); DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu", FileName, Flags, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF))) MyFlags|= my_global_flags; #if defined(_WIN32) fd= my_win_open(FileName, Flags); #else if (MyFlags & MY_NOSYMLINKS) fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask); else fd = open(FileName, Flags | O_CLOEXEC, my_umask); #endif fd= my_register_filename(fd, FileName, FILE_BY_OPEN, EE_FILENOTFOUND, MyFlags); DBUG_RETURN(fd); }
O3
c
my_open: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %esi, %r15d movq %rdi, %rbx testb $0x19, %dl jne 0x3069e leaq 0x348dff(%rip), %rax # 0x379498 movq (%rax), %r14 jmp 0x306a1 xorl %r14d, %r14d orq %rdx, %r14 btl $0x9, %r14d jb 0x306cd orl $0x80000, %r15d # imm = 0x80000 leaq 0x2c9faf(%rip), %rax # 0x2fa668 movl (%rax), %edx movq %rbx, %rdi movl %r15d, %esi xorl %eax, %eax callq 0x24680 movl %eax, %r15d jmp 0x30719 leaq 0x2c9f94(%rip), %rax # 0x2fa668 movl (%rax), %r12d leaq -0x24(%rbp), %rsi movq %rbx, %rdi callq 0x3113c testq %rax, %rax je 0x30713 movl -0x24(%rbp), %edi orl $0xa0000, %r15d # imm = 0xA0000 movq %rax, %rsi movl %r15d, %edx movl %r12d, %ecx xorl %eax, %eax callq 0x24340 movl %eax, %r15d movl -0x24(%rbp), %edi testl %edi, %edi js 0x30719 callq 0x24710 jmp 0x30719 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF movl %r15d, %edi movq %rbx, %rsi movl $0x1, %edx movl $0x1d, %ecx movq %r14, %r8 callq 0x3073e addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_open: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15d, esi mov rbx, rdi test dl, 19h jnz short loc_3069E lea rax, my_global_flags mov r14, [rax] jmp short loc_306A1 loc_3069E: xor r14d, r14d loc_306A1: or r14, rdx bt r14d, 9 jb short loc_306CD or r15d, 80000h lea rax, my_umask mov edx, [rax] mov rdi, rbx mov esi, r15d xor eax, eax call _open64 mov r15d, eax jmp short loc_30719 loc_306CD: lea rax, my_umask mov r12d, [rax] lea rsi, [rbp+var_24] mov rdi, rbx call my_open_parent_dir_nosymlinks test rax, rax jz short loc_30713 mov edi, [rbp+var_24] or r15d, 0A0000h mov rsi, rax mov edx, r15d mov ecx, r12d xor eax, eax call _openat64 mov r15d, eax mov edi, [rbp+var_24] test edi, edi js short loc_30719 call _close jmp short loc_30719 loc_30713: mov r15d, 0FFFFFFFFh loc_30719: mov edi, r15d mov rsi, rbx mov edx, 1 mov ecx, 1Dh mov r8, r14 call my_register_filename add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_open(long long a1, int a2, long long a3) { long long v3; // r14 long long v4; // r14 unsigned int v5; // r15d unsigned int v6; // r12d long long v7; // rax int v9[9]; // [rsp+Ch] [rbp-24h] BYREF if ( (a3 & 0x19) != 0 ) v3 = 0LL; else v3 = my_global_flags; v4 = a3 | v3; if ( (v4 & 0x200) != 0 ) { v6 = my_umask; v7 = my_open_parent_dir_nosymlinks(a1, v9); if ( v7 ) { v5 = openat64((unsigned int)v9[0], v7, a2 | 0xA0000u, v6); if ( v9[0] >= 0 ) close(); } else { v5 = -1; } } else { v5 = open64(a1, a2 | 0x80000u, my_umask); } return my_register_filename(v5, a1, 1LL, 29LL, v4); }
my_open: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15D,ESI MOV RBX,RDI TEST DL,0x19 JNZ 0x0013069e LEA RAX,[0x479498] MOV R14,qword ptr [RAX] JMP 0x001306a1 LAB_0013069e: XOR R14D,R14D LAB_001306a1: OR R14,RDX BT R14D,0x9 JC 0x001306cd OR R15D,0x80000 LEA RAX,[0x3fa668] MOV EDX,dword ptr [RAX] MOV RDI,RBX MOV ESI,R15D XOR EAX,EAX CALL 0x00124680 MOV R15D,EAX JMP 0x00130719 LAB_001306cd: LEA RAX,[0x3fa668] MOV R12D,dword ptr [RAX] LEA RSI,[RBP + -0x24] MOV RDI,RBX CALL 0x0013113c TEST RAX,RAX JZ 0x00130713 MOV EDI,dword ptr [RBP + -0x24] OR R15D,0xa0000 MOV RSI,RAX MOV EDX,R15D MOV ECX,R12D XOR EAX,EAX CALL 0x00124340 MOV R15D,EAX MOV EDI,dword ptr [RBP + -0x24] TEST EDI,EDI JS 0x00130719 CALL 0x00124710 JMP 0x00130719 LAB_00130713: MOV R15D,0xffffffff LAB_00130719: MOV EDI,R15D MOV RSI,RBX MOV EDX,0x1 MOV ECX,0x1d MOV R8,R14 CALL 0x0013073e ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void my_open(char *param_1,uint param_2,ulong param_3) { uint uVar1; int iVar2; char *__file; ulong uVar3; int local_2c; uVar1 = my_umask; uVar3 = my_global_flags; if ((param_3 & 0x19) != 0) { uVar3 = 0; } if (((uint)(uVar3 | param_3) >> 9 & 1) == 0) { iVar2 = open64(param_1,param_2 | 0x80000,(ulong)my_umask); } else { __file = (char *)my_open_parent_dir_nosymlinks(param_1,&local_2c); if (__file == (char *)0x0) { iVar2 = -1; } else { iVar2 = openat64(local_2c,__file,param_2 | 0xa0000,(ulong)uVar1); if (-1 < local_2c) { close(local_2c); } } } my_register_filename(iVar2,param_1,1,0x1d,uVar3 | param_3); return; }
25,312
cleanup_dirname
eloqsql/mysys/mf_pack.c
size_t cleanup_dirname(register char *to, const char *from) { reg5 size_t length; reg2 char * pos; reg3 char * from_ptr; reg4 char * start; char parent[5], /* for "FN_PARENTDIR" */ buff[FN_REFLEN + 1],*end_parentdir; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("cleanup_dirname"); DBUG_PRINT("enter",("from: '%s'",from)); start=buff; from_ptr=(char *) from; #ifdef FN_DEVCHAR if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0) { /* Skip device part */ length=(size_t) (pos-from_ptr)+1; start=strnmov(buff,from_ptr,length); from_ptr+=length; } #endif parent[0]=FN_LIBCHAR; length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent); for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++) { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2))) { for (l-- ; l ; *++pos= *from_ptr++, l--); start= pos + 1; /* Don't look inside multi-byte char */ continue; } #endif if (*pos == '/') *pos = FN_LIBCHAR; if (*pos == FN_LIBCHAR) { if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0) { /* If .../../; skip prev */ pos-=length; if (pos != start) { /* not /../ */ pos--; if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (!home_dir) { pos+=length+1; /* Don't unpack ~/.. */ continue; } pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (my_getwd(curr_dir,FN_REFLEN,MYF(0))) { pos+=length+1; /* Don't unpack ./.. */ continue; } pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } end_parentdir=pos; while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */ pos--; if (pos[1] == FN_HOMELIB || (pos >= start && memcmp(pos, parent, length) == 0)) { /* Don't remove ~user/ */ pos=strmov(end_parentdir+1,parent); *pos=FN_LIBCHAR; continue; } } } else if ((size_t) (pos-start) == length-1 && !memcmp(start,parent+1,length-1)) start=pos; /* Starts with "../" */ else if (pos-start > 0 && pos[-1] == FN_LIBCHAR) { #ifdef FN_NETWORK_DRIVES if (pos-start != 1) #endif pos--; /* Remove dupplicate '/' */ } else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR) pos-=2; /* Skip /./ */ } } (void) strmov(to,buff); DBUG_PRINT("exit",("to: '%s'",to)); DBUG_RETURN((size_t) (pos-buff)); }
O0
c
cleanup_dirname: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) jmp 0x35eb8 leaq -0x210(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x220(%rbp), %rax movq %rax, -0x238(%rbp) movb $0x2f, -0xd(%rbp) leaq -0xd(%rbp), %rdi addq $0x1, %rdi leaq 0x4e369(%rip), %rsi # 0x84250 callq 0x252d0 leaq -0xd(%rbp), %rcx subq %rcx, %rax movq %rax, -0x228(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x230(%rbp) movq -0x238(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x238(%rbp) movb (%rax), %al movq -0x230(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0x36301 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x35f4d movq -0x230(%rbp), %rax movb $0x2f, (%rax) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x362e8 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq -0x228(%rbp), %rax jbe 0x36204 movq -0x230(%rbp), %rdi xorl %eax, %eax subq -0x228(%rbp), %rax addq %rax, %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x25140 cmpl $0x0, %eax jne 0x36204 movq -0x228(%rbp), %rdx movq -0x230(%rbp), %rax xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x361ff movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x3608f movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x36020 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x3608f leaq 0x35b481(%rip), %rax # 0x3914a8 cmpq $0x0, (%rax) jne 0x3604b movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x362ea leaq -0x210(%rbp), %rdi leaq 0x35b44f(%rip), %rax # 0x3914a8 movq (%rax), %rsi callq 0x252d0 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x3608d movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x3608f movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax jne 0x3613b movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x360c2 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x3613b leaq 0x35b3f7(%rip), %rdi # 0x3914c0 movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0x385d0 cmpl $0x0, %eax je 0x360fa movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x362ea leaq -0x210(%rbp), %rdi leaq 0x35b3b8(%rip), %rsi # 0x3914c0 callq 0x252d0 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x36139 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x3613b movq -0x230(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x230(%rbp), %rcx xorl %eax, %eax cmpq -0x240(%rbp), %rcx movb %al, -0x249(%rbp) jb 0x36177 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax setne %al movb %al, -0x249(%rbp) movb -0x249(%rbp), %al testb $0x1, %al jne 0x36183 jmp 0x36197 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x36149 movq -0x230(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x7e, %eax je 0x361d3 movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax jb 0x361fd movq -0x230(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x25140 cmpl $0x0, %eax jne 0x361fd movq -0x248(%rbp), %rdi addq $0x1, %rdi leaq -0xd(%rbp), %rsi callq 0x252d0 movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movb $0x2f, (%rax) jmp 0x362ea jmp 0x361ff jmp 0x362e6 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax movq -0x228(%rbp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jne 0x3625c movq -0x240(%rbp), %rdi leaq -0xd(%rbp), %rsi addq $0x1, %rsi movq -0x228(%rbp), %rdx subq $0x1, %rdx callq 0x25140 cmpl $0x0, %eax jne 0x3625c movq -0x230(%rbp), %rax movq %rax, -0x240(%rbp) jmp 0x362e4 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x0, %rax jle 0x36297 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x36297 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x362e2 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x1, %rax jle 0x362e0 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2e, %eax jne 0x362e0 movq -0x230(%rbp), %rax movsbl -0x2(%rax), %eax cmpl $0x2f, %eax jne 0x362e0 movq -0x230(%rbp), %rax addq $-0x2, %rax movq %rax, -0x230(%rbp) jmp 0x362e2 jmp 0x362e4 jmp 0x362e6 jmp 0x362e8 jmp 0x362ea movq -0x230(%rbp), %rax addq $0x1, %rax movq %rax, -0x230(%rbp) jmp 0x35f08 movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x252d0 jmp 0x36316 jmp 0x36318 movq -0x230(%rbp), %rax leaq -0x210(%rbp), %rcx subq %rcx, %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x36352 movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x25330 nopw (%rax,%rax)
cleanup_dirname: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi jmp short $+2 loc_35EB8: lea rax, [rbp+var_210] mov [rbp+var_240], rax mov rax, [rbp+var_220] mov [rbp+var_238], rax mov [rbp+var_D], 2Fh ; '/' lea rdi, [rbp+var_D] add rdi, 1 lea rsi, asc_84250; ".." call _stpcpy lea rcx, [rbp+var_D] sub rax, rcx mov [rbp+var_228], rax mov rax, [rbp+var_240] mov [rbp+var_230], rax loc_35F08: mov rax, [rbp+var_238] mov rcx, rax add rcx, 1 mov [rbp+var_238], rcx mov al, [rax] mov rcx, [rbp+var_230] mov [rcx], al movsx eax, al cmp eax, 0 jz loc_36301 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_35F4D mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' loc_35F4D: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz loc_362E8 mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, [rbp+var_228] jbe loc_36204 mov rdi, [rbp+var_230] xor eax, eax sub rax, [rbp+var_228] add rdi, rax lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz loc_36204 mov rdx, [rbp+var_228] mov rax, [rbp+var_230] xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz loc_361FF mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz loc_3608F mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_36020 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_3608F loc_36020: lea rax, home_dir cmp qword ptr [rax], 0 jnz short loc_3604B mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_362EA loc_3604B: lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_3608D mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_3608D: jmp short $+2 loc_3608F: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_3613B mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_360C2 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_3613B loc_360C2: lea rdi, curr_dir mov esi, 200h xor eax, eax mov edx, eax call my_getwd cmp eax, 0 jz short loc_360FA mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_362EA loc_360FA: lea rdi, [rbp+var_210] lea rsi, curr_dir call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_36139 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_36139: jmp short $+2 loc_3613B: mov rax, [rbp+var_230] mov [rbp+var_248], rax loc_36149: mov rcx, [rbp+var_230] xor eax, eax cmp rcx, [rbp+var_240] mov [rbp+var_249], al jb short loc_36177 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' setnz al mov [rbp+var_249], al loc_36177: mov al, [rbp+var_249] test al, 1 jnz short loc_36183 jmp short loc_36197 loc_36183: mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_36149 loc_36197: mov rax, [rbp+var_230] movsx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jz short loc_361D3 mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jb short loc_361FD mov rdi, [rbp+var_230] lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz short loc_361FD loc_361D3: mov rdi, [rbp+var_248] add rdi, 1 lea rsi, [rbp+var_D] call _stpcpy mov [rbp+var_230], rax mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' jmp loc_362EA loc_361FD: jmp short $+2 loc_361FF: jmp loc_362E6 loc_36204: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx mov rcx, [rbp+var_228] sub rcx, 1 cmp rax, rcx jnz short loc_3625C mov rdi, [rbp+var_240] lea rsi, [rbp+var_D] add rsi, 1 mov rdx, [rbp+var_228] sub rdx, 1 call _memcmp cmp eax, 0 jnz short loc_3625C mov rax, [rbp+var_230] mov [rbp+var_240], rax jmp loc_362E4 loc_3625C: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 0 jle short loc_36297 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_36297 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_362E2 loc_36297: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 1 jle short loc_362E0 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Eh ; '.' jnz short loc_362E0 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-2] cmp eax, 2Fh ; '/' jnz short loc_362E0 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_230], rax loc_362E0: jmp short $+2 loc_362E2: jmp short $+2 loc_362E4: jmp short $+2 loc_362E6: jmp short $+2 loc_362E8: jmp short $+2 loc_362EA: mov rax, [rbp+var_230] add rax, 1 mov [rbp+var_230], rax jmp loc_35F08 loc_36301: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call _stpcpy jmp short $+2 loc_36316: jmp short $+2 loc_36318: mov rax, [rbp+var_230] lea rcx, [rbp+var_210] sub rax, rcx mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_36352 mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_36352: call ___stack_chk_fail
long long cleanup_dirname(long long a1, _BYTE *a2) { _BYTE *v2; // rax bool v4; // [rsp+17h] [rbp-249h] _BYTE *v5; // [rsp+18h] [rbp-248h] _BYTE *v6; // [rsp+20h] [rbp-240h] _BYTE *i; // [rsp+30h] [rbp-230h] unsigned long long v9; // [rsp+38h] [rbp-228h] long long v10; // [rsp+48h] [rbp-218h] _BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF char v12; // [rsp+253h] [rbp-Dh] BYREF _BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF *(_QWORD *)&v13[4] = __readfsqword(0x28u); v10 = a1; v6 = v11; v12 = 47; v9 = stpcpy(v13, "..") - (_QWORD)&v12; for ( i = v11; ; ++i ) { v2 = a2++; LOBYTE(v2) = *v2; *i = (_BYTE)v2; if ( !(_BYTE)v2 ) break; if ( *i == 47 ) *i = 47; if ( *i == 47 ) { if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) ) { i -= v9; if ( i != v6 ) { if ( *--i == 126 && (i == v6 || *(i - 1) == 47) ) { if ( !home_dir ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, home_dir) - 1); if ( *i == 47 ) --i; } if ( *i == 46 && (i == v6 || *(i - 1) == 47) ) { if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1); if ( *i == 47 ) --i; } v5 = i; while ( 1 ) { v4 = 0; if ( i >= v6 ) v4 = *i != 47; if ( !v4 ) break; --i; } if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) ) { i = (_BYTE *)stpcpy(v5 + 1, &v12); *i = 47; } } } else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) ) { v6 = i; } else if ( i - v6 > 0 && *(i - 1) == 47 ) { --i; } else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 ) { i -= 2; } } } stpcpy(v10, v11); return i - v11; }
cleanup_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI JMP 0x00135eb8 LAB_00135eb8: LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RBP + -0x238],RAX MOV byte ptr [RBP + -0xd],0x2f LEA RDI,[RBP + -0xd] ADD RDI,0x1 LEA RSI,[0x184250] CALL 0x001252d0 LEA RCX,[RBP + -0xd] SUB RAX,RCX MOV qword ptr [RBP + -0x228],RAX MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x230],RAX LAB_00135f08: MOV RAX,qword ptr [RBP + -0x238] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x238],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x230] MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x00136301 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x00135f4d MOV RAX,qword ptr [RBP + -0x230] MOV byte ptr [RAX],0x2f LAB_00135f4d: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001362e8 MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,qword ptr [RBP + -0x228] JBE 0x00136204 MOV RDI,qword ptr [RBP + -0x230] XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x228] ADD RDI,RAX LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x228] CALL 0x00125140 CMP EAX,0x0 JNZ 0x00136204 MOV RDX,qword ptr [RBP + -0x228] MOV RAX,qword ptr [RBP + -0x230] XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x001361ff MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x0013608f MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x00136020 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x0013608f LAB_00136020: LEA RAX,[0x4914a8] CMP qword ptr [RAX],0x0 JNZ 0x0013604b MOV RAX,qword ptr [RBP + -0x228] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x230],RAX JMP 0x001362ea LAB_0013604b: LEA RDI,[RBP + -0x210] LEA RAX,[0x4914a8] MOV RSI,qword ptr [RAX] CALL 0x001252d0 ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0013608d MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_0013608d: JMP 0x0013608f LAB_0013608f: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x0013613b MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x001360c2 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x0013613b LAB_001360c2: LEA RDI,[0x4914c0] MOV ESI,0x200 XOR EAX,EAX MOV EDX,EAX CALL 0x001385d0 CMP EAX,0x0 JZ 0x001360fa MOV RAX,qword ptr [RBP + -0x228] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x230],RAX JMP 0x001362ea LAB_001360fa: LEA RDI,[RBP + -0x210] LEA RSI,[0x4914c0] CALL 0x001252d0 ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x00136139 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_00136139: JMP 0x0013613b LAB_0013613b: MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x248],RAX LAB_00136149: MOV RCX,qword ptr [RBP + -0x230] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x240] MOV byte ptr [RBP + -0x249],AL JC 0x00136177 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f SETNZ AL MOV byte ptr [RBP + -0x249],AL LAB_00136177: MOV AL,byte ptr [RBP + -0x249] TEST AL,0x1 JNZ 0x00136183 JMP 0x00136197 LAB_00136183: MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x00136149 LAB_00136197: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JZ 0x001361d3 MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JC 0x001361fd MOV RDI,qword ptr [RBP + -0x230] LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x228] CALL 0x00125140 CMP EAX,0x0 JNZ 0x001361fd LAB_001361d3: MOV RDI,qword ptr [RBP + -0x248] ADD RDI,0x1 LEA RSI,[RBP + -0xd] CALL 0x001252d0 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOV byte ptr [RAX],0x2f JMP 0x001362ea LAB_001361fd: JMP 0x001361ff LAB_001361ff: JMP 0x001362e6 LAB_00136204: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x228] SUB RCX,0x1 CMP RAX,RCX JNZ 0x0013625c MOV RDI,qword ptr [RBP + -0x240] LEA RSI,[RBP + -0xd] ADD RSI,0x1 MOV RDX,qword ptr [RBP + -0x228] SUB RDX,0x1 CALL 0x00125140 CMP EAX,0x0 JNZ 0x0013625c MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x240],RAX JMP 0x001362e4 LAB_0013625c: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,0x0 JLE 0x00136297 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x00136297 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x001362e2 LAB_00136297: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,0x1 JLE 0x001362e0 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2e JNZ 0x001362e0 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x2] CMP EAX,0x2f JNZ 0x001362e0 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x2 MOV qword ptr [RBP + -0x230],RAX LAB_001362e0: JMP 0x001362e2 LAB_001362e2: JMP 0x001362e4 LAB_001362e4: JMP 0x001362e6 LAB_001362e6: JMP 0x001362e8 LAB_001362e8: JMP 0x001362ea LAB_001362ea: MOV RAX,qword ptr [RBP + -0x230] ADD RAX,0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x00135f08 LAB_00136301: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x001252d0 JMP 0x00136316 LAB_00136316: JMP 0x00136318 LAB_00136318: MOV RAX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x210] SUB RAX,RCX MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00136352 MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_00136352: CALL 0x00125330
long cleanup_dirname(char *param_1,char *param_2) { char cVar1; int iVar2; char *pcVar3; ulong __n; char *pcVar4; long in_FS_OFFSET; bool bVar5; char *local_248; char *local_240; char *local_238; char local_218 [515]; char local_15; char acStack_14 [4]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_248 = local_218; local_15 = '/'; pcVar3 = stpcpy(acStack_14,".."); __n = (long)pcVar3 - (long)&local_15; local_240 = param_2; local_238 = local_248; do { cVar1 = *local_240; *local_238 = cVar1; if (cVar1 == '\0') { stpcpy(param_1,local_218); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)local_238 - (long)local_218; } if (*local_238 == '/') { *local_238 = '/'; } if (*local_238 == '/') { if ((__n < (ulong)((long)local_238 - (long)local_248)) && (iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) { local_238 = local_238 + -__n; if (local_238 != local_248) { pcVar3 = local_238 + -1; if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) { if (home_dir == (char *)0x0) { local_238 = pcVar3 + __n + 1; goto LAB_001362ea; } pcVar4 = stpcpy(local_218,home_dir); pcVar3 = pcVar4 + -1; if (pcVar4[-1] == '/') { pcVar3 = pcVar4 + -2; } } local_238 = pcVar3; pcVar3 = local_238; if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) { iVar2 = my_getwd(&curr_dir,0x200,0); if (iVar2 != 0) { local_238 = local_238 + __n + 1; goto LAB_001362ea; } pcVar4 = stpcpy(local_218,&curr_dir); local_238 = pcVar4 + -1; pcVar3 = local_238; if (*local_238 == '/') { local_238 = pcVar4 + -2; pcVar3 = local_238; } } while( true ) { bVar5 = false; if (local_248 <= local_238) { bVar5 = *local_238 != '/'; } if (!bVar5) break; local_238 = local_238 + -1; } if ((local_238[1] == '~') || ((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) { local_238 = stpcpy(pcVar3 + 1,&local_15); *local_238 = '/'; } } } else if (((long)local_238 - (long)local_248 == __n - 1) && (iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) { local_248 = local_238; } else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) { if ((1 < (long)local_238 - (long)local_248) && ((local_238[-1] == '.' && (local_238[-2] == '/')))) { local_238 = local_238 + -2; } } else { local_238 = local_238 + -1; } } LAB_001362ea: local_238 = local_238 + 1; local_240 = local_240 + 1; } while( true ); }
25,313
cleanup_dirname
eloqsql/mysys/mf_pack.c
size_t cleanup_dirname(register char *to, const char *from) { reg5 size_t length; reg2 char * pos; reg3 char * from_ptr; reg4 char * start; char parent[5], /* for "FN_PARENTDIR" */ buff[FN_REFLEN + 1],*end_parentdir; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("cleanup_dirname"); DBUG_PRINT("enter",("from: '%s'",from)); start=buff; from_ptr=(char *) from; #ifdef FN_DEVCHAR if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0) { /* Skip device part */ length=(size_t) (pos-from_ptr)+1; start=strnmov(buff,from_ptr,length); from_ptr+=length; } #endif parent[0]=FN_LIBCHAR; length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent); for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++) { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2))) { for (l-- ; l ; *++pos= *from_ptr++, l--); start= pos + 1; /* Don't look inside multi-byte char */ continue; } #endif if (*pos == '/') *pos = FN_LIBCHAR; if (*pos == FN_LIBCHAR) { if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0) { /* If .../../; skip prev */ pos-=length; if (pos != start) { /* not /../ */ pos--; if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (!home_dir) { pos+=length+1; /* Don't unpack ~/.. */ continue; } pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (my_getwd(curr_dir,FN_REFLEN,MYF(0))) { pos+=length+1; /* Don't unpack ./.. */ continue; } pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } end_parentdir=pos; while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */ pos--; if (pos[1] == FN_HOMELIB || (pos >= start && memcmp(pos, parent, length) == 0)) { /* Don't remove ~user/ */ pos=strmov(end_parentdir+1,parent); *pos=FN_LIBCHAR; continue; } } } else if ((size_t) (pos-start) == length-1 && !memcmp(start,parent+1,length-1)) start=pos; /* Starts with "../" */ else if (pos-start > 0 && pos[-1] == FN_LIBCHAR) { #ifdef FN_NETWORK_DRIVES if (pos-start != 1) #endif pos--; /* Remove dupplicate '/' */ } else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR) pos-=2; /* Skip /./ */ } } (void) strmov(to,buff); DBUG_PRINT("exit",("to: '%s'",to)); DBUG_RETURN((size_t) (pos-buff)); }
O3
c
cleanup_dirname: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, %r14 movq %rdi, -0x248(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x35(%rbp), %r15 movb $0x2f, (%r15) movw $0x2e2e, 0x1(%r15) # imm = 0x2E2E movb $0x0, 0x3(%r15) leaq -0x240(%rbp), %r12 movq %r12, %r13 movzbl (%r14), %eax movb %al, (%r12) cmpl $0x2f, %eax je 0x2f15a testl %eax, %eax jne 0x2f312 jmp 0x2f31d movb $0x2f, (%r12) movq %r12, %rax subq %r13, %rax cmpq $0x4, %rax jb 0x2f231 movzwl -0x3(%r12), %ecx xorw -0x35(%rbp), %cx movb -0x1(%r12), %dl xorb -0x33(%rbp), %dl movzbl %dl, %edx orw %cx, %dx jne 0x2f24e leaq -0x3(%r12), %rax cmpq %r13, %rax je 0x2f295 leaq -0x4(%r12), %rbx movb -0x4(%r12), %al cmpb $0x7e, %al jne 0x2f1f4 cmpq %r13, %rbx je 0x2f1ba cmpb $0x2f, -0x5(%r12) jne 0x2f2b9 leaq 0x33e687(%rip), %rax # 0x36d848 movq (%rax), %rsi testq %rsi, %rsi je 0x2f312 leaq -0x240(%rbp), %rdi callq 0x24310 leaq -0x1(%rax), %rbx leaq -0x2(%rax), %rcx xorl %edx, %edx cmpb $0x2f, -0x1(%rax) sete %dl notq %rdx cmoveq %rcx, %rbx movb (%rax,%rdx), %al cmpb $0x2e, %al jne 0x2f2b9 cmpq %r13, %rbx leaq 0x33e65a(%rip), %r12 # 0x36d860 je 0x2f212 cmpb $0x2f, -0x1(%rbx) jne 0x2f2b9 movl $0x200, %esi # imm = 0x200 movq %r12, %rdi xorl %edx, %edx callq 0x306d8 testl %eax, %eax je 0x2f29a addq $0x4, %rbx movq %rbx, %r12 jmp 0x2f312 cmpq $0x2, %rax jne 0x2f24e movzwl (%r13), %eax cmpw -0x34(%rbp), %ax je 0x2f290 movb -0x1(%r12), %cl cmpb $0x2f, %cl je 0x2f261 jmp 0x2f273 testq %rax, %rax jle 0x2f312 movb -0x1(%r12), %cl cmpb $0x2f, %cl jne 0x2f269 decq %r12 jmp 0x2f312 cmpq $0x1, %rax je 0x2f312 cmpb $0x2e, %cl jne 0x2f312 leaq -0x2(%r12), %rax cmpb $0x2f, -0x2(%r12) cmoveq %rax, %r12 jmp 0x2f312 movq %r12, %r13 jmp 0x2f312 movq %rax, %r12 jmp 0x2f312 leaq -0x240(%rbp), %rdi movq %r12, %rsi callq 0x24310 leaq -0x1(%rax), %rbx leaq -0x2(%rax), %rcx cmpb $0x2f, -0x1(%rax) cmoveq %rcx, %rbx movq %rbx, %r12 cmpq %r13, %rbx jb 0x2f2d3 movq %rbx, %r12 cmpb $0x2f, (%r12) je 0x2f2dd decq %r12 cmpq %r13, %r12 jae 0x2f2c4 cmpb $0x7e, 0x1(%r12) je 0x2f2fe jmp 0x2f312 cmpb $0x7e, 0x1(%r12) je 0x2f2fe movzwl (%r12), %eax xorw -0x35(%rbp), %ax movb 0x2(%r12), %cl xorb -0x33(%rbp), %cl movzbl %cl, %ecx orw %ax, %cx jne 0x2f312 incq %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x24310 movq %rax, %r12 movb $0x2f, (%rax) incq %r14 incq %r12 jmp 0x2f140 leaq -0x240(%rbp), %rbx movq -0x248(%rbp), %rdi movq %rbx, %rsi callq 0x242a0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x2f35a subq %rbx, %r12 movq %r12, %rax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24380
cleanup_dirname: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov r14, rsi mov [rbp+var_248], rdi mov rax, fs:28h mov [rbp+var_30], rax lea r15, [rbp+var_35] mov byte ptr [r15], 2Fh ; '/' mov word ptr [r15+1], 2E2Eh mov byte ptr [r15+3], 0 lea r12, [rbp+var_240] mov r13, r12 loc_2F140: movzx eax, byte ptr [r14] mov [r12], al cmp eax, 2Fh ; '/' jz short loc_2F15A test eax, eax jnz loc_2F312 jmp loc_2F31D loc_2F15A: mov byte ptr [r12], 2Fh ; '/' mov rax, r12 sub rax, r13 cmp rax, 4 jb loc_2F231 movzx ecx, word ptr [r12-3] xor cx, [rbp+var_35] mov dl, [r12-1] xor dl, [rbp+var_33] movzx edx, dl or dx, cx jnz loc_2F24E lea rax, [r12-3] cmp rax, r13 jz loc_2F295 lea rbx, [r12-4] mov al, [r12-4] cmp al, 7Eh ; '~' jnz short loc_2F1F4 cmp rbx, r13 jz short loc_2F1BA cmp byte ptr [r12-5], 2Fh ; '/' jnz loc_2F2B9 loc_2F1BA: lea rax, home_dir mov rsi, [rax] test rsi, rsi jz loc_2F312 lea rdi, [rbp+var_240] call _stpcpy lea rbx, [rax-1] lea rcx, [rax-2] xor edx, edx cmp byte ptr [rax-1], 2Fh ; '/' setz dl not rdx cmovz rbx, rcx mov al, [rax+rdx] loc_2F1F4: cmp al, 2Eh ; '.' jnz loc_2F2B9 cmp rbx, r13 lea r12, curr_dir jz short loc_2F212 cmp byte ptr [rbx-1], 2Fh ; '/' jnz loc_2F2B9 loc_2F212: mov esi, 200h mov rdi, r12 xor edx, edx call my_getwd test eax, eax jz short loc_2F29A add rbx, 4 mov r12, rbx jmp loc_2F312 loc_2F231: cmp rax, 2 jnz short loc_2F24E movzx eax, word ptr [r13+0] cmp ax, [rbp+var_35+1] jz short loc_2F290 mov cl, [r12-1] cmp cl, 2Fh ; '/' jz short loc_2F261 jmp short loc_2F273 loc_2F24E: test rax, rax jle loc_2F312 mov cl, [r12-1] cmp cl, 2Fh ; '/' jnz short loc_2F269 loc_2F261: dec r12 jmp loc_2F312 loc_2F269: cmp rax, 1 jz loc_2F312 loc_2F273: cmp cl, 2Eh ; '.' jnz loc_2F312 lea rax, [r12-2] cmp byte ptr [r12-2], 2Fh ; '/' cmovz r12, rax jmp loc_2F312 loc_2F290: mov r13, r12 jmp short loc_2F312 loc_2F295: mov r12, rax jmp short loc_2F312 loc_2F29A: lea rdi, [rbp+var_240] mov rsi, r12 call _stpcpy lea rbx, [rax-1] lea rcx, [rax-2] cmp byte ptr [rax-1], 2Fh ; '/' cmovz rbx, rcx loc_2F2B9: mov r12, rbx cmp rbx, r13 jb short loc_2F2D3 mov r12, rbx loc_2F2C4: cmp byte ptr [r12], 2Fh ; '/' jz short loc_2F2DD dec r12 cmp r12, r13 jnb short loc_2F2C4 loc_2F2D3: cmp byte ptr [r12+1], 7Eh ; '~' jz short loc_2F2FE jmp short loc_2F312 loc_2F2DD: cmp byte ptr [r12+1], 7Eh ; '~' jz short loc_2F2FE movzx eax, word ptr [r12] xor ax, [rbp+var_35] mov cl, [r12+2] xor cl, [rbp+var_33] movzx ecx, cl or cx, ax jnz short loc_2F312 loc_2F2FE: inc rbx mov rdi, rbx mov rsi, r15 call _stpcpy mov r12, rax mov byte ptr [rax], 2Fh ; '/' loc_2F312: inc r14 inc r12 jmp loc_2F140 loc_2F31D: lea rbx, [rbp+var_240] mov rdi, [rbp+var_248] mov rsi, rbx call _strcpy mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_2F35A sub r12, rbx mov rax, r12 add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2F35A: call ___stack_chk_fail
long long cleanup_dirname(long long a1, unsigned __int8 *a2) { _BYTE *v3; // r12 _WORD *v4; // r13 int v5; // eax long long v6; // rax _BYTE *v7; // rbx char v8; // al long long v9; // rax char v10; // cl long long v11; // rax long long v13; // [rsp+8h] [rbp-248h] _BYTE v14[523]; // [rsp+10h] [rbp-240h] BYREF char v15[5]; // [rsp+21Bh] [rbp-35h] BYREF unsigned long long v16; // [rsp+220h] [rbp-30h] v13 = a1; v16 = __readfsqword(0x28u); strcpy(v15, "/.."); v3 = v14; v4 = v14; while ( 1 ) { v5 = *a2; *v3 = v5; if ( v5 != 47 ) break; *v3 = 47; v6 = v3 - (_BYTE *)v4; if ( (unsigned long long)(v3 - (_BYTE *)v4) < 4 ) { if ( v6 == 2 ) { if ( *v4 == *(_WORD *)&v15[1] ) { v4 = v3; goto LABEL_45; } v10 = *(v3 - 1); if ( v10 == 47 ) goto LABEL_26; LABEL_28: if ( v10 == 46 && *(v3 - 2) == 47 ) v3 -= 2; goto LABEL_45; } } else if ( !((unsigned __int16)(*(_WORD *)v15 ^ *(_WORD *)(v3 - 3)) | (unsigned __int8)(v15[2] ^ *(v3 - 1))) ) { if ( v3 - 3 == (_BYTE *)v4 ) { v3 -= 3; goto LABEL_45; } v7 = v3 - 4; v8 = *(v3 - 4); if ( v8 == 126 ) { if ( v7 == (_BYTE *)v4 || *(v3 - 5) == 47 ) { if ( !home_dir ) goto LABEL_45; v9 = stpcpy(v14, home_dir); v7 = (_BYTE *)(v9 - 1); if ( *(_BYTE *)(v9 - 1) == 47 ) v7 = (_BYTE *)(v9 - 2); v8 = *(_BYTE *)(v9 + ~(unsigned long long)(*(_BYTE *)(v9 - 1) == 47)); goto LABEL_15; } } else { LABEL_15: if ( v8 == 46 && (v7 == (_BYTE *)v4 || *(v7 - 1) == 47) ) { if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) ) { v3 = v7 + 4; goto LABEL_45; } v11 = stpcpy(v14, &curr_dir); v7 = (_BYTE *)(v11 - 1); if ( *(_BYTE *)(v11 - 1) == 47 ) v7 = (_BYTE *)(v11 - 2); } } v3 = v7; if ( v7 < (_BYTE *)v4 ) { LABEL_40: if ( v3[1] == 126 ) goto LABEL_44; } else { v3 = v7; while ( *v3 != 47 ) { if ( --v3 < (_BYTE *)v4 ) goto LABEL_40; } if ( v3[1] == 126 || !((unsigned __int16)(*(_WORD *)v15 ^ *(_WORD *)v3) | (unsigned __int8)(v15[2] ^ v3[2])) ) { LABEL_44: v3 = (_BYTE *)stpcpy(v7 + 1, v15); *v3 = 47; goto LABEL_45; } } goto LABEL_45; } if ( v6 <= 0 ) goto LABEL_45; v10 = *(v3 - 1); if ( v10 == 47 ) { LABEL_26: --v3; goto LABEL_45; } if ( v6 != 1 ) goto LABEL_28; LABEL_45: ++a2; ++v3; } if ( v5 ) goto LABEL_45; strcpy(v13, v14); return v3 - v14; }
cleanup_dirname: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV R14,RSI MOV qword ptr [RBP + -0x248],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RBP + -0x35] MOV byte ptr [R15],0x2f MOV word ptr [R15 + 0x1],0x2e2e MOV byte ptr [R15 + 0x3],0x0 LEA R12,[RBP + -0x240] MOV R13,R12 LAB_0012f140: MOVZX EAX,byte ptr [R14] MOV byte ptr [R12],AL CMP EAX,0x2f JZ 0x0012f15a TEST EAX,EAX JNZ 0x0012f312 JMP 0x0012f31d LAB_0012f15a: MOV byte ptr [R12],0x2f MOV RAX,R12 SUB RAX,R13 CMP RAX,0x4 JC 0x0012f231 MOVZX ECX,word ptr [R12 + -0x3] XOR CX,word ptr [RBP + -0x35] MOV DL,byte ptr [R12 + -0x1] XOR DL,byte ptr [RBP + -0x33] MOVZX EDX,DL OR DX,CX JNZ 0x0012f24e LEA RAX,[R12 + -0x3] CMP RAX,R13 JZ 0x0012f295 LEA RBX,[R12 + -0x4] MOV AL,byte ptr [R12 + -0x4] CMP AL,0x7e JNZ 0x0012f1f4 CMP RBX,R13 JZ 0x0012f1ba CMP byte ptr [R12 + -0x5],0x2f JNZ 0x0012f2b9 LAB_0012f1ba: LEA RAX,[0x46d848] MOV RSI,qword ptr [RAX] TEST RSI,RSI JZ 0x0012f312 LEA RDI,[RBP + -0x240] CALL 0x00124310 LEA RBX,[RAX + -0x1] LEA RCX,[RAX + -0x2] XOR EDX,EDX CMP byte ptr [RAX + -0x1],0x2f SETZ DL NOT RDX CMOVZ RBX,RCX MOV AL,byte ptr [RAX + RDX*0x1] LAB_0012f1f4: CMP AL,0x2e JNZ 0x0012f2b9 CMP RBX,R13 LEA R12,[0x46d860] JZ 0x0012f212 CMP byte ptr [RBX + -0x1],0x2f JNZ 0x0012f2b9 LAB_0012f212: MOV ESI,0x200 MOV RDI,R12 XOR EDX,EDX CALL 0x001306d8 TEST EAX,EAX JZ 0x0012f29a ADD RBX,0x4 MOV R12,RBX JMP 0x0012f312 LAB_0012f231: CMP RAX,0x2 JNZ 0x0012f24e MOVZX EAX,word ptr [R13] CMP AX,word ptr [RBP + -0x34] JZ 0x0012f290 MOV CL,byte ptr [R12 + -0x1] CMP CL,0x2f JZ 0x0012f261 JMP 0x0012f273 LAB_0012f24e: TEST RAX,RAX JLE 0x0012f312 MOV CL,byte ptr [R12 + -0x1] CMP CL,0x2f JNZ 0x0012f269 LAB_0012f261: DEC R12 JMP 0x0012f312 LAB_0012f269: CMP RAX,0x1 JZ 0x0012f312 LAB_0012f273: CMP CL,0x2e JNZ 0x0012f312 LEA RAX,[R12 + -0x2] CMP byte ptr [R12 + -0x2],0x2f CMOVZ R12,RAX JMP 0x0012f312 LAB_0012f290: MOV R13,R12 JMP 0x0012f312 LAB_0012f295: MOV R12,RAX JMP 0x0012f312 LAB_0012f29a: LEA RDI,[RBP + -0x240] MOV RSI,R12 CALL 0x00124310 LEA RBX,[RAX + -0x1] LEA RCX,[RAX + -0x2] CMP byte ptr [RAX + -0x1],0x2f CMOVZ RBX,RCX LAB_0012f2b9: MOV R12,RBX CMP RBX,R13 JC 0x0012f2d3 MOV R12,RBX LAB_0012f2c4: CMP byte ptr [R12],0x2f JZ 0x0012f2dd DEC R12 CMP R12,R13 JNC 0x0012f2c4 LAB_0012f2d3: CMP byte ptr [R12 + 0x1],0x7e JZ 0x0012f2fe JMP 0x0012f312 LAB_0012f2dd: CMP byte ptr [R12 + 0x1],0x7e JZ 0x0012f2fe MOVZX EAX,word ptr [R12] XOR AX,word ptr [RBP + -0x35] MOV CL,byte ptr [R12 + 0x2] XOR CL,byte ptr [RBP + -0x33] MOVZX ECX,CL OR CX,AX JNZ 0x0012f312 LAB_0012f2fe: INC RBX MOV RDI,RBX MOV RSI,R15 CALL 0x00124310 MOV R12,RAX MOV byte ptr [RAX],0x2f LAB_0012f312: INC R14 INC R12 JMP 0x0012f140 LAB_0012f31d: LEA RBX,[RBP + -0x240] MOV RDI,qword ptr [RBP + -0x248] MOV RSI,RBX CALL 0x001242a0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0012f35a SUB R12,RBX MOV RAX,R12 ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012f35a: CALL 0x00124380
long cleanup_dirname(char *param_1,char *param_2) { char cVar1; int iVar2; ulong uVar3; char *pcVar4; short *psVar5; short *psVar6; short *psVar7; short *psVar8; short *psVar9; long in_FS_OFFSET; short local_248 [261]; int1 local_3d [2]; char cStack_3b; int1 local_3a; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); _local_3d = 0x2e2e2f; local_3a = 0; psVar7 = local_248; psVar8 = psVar7; do { cVar1 = *param_2; *(char *)psVar7 = cVar1; psVar5 = psVar7; psVar9 = psVar8; if (cVar1 == '/') { *(char *)psVar7 = '/'; uVar3 = (long)psVar7 - (long)psVar8; if (uVar3 < 4) { if (uVar3 != 2) goto LAB_0012f24e; psVar9 = psVar7; if (*psVar8 == stack0xffffffffffffffc4) goto LAB_0012f312; cVar1 = *(char *)((long)psVar7 + -1); if (cVar1 == '/') goto LAB_0012f261; LAB_0012f273: psVar9 = psVar8; if ((cVar1 == '.') && ((char)psVar7[-1] == '/')) { psVar5 = psVar7 + -1; } } else if (*(char *)((long)psVar7 + -1) == cStack_3b && (int1 [2])*(short *)((long)psVar7 + -3) == local_3d) { psVar5 = (short *)((long)psVar7 + -3); if (psVar5 == psVar8) goto LAB_0012f312; psVar5 = psVar7 + -2; cVar1 = (char)psVar7[-2]; if (cVar1 == '~') { if ((psVar5 == psVar8) || (psVar6 = psVar5, *(char *)((long)psVar7 + -5) == '/')) { psVar5 = psVar7; if (home_dir == (char *)0x0) goto LAB_0012f312; pcVar4 = stpcpy((char *)local_248,home_dir); psVar5 = (short *)(pcVar4 + -1); if (pcVar4[-1] == '/') { psVar5 = (short *)(pcVar4 + -2); } cVar1 = pcVar4[~(ulong)(pcVar4[-1] == '/')]; goto LAB_0012f1f4; } } else { LAB_0012f1f4: psVar6 = psVar5; if ((cVar1 == '.') && ((psVar5 == psVar8 || (*(char *)((long)psVar5 + -1) == '/')))) { iVar2 = my_getwd(&curr_dir,0x200,0); if (iVar2 != 0) { psVar5 = psVar5 + 2; goto LAB_0012f312; } pcVar4 = stpcpy((char *)local_248,&curr_dir); psVar5 = (short *)(pcVar4 + -1); psVar6 = (short *)(pcVar4 + -1); if (pcVar4[-1] == '/') { psVar5 = (short *)(pcVar4 + -2); psVar6 = (short *)(pcVar4 + -2); } } } for (; psVar8 <= psVar5; psVar5 = (short *)((long)psVar5 + -1)) { if ((char)*psVar5 == '/') { if (*(char *)((long)psVar5 + 1) == '~') goto LAB_0012f2fe; if ((char)psVar5[1] != cStack_3b || (int1 [2])*psVar5 != local_3d) goto LAB_0012f312; goto LAB_0012f2fe; } } if (*(char *)((long)psVar5 + 1) == '~') { LAB_0012f2fe: psVar5 = (short *)stpcpy((char *)((long)psVar6 + 1),local_3d); *(int1 *)psVar5 = 0x2f; } } else { LAB_0012f24e: if (0 < (long)uVar3) { cVar1 = *(char *)((long)psVar7 + -1); if (cVar1 == '/') { LAB_0012f261: psVar5 = (short *)((long)psVar7 + -1); psVar9 = psVar8; } else if (uVar3 != 1) goto LAB_0012f273; } } } else if (cVar1 == '\0') { strcpy(param_1,(char *)local_248); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)psVar7 - (long)local_248; } LAB_0012f312: param_2 = param_2 + 1; psVar7 = (short *)((long)psVar5 + 1); psVar8 = psVar9; } while( true ); }
25,314
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); }
O2
c
ssz_dump_to_file_no_quotes: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx movups 0x3265b(%rip), %xmm0 # 0x7f418 leaq 0x20(%rsp), %r14 movaps %xmm0, 0x10(%r14) movups 0x3263a(%rip), %xmm0 # 0x7f408 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 0x4c817 movl (%r14), %edi movq 0x8(%r14), %rsi movq %rbx, %rdx xorl %ecx, %ecx callq 0x4b48e movq %r14, %rdi callq 0x4b16d 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_7F418 lea r14, [rsp+58h+var_38] movaps xmmword ptr [r14+10h], xmm0 movups xmm0, cs:xmmword_7F408 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_7F418; v9[0] = xmmword_7F408; 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 [0x0017f418] LEA R14,[RSP + 0x20] MOVAPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [0x0017f408] 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 0x0014c817 MOV EDI,dword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] MOV RDX,RBX XOR ECX,ECX CALL 0x0014b48e MOV RDI,R14 CALL 0x0014b16d 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_0017f418; uStack_20 = _UNK_0017f420; local_38 = _DAT_0017f408; uStack_30 = _UNK_0017f410; 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; }
25,315
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++()
monkey531[P]llama/common/json.hpp
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { ++m_it.primitive_iterator; break; } } return *this; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, (%rax) jne 0xc7b7a leaq 0xfc415(%rip), %rdi # 0x1c3f75 movl $0x33c0, %esi # imm = 0x33C0 leaq 0xfabd5(%rip), %rdx # 0x1c2741 leaq 0xfeb88(%rip), %rcx # 0x1c66fb movb $0x0, %al callq 0x52c30 movq 0x8(%rsp), %rax movq (%rax), %rax movzbl (%rax), %eax movq %rax, (%rsp) subq $0x9, %rax ja 0xc7bd3 movq (%rsp), %rax leaq 0xfa2f2(%rip), %rcx # 0x1c1e8c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsp), %rdi addq $0x8, %rdi movl $0x1, %esi callq 0xc9a40 jmp 0xc7be5 movq 0x8(%rsp), %rdi addq $0x8, %rdi addq $0x8, %rdi movl $0x1, %esi callq 0xc9a90 jmp 0xc7be5 jmp 0xc7bd3 movq 0x8(%rsp), %rdi addq $0x8, %rdi addq $0x10, %rdi callq 0xc9ae0 movq 0x8(%rsp), %rax addq $0x18, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_10], rax cmp qword ptr [rax], 0 jnz short loc_C7B7A lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 33C0h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov al, 0 call _ggml_abort loc_C7B7A: mov rax, [rsp+18h+var_10] mov rax, [rax] movzx eax, byte ptr [rax] mov [rsp+18h+var_18], rax sub rax, 9; switch 10 cases ja short def_C7BA1; jumptable 00000000000C7BA1 default case mov rax, [rsp+18h+var_18] lea rcx, jpt_C7BA1 movsxd rax, ds:(jpt_C7BA1 - 1C1E8Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_C7BA3: mov rdi, [rsp+18h+var_10]; jumptable 00000000000C7BA1 case 1 add rdi, 8 mov esi, 1 call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEiEvRT_T0_; std::advance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,int>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> &,int) jmp short loc_C7BE5 loc_C7BB8: mov rdi, [rsp+18h+var_10]; jumptable 00000000000C7BA1 case 2 add rdi, 8 add rdi, 8 mov esi, 1 call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES6_ISG_SaISG_EEEEiEvRT_T0_; std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,int>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> &,int) jmp short loc_C7BE5 loc_C7BD1: jmp short $+2; jumptable 00000000000C7BA1 cases 0,3-9 def_C7BA1: mov rdi, [rsp+18h+var_10]; jumptable 00000000000C7BA1 default case add rdi, 8 add rdi, 10h call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tppEv; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(void) loc_C7BE5: mov rax, [rsp+18h+var_10] add rsp, 18h retn
_QWORD * nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++( _QWORD *a1) { if ( !*a1 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 13248LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); switch ( *(_BYTE *)*a1 ) { case 1: std::advance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,int>( a1 + 1, 1LL); break; case 2: std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,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>>>,int>( a1 + 2, 1LL); break; default: nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(a1 + 3); break; } return a1; }
operator++: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RAX],0x0 JNZ 0x001c7b7a LEA RDI,[0x2c3f75] MOV ESI,0x33c0 LEA RDX,[0x2c2741] LEA RCX,[0x2c66fb] MOV AL,0x0 CALL 0x00152c30 LAB_001c7b7a: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RSP],RAX SUB RAX,0x9 JA 0x001c7bd3 MOV RAX,qword ptr [RSP] LEA RCX,[0x2c1e8c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 MOV ESI,0x1 CALL 0x001c9a40 JMP 0x001c7be5 caseD_2: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 ADD RDI,0x8 MOV ESI,0x1 CALL 0x001c9a90 JMP 0x001c7be5 caseD_0: JMP 0x001c7bd3 default: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 ADD RDI,0x10 CALL 0x001c9ae0 LAB_001c7be5: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 RET
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() */ iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { if (*(long *)this == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0, "GGML_ASSERT(%s) failed","m_object != nullptr"); } switch(**(int1 **)this) { case 0: case 3: case 4: case 5: case 6: case 7: case 8: case 9: default: primitive_iterator_t::operator++((primitive_iterator_t *)(this + 0x18)); break; case 1: std:: advance<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>,int> ((__normal_iterator *)(this + 8),1); break; case 2: std:: advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,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>>>>,int> ((__normal_iterator *)(this + 0x10),1); } return this; }
25,316
my_rw_init
eloqsql/mysys/thr_rwlock.c
int my_rw_init(my_rw_lock_t *rwp) { pthread_condattr_t cond_attr; pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST); pthread_condattr_init( &cond_attr ); pthread_cond_init( &rwp->readers, &cond_attr ); pthread_cond_init( &rwp->writers, &cond_attr ); pthread_condattr_destroy(&cond_attr); rwp->state = 0; rwp->waiters = 0; #ifdef SAFE_MUTEX rwp->write_thread = 0; #endif return(0); }
O3
c
my_rw_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0xb65a6f(%rip), %rsi # 0xc0ace0 callq 0x29340 leaq -0x14(%rbp), %r14 movq %r14, %rdi callq 0x296c0 leaq 0x28(%rbx), %rdi movq %r14, %rsi callq 0x29380 leaq 0x58(%rbx), %rdi movq %r14, %rsi callq 0x29380 movq %r14, %rdi callq 0x296b0 movq $0x0, 0x88(%rbx) xorl %eax, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
my_rw_init: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov rbx, rdi lea rsi, my_fast_mutexattr call _pthread_mutex_init lea r14, [rbp+var_14] mov rdi, r14 call _pthread_condattr_init lea rdi, [rbx+28h] mov rsi, r14 call _pthread_cond_init lea rdi, [rbx+58h] mov rsi, r14 call _pthread_cond_init mov rdi, r14 call _pthread_condattr_destroy mov qword ptr [rbx+88h], 0 xor eax, eax add rsp, 10h pop rbx pop r14 pop rbp retn
long long my_rw_init(long long a1) { _BYTE v2[20]; // [rsp+Ch] [rbp-14h] BYREF pthread_mutex_init(a1, &my_fast_mutexattr); pthread_condattr_init(v2); pthread_cond_init(a1 + 40, v2); pthread_cond_init(a1 + 88, v2); pthread_condattr_destroy(v2); *(_QWORD *)(a1 + 136) = 0LL; return 0LL; }
my_rw_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI LEA RSI,[0xd0ace0] CALL 0x00129340 LEA R14,[RBP + -0x14] MOV RDI,R14 CALL 0x001296c0 LEA RDI,[RBX + 0x28] MOV RSI,R14 CALL 0x00129380 LEA RDI,[RBX + 0x58] MOV RSI,R14 CALL 0x00129380 MOV RDI,R14 CALL 0x001296b0 MOV qword ptr [RBX + 0x88],0x0 XOR EAX,EAX ADD RSP,0x10 POP RBX POP R14 POP RBP RET
int8 my_rw_init(pthread_mutex_t *param_1) { pthread_condattr_t local_1c; pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr); pthread_condattr_init(&local_1c); pthread_cond_init((pthread_cond_t *)(param_1 + 1),&local_1c); pthread_cond_init((pthread_cond_t *)((long)param_1 + 0x58),&local_1c); pthread_condattr_destroy(&local_1c); *(int8 *)((long)param_1 + 0x88) = 0; return 0; }
25,317
mi_cmp_dynamic_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_cmp_dynamic_record(register MI_INFO *info, register const uchar *record) { uint flag,reclength,b_type; my_off_t filepos; uchar *buffer; MI_BLOCK_INFO block_info; DBUG_ENTER("_mi_cmp_dynamic_record"); if (info->opt_flag & WRITE_CACHE_USED) { info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK); if (flush_io_cache(&info->rec_cache)) DBUG_RETURN(-1); } info->rec_cache.seek_not_done=1; /* If nobody have touched the database we don't have to test rec */ buffer=info->rec_buff; if ((info->opt_flag & READ_CHECK_USED)) { /* If check isn't disabled */ if (info->s->base.blobs) { if (!(buffer=(uchar*) my_alloca(info->s->base.pack_reclength+ _mi_calc_total_blob_length(info,record)))) DBUG_RETURN(-1); } reclength=_mi_rec_pack(info,buffer,record); record= buffer; filepos=info->lastpos; flag=block_info.second_read=0; block_info.next_filepos=filepos; while (reclength > 0) { if ((b_type=_mi_get_block_info(&block_info,info->dfile, block_info.next_filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_CHANGED; goto err; } if (flag == 0) /* First block */ { flag=1; if (reclength != block_info.rec_len) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } } else if (reclength < block_info.data_len) { my_errno=HA_ERR_WRONG_IN_RECORD; goto err; } reclength-=block_info.data_len; if (_mi_cmp_buffer(info->dfile,record,block_info.filepos, block_info.data_len)) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } flag=1; record+=block_info.data_len; } } my_errno=0; err: if (buffer != info->rec_buff) my_afree((uchar*) buffer); DBUG_RETURN(my_errno); }
O0
c
mi_cmp_dynamic_record: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq -0x70(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xb0d12 movq -0x70(%rbp), %rax movl 0x1d0(%rax), %ecx andl $0xfffff6ff, %ecx # imm = 0xFFFFF6FF movl %ecx, 0x1d0(%rax) movq -0x70(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 movl $0x1, %esi callq 0xe5bf0 cmpl $0x0, %eax je 0xb0d10 jmp 0xb0d04 movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0xb0f10 jmp 0xb0d12 movq -0x70(%rbp), %rax movl $0x1, 0x300(%rax) movq -0x70(%rbp), %rax movq 0x120(%rax), %rax movq %rax, -0x98(%rbp) movq -0x70(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0xb0ed9 movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x188(%rax) je 0xb0dac movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rax movq %rax, -0xa0(%rbp) movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0xad820 movq -0xa0(%rbp), %rsi addq %rax, %rsi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xfc090 movq %rax, -0x98(%rbp) cmpq $0x0, %rax jne 0xb0daa jmp 0xb0d9e movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0xb0f10 jmp 0xb0dac movq -0x70(%rbp), %rdi movq -0x98(%rbp), %rsi movq -0x78(%rbp), %rdx callq 0xac890 movl %eax, -0x80(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x70(%rbp), %rax movq 0x170(%rax), %rax movq %rax, -0x90(%rbp) movl $0x0, -0x10(%rbp) movl $0x0, -0x7c(%rbp) movq -0x90(%rbp), %rax movq %rax, -0x20(%rbp) cmpl $0x0, -0x80(%rbp) jbe 0xb0ed7 movq -0x70(%rbp), %rax movl 0x1c0(%rax), %esi movq -0x20(%rbp), %rdx leaq -0x60(%rbp), %rdi callq 0xaec60 movl %eax, -0x84(%rbp) andl $0x3c, %eax cmpl $0x0, %eax je 0xb0e46 movl -0x84(%rbp), %eax andl $0x14, %eax cmpl $0x0, %eax je 0xb0e41 callq 0xfea30 movl $0x7b, (%rax) jmp 0xb0ee4 cmpl $0x0, -0x7c(%rbp) jne 0xb0e6b movl $0x1, -0x7c(%rbp) movl -0x80(%rbp), %eax cmpq -0x48(%rbp), %rax je 0xb0e69 callq 0xfea30 movl $0x7b, (%rax) jmp 0xb0ee4 jmp 0xb0e83 movl -0x80(%rbp), %eax cmpq -0x40(%rbp), %rax jae 0xb0e81 callq 0xfea30 movl $0x7f, (%rax) jmp 0xb0ee4 jmp 0xb0e83 movq -0x40(%rbp), %rcx movl -0x80(%rbp), %eax subq %rcx, %rax movl %eax, -0x80(%rbp) movq -0x70(%rbp), %rax movl 0x1c0(%rax), %edi movq -0x78(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x40(%rbp), %rax movl %eax, %ecx callq 0xb0f40 cmpl $0x0, %eax je 0xb0ebf callq 0xfea30 movl $0x7b, (%rax) jmp 0xb0ee4 movl $0x1, -0x7c(%rbp) movq -0x40(%rbp), %rax addq -0x78(%rbp), %rax movq %rax, -0x78(%rbp) jmp 0xb0df9 jmp 0xb0ed9 callq 0xfea30 movl $0x0, (%rax) movq -0x98(%rbp), %rax movq -0x70(%rbp), %rcx cmpq 0x120(%rcx), %rax je 0xb0f04 movq -0x98(%rbp), %rdi callq 0xfc410 jmp 0xb0f06 callq 0xfea30 movl (%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0xa4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xb0f3a movl -0xa4(%rbp), %eax addq $0xb0, %rsp popq %rbp retq callq 0x2a250 nop
_mi_cmp_dynamic_record: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov rax, [rbp+var_70] mov eax, [rax+1C8h] and eax, 10h cmp eax, 0 jz short loc_B0D12 mov rax, [rbp+var_70] mov ecx, [rax+1D0h] and ecx, 0FFFFF6FFh mov [rax+1D0h], ecx mov rdi, [rbp+var_70] add rdi, 220h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_B0D10 jmp short $+2 loc_B0D04: mov [rbp+var_64], 0FFFFFFFFh jmp loc_B0F10 loc_B0D10: jmp short $+2 loc_B0D12: mov rax, [rbp+var_70] mov dword ptr [rax+300h], 1 mov rax, [rbp+var_70] mov rax, [rax+120h] mov [rbp+var_98], rax mov rax, [rbp+var_70] mov eax, [rax+1C8h] and eax, 4 cmp eax, 0 jz loc_B0ED9 mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+188h], 0 jz short loc_B0DAC mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+148h] mov [rbp+var_A0], rax mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] call _mi_calc_total_blob_length mov rsi, [rbp+var_A0] add rsi, rax xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_98], rax cmp rax, 0 jnz short loc_B0DAA jmp short $+2 loc_B0D9E: mov [rbp+var_64], 0FFFFFFFFh jmp loc_B0F10 loc_B0DAA: jmp short $+2 loc_B0DAC: mov rdi, [rbp+var_70] mov rsi, [rbp+var_98] mov rdx, [rbp+var_78] call _mi_rec_pack mov [rbp+var_80], eax mov rax, [rbp+var_98] mov [rbp+var_78], rax mov rax, [rbp+var_70] mov rax, [rax+170h] mov [rbp+var_90], rax mov [rbp+var_10], 0 mov [rbp+var_7C], 0 mov rax, [rbp+var_90] mov [rbp+var_20], rax loc_B0DF9: cmp [rbp+var_80], 0 jbe loc_B0ED7 mov rax, [rbp+var_70] mov esi, [rax+1C0h] mov rdx, [rbp+var_20] lea rdi, [rbp+var_60] call _mi_get_block_info mov [rbp+var_84], eax and eax, 3Ch cmp eax, 0 jz short loc_B0E46 mov eax, [rbp+var_84] and eax, 14h cmp eax, 0 jz short loc_B0E41 call _my_thread_var mov dword ptr [rax], 7Bh ; '{' loc_B0E41: jmp loc_B0EE4 loc_B0E46: cmp [rbp+var_7C], 0 jnz short loc_B0E6B mov [rbp+var_7C], 1 mov eax, [rbp+var_80] cmp rax, [rbp+var_48] jz short loc_B0E69 call _my_thread_var mov dword ptr [rax], 7Bh ; '{' jmp short loc_B0EE4 loc_B0E69: jmp short loc_B0E83 loc_B0E6B: mov eax, [rbp+var_80] cmp rax, [rbp+var_40] jnb short loc_B0E81 call _my_thread_var mov dword ptr [rax], 7Fh jmp short loc_B0EE4 loc_B0E81: jmp short $+2 loc_B0E83: mov rcx, [rbp+var_40] mov eax, [rbp+var_80] sub rax, rcx mov [rbp+var_80], eax mov rax, [rbp+var_70] mov edi, [rax+1C0h] mov rsi, [rbp+var_78] mov rdx, [rbp+var_28] mov rax, [rbp+var_40] mov ecx, eax call _mi_cmp_buffer cmp eax, 0 jz short loc_B0EBF call _my_thread_var mov dword ptr [rax], 7Bh ; '{' jmp short loc_B0EE4 loc_B0EBF: mov [rbp+var_7C], 1 mov rax, [rbp+var_40] add rax, [rbp+var_78] mov [rbp+var_78], rax jmp loc_B0DF9 loc_B0ED7: jmp short $+2 loc_B0ED9: call _my_thread_var mov dword ptr [rax], 0 loc_B0EE4: mov rax, [rbp+var_98] mov rcx, [rbp+var_70] cmp rax, [rcx+120h] jz short loc_B0F04 mov rdi, [rbp+var_98] call my_free loc_B0F04: jmp short $+2 loc_B0F06: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax loc_B0F10: mov eax, [rbp+var_64] mov [rbp+var_A4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_B0F3A mov eax, [rbp+var_A4] add rsp, 0B0h pop rbp retn loc_B0F3A: call ___stack_chk_fail
long long mi_cmp_dynamic_record(char *a1, const char *a2) { long long v2; // rax long long v4; // [rsp+10h] [rbp-A0h] char *v5; // [rsp+18h] [rbp-98h] long long v6; // [rsp+20h] [rbp-90h] char block_info; // [rsp+2Ch] [rbp-84h] unsigned int v8; // [rsp+30h] [rbp-80h] int v9; // [rsp+34h] [rbp-7Ch] _BYTE *v10; // [rsp+38h] [rbp-78h] const char *v11; // [rsp+38h] [rbp-78h] char *v12; // [rsp+40h] [rbp-70h] char v14[24]; // [rsp+50h] [rbp-60h] BYREF long long v15; // [rsp+68h] [rbp-48h] unsigned long long v16; // [rsp+70h] [rbp-40h] long long v17; // [rsp+88h] [rbp-28h] long long v18; // [rsp+90h] [rbp-20h] int v19; // [rsp+A0h] [rbp-10h] unsigned long long v20; // [rsp+A8h] [rbp-8h] v20 = __readfsqword(0x28u); v12 = a1; v10 = a2; if ( (*((_DWORD *)a1 + 114) & 0x10) != 0 && (*((_DWORD *)a1 + 116) &= 0xFFFFF6FF, a1 += 544, a2 = (_BYTE *)(&dword_0 + 1), (unsigned int)my_b_flush_io_cache(v12 + 544, 1LL)) ) { return (unsigned int)-1; } else { *((_DWORD *)v12 + 192) = 1; v5 = (char *)*((_QWORD *)v12 + 36); if ( (*((_DWORD *)v12 + 114) & 4) != 0 ) { if ( *(_DWORD *)(*(_QWORD *)v12 + 392LL) ) { v4 = *(_QWORD *)(*(_QWORD *)v12 + 328LL); v2 = mi_calc_total_blob_length(v12, (long long)v10); v5 = (char *)my_malloc(0LL, v2 + v4, 0LL); if ( !v5 ) return (unsigned int)-1; } a1 = v12; a2 = v5; v8 = mi_rec_pack(v12, v5, v10); v11 = v5; v6 = *((_QWORD *)v12 + 46); v19 = 0; v9 = 0; v18 = v6; while ( v8 ) { a2 = (const char *)*((unsigned int *)v12 + 112); a1 = v14; block_info = mi_get_block_info(v14, a2, v18); if ( (block_info & 0x3C) != 0 ) { if ( (block_info & 0x14) != 0 ) *(_DWORD *)my_thread_var(v14, a2) = 123; goto LABEL_23; } if ( v9 ) { if ( v8 < v16 ) { *(_DWORD *)my_thread_var(v14, a2) = 127; goto LABEL_23; } } else if ( v8 != v15 ) { goto LABEL_16; } v8 -= v16; a1 = (char *)*((unsigned int *)v12 + 112); a2 = v11; if ( (unsigned int)mi_cmp_buffer(a1, v11, v17, (unsigned int)v16) ) { LABEL_16: *(_DWORD *)my_thread_var(a1, a2) = 123; goto LABEL_23; } v9 = 1; v11 += v16; } } *(_DWORD *)my_thread_var(a1, a2) = 0; LABEL_23: if ( v5 != *((char **)v12 + 36) ) { a1 = v5; my_free(v5); } return *(unsigned int *)my_thread_var(a1, a2); } }
_mi_cmp_dynamic_record: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 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 + -0x70] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x10 CMP EAX,0x0 JZ 0x001b0d12 MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x1d0] AND ECX,0xfffff6ff MOV dword ptr [RAX + 0x1d0],ECX MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x220 MOV ESI,0x1 CALL 0x001e5bf0 CMP EAX,0x0 JZ 0x001b0d10 JMP 0x001b0d04 LAB_001b0d04: MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x001b0f10 LAB_001b0d10: JMP 0x001b0d12 LAB_001b0d12: MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + 0x300],0x1 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x120] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x4 CMP EAX,0x0 JZ 0x001b0ed9 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x188],0x0 JZ 0x001b0dac MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0xa0],RAX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] CALL 0x001ad820 MOV RSI,qword ptr [RBP + -0xa0] ADD RSI,RAX XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001fc090 MOV qword ptr [RBP + -0x98],RAX CMP RAX,0x0 JNZ 0x001b0daa JMP 0x001b0d9e LAB_001b0d9e: MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x001b0f10 LAB_001b0daa: JMP 0x001b0dac LAB_001b0dac: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0x78] CALL 0x001ac890 MOV dword ptr [RBP + -0x80],EAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x170] MOV qword ptr [RBP + -0x90],RAX MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0x7c],0x0 MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x20],RAX LAB_001b0df9: CMP dword ptr [RBP + -0x80],0x0 JBE 0x001b0ed7 MOV RAX,qword ptr [RBP + -0x70] MOV ESI,dword ptr [RAX + 0x1c0] MOV RDX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x60] CALL 0x001aec60 MOV dword ptr [RBP + -0x84],EAX AND EAX,0x3c CMP EAX,0x0 JZ 0x001b0e46 MOV EAX,dword ptr [RBP + -0x84] AND EAX,0x14 CMP EAX,0x0 JZ 0x001b0e41 CALL 0x001fea30 MOV dword ptr [RAX],0x7b LAB_001b0e41: JMP 0x001b0ee4 LAB_001b0e46: CMP dword ptr [RBP + -0x7c],0x0 JNZ 0x001b0e6b MOV dword ptr [RBP + -0x7c],0x1 MOV EAX,dword ptr [RBP + -0x80] CMP RAX,qword ptr [RBP + -0x48] JZ 0x001b0e69 CALL 0x001fea30 MOV dword ptr [RAX],0x7b JMP 0x001b0ee4 LAB_001b0e69: JMP 0x001b0e83 LAB_001b0e6b: MOV EAX,dword ptr [RBP + -0x80] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001b0e81 CALL 0x001fea30 MOV dword ptr [RAX],0x7f JMP 0x001b0ee4 LAB_001b0e81: JMP 0x001b0e83 LAB_001b0e83: MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x80] SUB RAX,RCX MOV dword ptr [RBP + -0x80],EAX MOV RAX,qword ptr [RBP + -0x70] MOV EDI,dword ptr [RAX + 0x1c0] MOV RSI,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x40] MOV ECX,EAX CALL 0x001b0f40 CMP EAX,0x0 JZ 0x001b0ebf CALL 0x001fea30 MOV dword ptr [RAX],0x7b JMP 0x001b0ee4 LAB_001b0ebf: MOV dword ptr [RBP + -0x7c],0x1 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x78],RAX JMP 0x001b0df9 LAB_001b0ed7: JMP 0x001b0ed9 LAB_001b0ed9: CALL 0x001fea30 MOV dword ptr [RAX],0x0 LAB_001b0ee4: MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RCX + 0x120] JZ 0x001b0f04 MOV RDI,qword ptr [RBP + -0x98] CALL 0x001fc410 LAB_001b0f04: JMP 0x001b0f06 LAB_001b0f06: CALL 0x001fea30 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX LAB_001b0f10: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0xa4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001b0f3a MOV EAX,dword ptr [RBP + -0xa4] ADD RSP,0xb0 POP RBP RET LAB_001b0f3a: CALL 0x0012a250
int4 _mi_cmp_dynamic_record(long *param_1,int8 param_2) { long lVar1; bool bVar2; int iVar3; uint uVar4; long lVar5; int4 *puVar6; long in_FS_OFFSET; long local_a0; uint local_88; long local_80; int4 local_6c; int1 local_68 [24]; ulong local_50; ulong local_48; int8 local_30; long local_28; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if ((*(uint *)(param_1 + 0x39) & 0x10) != 0) { *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 0xfffff6ff; iVar3 = my_b_flush_io_cache(param_1 + 0x44,1); if (iVar3 != 0) { local_6c = 0xffffffff; goto LAB_001b0f10; } } *(int4 *)(param_1 + 0x60) = 1; local_a0 = param_1[0x24]; if ((*(uint *)(param_1 + 0x39) & 4) != 0) { if (*(int *)(*param_1 + 0x188) != 0) { lVar1 = *(long *)(*param_1 + 0x148); lVar5 = _mi_calc_total_blob_length(param_1,param_2); local_a0 = my_malloc(0,lVar1 + lVar5,0); if (local_a0 == 0) { local_6c = 0xffffffff; goto LAB_001b0f10; } } local_88 = _mi_rec_pack(param_1,local_a0,param_2); local_80 = local_a0; local_28 = param_1[0x2e]; local_18 = 0; bVar2 = false; while (local_88 != 0) { uVar4 = _mi_get_block_info(local_68,(int)param_1[0x38],local_28); if ((uVar4 & 0x3c) != 0) { if ((uVar4 & 0x14) != 0) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7b; } goto LAB_001b0ee4; } if (bVar2) { if (local_88 < local_48) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7f; goto LAB_001b0ee4; } } else if (local_88 != local_50) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7b; goto LAB_001b0ee4; } local_88 = local_88 - (int)local_48; iVar3 = _mi_cmp_buffer((int)param_1[0x38],local_80,local_30,local_48 & 0xffffffff); if (iVar3 != 0) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7b; goto LAB_001b0ee4; } bVar2 = true; local_80 = local_48 + local_80; } } puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0; LAB_001b0ee4: if (local_a0 != param_1[0x24]) { my_free(local_a0); } puVar6 = (int4 *)_my_thread_var(); local_6c = *puVar6; LAB_001b0f10: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }
25,318
mi_cmp_dynamic_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_cmp_dynamic_record(register MI_INFO *info, register const uchar *record) { uint flag,reclength,b_type; my_off_t filepos; uchar *buffer; MI_BLOCK_INFO block_info; DBUG_ENTER("_mi_cmp_dynamic_record"); if (info->opt_flag & WRITE_CACHE_USED) { info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK); if (flush_io_cache(&info->rec_cache)) DBUG_RETURN(-1); } info->rec_cache.seek_not_done=1; /* If nobody have touched the database we don't have to test rec */ buffer=info->rec_buff; if ((info->opt_flag & READ_CHECK_USED)) { /* If check isn't disabled */ if (info->s->base.blobs) { if (!(buffer=(uchar*) my_alloca(info->s->base.pack_reclength+ _mi_calc_total_blob_length(info,record)))) DBUG_RETURN(-1); } reclength=_mi_rec_pack(info,buffer,record); record= buffer; filepos=info->lastpos; flag=block_info.second_read=0; block_info.next_filepos=filepos; while (reclength > 0) { if ((b_type=_mi_get_block_info(&block_info,info->dfile, block_info.next_filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_CHANGED; goto err; } if (flag == 0) /* First block */ { flag=1; if (reclength != block_info.rec_len) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } } else if (reclength < block_info.data_len) { my_errno=HA_ERR_WRONG_IN_RECORD; goto err; } reclength-=block_info.data_len; if (_mi_cmp_buffer(info->dfile,record,block_info.filepos, block_info.data_len)) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } flag=1; record+=block_info.data_len; } } my_errno=0; err: if (buffer != info->rec_buff) my_afree((uchar*) buffer); DBUG_RETURN(my_errno); }
O3
c
mi_cmp_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20e8, %rsp # imm = 0x20E8 movq %rsi, %r14 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x1c8(%rdi), %eax testb $0x10, %al je 0x7e70c andb $-0xa, 0x1d1(%r12) leaq 0x220(%r12), %rdi movl $0x1, %esi callq 0x9a355 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x7ea8a movl 0x1c8(%r12), %eax movl $0x1, 0x300(%r12) movq 0x120(%r12), %rbx xorl %r15d, %r15d testb $0x4, %al je 0x7ea69 movq (%r12), %rax cmpl $0x0, 0x188(%rax) je 0x7e765 movq 0x148(%rax), %rbx movq %r12, %rdi movq %r14, %rsi callq 0x7cc08 addq %rax, %rbx xorl %edi, %edi movq %rbx, %rsi xorl %edx, %edx callq 0xa6f99 movq %rax, %rbx testq %rax, %rax je 0x7eaab movq %r12, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x7c2ce movl %eax, %r14d movq 0x170(%r12), %rax movl $0x0, -0x2038(%rbp) movq %rax, -0x2048(%rbp) testl %r14d, %r14d je 0x7ea69 movb $0x1, %r15b leaq -0x2088(%rbp), %rdi movq %rbx, %r13 movq %r12, -0x2098(%rbp) movq %rbx, -0x2090(%rbp) movl 0x1c0(%r12), %esi movq -0x2048(%rbp), %rdx callq 0x7d5ef cmpl $0x4, %eax jae 0x7eab2 movl %r14d, %eax testb $0x1, %r15b je 0x7e7ef cmpq %rax, -0x2070(%rbp) jne 0x7eac6 movq -0x2068(%rbp), %rdx jmp 0x7e7ff movq -0x2068(%rbp), %rdx cmpq %rax, %rdx ja 0x7eabe movl %r14d, -0x209c(%rbp) movl 0x1c0(%r12), %ebx movq -0x2050(%rbp), %r14 cmpl $0x2001, %edx # imm = 0x2001 movq %r13, -0x20b8(%rbp) movq %rdx, -0x20b0(%rbp) jb 0x7e947 movl %r14d, %ecx andl $0xfff, %ecx # imm = 0xFFF movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movq %r13, %r15 movl %edx, %r13d movq %r15, -0x20c0(%rbp) movl %eax, %r12d leaq 0x312682(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq -0x2108(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7e8d6 movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq 0xa77dc movq %rax, %r15 testq %r15, %r15 movq -0x20c0(%rbp), %r15 jne 0x7ea55 movq %r15, %rdi leaq -0x2030(%rbp), %rsi movq %r12, %rdx callq 0x2a560 testl %eax, %eax jne 0x7ea55 addq %r12, %r14 addq %r12, %r15 subl %r12d, %r13d movl $0x2000, %eax # imm = 0x2000 cmpl $0x2000, %r13d # imm = 0x2000 ja 0x7e845 jmp 0x7e94d movq %rax, %rcx leaq 0x3125f8(%rip), %rax # 0x390ed8 movq (%rax), %rax movq %rcx, -0x20a8(%rbp) movq %rcx, %rdi movq %r12, %rsi leaq 0x659ea(%rip), %rdx # 0xe42e1 movl $0x67e, %ecx # imm = 0x67E callq *0x210(%rax) movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq 0xa77dc movq %rax, %r15 testq %rax, %rax movl $0x0, %esi cmoveq %r12, %rsi leaq 0x3125a6(%rip), %rax # 0x390ed8 movq (%rax), %rax movq -0x20a8(%rbp), %rdi callq *0x218(%rax) jmp 0x7e88f movq %r13, %r15 movl %edx, %r13d movl %r13d, %r13d leaq 0x312581(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq -0x2108(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7e9ef movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r13, %rdx movq %r14, %rcx callq 0xa77dc movq %rax, %rbx testq %rbx, %rbx jne 0x7ea55 movq %r15, %rdi leaq -0x2030(%rbp), %rsi movq %r13, %rdx callq 0x2a560 testl %eax, %eax jne 0x7ea55 movq -0x20b8(%rbp), %r13 addq -0x2068(%rbp), %r13 xorl %r15d, %r15d movl -0x209c(%rbp), %r14d subl -0x20b0(%rbp), %r14d movq -0x2098(%rbp), %r12 movq -0x2090(%rbp), %rbx leaq -0x2088(%rbp), %rdi jne 0x7e7b3 jmp 0x7ea69 movq %rax, %r12 leaq 0x3124df(%rip), %rax # 0x390ed8 movq (%rax), %rax movq %r12, %rdi movq %r13, %rsi leaq 0x658d8(%rip), %rdx # 0xe42e1 movl $0x686, %ecx # imm = 0x686 callq *0x210(%rax) movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r13, %rdx movq %r14, %rcx callq 0xa77dc movq %rax, %rbx testq %rax, %rax movl $0x0, %esi cmoveq %r13, %rsi leaq 0x312494(%rip), %rax # 0x390ed8 movq (%rax), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x7e990 movl $0x7b, %r15d movq -0x2098(%rbp), %r12 movq -0x2090(%rbp), %rbx callq 0xa8dda movl %r15d, (%rax) cmpq 0x120(%r12), %rbx je 0x7ea83 movq %rbx, %rdi callq 0xa71c6 callq 0xa8dda movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x7eace addq $0x20e8, %rsp # imm = 0x20E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x7ea8a movl $0x7b, %r15d testb $0x14, %al jne 0x7ea69 jmp 0x7ea71 movl $0x7f, %r15d jmp 0x7ea69 movl $0x7b, %r15d jmp 0x7ea69 callq 0x2a240
_mi_cmp_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 20E8h mov r14, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov eax, [rdi+1C8h] test al, 10h jz short loc_7E70C and byte ptr [r12+1D1h], 0F6h lea rdi, [r12+220h] mov esi, 1 call my_b_flush_io_cache mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz loc_7EA8A mov eax, [r12+1C8h] loc_7E70C: mov dword ptr [r12+300h], 1 mov rbx, [r12+120h] xor r15d, r15d test al, 4 jz loc_7EA69 mov rax, [r12] cmp dword ptr [rax+188h], 0 jz short loc_7E765 mov rbx, [rax+148h] mov rdi, r12 mov rsi, r14 call _mi_calc_total_blob_length add rbx, rax xor edi, edi mov rsi, rbx xor edx, edx call my_malloc mov rbx, rax test rax, rax jz loc_7EAAB loc_7E765: mov rdi, r12 mov rsi, rbx mov rdx, r14 call _mi_rec_pack mov r14d, eax mov rax, [r12+170h] mov [rbp+var_2038], 0 mov [rbp+var_2048], rax test r14d, r14d jz loc_7EA69 mov r15b, 1 lea rdi, [rbp+var_2088] mov r13, rbx mov [rbp+var_2098], r12 mov [rbp+var_2090], rbx loc_7E7B3: mov esi, [r12+1C0h] mov rdx, [rbp+var_2048] call _mi_get_block_info cmp eax, 4 jnb loc_7EAB2 mov eax, r14d test r15b, 1 jz short loc_7E7EF cmp [rbp+var_2070], rax jnz loc_7EAC6 mov rdx, [rbp+var_2068] jmp short loc_7E7FF loc_7E7EF: mov rdx, [rbp+var_2068] cmp rdx, rax ja loc_7EABE loc_7E7FF: mov [rbp+var_209C], r14d mov ebx, [r12+1C0h] mov r14, [rbp+var_2050] cmp edx, 2001h mov [rbp+var_20B8], r13 mov [rbp+var_20B0], rdx jb loc_7E947 mov ecx, r14d and ecx, 0FFFh mov eax, 2000h sub eax, ecx mov r15, r13 mov r13d, edx loc_7E845: mov [rbp+var_20C0], r15 mov r12d, eax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_2108] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_7E8D6 mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r12 mov rcx, r14 call my_pread mov r15, rax loc_7E88F: test r15, r15 mov r15, [rbp+var_20C0] jnz loc_7EA55 mov rdi, r15 lea rsi, [rbp+var_2030] mov rdx, r12 call _bcmp test eax, eax jnz loc_7EA55 add r14, r12 add r15, r12 sub r13d, r12d mov eax, 2000h cmp r13d, 2000h ja loc_7E845 jmp short loc_7E94D loc_7E8D6: mov rcx, rax lea rax, PSI_server mov rax, [rax] mov [rbp+var_20A8], rcx mov rdi, rcx mov rsi, r12 lea rdx, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 67Eh call qword ptr [rax+210h] mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r12 mov rcx, r14 call my_pread mov r15, rax test rax, rax mov esi, 0 cmovz rsi, r12 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_20A8] call qword ptr [rax+218h] jmp loc_7E88F loc_7E947: mov r15, r13 mov r13d, edx loc_7E94D: mov r13d, r13d lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_2108] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_7E9EF mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r13 mov rcx, r14 call my_pread mov rbx, rax loc_7E990: test rbx, rbx jnz loc_7EA55 mov rdi, r15 lea rsi, [rbp+var_2030] mov rdx, r13 call _bcmp test eax, eax jnz loc_7EA55 mov r13, [rbp+var_20B8] add r13, [rbp+var_2068] xor r15d, r15d mov r14d, [rbp+var_209C] sub r14d, dword ptr [rbp+var_20B0] mov r12, [rbp+var_2098] mov rbx, [rbp+var_2090] lea rdi, [rbp+var_2088] jnz loc_7E7B3 jmp short loc_7EA69 loc_7E9EF: mov r12, rax lea rax, PSI_server mov rax, [rax] mov rdi, r12 mov rsi, r13 lea rdx, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 686h call qword ptr [rax+210h] mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r13 mov rcx, r14 call my_pread mov rbx, rax test rax, rax mov esi, 0 cmovz rsi, r13 lea rax, PSI_server mov rax, [rax] mov rdi, r12 call qword ptr [rax+218h] jmp loc_7E990 loc_7EA55: mov r15d, 7Bh ; '{' mov r12, [rbp+var_2098] mov rbx, [rbp+var_2090] loc_7EA69: call _my_thread_var mov [rax], r15d loc_7EA71: cmp rbx, [r12+120h] jz short loc_7EA83 mov rdi, rbx call my_free loc_7EA83: call _my_thread_var mov eax, [rax] loc_7EA8A: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_7EACE add rsp, 20E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7EAAB: mov eax, 0FFFFFFFFh jmp short loc_7EA8A loc_7EAB2: mov r15d, 7Bh ; '{' test al, 14h jnz short loc_7EA69 jmp short loc_7EA71 loc_7EABE: mov r15d, 7Fh jmp short loc_7EA69 loc_7EAC6: mov r15d, 7Bh ; '{' jmp short loc_7EA69 loc_7EACE: call ___stack_chk_fail
long long mi_cmp_dynamic_record(unsigned long long a1, unsigned long long a2) { char *v2; // r14 long long v3; // r12 int v4; // eax int v5; // ecx long long result; // rax _BYTE *v7; // rbx int v8; // r15d long long v9; // rbx long long v10; // rax unsigned int v11; // r14d long long v12; // rax _BYTE *v13; // r13 unsigned int block_info; // eax unsigned long long v15; // rdx unsigned int v16; // ebx long long v17; // r14 unsigned int v18; // eax _BYTE *v19; // r15 unsigned int v20; // r13d unsigned long long v21; // r12 long long v22; // rax long long v23; // r15 bool v24; // zf _BYTE *v25; // r15 long long v26; // rax long long v27; // rbx _BYTE *v28; // r12 _BYTE v29[72]; // [rsp+8h] [rbp-2108h] BYREF _BYTE *v30; // [rsp+50h] [rbp-20C0h] _BYTE *v31; // [rsp+58h] [rbp-20B8h] unsigned long long v32; // [rsp+60h] [rbp-20B0h] _BYTE *v33; // [rsp+68h] [rbp-20A8h] unsigned int v34; // [rsp+74h] [rbp-209Ch] long long v35; // [rsp+78h] [rbp-2098h] _BYTE *v36; // [rsp+80h] [rbp-2090h] _BYTE v37[24]; // [rsp+88h] [rbp-2088h] BYREF long long v38; // [rsp+A0h] [rbp-2070h] unsigned long long v39; // [rsp+A8h] [rbp-2068h] long long v40; // [rsp+C0h] [rbp-2050h] long long v41; // [rsp+C8h] [rbp-2048h] int v42; // [rsp+D8h] [rbp-2038h] _BYTE v43[8192]; // [rsp+E0h] [rbp-2030h] BYREF unsigned long long v44; // [rsp+20E0h] [rbp-30h] v2 = (char *)a2; v3 = a1; v44 = __readfsqword(0x28u); v4 = *(_DWORD *)(a1 + 456); if ( (v4 & 0x10) != 0 ) { *(_BYTE *)(a1 + 465) &= 0xF6u; a1 += 544LL; a2 = 1LL; v5 = my_b_flush_io_cache(a1, 1LL); result = 0xFFFFFFFFLL; if ( v5 ) return result; v4 = *(_DWORD *)(v3 + 456); } *(_DWORD *)(v3 + 768) = 1; v7 = *(_BYTE **)(v3 + 288); v8 = 0; if ( (v4 & 4) == 0 ) goto LABEL_36; if ( *(_DWORD *)(*(_QWORD *)v3 + 392LL) ) { v9 = *(_QWORD *)(*(_QWORD *)v3 + 328LL); v10 = mi_calc_total_blob_length((_QWORD *)v3, (long long)v2); v7 = (_BYTE *)my_malloc(0LL, v10 + v9, 0LL); if ( !v7 ) return 0xFFFFFFFFLL; } a1 = v3; a2 = (unsigned long long)v7; v11 = mi_rec_pack(v3, v7, v2); v12 = *(_QWORD *)(v3 + 368); v42 = 0; v41 = v12; if ( v11 ) { LOBYTE(v8) = 1; a1 = (unsigned long long)v37; v13 = v7; v35 = v3; v36 = v7; while ( 1 ) { a2 = *(unsigned int *)(v3 + 448); block_info = mi_get_block_info((long long)v37, a2, v41); if ( block_info >= 4 ) break; if ( (v8 & 1) != 0 ) { if ( v38 != v11 ) { v8 = 123; goto LABEL_36; } v15 = v39; } else { v15 = v39; if ( v39 > v11 ) { v8 = 127; goto LABEL_36; } } v34 = v11; v16 = *(_DWORD *)(v3 + 448); v17 = v40; v31 = v13; v32 = v15; if ( (unsigned int)v15 >= 0x2001 ) { v18 = 0x2000 - (v40 & 0xFFF); v19 = v13; v20 = v15; while ( 1 ) { v30 = v19; v21 = v18; v22 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v29, v16, 6LL); if ( v22 ) { v33 = (_BYTE *)v22; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v22, v21, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 1662LL); v23 = my_pread(v16, v43, v21, v17, 4LL); a2 = 0LL; if ( !v23 ) a2 = v21; a1 = (unsigned long long)v33; ((void ( *)(_BYTE *, unsigned long long))PSI_server[67])(v33, a2); } else { a1 = v16; a2 = (unsigned long long)v43; v23 = my_pread(v16, v43, v21, v17, 4LL); } v24 = v23 == 0; v25 = v30; if ( !v24 ) break; a1 = (unsigned long long)v30; a2 = (unsigned long long)v43; if ( (unsigned int)bcmp(v30, v43, v21) ) break; v17 += v21; v19 = &v25[v21]; v20 -= v21; v18 = 0x2000; if ( v20 <= 0x2000 ) goto LABEL_26; } LABEL_35: v8 = 123; v3 = v35; v7 = v36; goto LABEL_36; } v19 = v13; v20 = v15; LABEL_26: v26 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v29, v16, 6LL); if ( v26 ) { v28 = (_BYTE *)v26; ((void ( *)(long long, _QWORD, const char *, long long))PSI_server[66])( v26, v20, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 1670LL); v27 = my_pread(v16, v43, v20, v17, 4LL); a2 = 0LL; if ( !v27 ) a2 = v20; a1 = (unsigned long long)v28; ((void ( *)(_BYTE *, unsigned long long))PSI_server[67])(v28, a2); } else { a1 = v16; a2 = (unsigned long long)v43; v27 = my_pread(v16, v43, v20, v17, 4LL); } if ( v27 ) goto LABEL_35; a1 = (unsigned long long)v19; a2 = (unsigned long long)v43; if ( (unsigned int)bcmp(v19, v43, v20) ) goto LABEL_35; v13 = &v31[v39]; v8 = 0; v11 = v34 - v32; v3 = v35; v7 = v36; a1 = (unsigned long long)v37; if ( v34 == (_DWORD)v32 ) goto LABEL_36; } v8 = 123; if ( (block_info & 0x14) != 0 ) goto LABEL_36; } else { LABEL_36: *(_DWORD *)my_thread_var(a1, (const char *)a2) = v8; } if ( v7 != *(_BYTE **)(v3 + 288) ) { a1 = (unsigned long long)v7; my_free(v7); } return *(unsigned int *)my_thread_var(a1, (const char *)a2); }
_mi_cmp_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20e8 MOV R14,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RDI + 0x1c8] TEST AL,0x10 JZ 0x0017e70c AND byte ptr [R12 + 0x1d1],0xf6 LEA RDI,[R12 + 0x220] MOV ESI,0x1 CALL 0x0019a355 MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x0017ea8a MOV EAX,dword ptr [R12 + 0x1c8] LAB_0017e70c: MOV dword ptr [R12 + 0x300],0x1 MOV RBX,qword ptr [R12 + 0x120] XOR R15D,R15D TEST AL,0x4 JZ 0x0017ea69 MOV RAX,qword ptr [R12] CMP dword ptr [RAX + 0x188],0x0 JZ 0x0017e765 MOV RBX,qword ptr [RAX + 0x148] MOV RDI,R12 MOV RSI,R14 CALL 0x0017cc08 ADD RBX,RAX XOR EDI,EDI MOV RSI,RBX XOR EDX,EDX CALL 0x001a6f99 MOV RBX,RAX TEST RAX,RAX JZ 0x0017eaab LAB_0017e765: MOV RDI,R12 MOV RSI,RBX MOV RDX,R14 CALL 0x0017c2ce MOV R14D,EAX MOV RAX,qword ptr [R12 + 0x170] MOV dword ptr [RBP + -0x2038],0x0 MOV qword ptr [RBP + -0x2048],RAX TEST R14D,R14D JZ 0x0017ea69 MOV R15B,0x1 LEA RDI,[RBP + -0x2088] MOV R13,RBX MOV qword ptr [RBP + -0x2098],R12 MOV qword ptr [RBP + -0x2090],RBX LAB_0017e7b3: MOV ESI,dword ptr [R12 + 0x1c0] MOV RDX,qword ptr [RBP + -0x2048] CALL 0x0017d5ef CMP EAX,0x4 JNC 0x0017eab2 MOV EAX,R14D TEST R15B,0x1 JZ 0x0017e7ef CMP qword ptr [RBP + -0x2070],RAX JNZ 0x0017eac6 MOV RDX,qword ptr [RBP + -0x2068] JMP 0x0017e7ff LAB_0017e7ef: MOV RDX,qword ptr [RBP + -0x2068] CMP RDX,RAX JA 0x0017eabe LAB_0017e7ff: MOV dword ptr [RBP + -0x209c],R14D MOV EBX,dword ptr [R12 + 0x1c0] MOV R14,qword ptr [RBP + -0x2050] CMP EDX,0x2001 MOV qword ptr [RBP + -0x20b8],R13 MOV qword ptr [RBP + -0x20b0],RDX JC 0x0017e947 MOV ECX,R14D AND ECX,0xfff MOV EAX,0x2000 SUB EAX,ECX MOV R15,R13 MOV R13D,EDX LAB_0017e845: MOV qword ptr [RBP + -0x20c0],R15 MOV R12D,EAX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x2108] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017e8d6 MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R12 MOV RCX,R14 CALL 0x001a77dc MOV R15,RAX LAB_0017e88f: TEST R15,R15 MOV R15,qword ptr [RBP + -0x20c0] JNZ 0x0017ea55 MOV RDI,R15 LEA RSI,[RBP + -0x2030] MOV RDX,R12 CALL 0x0012a560 TEST EAX,EAX JNZ 0x0017ea55 ADD R14,R12 ADD R15,R12 SUB R13D,R12D MOV EAX,0x2000 CMP R13D,0x2000 JA 0x0017e845 JMP 0x0017e94d LAB_0017e8d6: MOV RCX,RAX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20a8],RCX MOV RDI,RCX MOV RSI,R12 LEA RDX,[0x1e42e1] MOV ECX,0x67e CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R12 MOV RCX,R14 CALL 0x001a77dc MOV R15,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R12 LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x20a8] CALL qword ptr [RAX + 0x218] JMP 0x0017e88f LAB_0017e947: MOV R15,R13 MOV R13D,EDX LAB_0017e94d: MOV R13D,R13D LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x2108] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017e9ef MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R13 MOV RCX,R14 CALL 0x001a77dc MOV RBX,RAX LAB_0017e990: TEST RBX,RBX JNZ 0x0017ea55 MOV RDI,R15 LEA RSI,[RBP + -0x2030] MOV RDX,R13 CALL 0x0012a560 TEST EAX,EAX JNZ 0x0017ea55 MOV R13,qword ptr [RBP + -0x20b8] ADD R13,qword ptr [RBP + -0x2068] XOR R15D,R15D MOV R14D,dword ptr [RBP + -0x209c] SUB R14D,dword ptr [RBP + -0x20b0] MOV R12,qword ptr [RBP + -0x2098] MOV RBX,qword ptr [RBP + -0x2090] LEA RDI,[RBP + -0x2088] JNZ 0x0017e7b3 JMP 0x0017ea69 LAB_0017e9ef: MOV R12,RAX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] MOV RDI,R12 MOV RSI,R13 LEA RDX,[0x1e42e1] MOV ECX,0x686 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R13 MOV RCX,R14 CALL 0x001a77dc MOV RBX,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R13 LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x0017e990 LAB_0017ea55: MOV R15D,0x7b MOV R12,qword ptr [RBP + -0x2098] MOV RBX,qword ptr [RBP + -0x2090] LAB_0017ea69: CALL 0x001a8dda MOV dword ptr [RAX],R15D LAB_0017ea71: CMP RBX,qword ptr [R12 + 0x120] JZ 0x0017ea83 MOV RDI,RBX CALL 0x001a71c6 LAB_0017ea83: CALL 0x001a8dda MOV EAX,dword ptr [RAX] LAB_0017ea8a: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0017eace ADD RSP,0x20e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017eaab: MOV EAX,0xffffffff JMP 0x0017ea8a LAB_0017eab2: MOV R15D,0x7b TEST AL,0x14 JNZ 0x0017ea69 JMP 0x0017ea71 LAB_0017eabe: MOV R15D,0x7f JMP 0x0017ea69 LAB_0017eac6: MOV R15D,0x7b JMP 0x0017ea69 LAB_0017eace: CALL 0x0012a240
int4 _mi_cmp_dynamic_record(long *param_1,int8 param_2) { int iVar1; uint uVar2; uint uVar3; long lVar4; void *pvVar5; int4 *puVar6; void *pvVar7; ulong uVar8; ulong uVar9; ulong uVar10; long lVar11; bool bVar12; int4 uVar13; long in_FS_OFFSET; int1 local_2110 [72]; void *local_20c8; void *local_20c0; ulong local_20b8; long local_20b0; uint local_20a4; long *local_20a0; void *local_2098; int1 local_2090 [24]; ulong local_2078; ulong local_2070; long local_2058; long local_2050; int4 local_2040; int1 local_2038 [8192]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = *(uint *)(param_1 + 0x39); if ((uVar2 & 0x10) != 0) { *(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xf6; iVar1 = my_b_flush_io_cache(param_1 + 0x44,1); uVar13 = 0xffffffff; if (iVar1 != 0) goto LAB_0017ea8a; uVar2 = *(uint *)(param_1 + 0x39); } *(int4 *)(param_1 + 0x60) = 1; pvVar5 = (void *)param_1[0x24]; uVar13 = 0; pvVar7 = pvVar5; if ((uVar2 & 4) != 0) { if (*(int *)(*param_1 + 0x188) != 0) { lVar11 = *(long *)(*param_1 + 0x148); lVar4 = _mi_calc_total_blob_length(param_1,param_2); pvVar5 = (void *)my_malloc(0,lVar11 + lVar4,0); if (pvVar5 == (void *)0x0) { uVar13 = 0xffffffff; goto LAB_0017ea8a; } } uVar2 = _mi_rec_pack(param_1,pvVar5,param_2); local_2050 = param_1[0x2e]; local_2040 = 0; pvVar7 = pvVar5; if (uVar2 != 0) { bVar12 = true; local_20a0 = param_1; local_2098 = pvVar5; do { pvVar7 = local_2098; param_1 = local_20a0; uVar3 = _mi_get_block_info(local_2090,(int)local_20a0[0x38],local_2050); if (3 < uVar3) { uVar13 = 0x7b; if ((uVar3 & 0x14) == 0) goto LAB_0017ea71; break; } if (bVar12) { if (local_2078 != uVar2) { uVar13 = 0x7b; break; } } else if (uVar2 < local_2070) { uVar13 = 0x7f; break; } uVar13 = (int4)param_1[0x38]; uVar3 = (uint)local_2070; local_20b8 = local_2070; lVar11 = local_2058; local_20c0 = pvVar5; local_20a4 = uVar2; if (0x2000 < uVar3) { uVar2 = 0x2000 - ((uint)local_2058 & 0xfff); uVar10 = local_2070 & 0xffffffff; do { uVar9 = (ulong)uVar2; local_20c8 = pvVar5; lVar4 = (**(code **)(PSI_server + 0x158))(local_2110,uVar13,6); if (lVar4 == 0) { lVar4 = my_pread(uVar13,local_2038,uVar9,lVar11,4); } else { local_20b0 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,uVar9, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x67e ); lVar4 = my_pread(uVar13,local_2038,uVar9,lVar11,4); uVar8 = 0; if (lVar4 == 0) { uVar8 = uVar9; } (**(code **)(PSI_server + 0x218))(local_20b0,uVar8); } pvVar5 = local_20c8; if ((lVar4 != 0) || (iVar1 = bcmp(local_20c8,local_2038,uVar9), iVar1 != 0)) goto LAB_0017ea55; lVar11 = lVar11 + uVar9; pvVar5 = (void *)((long)pvVar5 + uVar9); uVar3 = (int)uVar10 - uVar2; uVar10 = (ulong)uVar3; uVar2 = 0x2000; } while (0x2000 < uVar3); } uVar10 = (ulong)uVar3; lVar4 = (**(code **)(PSI_server + 0x158))(local_2110,uVar13,6); if (lVar4 == 0) { lVar11 = my_pread(uVar13,local_2038,uVar10,lVar11,4); } else { (**(code **)(PSI_server + 0x210)) (lVar4,uVar10, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x686); lVar11 = my_pread(uVar13,local_2038,uVar10,lVar11,4); uVar9 = 0; if (lVar11 == 0) { uVar9 = uVar10; } (**(code **)(PSI_server + 0x218))(lVar4,uVar9); } if ((lVar11 != 0) || (iVar1 = bcmp(pvVar5,local_2038,uVar10), iVar1 != 0)) { LAB_0017ea55: uVar13 = 0x7b; pvVar7 = local_2098; param_1 = local_20a0; break; } pvVar5 = (void *)((long)local_20c0 + local_2070); bVar12 = false; uVar13 = 0; uVar2 = local_20a4 - (int)local_20b8; pvVar7 = local_2098; param_1 = local_20a0; } while (uVar2 != 0); } } puVar6 = (int4 *)_my_thread_var(); *puVar6 = uVar13; LAB_0017ea71: if (pvVar7 != (void *)param_1[0x24]) { my_free(pvVar7); } puVar6 = (int4 *)_my_thread_var(); uVar13 = *puVar6; LAB_0017ea8a: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar13; }
25,319
ma_put_key_in_record
eloqsql/storage/maria/ma_key.c
static int _ma_put_key_in_record(register MARIA_HA *info, uint keynr, my_bool unpack_blobs, uchar *record) { reg2 uchar *key; uchar *pos,*key_end; reg1 HA_KEYSEG *keyseg; uchar *blob_ptr; DBUG_ENTER("_ma_put_key_in_record"); blob_ptr= info->lastkey_buff2; /* Place to put blob parts */ key= info->last_key.data; /* Key that was read */ key_end= key + info->last_key.data_length; for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++) { if (keyseg->null_bit) { if (!*key++) { record[keyseg->null_pos]|= keyseg->null_bit; continue; } record[keyseg->null_pos]&= ~keyseg->null_bit; } if (keyseg->type == HA_KEYTYPE_BIT) { uint length= keyseg->length; if (keyseg->bit_length) { uchar bits= *key++; set_rec_bits(bits, record + keyseg->bit_pos, keyseg->bit_start, keyseg->bit_length); length--; } else { clr_rec_bits(record + keyseg->bit_pos, keyseg->bit_start, keyseg->bit_length); } memcpy(record + keyseg->start, key, length); key+= length; continue; } if (keyseg->flag & HA_SPACE_PACK) { uint length; get_key_length(length,key); #ifdef CHECK_KEYS if (length > keyseg->length || key+length > key_end) goto err; #endif pos= record+keyseg->start; if (keyseg->type != (int) HA_KEYTYPE_NUM) { memcpy(pos,key,(size_t) length); my_ci_fill(keyseg->charset, (char*) pos + length, keyseg->length - length, ' '); } else { bfill(pos,keyseg->length-length,' '); memcpy(pos+keyseg->length-length,key,(size_t) length); } key+=length; continue; } if (keyseg->flag & HA_VAR_LENGTH_PART) { uint length; get_key_length(length,key); #ifdef CHECK_KEYS if (length > keyseg->length || key+length > key_end) goto err; #endif /* Store key length */ if (keyseg->bit_start == 1) *(uchar*) (record+keyseg->start)= (uchar) length; else int2store(record+keyseg->start, length); /* And key data */ memcpy(record+keyseg->start + keyseg->bit_start, key, length); key+= length; } else if (keyseg->flag & HA_BLOB_PART) { uint length; get_key_length(length,key); #ifdef CHECK_KEYS if (length > keyseg->length || key+length > key_end) goto err; #endif if (unpack_blobs) { memcpy(record+keyseg->start+keyseg->bit_start, &blob_ptr, sizeof(char*)); memcpy(blob_ptr,key,length); blob_ptr+=length; /* The above changed info->lastkey2. Inform maria_rnext_same(). */ info->update&= ~HA_STATE_RNEXT_SAME; _ma_store_blob_length(record+keyseg->start, (uint) keyseg->bit_start,length); } key+=length; } else if (keyseg->flag & HA_SWAP_KEY) { uchar *to= record+keyseg->start+keyseg->length; uchar *end= key+keyseg->length; #ifdef CHECK_KEYS if (end > key_end) goto err; #endif do { *--to= *key++; } while (key != end); continue; } else { #ifdef CHECK_KEYS if (key+keyseg->length > key_end) goto err; #endif memcpy(record+keyseg->start, key, (size_t) keyseg->length); key+= keyseg->length; } } DBUG_RETURN(0); err: DBUG_PRINT("info",("error")); DBUG_RETURN(1); /* Crashed row */ }
O3
c
ma_put_key_in_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r12 movl %edx, -0x44(%rbp) movq (%rdi), %rax movq 0x570(%rax), %rax movl %esi, %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 movq 0xc0(%rax,%rcx), %r15 movb 0x18(%r15), %cl testb %cl, %cl je 0x42793 movq 0x200(%rdi), %r13 movl 0x210(%rdi), %eax addq %r13, %rax movq %rax, -0x40(%rbp) leaq 0x18(%r15), %rax movq %rdi, -0x60(%rbp) movq 0x390(%rdi), %rdx movq %rdx, -0x50(%rbp) leaq -0x1(%r12), %rdx movq %rdx, -0x58(%rbp) movq %r12, -0x30(%rbp) movb 0x19(%r15), %dl testb %dl, %dl je 0x42445 leaq 0x1(%r13), %rbx cmpb $0x0, (%r13) je 0x42517 notb %dl movl 0xc(%r15), %ecx andb %dl, (%r12,%rcx) movb (%rax), %cl movq %rbx, %r13 cmpb $0x13, %cl jne 0x424c7 movzwl 0x14(%r15), %esi movzbl 0x1b(%r15), %eax testl %eax, %eax je 0x42538 movzbl (%r13), %edi movzwl 0x10(%r15), %r8d movzbl 0x1a(%r15), %edx movl $0xffffffff, %r9d # imm = 0xFFFFFFFF movl %eax, %ecx shll %cl, %r9d notl %r9d movl %edx, %ecx shll %cl, %r9d movzbl (%r12,%r8), %ecx notl %r9d andl %ecx, %r9d movl %edi, %r10d movl %edx, %ecx shll %cl, %r10d orl %r9d, %r10d movb %r10b, (%r12,%r8) addl %edx, %eax cmpl $0x9, %eax jb 0x424bd movzbl 0x1(%r12,%r8), %r9d addb $-0x8, %al movl %eax, %ecx shrl %cl, %r9d shll %cl, %r9d movb $0x8, %cl subb %dl, %cl shrl %cl, %edi orl %r9d, %edi movb %dil, 0x1(%r12,%r8) incq %r13 decl %esi jmp 0x42556 movzwl 0x12(%r15), %eax testb $0x1, %al jne 0x42524 testb $0x8, %al jne 0x42576 testb $0x20, %al jne 0x42634 movzwl 0x14(%r15), %edx leaq (%rdx,%r13), %rcx testb $0x40, %al jne 0x426c3 cmpq -0x40(%rbp), %rcx ja 0x427a4 movl 0x8(%r15), %edi addq %r12, %rdi movq %r13, %rsi callq 0x2a0a0 movzwl 0x14(%r15), %ebx addq %r13, %rbx jmp 0x42776 movl 0xc(%r15), %eax orb %dl, (%r12,%rax) jmp 0x42776 movzbl (%r13), %edi cmpl $0xff, %edi je 0x42591 movl $0x1, %esi jmp 0x425a2 movzbl 0x1a(%r15), %ecx cmpl $0x9, %ecx jb 0x42556 addb $-0x8, %cl movl $0xffffffff, %eax # imm = 0xFFFFFFFF shll %cl, %eax movzwl 0x10(%r15), %ecx andb %al, 0x1(%r12,%rcx) movl 0x8(%r15), %edi addq %r12, %rdi movl %esi, %r14d movq %r13, %rsi movq %r14, %rdx callq 0x2a0a0 addq %r14, %r13 movq %r13, %rbx jmp 0x42776 movzbl (%r13), %ecx cmpl $0xff, %ecx je 0x4264f movl $0x1, %edx jmp 0x42660 movzwl 0x1(%r13), %eax rolw $0x8, %ax movzwl %ax, %edi movl $0x3, %esi movzwl 0x14(%r15), %edx movl $0x1, %eax subl %edi, %edx jb 0x42795 addq %rsi, %r13 movl %edi, %r14d leaq (%r14,%r13), %rbx cmpq -0x40(%rbp), %rbx ja 0x42795 movl 0x8(%r15), %r12d addq -0x30(%rbp), %r12 cmpb $0x7, %cl jne 0x425fa movq %r12, %rdi movl $0x20, %esi callq 0x2a2a0 movzwl 0x14(%r15), %edi addq %r12, %rdi subq %r14, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x2a0a0 jmp 0x4262b movl %edi, -0x34(%rbp) movq %r12, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x2a0a0 movq (%r15), %rdi addq %r14, %r12 movzwl 0x14(%r15), %edx subl -0x34(%rbp), %edx movq 0xb8(%rdi), %rax movq %r12, %rsi movl $0x20, %ecx callq *0x78(%rax) movq -0x30(%rbp), %r12 jmp 0x42776 movzbl (%r13), %esi cmpl $0xff, %esi je 0x426e9 movl $0x1, %ecx jmp 0x426fa movzwl 0x1(%r13), %eax rolw $0x8, %ax movzwl %ax, %ecx movl $0x3, %edx movzwl 0x14(%r15), %esi movl $0x1, %eax cmpl %esi, %ecx ja 0x42795 addq %rdx, %r13 movl %ecx, %edx leaq (%rdx,%r13), %rbx cmpq -0x40(%rbp), %rbx ja 0x42795 cmpb $0x1, 0x1a(%r15) jne 0x4269a movl 0x8(%r15), %eax movq -0x30(%rbp), %r12 movb %cl, (%r12,%rax) jmp 0x426a7 movl 0x8(%r15), %eax movq -0x30(%rbp), %r12 movw %cx, (%r12,%rax) movl 0x8(%r15), %eax addq %r12, %rax movzbl 0x1a(%r15), %edi addq %rax, %rdi movq %r13, %rsi callq 0x2a0a0 jmp 0x42776 cmpq -0x40(%rbp), %rcx ja 0x427a4 movl 0x8(%r15), %eax addq -0x58(%rbp), %rax movb (%r13), %cl incq %r13 movb %cl, (%rax,%rdx) decq %rdx jne 0x426d5 jmp 0x4256e movzwl 0x1(%r13), %eax rolw $0x8, %ax movzwl %ax, %esi movl $0x3, %ecx movzwl 0x14(%r15), %edx movl $0x1, %eax cmpl %edx, %esi ja 0x42795 addq %rcx, %r13 movl %esi, %r12d leaq (%r12,%r13), %rbx cmpq -0x40(%rbp), %rbx ja 0x42795 cmpb $0x0, -0x44(%rbp) je 0x4262b movl 0x8(%r15), %eax addq -0x30(%rbp), %rax movzbl 0x1a(%r15), %ecx movq -0x50(%rbp), %r14 movq %r14, (%rcx,%rax) movq %r14, %rdi movl %esi, -0x34(%rbp) movq %r13, %rsi movq %r12, %rdx callq 0x2a0a0 movq -0x60(%rbp), %rax andb $-0x11, 0x625(%rax) addq %r12, %r14 movq %r14, -0x50(%rbp) movq -0x30(%rbp), %r12 movl 0x8(%r15), %edi addq %r12, %rdi movzbl 0x1a(%r15), %esi movl -0x34(%rbp), %edx callq 0x49f52 leaq 0x20(%r15), %rdx movb 0x38(%r15), %cl addq $0x38, %r15 movq %r15, %rax movq %rbx, %r13 movq %rdx, %r15 testb %cl, %cl jne 0x4241f xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %eax jmp 0x42795
_ma_put_key_in_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rcx mov [rbp+var_44], edx mov rax, [rdi] mov rax, [rax+570h] mov ecx, esi imul rcx, 118h mov r15, [rax+rcx+0C0h] mov cl, [r15+18h] test cl, cl jz loc_42793 mov r13, [rdi+200h] mov eax, [rdi+210h] add rax, r13 mov [rbp+var_40], rax lea rax, [r15+18h] mov [rbp+var_60], rdi mov rdx, [rdi+390h] mov [rbp+var_50], rdx lea rdx, [r12-1] mov [rbp+var_58], rdx mov [rbp+var_30], r12 loc_4241F: mov dl, [r15+19h] test dl, dl jz short loc_42445 lea rbx, [r13+1] cmp byte ptr [r13+0], 0 jz loc_42517 not dl mov ecx, [r15+0Ch] and [r12+rcx], dl mov cl, [rax] mov r13, rbx loc_42445: cmp cl, 13h jnz short loc_424C7 movzx esi, word ptr [r15+14h] movzx eax, byte ptr [r15+1Bh] test eax, eax jz loc_42538 movzx edi, byte ptr [r13+0] movzx r8d, word ptr [r15+10h] movzx edx, byte ptr [r15+1Ah] mov r9d, 0FFFFFFFFh mov ecx, eax shl r9d, cl not r9d mov ecx, edx shl r9d, cl movzx ecx, byte ptr [r12+r8] not r9d and r9d, ecx mov r10d, edi mov ecx, edx shl r10d, cl or r10d, r9d mov [r12+r8], r10b add eax, edx cmp eax, 9 jb short loc_424BD movzx r9d, byte ptr [r12+r8+1] add al, 0F8h mov ecx, eax shr r9d, cl shl r9d, cl mov cl, 8 sub cl, dl shr edi, cl or edi, r9d mov [r12+r8+1], dil loc_424BD: inc r13 dec esi jmp loc_42556 loc_424C7: movzx eax, word ptr [r15+12h] test al, 1 jnz short loc_42524 test al, 8 jnz loc_42576 test al, 20h jnz loc_42634 movzx edx, word ptr [r15+14h] lea rcx, [rdx+r13] test al, 40h jnz loc_426C3 cmp rcx, [rbp+var_40] ja loc_427A4 mov edi, [r15+8] add rdi, r12 mov rsi, r13 call _memcpy movzx ebx, word ptr [r15+14h] add rbx, r13 jmp loc_42776 loc_42517: mov eax, [r15+0Ch] or [r12+rax], dl jmp loc_42776 loc_42524: movzx edi, byte ptr [r13+0] cmp edi, 0FFh jz short loc_42591 mov esi, 1 jmp short loc_425A2 loc_42538: movzx ecx, byte ptr [r15+1Ah] cmp ecx, 9 jb short loc_42556 add cl, 0F8h mov eax, 0FFFFFFFFh shl eax, cl movzx ecx, word ptr [r15+10h] and [r12+rcx+1], al loc_42556: mov edi, [r15+8] add rdi, r12 mov r14d, esi mov rsi, r13 mov rdx, r14 call _memcpy add r13, r14 loc_4256E: mov rbx, r13 jmp loc_42776 loc_42576: movzx ecx, byte ptr [r13+0] cmp ecx, 0FFh jz loc_4264F mov edx, 1 jmp loc_42660 loc_42591: movzx eax, word ptr [r13+1] rol ax, 8 movzx edi, ax mov esi, 3 loc_425A2: movzx edx, word ptr [r15+14h] mov eax, 1 sub edx, edi jb loc_42795 add r13, rsi mov r14d, edi lea rbx, [r14+r13] cmp rbx, [rbp+var_40] ja loc_42795 mov r12d, [r15+8] add r12, [rbp+var_30] cmp cl, 7 jnz short loc_425FA mov rdi, r12 mov esi, 20h ; ' ' call _memset movzx edi, word ptr [r15+14h] add rdi, r12 sub rdi, r14 mov rsi, r13 mov rdx, r14 call _memcpy jmp short loc_4262B loc_425FA: mov [rbp+var_34], edi mov rdi, r12 mov rsi, r13 mov rdx, r14 call _memcpy mov rdi, [r15] add r12, r14 movzx edx, word ptr [r15+14h] sub edx, [rbp+var_34] mov rax, [rdi+0B8h] mov rsi, r12 mov ecx, 20h ; ' ' call qword ptr [rax+78h] loc_4262B: mov r12, [rbp+var_30] jmp loc_42776 loc_42634: movzx esi, byte ptr [r13+0] cmp esi, 0FFh jz loc_426E9 mov ecx, 1 jmp loc_426FA loc_4264F: movzx eax, word ptr [r13+1] rol ax, 8 movzx ecx, ax mov edx, 3 loc_42660: movzx esi, word ptr [r15+14h] mov eax, 1 cmp ecx, esi ja loc_42795 add r13, rdx mov edx, ecx lea rbx, [rdx+r13] cmp rbx, [rbp+var_40] ja loc_42795 cmp byte ptr [r15+1Ah], 1 jnz short loc_4269A mov eax, [r15+8] mov r12, [rbp+var_30] mov [r12+rax], cl jmp short loc_426A7 loc_4269A: mov eax, [r15+8] mov r12, [rbp+var_30] mov [r12+rax], cx loc_426A7: mov eax, [r15+8] add rax, r12 movzx edi, byte ptr [r15+1Ah] add rdi, rax mov rsi, r13 call _memcpy jmp loc_42776 loc_426C3: cmp rcx, [rbp+var_40] ja loc_427A4 mov eax, [r15+8] add rax, [rbp+var_58] loc_426D5: mov cl, [r13+0] inc r13 mov [rax+rdx], cl dec rdx jnz short loc_426D5 jmp loc_4256E loc_426E9: movzx eax, word ptr [r13+1] rol ax, 8 movzx esi, ax mov ecx, 3 loc_426FA: movzx edx, word ptr [r15+14h] mov eax, 1 cmp esi, edx ja loc_42795 add r13, rcx mov r12d, esi lea rbx, [r12+r13] cmp rbx, [rbp+var_40] ja short loc_42795 cmp byte ptr [rbp+var_44], 0 jz loc_4262B mov eax, [r15+8] add rax, [rbp+var_30] movzx ecx, byte ptr [r15+1Ah] mov r14, [rbp+var_50] mov [rcx+rax], r14 mov rdi, r14 mov [rbp+var_34], esi mov rsi, r13 mov rdx, r12 call _memcpy mov rax, [rbp+var_60] and byte ptr [rax+625h], 0EFh add r14, r12 mov [rbp+var_50], r14 mov r12, [rbp+var_30] mov edi, [r15+8] add rdi, r12 movzx esi, byte ptr [r15+1Ah] mov edx, [rbp+var_34] call _ma_store_blob_length loc_42776: lea rdx, [r15+20h] mov cl, [r15+38h] add r15, 38h ; '8' mov rax, r15 mov r13, rbx mov r15, rdx test cl, cl jnz loc_4241F loc_42793: xor eax, eax loc_42795: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_427A4: mov eax, 1 jmp short loc_42795
long long ma_put_key_in_record(long long a1, unsigned int a2, char a3, long long a4) { _QWORD *v5; // r15 char v6; // cl unsigned __int8 *v7; // r13 char *v8; // rax char v9; // dl unsigned __int8 *v10; // rbx unsigned int v11; // esi int v12; // eax unsigned int v13; // edi long long v14; // r8 int v15; // edx unsigned int v16; // eax __int16 v17; // ax long long v18; // rdx unsigned __int8 *v19; // rcx unsigned int v20; // edi long long v21; // rsi unsigned int v22; // ecx unsigned int v23; // ecx long long v24; // rdx unsigned int v25; // edx long long result; // rax bool v27; // cf long long v28; // rdx unsigned __int8 *v29; // r13 long long v30; // r12 unsigned int v31; // esi long long v32; // rcx unsigned __int8 *v33; // r13 long long v34; // rax char v35; // cl unsigned __int8 *v36; // r13 long long v38; // [rsp+8h] [rbp-58h] long long v39; // [rsp+10h] [rbp-50h] unsigned __int8 *v41; // [rsp+20h] [rbp-40h] long long v42; // [rsp+30h] [rbp-30h] v5 = *(_QWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 280LL * a2 + 192); v6 = *((_BYTE *)v5 + 24); if ( v6 ) { v7 = *(unsigned __int8 **)(a1 + 512); v41 = &v7[*(unsigned int *)(a1 + 528)]; v8 = (char *)(v5 + 3); v39 = *(_QWORD *)(a1 + 912); v38 = a4 - 1; v42 = a4; do { v9 = *((_BYTE *)v5 + 25); if ( v9 ) { v10 = v7 + 1; if ( !*v7 ) { *(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) |= v9; goto LABEL_51; } *(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) &= ~v9; v6 = *v8; ++v7; } if ( v6 == 19 ) { v11 = *((unsigned __int16 *)v5 + 10); v12 = *((unsigned __int8 *)v5 + 27); if ( *((_BYTE *)v5 + 27) ) { v13 = *v7; v14 = *((unsigned __int16 *)v5 + 8); v15 = *((unsigned __int8 *)v5 + 26); *(_BYTE *)(a4 + v14) = *(_BYTE *)(a4 + v14) & ~(~(-1 << v12) << *((_BYTE *)v5 + 26)) | (*v7 << *((_BYTE *)v5 + 26)); v16 = v15 + v12; if ( v16 >= 9 ) *(_BYTE *)(a4 + v14 + 1) = (*(unsigned __int8 *)(a4 + v14 + 1) >> (v16 - 8) << (v16 - 8)) | (v13 >> (8 - v15)); ++v7; --v11; } else { v22 = *((unsigned __int8 *)v5 + 26); if ( v22 >= 9 ) *(_BYTE *)(a4 + *((unsigned __int16 *)v5 + 8) + 1) &= -1 << (v22 - 8); } memcpy(a4 + *((unsigned int *)v5 + 2), v7, v11); v7 += v11; LABEL_23: v10 = v7; goto LABEL_51; } v17 = *((_WORD *)v5 + 9); if ( (v17 & 1) != 0 ) { v20 = *v7; if ( v20 == 255 ) { v20 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8); v21 = 3LL; } else { v21 = 1LL; } v25 = *((unsigned __int16 *)v5 + 10); result = 1LL; v27 = v25 < v20; v28 = v25 - v20; if ( v27 ) return result; v29 = &v7[v21]; v10 = &v29[v20]; if ( v10 > v41 ) return result; v30 = v42 + *((unsigned int *)v5 + 2); if ( v6 == 7 ) { memset(v42 + *((unsigned int *)v5 + 2), 32LL, v28); memcpy(v30 + *((unsigned __int16 *)v5 + 10) - v20, v29, v20); } else { memcpy(v30, v29, v20); (*(void ( **)(_QWORD, long long, _QWORD, long long))(*(_QWORD *)(*v5 + 184LL) + 120LL))( *v5, v20 + v30, *((unsigned __int16 *)v5 + 10) - v20, 32LL); } LABEL_32: a4 = v42; goto LABEL_51; } if ( (v17 & 8) != 0 ) { v23 = *v7; if ( v23 == 255 ) { v23 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8); v24 = 3LL; } else { v24 = 1LL; } result = 1LL; if ( v23 > *((unsigned __int16 *)v5 + 10) ) return result; v33 = &v7[v24]; v10 = &v33[v23]; if ( v10 > v41 ) return result; a4 = v42; if ( *((_BYTE *)v5 + 26) == 1 ) *(_BYTE *)(v42 + *((unsigned int *)v5 + 2)) = v23; else *(_WORD *)(v42 + *((unsigned int *)v5 + 2)) = v23; memcpy(v42 + *((unsigned int *)v5 + 2) + *((unsigned __int8 *)v5 + 26), v33, v23); } else { if ( (v17 & 0x20) != 0 ) { v31 = *v7; if ( v31 == 255 ) { v31 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8); v32 = 3LL; } else { v32 = 1LL; } result = 1LL; if ( v31 > *((unsigned __int16 *)v5 + 10) ) return result; v36 = &v7[v32]; v10 = &v36[v31]; if ( v10 > v41 ) return result; if ( a3 ) { *(_QWORD *)(*((unsigned __int8 *)v5 + 26) + v42 + *((unsigned int *)v5 + 2)) = v39; memcpy(v39, v36, v31); *(_BYTE *)(a1 + 1573) &= ~0x10u; v39 += v31; a4 = v42; ma_store_blob_length(v42 + *((unsigned int *)v5 + 2), *((unsigned __int8 *)v5 + 26), v31); goto LABEL_51; } goto LABEL_32; } v18 = *((unsigned __int16 *)v5 + 10); v19 = &v7[v18]; if ( (v17 & 0x40) != 0 ) { if ( v19 > v41 ) return 1LL; v34 = v38 + *((unsigned int *)v5 + 2); do { v35 = *v7++; *(_BYTE *)(v34 + v18--) = v35; } while ( v18 ); goto LABEL_23; } if ( v19 > v41 ) return 1LL; memcpy(a4 + *((unsigned int *)v5 + 2), v7, v18); v10 = &v7[*((unsigned __int16 *)v5 + 10)]; } LABEL_51: v6 = *((_BYTE *)v5 + 56); v8 = (char *)(v5 + 7); v7 = v10; v5 += 4; } while ( v6 ); } return 0LL; }
_ma_put_key_in_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RCX MOV dword ptr [RBP + -0x44],EDX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,ESI IMUL RCX,RCX,0x118 MOV R15,qword ptr [RAX + RCX*0x1 + 0xc0] MOV CL,byte ptr [R15 + 0x18] TEST CL,CL JZ 0x00142793 MOV R13,qword ptr [RDI + 0x200] MOV EAX,dword ptr [RDI + 0x210] ADD RAX,R13 MOV qword ptr [RBP + -0x40],RAX LEA RAX,[R15 + 0x18] MOV qword ptr [RBP + -0x60],RDI MOV RDX,qword ptr [RDI + 0x390] MOV qword ptr [RBP + -0x50],RDX LEA RDX,[R12 + -0x1] MOV qword ptr [RBP + -0x58],RDX MOV qword ptr [RBP + -0x30],R12 LAB_0014241f: MOV DL,byte ptr [R15 + 0x19] TEST DL,DL JZ 0x00142445 LEA RBX,[R13 + 0x1] CMP byte ptr [R13],0x0 JZ 0x00142517 NOT DL MOV ECX,dword ptr [R15 + 0xc] AND byte ptr [R12 + RCX*0x1],DL MOV CL,byte ptr [RAX] MOV R13,RBX LAB_00142445: CMP CL,0x13 JNZ 0x001424c7 MOVZX ESI,word ptr [R15 + 0x14] MOVZX EAX,byte ptr [R15 + 0x1b] TEST EAX,EAX JZ 0x00142538 MOVZX EDI,byte ptr [R13] MOVZX R8D,word ptr [R15 + 0x10] MOVZX EDX,byte ptr [R15 + 0x1a] MOV R9D,0xffffffff MOV ECX,EAX SHL R9D,CL NOT R9D MOV ECX,EDX SHL R9D,CL MOVZX ECX,byte ptr [R12 + R8*0x1] NOT R9D AND R9D,ECX MOV R10D,EDI MOV ECX,EDX SHL R10D,CL OR R10D,R9D MOV byte ptr [R12 + R8*0x1],R10B ADD EAX,EDX CMP EAX,0x9 JC 0x001424bd MOVZX R9D,byte ptr [R12 + R8*0x1 + 0x1] ADD AL,0xf8 MOV ECX,EAX SHR R9D,CL SHL R9D,CL MOV CL,0x8 SUB CL,DL SHR EDI,CL OR EDI,R9D MOV byte ptr [R12 + R8*0x1 + 0x1],DIL LAB_001424bd: INC R13 DEC ESI JMP 0x00142556 LAB_001424c7: MOVZX EAX,word ptr [R15 + 0x12] TEST AL,0x1 JNZ 0x00142524 TEST AL,0x8 JNZ 0x00142576 TEST AL,0x20 JNZ 0x00142634 MOVZX EDX,word ptr [R15 + 0x14] LEA RCX,[RDX + R13*0x1] TEST AL,0x40 JNZ 0x001426c3 CMP RCX,qword ptr [RBP + -0x40] JA 0x001427a4 MOV EDI,dword ptr [R15 + 0x8] ADD RDI,R12 MOV RSI,R13 CALL 0x0012a0a0 MOVZX EBX,word ptr [R15 + 0x14] ADD RBX,R13 JMP 0x00142776 LAB_00142517: MOV EAX,dword ptr [R15 + 0xc] OR byte ptr [R12 + RAX*0x1],DL JMP 0x00142776 LAB_00142524: MOVZX EDI,byte ptr [R13] CMP EDI,0xff JZ 0x00142591 MOV ESI,0x1 JMP 0x001425a2 LAB_00142538: MOVZX ECX,byte ptr [R15 + 0x1a] CMP ECX,0x9 JC 0x00142556 ADD CL,0xf8 MOV EAX,0xffffffff SHL EAX,CL MOVZX ECX,word ptr [R15 + 0x10] AND byte ptr [R12 + RCX*0x1 + 0x1],AL LAB_00142556: MOV EDI,dword ptr [R15 + 0x8] ADD RDI,R12 MOV R14D,ESI MOV RSI,R13 MOV RDX,R14 CALL 0x0012a0a0 ADD R13,R14 LAB_0014256e: MOV RBX,R13 JMP 0x00142776 LAB_00142576: MOVZX ECX,byte ptr [R13] CMP ECX,0xff JZ 0x0014264f MOV EDX,0x1 JMP 0x00142660 LAB_00142591: MOVZX EAX,word ptr [R13 + 0x1] ROL AX,0x8 MOVZX EDI,AX MOV ESI,0x3 LAB_001425a2: MOVZX EDX,word ptr [R15 + 0x14] MOV EAX,0x1 SUB EDX,EDI JC 0x00142795 ADD R13,RSI MOV R14D,EDI LEA RBX,[R14 + R13*0x1] CMP RBX,qword ptr [RBP + -0x40] JA 0x00142795 MOV R12D,dword ptr [R15 + 0x8] ADD R12,qword ptr [RBP + -0x30] CMP CL,0x7 JNZ 0x001425fa MOV RDI,R12 MOV ESI,0x20 CALL 0x0012a2a0 MOVZX EDI,word ptr [R15 + 0x14] ADD RDI,R12 SUB RDI,R14 MOV RSI,R13 MOV RDX,R14 CALL 0x0012a0a0 JMP 0x0014262b LAB_001425fa: MOV dword ptr [RBP + -0x34],EDI MOV RDI,R12 MOV RSI,R13 MOV RDX,R14 CALL 0x0012a0a0 MOV RDI,qword ptr [R15] ADD R12,R14 MOVZX EDX,word ptr [R15 + 0x14] SUB EDX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,R12 MOV ECX,0x20 CALL qword ptr [RAX + 0x78] LAB_0014262b: MOV R12,qword ptr [RBP + -0x30] JMP 0x00142776 LAB_00142634: MOVZX ESI,byte ptr [R13] CMP ESI,0xff JZ 0x001426e9 MOV ECX,0x1 JMP 0x001426fa LAB_0014264f: MOVZX EAX,word ptr [R13 + 0x1] ROL AX,0x8 MOVZX ECX,AX MOV EDX,0x3 LAB_00142660: MOVZX ESI,word ptr [R15 + 0x14] MOV EAX,0x1 CMP ECX,ESI JA 0x00142795 ADD R13,RDX MOV EDX,ECX LEA RBX,[RDX + R13*0x1] CMP RBX,qword ptr [RBP + -0x40] JA 0x00142795 CMP byte ptr [R15 + 0x1a],0x1 JNZ 0x0014269a MOV EAX,dword ptr [R15 + 0x8] MOV R12,qword ptr [RBP + -0x30] MOV byte ptr [R12 + RAX*0x1],CL JMP 0x001426a7 LAB_0014269a: MOV EAX,dword ptr [R15 + 0x8] MOV R12,qword ptr [RBP + -0x30] MOV word ptr [R12 + RAX*0x1],CX LAB_001426a7: MOV EAX,dword ptr [R15 + 0x8] ADD RAX,R12 MOVZX EDI,byte ptr [R15 + 0x1a] ADD RDI,RAX MOV RSI,R13 CALL 0x0012a0a0 JMP 0x00142776 LAB_001426c3: CMP RCX,qword ptr [RBP + -0x40] JA 0x001427a4 MOV EAX,dword ptr [R15 + 0x8] ADD RAX,qword ptr [RBP + -0x58] LAB_001426d5: MOV CL,byte ptr [R13] INC R13 MOV byte ptr [RAX + RDX*0x1],CL DEC RDX JNZ 0x001426d5 JMP 0x0014256e LAB_001426e9: MOVZX EAX,word ptr [R13 + 0x1] ROL AX,0x8 MOVZX ESI,AX MOV ECX,0x3 LAB_001426fa: MOVZX EDX,word ptr [R15 + 0x14] MOV EAX,0x1 CMP ESI,EDX JA 0x00142795 ADD R13,RCX MOV R12D,ESI LEA RBX,[R12 + R13*0x1] CMP RBX,qword ptr [RBP + -0x40] JA 0x00142795 CMP byte ptr [RBP + -0x44],0x0 JZ 0x0014262b MOV EAX,dword ptr [R15 + 0x8] ADD RAX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [R15 + 0x1a] MOV R14,qword ptr [RBP + -0x50] MOV qword ptr [RCX + RAX*0x1],R14 MOV RDI,R14 MOV dword ptr [RBP + -0x34],ESI MOV RSI,R13 MOV RDX,R12 CALL 0x0012a0a0 MOV RAX,qword ptr [RBP + -0x60] AND byte ptr [RAX + 0x625],0xef ADD R14,R12 MOV qword ptr [RBP + -0x50],R14 MOV R12,qword ptr [RBP + -0x30] MOV EDI,dword ptr [R15 + 0x8] ADD RDI,R12 MOVZX ESI,byte ptr [R15 + 0x1a] MOV EDX,dword ptr [RBP + -0x34] CALL 0x00149f52 LAB_00142776: LEA RDX,[R15 + 0x20] MOV CL,byte ptr [R15 + 0x38] ADD R15,0x38 MOV RAX,R15 MOV R13,RBX MOV R15,RDX TEST CL,CL JNZ 0x0014241f LAB_00142793: XOR EAX,EAX LAB_00142795: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001427a4: MOV EAX,0x1 JMP 0x00142795
int8 _ma_put_key_in_record(long *param_1,ulong param_2,char param_3,long param_4) { byte bVar1; byte bVar2; ushort uVar3; byte bVar4; byte *pbVar5; long *plVar6; char cVar7; long lVar8; ulong uVar9; uint uVar10; void *__dest; byte *__src; byte *pbVar11; long *plVar12; void *local_58; plVar12 = *(long **)(*(long *)(*param_1 + 0x570) + 0xc0 + (param_2 & 0xffffffff) * 0x118); cVar7 = (char)plVar12[3]; if (cVar7 != '\0') { pbVar5 = (byte *)param_1[0x40] + *(uint *)(param_1 + 0x42); plVar6 = plVar12 + 3; local_58 = (void *)param_1[0x72]; pbVar11 = (byte *)param_1[0x40]; do { bVar4 = *(byte *)((long)plVar12 + 0x19); __src = pbVar11; if (bVar4 == 0) { LAB_00142445: if (cVar7 == '\x13') { uVar3 = *(ushort *)((long)plVar12 + 0x14); uVar10 = (uint)uVar3; bVar4 = *(byte *)((long)plVar12 + 0x1b); if (bVar4 == 0) { if (8 < *(byte *)((long)plVar12 + 0x1a)) { pbVar11 = (byte *)(param_4 + 1 + (ulong)*(ushort *)(plVar12 + 2)); *pbVar11 = *pbVar11 & (byte)(-1 << (*(byte *)((long)plVar12 + 0x1a) - 8 & 0x1f)); } } else { bVar1 = *__src; uVar9 = (ulong)*(ushort *)(plVar12 + 2); bVar2 = *(byte *)((long)plVar12 + 0x1a); *(byte *)(param_4 + uVar9) = bVar1 << (bVar2 & 0x1f) | ~(byte)(~(-1 << (bVar4 & 0x1f)) << (bVar2 & 0x1f)) & *(byte *)(param_4 + uVar9); if (8 < (uint)bVar4 + (uint)bVar2) { bVar4 = (char)((uint)bVar4 + (uint)bVar2) - 8; *(byte *)(param_4 + 1 + uVar9) = bVar1 >> (8 - bVar2 & 0x1f) | (*(byte *)(param_4 + 1 + uVar9) >> (bVar4 & 0x1f)) << (bVar4 & 0x1f); } __src = __src + 1; uVar10 = uVar3 - 1; } memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,(ulong)uVar10); __src = __src + uVar10; } else { uVar3 = *(ushort *)((long)plVar12 + 0x12); if ((uVar3 & 1) == 0) { if ((uVar3 & 8) == 0) { if ((uVar3 & 0x20) == 0) { uVar9 = (ulong)*(ushort *)((long)plVar12 + 0x14); if ((uVar3 & 0x40) == 0) { if (pbVar5 < __src + uVar9) { return 1; } memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,uVar9); __src = __src + *(ushort *)((long)plVar12 + 0x14); } else { if (pbVar5 < __src + uVar9) { return 1; } uVar10 = *(uint *)(plVar12 + 1); do { bVar4 = *__src; __src = __src + 1; *(byte *)((ulong)uVar10 + param_4 + -1 + uVar9) = bVar4; uVar9 = uVar9 - 1; } while (uVar9 != 0); } } else { uVar10 = (uint)*__src; if (*__src == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8) ; lVar8 = 3; } else { lVar8 = 1; } if (*(ushort *)((long)plVar12 + 0x14) < uVar10) { return 1; } pbVar11 = __src + lVar8; uVar9 = (ulong)uVar10; __src = pbVar11 + uVar9; if (pbVar5 < __src) { return 1; } if (param_3 != '\0') { *(void **)((ulong)*(byte *)((long)plVar12 + 0x1a) + (ulong)*(uint *)(plVar12 + 1) + param_4) = local_58; memcpy(local_58,pbVar11,uVar9); *(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) & 0xef; local_58 = (void *)((long)local_58 + uVar9); _ma_store_blob_length ((ulong)*(uint *)(plVar12 + 1) + param_4, *(int1 *)((long)plVar12 + 0x1a),uVar10); } } } else { uVar10 = (uint)*__src; if (*__src == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8); lVar8 = 3; } else { lVar8 = 1; } if (*(ushort *)((long)plVar12 + 0x14) < uVar10) { return 1; } pbVar11 = __src + lVar8; __src = pbVar11 + uVar10; if (pbVar5 < __src) { return 1; } if (*(char *)((long)plVar12 + 0x1a) == '\x01') { *(char *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (char)uVar10; } else { *(short *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (short)uVar10; } memcpy((void *)((ulong)*(byte *)((long)plVar12 + 0x1a) + (ulong)*(uint *)(plVar12 + 1) + param_4),pbVar11,(ulong)uVar10); } } else { uVar10 = (uint)*__src; if (*__src == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8); lVar8 = 3; } else { lVar8 = 1; } if (*(ushort *)((long)plVar12 + 0x14) < uVar10) { return 1; } pbVar11 = __src + lVar8; uVar9 = (ulong)uVar10; __src = pbVar11 + uVar9; if (pbVar5 < __src) { return 1; } __dest = (void *)((ulong)*(uint *)(plVar12 + 1) + param_4); if (cVar7 == '\a') { memset(__dest,0x20,(ulong)(*(ushort *)((long)plVar12 + 0x14) - uVar10)); memcpy((void *)((long)__dest + (*(ushort *)((long)plVar12 + 0x14) - uVar9)),pbVar11, uVar9); } else { memcpy(__dest,pbVar11,uVar9); (**(code **)(*(long *)(*plVar12 + 0xb8) + 0x78)) (*plVar12,(long)__dest + uVar9,*(ushort *)((long)plVar12 + 0x14) - uVar10, 0x20); } } } } else { __src = pbVar11 + 1; if (*pbVar11 != 0) { pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc)); *pbVar11 = *pbVar11 & ~bVar4; cVar7 = (char)*plVar6; goto LAB_00142445; } pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc)); *pbVar11 = *pbVar11 | bVar4; } cVar7 = (char)plVar12[7]; plVar6 = plVar12 + 7; pbVar11 = __src; plVar12 = plVar12 + 4; } while (cVar7 != '\0'); } return 0; }
25,320
maria_delete_all_rows
eloqsql/storage/maria/ma_delete_all.c
int maria_delete_all_rows(MARIA_HA *info) { MARIA_SHARE *share= info->s; my_bool log_record; LSN lsn; #ifdef HAVE_MMAP my_bool mmap_file= share->file_map != 0; #endif DBUG_ENTER("maria_delete_all_rows"); if (share->options & HA_OPTION_READ_ONLY_DATA) { DBUG_RETURN(my_errno=EACCES); } /** @todo LOCK take X-lock on table here. When we have versioning, if some other thread is looking at this table, we cannot shrink the file like this. */ if (_ma_readinfo(info,F_WRLCK,1)) DBUG_RETURN(my_errno); log_record= share->now_transactional && !share->temporary; if (log_record) { /* This record will be used by Recovery to finish the deletion if it crashed. We force it to have a complete history in the log. */ LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; uchar log_data[FILEID_STORE_SIZE]; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); if (unlikely(translog_write_record(&lsn, LOGREC_REDO_DELETE_ALL, info->trn, info, 0, sizeof(log_array)/sizeof(log_array[0]), log_array, log_data, NULL) || translog_flush(lsn))) goto err; /* If we fail in this function after this point, log and table will be inconsistent. */ if (_ma_mark_file_changed(share)) goto err; } else { if (_ma_mark_file_changed(share)) goto err; /* Other branch called function below when writing log record, in hook */ _ma_reset_status(info); } /* Remove old history as the table is now empty for everyone */ _ma_reset_state(info); share->state.changed= 0; /* If we are using delayed keys or if the user has done changes to the tables since it was locked then there may be key blocks in the page cache. Or there may be data blocks there. We need to throw them away or they may re-enter the emptied table or another table later. */ #ifdef HAVE_MMAP if (mmap_file) _ma_unmap_file(info); #endif if (_ma_flush_table_files(info, MARIA_FLUSH_DATA|MARIA_FLUSH_INDEX, FLUSH_IGNORE_CHANGED, FLUSH_IGNORE_CHANGED) || mysql_file_chsize(info->dfile.file, 0, 0, MYF(MY_WME)) || mysql_file_chsize(share->kfile.file, share->base.keystart, 0, MYF(MY_WME))) goto err; if (_ma_initialize_data_file(share, info->dfile.file)) goto err; if (log_record) { /* Because LOGREC_REDO_DELETE_ALL does not operate on pages, it has the following problem: delete_all; inserts (redo_insert); all pages get flushed; checkpoint: the dirty pages list will be empty. In recovery, delete_all is executed, but redo_insert are skipped (dirty pages list is empty). To avoid this, we need to set skip_redo_lsn now, and thus need to sync files. Also fixes the problem of: bulk insert; insert; delete_all; crash: "bulk insert" is skipped (no REDOs), so if "insert" would not be skipped (if we didn't update skip_redo_lsn below) then "insert" would be tried and fail, saying that it sees that the first page has to be created though the inserted row has rownr>0. */ my_bool error= _ma_state_info_write(share, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET | MA_STATE_INFO_WRITE_LOCK) || _ma_update_state_lsns(share, lsn, info->trn->trid, FALSE, FALSE) || _ma_sync_table_files(info); info->trn->rec_lsn= LSN_IMPOSSIBLE; if (error) goto err; } if (info->opt_flag & WRITE_CACHE_USED) reinit_io_cache(&info->rec_cache, WRITE_CACHE, 0, 1, 1); _ma_writeinfo(info, WRITEINFO_UPDATE_KEYFILE); #ifdef HAVE_MMAP /* Map again */ if (mmap_file) _ma_dynmap_file(info, (my_off_t) 0); #endif DBUG_RETURN(0); err: { int save_errno=my_errno; _ma_writeinfo(info, WRITEINFO_UPDATE_KEYFILE); info->update|=HA_STATE_WRITTEN; /* Buffer changed */ DBUG_RETURN(my_errno=save_errno); } }
O0
c
maria_delete_all_rows: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x5f0(%rax) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x29(%rbp) movq -0x18(%rbp), %rax movq 0x720(%rax), %rax andq $0x10000, %rax # imm = 0x10000 cmpq $0x0, %rax je 0x77d31 jmp 0x77d1a callq 0x105150 movl $0xd, (%rax) movl $0xd, -0x4(%rbp) jmp 0x78040 movq -0x10(%rbp), %rdi movl $0x1, %edx movl %edx, %esi callq 0x49730 cmpl $0x0, %eax je 0x77d57 jmp 0x77d48 callq 0x105150 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x78040 movq -0x18(%rbp), %rax movsbl 0x7e7(%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x69(%rbp) je 0x77d7f movq -0x18(%rbp), %rax cmpb $0x0, 0x7d9(%rax) setne %al xorb $-0x1, %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x19(%rbp) cmpb $0x0, -0x19(%rbp) je 0x77e3b leaq -0x62(%rbp), %rax movq %rax, -0x40(%rbp) movq $0x2, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdx movq -0x10(%rbp), %rcx leaq -0x60(%rbp), %r10 leaq -0x62(%rbp), %rax leaq -0x28(%rbp), %rdi movl $0x21, %esi xorl %r8d, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x91400 movsbl %al, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x6a(%rbp) jne 0x77e06 movq -0x28(%rbp), %rdi callq 0x93c10 movsbl %al, %eax cmpl $0x0, %eax setne %al movb %al, -0x6a(%rbp) movb -0x6a(%rbp), %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x77e26 jmp 0x77fff movq -0x18(%rbp), %rdi callq 0x49810 cmpl $0x0, %eax je 0x77e39 jmp 0x77fff jmp 0x77e57 movq -0x18(%rbp), %rdi callq 0x49810 cmpl $0x0, %eax je 0x77e4e jmp 0x77fff movq -0x10(%rbp), %rdi callq 0x78050 movq -0x10(%rbp), %rdi callq 0x4a250 movq -0x18(%rbp), %rax movl $0x0, 0x170(%rax) cmpb $0x0, -0x29(%rbp) je 0x77e7d movq -0x10(%rbp), %rdi callq 0x4d530 movq -0x10(%rbp), %rdi movl $0x3, %esi movl $0x2, %ecx movl %ecx, %edx callq 0x3cc40 cmpl $0x0, %eax jne 0x77ef8 movq -0x10(%rbp), %rax movl 0x480(%rax), %edx leaq 0xea579(%rip), %rdi # 0x162421 movl $0x6b, %esi xorl %eax, %eax movl %eax, %ecx xorl %r8d, %r8d movl $0x10, %r9d callq 0x781a0 cmpl $0x0, %eax jne 0x77ef8 movq -0x18(%rbp), %rax movl 0x760(%rax), %edx movq -0x18(%rbp), %rax movq 0x360(%rax), %rcx leaq 0xea541(%rip), %rdi # 0x162421 movl $0x6c, %esi xorl %r8d, %r8d movl $0x10, %r9d callq 0x781a0 cmpl $0x0, %eax je 0x77efd jmp 0x77fff movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movl 0x480(%rax), %esi callq 0x775d0 cmpl $0x0, %eax je 0x77f1a jmp 0x77fff cmpb $0x0, -0x19(%rbp) je 0x77f9f movq -0x18(%rbp), %rdi movl $0x5, %esi callq 0x37fa0 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x6b(%rbp) jne 0x77f77 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rdx xorl %r8d, %r8d movl %r8d, %ecx callq 0x77a10 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x6b(%rbp) jne 0x77f77 movq -0x10(%rbp), %rdi callq 0x3ceb0 cmpl $0x0, %eax setne %al movb %al, -0x6b(%rbp) movb -0x6b(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x63(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq $0x0, 0x90(%rax) cmpb $0x0, -0x63(%rbp) je 0x77f9d jmp 0x77fff jmp 0x77f9f movq -0x10(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x77fd3 movq -0x10(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x2, %esi xorl %eax, %eax movl %eax, %edx movl $0x1, %r8d movl %r8d, %ecx callq 0xead30 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x49750 cmpb $0x0, -0x29(%rbp) je 0x77ff4 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x4fc60 jmp 0x77ff6 movl $0x0, -0x4(%rbp) jmp 0x78040 callq 0x105150 movl (%rax), %eax movl %eax, -0x68(%rbp) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x49750 movq -0x10(%rbp), %rax movl 0x624(%rax), %ecx orl $0x4, %ecx movl %ecx, 0x624(%rax) movl -0x68(%rbp), %eax movl %eax, -0x70(%rbp) callq 0x105150 movq %rax, %rcx movl -0x70(%rbp), %eax movl %eax, (%rcx) movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopl (%rax)
maria_delete_all_rows: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp qword ptr [rax+5F0h], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_29], al mov rax, [rbp+var_18] mov rax, [rax+720h] and rax, 10000h cmp rax, 0 jz short loc_77D31 jmp short $+2 loc_77D1A: call _my_thread_var mov dword ptr [rax], 0Dh mov [rbp+var_4], 0Dh jmp loc_78040 loc_77D31: mov rdi, [rbp+var_10] mov edx, 1 mov esi, edx call _ma_readinfo cmp eax, 0 jz short loc_77D57 jmp short $+2 loc_77D48: call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax jmp loc_78040 loc_77D57: mov rax, [rbp+var_18] movsx ecx, byte ptr [rax+7E7h] xor eax, eax cmp ecx, 0 mov [rbp+var_69], al jz short loc_77D7F mov rax, [rbp+var_18] cmp byte ptr [rax+7D9h], 0 setnz al xor al, 0FFh mov [rbp+var_69], al loc_77D7F: mov al, [rbp+var_69] and al, 1 movzx eax, al mov [rbp+var_19], al cmp [rbp+var_19], 0 jz loc_77E3B lea rax, [rbp+var_62] mov [rbp+var_40], rax mov [rbp+var_38], 2 mov rax, [rbp+var_10] mov rdx, [rax+8] mov rcx, [rbp+var_10] lea r10, [rbp+var_60] lea rax, [rbp+var_62] lea rdi, [rbp+var_28] mov esi, 21h ; '!' xor r8d, r8d mov r9d, 3 xor r11d, r11d mov [rsp+90h+var_90], r10 mov [rsp+90h+var_88], rax mov [rsp+90h+var_80], 0 call translog_write_record movsx ecx, al mov al, 1 cmp ecx, 0 mov [rbp+var_6A], al jnz short loc_77E06 mov rdi, [rbp+var_28] call translog_flush movsx eax, al cmp eax, 0 setnz al mov [rbp+var_6A], al loc_77E06: mov al, [rbp+var_6A] and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_77E26 jmp loc_77FFF loc_77E26: mov rdi, [rbp+var_18] call _ma_mark_file_changed cmp eax, 0 jz short loc_77E39 jmp loc_77FFF loc_77E39: jmp short loc_77E57 loc_77E3B: mov rdi, [rbp+var_18] call _ma_mark_file_changed cmp eax, 0 jz short loc_77E4E jmp loc_77FFF loc_77E4E: mov rdi, [rbp+var_10] call _ma_reset_status loc_77E57: mov rdi, [rbp+var_10] call _ma_reset_state mov rax, [rbp+var_18] mov dword ptr [rax+170h], 0 cmp [rbp+var_29], 0 jz short loc_77E7D mov rdi, [rbp+var_10] call _ma_unmap_file loc_77E7D: mov rdi, [rbp+var_10] mov esi, 3 mov ecx, 2 mov edx, ecx call _ma_flush_table_files cmp eax, 0 jnz short loc_77EF8 mov rax, [rbp+var_10] mov edx, [rax+480h] lea rdi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 6Bh ; 'k' xor eax, eax mov ecx, eax xor r8d, r8d mov r9d, 10h call inline_mysql_file_chsize_1 cmp eax, 0 jnz short loc_77EF8 mov rax, [rbp+var_18] mov edx, [rax+760h] mov rax, [rbp+var_18] mov rcx, [rax+360h] lea rdi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 6Ch ; 'l' xor r8d, r8d mov r9d, 10h call inline_mysql_file_chsize_1 cmp eax, 0 jz short loc_77EFD loc_77EF8: jmp loc_77FFF loc_77EFD: mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov esi, [rax+480h] call _ma_initialize_data_file cmp eax, 0 jz short loc_77F1A jmp loc_77FFF loc_77F1A: cmp [rbp+var_19], 0 jz short loc_77F9F mov rdi, [rbp+var_18] mov esi, 5 call _ma_state_info_write mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_6B], al jnz short loc_77F77 mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] mov rax, [rbp+var_10] mov rax, [rax+8] mov rdx, [rax+78h] xor r8d, r8d mov ecx, r8d call _ma_update_state_lsns mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_6B], al jnz short loc_77F77 mov rdi, [rbp+var_10] call _ma_sync_table_files cmp eax, 0 setnz al mov [rbp+var_6B], al loc_77F77: mov al, [rbp+var_6B] and al, 1 movzx eax, al mov [rbp+var_63], al mov rax, [rbp+var_10] mov rax, [rax+8] mov qword ptr [rax+90h], 0 cmp [rbp+var_63], 0 jz short loc_77F9D jmp short loc_77FFF loc_77F9D: jmp short $+2 loc_77F9F: mov rax, [rbp+var_10] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_77FD3 mov rdi, [rbp+var_10] add rdi, 4B8h mov esi, 2 xor eax, eax mov edx, eax mov r8d, 1 mov ecx, r8d call reinit_io_cache loc_77FD3: mov rdi, [rbp+var_10] mov esi, 1 call _ma_writeinfo cmp [rbp+var_29], 0 jz short loc_77FF4 mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ma_dynmap_file loc_77FF4: jmp short $+2 loc_77FF6: mov [rbp+var_4], 0 jmp short loc_78040 loc_77FFF: call _my_thread_var mov eax, [rax] mov [rbp+var_68], eax mov rdi, [rbp+var_10] mov esi, 1 call _ma_writeinfo mov rax, [rbp+var_10] mov ecx, [rax+624h] or ecx, 4 mov [rax+624h], ecx mov eax, [rbp+var_68] mov [rbp+var_70], eax call _my_thread_var mov rcx, rax mov eax, [rbp+var_70] mov [rcx], eax mov [rbp+var_4], eax loc_78040: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long maria_delete_all_rows(long long *a1, const char *a2) { long long v2; // rsi long long *v3; // rdi long long *v4; // rdi bool v6; // [rsp+25h] [rbp-6Bh] bool v7; // [rsp+26h] [rbp-6Ah] char v8; // [rsp+27h] [rbp-69h] unsigned int v9; // [rsp+28h] [rbp-68h] _BYTE v10[2]; // [rsp+2Eh] [rbp-62h] BYREF _BYTE v11[32]; // [rsp+30h] [rbp-60h] BYREF _BYTE *v12; // [rsp+50h] [rbp-40h] long long v13; // [rsp+58h] [rbp-38h] bool v14; // [rsp+67h] [rbp-29h] long long *v15; // [rsp+68h] [rbp-28h] BYREF char v16; // [rsp+77h] [rbp-19h] _DWORD *v17; // [rsp+78h] [rbp-18h] long long *v18; // [rsp+80h] [rbp-10h] v18 = a1; v17 = (_DWORD *)*a1; v14 = *((_QWORD *)v17 + 190) != 0LL; if ( (*((_QWORD *)v17 + 228) & 0x10000LL) != 0 ) { *(_DWORD *)my_thread_var(a1, a2) = 13; return 13; } v2 = 1LL; if ( (unsigned int)ma_readinfo() ) return *(unsigned int *)my_thread_var(v18, (_BYTE *)&dword_0 + 1); v8 = 0; if ( *((_BYTE *)v17 + 2023) ) v8 = ~(*((_BYTE *)v17 + 2009) != 0); v16 = v8 & 1; if ( (v8 & 1) != 0 ) { v12 = v10; v13 = 2LL; v3 = (long long *)&v15; v2 = 33LL; v7 = 1; if ( !(unsigned __int8)translog_write_record( (unsigned int)&v15, 33, v18[1], (_DWORD)v18, 0, 3, (long long)v11, (long long)v10, 0LL) ) { v3 = v15; v7 = (char)translog_flush(v15) != 0; } if ( v7 ) goto LABEL_32; v3 = (long long *)v17; if ( (unsigned int)ma_mark_file_changed((long long)v17) ) goto LABEL_32; } else { v3 = (long long *)v17; if ( (unsigned int)ma_mark_file_changed((long long)v17) ) { LABEL_32: v9 = *(_DWORD *)my_thread_var(v3, (const char *)v2); v4 = v18; ma_writeinfo(v18, (_BYTE *)&dword_0 + 1); *((_DWORD *)v18 + 393) |= 4u; *(_DWORD *)my_thread_var(v4, (_BYTE *)&dword_0 + 1) = v9; return v9; } ma_reset_status(v18); } ma_reset_state(v18); v17[92] = 0; if ( v14 ) ma_unmap_file(v18); v3 = v18; v2 = 3LL; if ( (unsigned int)ma_flush_table_files(v18, 3, 2u, 2u) ) goto LABEL_32; v3 = (long long *)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_delete_all.c"; v2 = 107LL; if ( (unsigned int)inline_mysql_file_chsize_1( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_delete_all.c", 107LL, *((unsigned int *)v18 + 288), 0LL, 0LL, 16LL) ) goto LABEL_32; v3 = (long long *)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_delete_all.c"; v2 = 108LL; if ( (unsigned int)inline_mysql_file_chsize_1( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_delete_all.c", 108LL, (unsigned int)v17[472], *((_QWORD *)v17 + 108), 0LL, 16LL) ) goto LABEL_32; v3 = (long long *)v17; v2 = *((unsigned int *)v18 + 288); if ( (unsigned int)ma_initialize_data_file(v17, v2) ) goto LABEL_32; if ( v16 ) { v3 = (long long *)v17; v2 = 5LL; v6 = 1; if ( !(unsigned int)ma_state_info_write((long long)v17, 5u) ) { v3 = (long long *)v17; v2 = (long long)v15; v6 = 1; if ( !(unsigned int)ma_update_state_lsns((long long)v17, (long long)v15, *(_QWORD *)(v18[1] + 120), 0, 0) ) { v3 = v18; v6 = ma_sync_table_files((unsigned int *)v18); } } *(_QWORD *)(v18[1] + 144) = 0LL; if ( v6 ) goto LABEL_32; } if ( (*((_DWORD *)v18 + 391) & 0x10) != 0 ) reinit_io_cache(v18 + 151, 2LL, 0LL, 1LL, 1LL); ma_writeinfo(v18, (_BYTE *)&dword_0 + 1); if ( v14 ) ma_dynmap_file((unsigned int *)v18, 0LL); return 0; }
maria_delete_all_rows: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x5f0],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x29],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x720] AND RAX,0x10000 CMP RAX,0x0 JZ 0x00177d31 JMP 0x00177d1a LAB_00177d1a: CALL 0x00205150 MOV dword ptr [RAX],0xd MOV dword ptr [RBP + -0x4],0xd JMP 0x00178040 LAB_00177d31: MOV RDI,qword ptr [RBP + -0x10] MOV EDX,0x1 MOV ESI,EDX CALL 0x00149730 CMP EAX,0x0 JZ 0x00177d57 JMP 0x00177d48 LAB_00177d48: CALL 0x00205150 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00178040 LAB_00177d57: MOV RAX,qword ptr [RBP + -0x18] MOVSX ECX,byte ptr [RAX + 0x7e7] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x69],AL JZ 0x00177d7f MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x7d9],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x69],AL LAB_00177d7f: MOV AL,byte ptr [RBP + -0x69] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x19],AL CMP byte ptr [RBP + -0x19],0x0 JZ 0x00177e3b LEA RAX,[RBP + -0x62] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x38],0x2 MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] LEA R10,[RBP + -0x60] LEA RAX,[RBP + -0x62] LEA RDI,[RBP + -0x28] MOV ESI,0x21 XOR R8D,R8D MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00191400 MOVSX ECX,AL MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x6a],AL JNZ 0x00177e06 MOV RDI,qword ptr [RBP + -0x28] CALL 0x00193c10 MOVSX EAX,AL CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x6a],AL LAB_00177e06: MOV AL,byte ptr [RBP + -0x6a] AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00177e26 JMP 0x00177fff LAB_00177e26: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00149810 CMP EAX,0x0 JZ 0x00177e39 JMP 0x00177fff LAB_00177e39: JMP 0x00177e57 LAB_00177e3b: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00149810 CMP EAX,0x0 JZ 0x00177e4e JMP 0x00177fff LAB_00177e4e: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00178050 LAB_00177e57: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014a250 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x170],0x0 CMP byte ptr [RBP + -0x29],0x0 JZ 0x00177e7d MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014d530 LAB_00177e7d: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x3 MOV ECX,0x2 MOV EDX,ECX CALL 0x0013cc40 CMP EAX,0x0 JNZ 0x00177ef8 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x480] LEA RDI,[0x262421] MOV ESI,0x6b XOR EAX,EAX MOV ECX,EAX XOR R8D,R8D MOV R9D,0x10 CALL 0x001781a0 CMP EAX,0x0 JNZ 0x00177ef8 MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RAX + 0x760] MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x360] LEA RDI,[0x262421] MOV ESI,0x6c XOR R8D,R8D MOV R9D,0x10 CALL 0x001781a0 CMP EAX,0x0 JZ 0x00177efd LAB_00177ef8: JMP 0x00177fff LAB_00177efd: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x480] CALL 0x001775d0 CMP EAX,0x0 JZ 0x00177f1a JMP 0x00177fff LAB_00177f1a: CMP byte ptr [RBP + -0x19],0x0 JZ 0x00177f9f MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x5 CALL 0x00137fa0 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x6b],AL JNZ 0x00177f77 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x78] XOR R8D,R8D MOV ECX,R8D CALL 0x00177a10 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x6b],AL JNZ 0x00177f77 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013ceb0 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x6b],AL LAB_00177f77: MOV AL,byte ptr [RBP + -0x6b] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x63],AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x90],0x0 CMP byte ptr [RBP + -0x63],0x0 JZ 0x00177f9d JMP 0x00177fff LAB_00177f9d: JMP 0x00177f9f LAB_00177f9f: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00177fd3 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4b8 MOV ESI,0x2 XOR EAX,EAX MOV EDX,EAX MOV R8D,0x1 MOV ECX,R8D CALL 0x001ead30 LAB_00177fd3: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00149750 CMP byte ptr [RBP + -0x29],0x0 JZ 0x00177ff4 MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x0014fc60 LAB_00177ff4: JMP 0x00177ff6 LAB_00177ff6: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00178040 LAB_00177fff: CALL 0x00205150 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x68],EAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00149750 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x4 MOV dword ptr [RAX + 0x624],ECX MOV EAX,dword ptr [RBP + -0x68] MOV dword ptr [RBP + -0x70],EAX CALL 0x00205150 MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x70] MOV dword ptr [RCX],EAX MOV dword ptr [RBP + -0x4],EAX LAB_00178040: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 maria_delete_all_rows(long *param_1) { int4 uVar1; char cVar2; int iVar3; int4 *puVar4; bool bVar5; byte local_71; int1 local_6a [2]; int1 local_68 [32]; int1 *local_48; int8 local_40; char local_31; int8 local_30; byte local_21; long local_20; long *local_18; local_20 = *param_1; local_31 = *(long *)(local_20 + 0x5f0) != 0; local_18 = param_1; if ((*(ulong *)(local_20 + 0x720) & 0x10000) != 0) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0xd; return 0xd; } iVar3 = _ma_readinfo(param_1,1); if (iVar3 != 0) { puVar4 = (int4 *)_my_thread_var(); return *puVar4; } local_71 = 0; if (*(char *)(local_20 + 0x7e7) != '\0') { local_71 = *(char *)(local_20 + 0x7d9) != '\0' ^ 0xff; } local_21 = local_71 & 1; if (local_21 == 0) { iVar3 = _ma_mark_file_changed(local_20); if (iVar3 != 0) goto LAB_00177fff; _ma_reset_status(local_18); } else { local_48 = local_6a; local_40 = 2; cVar2 = translog_write_record(&local_30,0x21,local_18[1],local_18,0,3,local_68,local_6a,0); bVar5 = true; if (cVar2 == '\0') { cVar2 = translog_flush(local_30); bVar5 = cVar2 != '\0'; } if ((bVar5) || (iVar3 = _ma_mark_file_changed(local_20), iVar3 != 0)) goto LAB_00177fff; } _ma_reset_state(local_18); *(int4 *)(local_20 + 0x170) = 0; if (local_31 != '\0') { _ma_unmap_file(local_18); } iVar3 = _ma_flush_table_files(local_18,3,2); if ((((iVar3 == 0) && (iVar3 = inline_mysql_file_chsize ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_delete_all.c", 0x6b,(int)local_18[0x90],0,0,0x10), iVar3 == 0)) && (iVar3 = inline_mysql_file_chsize ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_delete_all.c", 0x6c,*(int4 *)(local_20 + 0x760),*(int8 *)(local_20 + 0x360),0 ,0x10), iVar3 == 0)) && (iVar3 = _ma_initialize_data_file(local_20,(int)local_18[0x90]), iVar3 == 0)) { if (local_21 != 0) { iVar3 = _ma_state_info_write(local_20,5); bVar5 = true; if (iVar3 == 0) { iVar3 = _ma_update_state_lsns(local_20,local_30,*(int8 *)(local_18[1] + 0x78),0); bVar5 = true; if (iVar3 == 0) { iVar3 = _ma_sync_table_files(local_18); bVar5 = iVar3 != 0; } } *(int8 *)(local_18[1] + 0x90) = 0; if (bVar5) goto LAB_00177fff; } if ((*(uint *)((long)local_18 + 0x61c) & 0x10) != 0) { reinit_io_cache(local_18 + 0x97,2,0,1); } _ma_writeinfo(local_18,1); if (local_31 != '\0') { _ma_dynmap_file(local_18,0); } return 0; } LAB_00177fff: puVar4 = (int4 *)_my_thread_var(); uVar1 = *puVar4; _ma_writeinfo(local_18,1); *(uint *)((long)local_18 + 0x624) = *(uint *)((long)local_18 + 0x624) | 4; puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar1; return uVar1; }
25,321
get_date_string
bluesky950520[P]quickjs/quickjs.c
static JSValue get_date_string(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // _string(obj, fmt, part) char buf[64]; double fields[9]; int res, fmt, part, pos; int y, mon, d, h, m, s, ms, wd, tz; fmt = (magic >> 4) & 0x0F; part = magic & 0x0F; res = get_date_fields(ctx, this_val, fields, fmt & 1, 0); if (res < 0) return JS_EXCEPTION; if (!res) { if (fmt == 2) return JS_ThrowRangeError(ctx, "Date value is NaN"); else return js_new_string8(ctx, "Invalid Date"); } y = fields[0]; mon = fields[1]; d = fields[2]; h = fields[3]; m = fields[4]; s = fields[5]; ms = fields[6]; wd = fields[7]; tz = fields[8]; pos = 0; if (part & 1) { /* date part */ switch(fmt) { case 0: pos += snprintf(buf + pos, sizeof(buf) - pos, "%.3s, %02d %.3s %0*d ", day_names + wd * 3, d, month_names + mon * 3, 4 + (y < 0), y); break; case 1: pos += snprintf(buf + pos, sizeof(buf) - pos, "%.3s %.3s %02d %0*d", day_names + wd * 3, month_names + mon * 3, d, 4 + (y < 0), y); if (part == 3) { buf[pos++] = ' '; } break; case 2: if (y >= 0 && y <= 9999) { pos += snprintf(buf + pos, sizeof(buf) - pos, "%04d", y); } else { pos += snprintf(buf + pos, sizeof(buf) - pos, "%+07d", y); } pos += snprintf(buf + pos, sizeof(buf) - pos, "-%02d-%02dT", mon + 1, d); break; case 3: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d/%02d/%0*d", mon + 1, d, 4 + (y < 0), y); if (part == 3) { buf[pos++] = ','; buf[pos++] = ' '; } break; } } if (part & 2) { /* time part */ switch(fmt) { case 0: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d GMT", h, m, s); break; case 1: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d GMT", h, m, s); if (tz < 0) { buf[pos++] = '-'; tz = -tz; } else { buf[pos++] = '+'; } /* tz is >= 0, can use % */ pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d%02d", tz / 60, tz % 60); /* XXX: tack the time zone code? */ break; case 2: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d.%03dZ", h, m, s, ms); break; case 3: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d %cM", (h + 11) % 12 + 1, m, s, (h < 12) ? 'A' : 'P'); break; } } if (!pos) { // XXX: should throw exception? return JS_AtomToString(ctx, JS_ATOM_empty_string); } return js_new_string8_len(ctx, buf, pos); }
O1
c
get_date_string: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movl %r9d, %ebx movq %rdi, %rbp movl %r9d, %r8d shrl $0x4, %r8d movl %r8d, %r12d andl $0xf, %r12d movl %r9d, %r13d andl $0xf, %r13d andl $0x1, %r8d leaq 0x80(%rsp), %rcx xorl %r14d, %r14d xorl %r9d, %r9d callq 0x55e55 movl $0x6, %r15d testl %eax, %eax js 0x55415 je 0x553fb movq %rbp, 0x38(%rsp) cvttsd2si 0x98(%rsp), %r9d cvttsd2si 0xa0(%rsp), %r8d cvttsd2si 0xa8(%rsp), %r14d cvttsd2si 0xb0(%rsp), %edx cvttsd2si 0xc0(%rsp), %r15d xorl %ebp, %ebp movl %r12d, %esi testb $0x1, %bl je 0x5556e cmpl $0x3, %r12d ja 0x5556e movl %edx, 0x14(%rsp) movl %r15d, 0x18(%rsp) movq %r9, 0x28(%rsp) movl %r8d, 0x1c(%rsp) cvttsd2si 0x80(%rsp), %ecx cvttsd2si 0x88(%rsp), %r15d cvttsd2si 0x90(%rsp), %r10d cvttsd2si 0xb8(%rsp), %eax leaq 0x462fc(%rip), %rdx # 0x9b694 movq %rsi, 0x20(%rsp) movslq (%rdx,%rsi,4), %rsi addq %rdx, %rsi jmpq *%rsi leal (%rax,%rax,2), %eax movslq %eax, %rdx leaq 0x47abd(%rip), %rax # 0x9ce70 addq %rdx, %rax leal (%r15,%r15,2), %edx movslq %edx, %rdx leaq 0x47acc(%rip), %r9 # 0x9ce90 addq %rdx, %r9 movl %ecx, %edx shrl $0x1f, %edx orl $0x4, %edx movl %ecx, 0x8(%rsp) movl %edx, (%rsp) leaq 0x49b93(%rip), %rdx # 0x9ef70 leaq 0x40(%rsp), %rdi movl $0x40, %esi movq %rax, %rcx movl %r10d, %r8d xorl %eax, %eax callq 0xe2d0 movl %eax, %ebp jmp 0x55556 cmpl $0x2, %r12d jne 0x5541c leaq 0x49b49(%rip), %rsi # 0x9ef51 xorl %r14d, %r14d movq %rbp, %rdi xorl %eax, %eax callq 0x1fec9 xorl %ebx, %ebx jmp 0x55704 leaq 0x49b40(%rip), %rsi # 0x9ef63 movq %rbp, %rdi movl $0xc, %edx callq 0x1f5c9 movq %rax, %r14 movq %rdx, %r15 movabsq $-0x100000000, %rbx # imm = 0xFFFFFFFF00000000 jmp 0x556de cmpl $0x2710, %ecx # imm = 0x2710 leaq 0x49b48(%rip), %rax # 0x9ef9a leaq 0x49b46(%rip), %rdx # 0x9ef9f cmovbq %rax, %rdx leaq 0x40(%rsp), %rdi movl %r14d, 0x34(%rsp) movl $0x40, %r14d movl $0x40, %esi xorl %eax, %eax movl %r10d, %r13d callq 0xe2d0 movslq %eax, %rbp leaq (%rsp,%rbp), %rdi addq $0x40, %rdi subq %rbp, %r14 incl %r15d leaq 0x49b11(%rip), %rdx # 0x9efa5 movq %r14, %rsi movl 0x34(%rsp), %r14d movl %r15d, %ecx movl %r13d, %r8d xorl %eax, %eax callq 0xe2d0 addl %eax, %ebp jmp 0x55556 incl %r15d movl %ecx, %r9d shrl $0x1f, %r9d orl $0x4, %r9d movl %ecx, (%rsp) leaq 0x49ae9(%rip), %rdx # 0x9efb1 leaq 0x40(%rsp), %rdi movl $0x40, %esi movl %r15d, %ecx movl %r10d, %r8d xorl %eax, %eax callq 0xe2d0 movl %eax, %ebp cmpl $0x3, %r13d jne 0x55556 movslq %ebp, %rax movw $0x202c, 0x40(%rsp,%rax) # imm = 0x202C addl $0x2, %ebp jmp 0x55556 leal (%rax,%rax,2), %eax movslq %eax, %rdx leaq 0x4796d(%rip), %rax # 0x9ce70 addq %rdx, %rax leal (%r15,%r15,2), %edx movslq %edx, %rdx leaq 0x4797c(%rip), %r8 # 0x9ce90 addq %rdx, %r8 movl %ecx, %edx shrl $0x1f, %edx orl $0x4, %edx movl %ecx, 0x8(%rsp) movl %edx, (%rsp) leaq 0x49a59(%rip), %rdx # 0x9ef86 leaq 0x40(%rsp), %rdi movl $0x40, %esi movq %rax, %rcx movl %r10d, %r9d xorl %eax, %eax callq 0xe2d0 movl %eax, %ebp cmpl $0x3, %r13d jne 0x55556 movslq %ebp, %rax incl %ebp movb $0x20, 0x40(%rsp,%rax) movl 0x1c(%rsp), %r8d movq 0x28(%rsp), %r9 movl 0x18(%rsp), %r15d movl 0x14(%rsp), %edx movq 0x20(%rsp), %rsi testb $0x2, %bl je 0x556b9 cmpl $0x3, %r12d ja 0x556b9 leaq 0x4611c(%rip), %rax # 0x9b6a4 movslq (%rax,%rsi,4), %rcx addq %rax, %rcx jmpq *%rcx movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leaq 0x49a15(%rip), %rdx # 0x9efc0 jmp 0x555ca movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi movl %edx, (%rsp) leaq 0x49a12(%rip), %rdx # 0x9efdc movl %r9d, %ecx jmp 0x55626 movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leal 0xb(%r9), %eax cltq imulq $0x2aaaaaab, %rax, %rax # imm = 0x2AAAAAAB movq %rax, %rcx shrq $0x3f, %rcx shrq $0x21, %rax addl %ecx, %eax shll $0x2, %eax leal (%rax,%rax,2), %eax negl %eax leal (%r9,%rax), %ecx addl $0xc, %ecx cmpl $0xc, %r9d movl $0x41, %eax movl $0x50, %edx cmovll %eax, %edx movl %edx, (%rsp) leaq 0x499cb(%rip), %rdx # 0x9eff1 movl %r14d, %r9d xorl %eax, %eax callq 0xe2d0 addl %ebp, %eax movl %eax, %ebp jmp 0x556b9 movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leaq 0x4996d(%rip), %rdx # 0x9efc0 movl %r9d, %ecx movl %r14d, %r9d xorl %eax, %eax callq 0xe2d0 addl %ebp, %eax movslq %eax, %rbx testl %r15d, %r15d js 0x55671 movb $0x2b, 0x40(%rsp,%rbx) jmp 0x55679 movb $0x2d, 0x40(%rsp,%rbx) negl %r15d leaq 0x40(%rsp), %rax leaq (%rbx,%rax), %rdi incq %rdi movl $0x3f, %esi subq %rbx, %rsi movl %r15d, %eax movl $0x88888889, %ecx # imm = 0x88888889 imulq %rax, %rcx shrq $0x25, %rcx imull $0x3c, %ecx, %eax subl %eax, %r15d leaq 0x49929(%rip), %rdx # 0x9efd3 movl %r15d, %r8d xorl %eax, %eax callq 0xe2d0 leal (%rbx,%rax), %ebp incl %ebp movabsq $-0x100000000, %rbx # imm = 0xFFFFFFFF00000000 testl %ebp, %ebp je 0x556e3 leaq 0x40(%rsp), %rsi movq 0x38(%rsp), %rdi movl %ebp, %edx callq 0x1f5c9 movq %rax, %r14 movq %rdx, %r15 andq %rax, %rbx jmp 0x55704 movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %r14 incl (%r14) andq %r14, %rbx movq $-0x7, %r15 movl %r14d, %eax orq %rbx, %rax movq %r15, %rdx addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
get_date_string: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov ebx, r9d mov rbp, rdi mov r8d, r9d shr r8d, 4 mov r12d, r8d and r12d, 0Fh mov r13d, r9d and r13d, 0Fh and r8d, 1 lea rcx, [rsp+0F8h+var_78] xor r14d, r14d xor r9d, r9d call get_date_fields mov r15d, 6 test eax, eax js loc_55415 jz loc_553FB mov [rsp+0F8h+var_C0], rbp cvttsd2si r9d, [rsp+0F8h+var_60] cvttsd2si r8d, [rsp+0F8h+var_58] cvttsd2si r14d, [rsp+0F8h+var_50] cvttsd2si edx, [rsp+0F8h+var_48] cvttsd2si r15d, [rsp+0F8h+var_38] xor ebp, ebp mov esi, r12d test bl, 1 jz def_553A4; jumptable 00000000000553A4 default case cmp r12d, 3; switch 4 cases ja def_553A4; jumptable 00000000000553A4 default case mov [rsp+0F8h+var_E4], edx mov [rsp+0F8h+var_E0], r15d mov [rsp+0F8h+var_D0], r9 mov [rsp+0F8h+var_DC], r8d cvttsd2si ecx, [rsp+0F8h+var_78] cvttsd2si r15d, [rsp+0F8h+var_70] cvttsd2si r10d, [rsp+0F8h+var_68] cvttsd2si eax, [rsp+0F8h+var_40] lea rdx, jpt_553A4 mov [rsp+0F8h+var_D8], rsi movsxd rsi, ds:(jpt_553A4 - 9B694h)[rdx+rsi*4] add rsi, rdx jmp rsi; switch jump loc_553A6: lea eax, [rax+rax*2]; jumptable 00000000000553A4 case 0 movsxd rdx, eax lea rax, day_names; "SunMonTueWedThuFriSat" add rax, rdx lea edx, [r15+r15*2] movsxd rdx, edx lea r9, month_names; "JanFebMarAprMayJunJulAugSepOctNovDec" add r9, rdx mov edx, ecx shr edx, 1Fh or edx, 4 mov [rsp+0F8h+var_F0], ecx mov [rsp+0F8h+var_F8], edx lea rdx, a3s02d3s0D; "%.3s, %02d %.3s %0*d " lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov rcx, rax mov r8d, r10d xor eax, eax call _snprintf mov ebp, eax jmp loc_55556 loc_553FB: cmp r12d, 2 jnz short loc_5541C lea rsi, aDateValueIsNan; "Date value is NaN" xor r14d, r14d mov rdi, rbp xor eax, eax call JS_ThrowRangeError loc_55415: xor ebx, ebx jmp loc_55704 loc_5541C: lea rsi, aInvalidDate; "Invalid Date" mov rdi, rbp mov edx, 0Ch call js_new_string8_len mov r14, rax mov r15, rdx mov rbx, 0FFFFFFFF00000000h jmp loc_556DE loc_55445: cmp ecx, 2710h; jumptable 00000000000553A4 case 2 lea rax, a04d; "%04d" lea rdx, a07d; "%+07d" cmovb rdx, rax lea rdi, [rsp+0F8h+var_B8] mov [rsp+0F8h+var_C4], r14d mov r14d, 40h ; '@' mov esi, 40h ; '@' xor eax, eax mov r13d, r10d call _snprintf movsxd rbp, eax lea rdi, [rsp+rbp+0F8h+var_F8] add rdi, 40h ; '@' sub r14, rbp inc r15d lea rdx, a02d02dt; "-%02d-%02dT" mov rsi, r14 mov r14d, [rsp+0F8h+var_C4] mov ecx, r15d mov r8d, r13d xor eax, eax call _snprintf add ebp, eax jmp loc_55556 loc_554B0: inc r15d; jumptable 00000000000553A4 case 3 mov r9d, ecx shr r9d, 1Fh or r9d, 4 mov [rsp+0F8h+var_F8], ecx lea rdx, a02d02d0D; "%02d/%02d/%0*d" lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov ecx, r15d mov r8d, r10d xor eax, eax call _snprintf mov ebp, eax cmp r13d, 3 jnz short loc_55556 movsxd rax, ebp mov [rsp+rax+0F8h+var_B8], 202Ch add ebp, 2 jmp short loc_55556 loc_554F6: lea eax, [rax+rax*2]; jumptable 00000000000553A4 case 1 movsxd rdx, eax lea rax, day_names; "SunMonTueWedThuFriSat" add rax, rdx lea edx, [r15+r15*2] movsxd rdx, edx lea r8, month_names; "JanFebMarAprMayJunJulAugSepOctNovDec" add r8, rdx mov edx, ecx shr edx, 1Fh or edx, 4 mov [rsp+0F8h+var_F0], ecx mov [rsp+0F8h+var_F8], edx lea rdx, a3s3s02d0D; "%.3s %.3s %02d %0*d" lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov rcx, rax mov r9d, r10d xor eax, eax call _snprintf mov ebp, eax cmp r13d, 3 jnz short loc_55556 movsxd rax, ebp inc ebp mov byte ptr [rsp+rax+0F8h+var_B8], 20h ; ' ' loc_55556: mov r8d, [rsp+0F8h+var_DC] mov r9, [rsp+0F8h+var_D0] mov r15d, [rsp+0F8h+var_E0] mov edx, [rsp+0F8h+var_E4] mov rsi, [rsp+0F8h+var_D8] def_553A4: test bl, 2; jumptable 00000000000553A4 default case jz def_5558F; jumptable 000000000005558F default case cmp r12d, 3; switch 4 cases ja def_5558F; jumptable 000000000005558F default case lea rax, jpt_5558F movsxd rcx, ds:(jpt_5558F - 9B6A4h)[rax+rsi*4] add rcx, rax jmp rcx; switch jump loc_55591: movsxd rax, ebp; jumptable 000000000005558F case 0 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea rdx, a02d02d02dGmt; "%02d:%02d:%02d GMT" jmp short loc_555CA loc_555AD: movsxd rax, ebp; jumptable 000000000005558F case 2 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax mov [rsp+0F8h+var_F8], edx lea rdx, a02d02d02d03dz; "%02d:%02d:%02d.%03dZ" loc_555CA: mov ecx, r9d jmp short loc_55626 loc_555CF: movsxd rax, ebp; jumptable 000000000005558F case 3 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea eax, [r9+0Bh] cdqe imul rax, 2AAAAAABh mov rcx, rax shr rcx, 3Fh shr rax, 21h add eax, ecx shl eax, 2 lea eax, [rax+rax*2] neg eax lea ecx, [r9+rax] add ecx, 0Ch cmp r9d, 0Ch mov eax, 41h ; 'A' mov edx, 50h ; 'P' cmovl edx, eax mov [rsp+0F8h+var_F8], edx lea rdx, a02d02d02dCm; "%02d:%02d:%02d %cM" loc_55626: mov r9d, r14d xor eax, eax call _snprintf add eax, ebp mov ebp, eax jmp def_5558F; jumptable 000000000005558F default case loc_55639: movsxd rax, ebp; jumptable 000000000005558F case 1 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea rdx, a02d02d02dGmt; "%02d:%02d:%02d GMT" mov ecx, r9d mov r9d, r14d xor eax, eax call _snprintf add eax, ebp movsxd rbx, eax test r15d, r15d js short loc_55671 mov byte ptr [rsp+rbx+0F8h+var_B8], 2Bh ; '+' jmp short loc_55679 loc_55671: mov byte ptr [rsp+rbx+0F8h+var_B8], 2Dh ; '-' neg r15d loc_55679: lea rax, [rsp+0F8h+var_B8] lea rdi, [rbx+rax] inc rdi mov esi, 3Fh ; '?' sub rsi, rbx mov eax, r15d mov ecx, 88888889h imul rcx, rax shr rcx, 25h imul eax, ecx, 3Ch ; '<' sub r15d, eax lea rdx, a02d02d; "%02d%02d" mov r8d, r15d xor eax, eax call _snprintf lea ebp, [rbx+rax] inc ebp def_5558F: mov rbx, 0FFFFFFFF00000000h; jumptable 000000000005558F default case test ebp, ebp jz short loc_556E3 lea rsi, [rsp+0F8h+var_B8] mov rdi, [rsp+0F8h+var_C0] mov edx, ebp call js_new_string8_len mov r14, rax mov r15, rdx loc_556DE: and rbx, rax jmp short loc_55704 loc_556E3: mov rax, [rsp+0F8h+var_C0] mov rax, [rax+18h] mov rax, [rax+68h] mov r14, [rax+178h] inc dword ptr [r14] and rbx, r14 mov r15, 0FFFFFFFFFFFFFFF9h loc_55704: mov eax, r14d or rax, rbx mov rdx, r15 add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long get_date_string( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long a13, unsigned int a14) { char v14; // bl int v15; // r12d int v16; // r13d unsigned long long v17; // r14 int date_fields; // eax long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 long long v25; // r9 long long v26; // r8 unsigned int v27; // r14d int v28; // edx int v29; // r15d signed int v30; // ebp long long v31; // rcx int v32; // r10d int v33; // eax unsigned long long v34; // rbx long long v35; // rax const char *v36; // rdx int v37; // r13d int v38; // ebp long long v39; // rax char *v40; // rdi long long v41; // rsi const char *v42; // rdx long long v43; // rcx int v44; // edx int v45; // eax long long v47; // [rsp+0h] [rbp-F8h] int v48; // [rsp+14h] [rbp-E4h] int v49; // [rsp+18h] [rbp-E0h] unsigned int v50; // [rsp+1Ch] [rbp-DCh] int v51; // [rsp+28h] [rbp-D0h] _BYTE v53[64]; // [rsp+40h] [rbp-B8h] BYREF double v54[2]; // [rsp+80h] [rbp-78h] BYREF double v55; // [rsp+90h] [rbp-68h] double v56; // [rsp+98h] [rbp-60h] double v57; // [rsp+A0h] [rbp-58h] double v58; // [rsp+A8h] [rbp-50h] double v59; // [rsp+B0h] [rbp-48h] double v60; // [rsp+B8h] [rbp-40h] double v61; // [rsp+C0h] [rbp-38h] v14 = a14; v15 = (unsigned __int8)a14 >> 4; v16 = a14 & 0xF; LODWORD(v17) = 0; date_fields = get_date_fields(a1, a2, a3, v54, (a14 >> 4) & 1, 0LL); if ( date_fields >= 0 ) { if ( date_fields ) { v25 = (unsigned int)(int)v56; v26 = (unsigned int)(int)v57; v27 = (int)v58; v28 = (int)v59; v29 = (int)v61; v30 = 0; if ( (v14 & 1) != 0 ) { v48 = (int)v59; v49 = (int)v61; v51 = (int)v56; v50 = (int)v57; v31 = (unsigned int)(int)v54[0]; v29 = (int)v54[1]; v32 = (int)v55; v33 = (int)v60; switch ( v15 ) { case 0: v30 = snprintf( v53, 64LL, "%.3s, %02d %.3s %0*d ", &day_names[3 * v33], v32, &month_names[3 * v29], ((unsigned int)v31 >> 31) | 4, v31); goto LABEL_17; case 1: v30 = snprintf( v53, 64LL, "%.3s %.3s %02d %0*d", &day_names[3 * v33], &month_names[3 * v29], v32, ((unsigned int)v31 >> 31) | 4, v31); if ( v16 == 3 ) { v39 = v30++; v53[v39] = 32; } goto LABEL_17; case 2: v36 = "%+07d"; if ( (unsigned int)v31 < 0x2710 ) v36 = "%04d"; v37 = (int)v55; v38 = snprintf(v53, 64LL, v36, v31, v26, v25); v30 = snprintf(&v53[v38], 64LL - v38, "-%02d-%02dT", v29 + 1, v37) + v38; goto LABEL_17; case 3: v30 = snprintf(v53, 64LL, "%02d/%02d/%0*d", v29 + 1, v32, ((unsigned int)v31 >> 31) | 4, v31); if ( v16 == 3 ) { *(_WORD *)&v53[v30] = 8236; v30 += 2; } LABEL_17: v26 = v50; LODWORD(v25) = v51; v29 = v49; v28 = v48; break; default: break; } } if ( (v14 & 2) != 0 ) { switch ( v15 ) { case 0: v40 = &v53[v30]; v41 = 64LL - v30; v42 = "%02d:%02d:%02d GMT"; goto LABEL_22; case 1: v45 = v30 + snprintf(&v53[v30], 64LL - v30, "%02d:%02d:%02d GMT", v25, v26, v27); if ( v29 < 0 ) { v53[v45] = 45; v29 = -v29; } else { v53[v45] = 43; } v30 = v45 + snprintf(&v53[v45 + 1], 63LL - v45, "%02d%02d", v29 / 0x3Cu, v29 % 0x3Cu) + 1; break; case 2: v40 = &v53[v30]; v41 = 64LL - v30; LODWORD(v47) = v28; v42 = "%02d:%02d:%02d.%03dZ"; LABEL_22: v43 = (unsigned int)v25; goto LABEL_26; case 3: v40 = &v53[v30]; v41 = 64LL - v30; v43 = (unsigned int)(v25 - 12 * (((int)v25 + 11) / 12) + 12); v44 = 80; if ( (int)v25 < 12 ) v44 = 65; LODWORD(v47) = v44; v42 = "%02d:%02d:%02d %cM"; LABEL_26: v30 += snprintf(v40, v41, v42, v43, v26, v27, v47); break; default: break; } } if ( !v30 ) { v17 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*(_DWORD *)v17; v34 = v17 & 0xFFFFFFFF00000000LL; return v34 | (unsigned int)v17; } v35 = js_new_string8_len(a1, (long long)v53, v30); LODWORD(v17) = v35; goto LABEL_33; } if ( v15 != 2 ) { v35 = js_new_string8_len(a1, (long long)"Invalid Date", 0xCu); LODWORD(v17) = v35; LABEL_33: v34 = v35 & 0xFFFFFFFF00000000LL; return v34 | (unsigned int)v17; } LODWORD(v17) = 0; JS_ThrowRangeError(a1, (long long)"Date value is NaN", v19, v20, v21, v22, a4, a5, a6, a7, v23, v24, a10, a11, v47); } v34 = 0LL; return v34 | (unsigned int)v17; }
get_date_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV EBX,R9D MOV RBP,RDI MOV R8D,R9D SHR R8D,0x4 MOV R12D,R8D AND R12D,0xf MOV R13D,R9D AND R13D,0xf AND R8D,0x1 LEA RCX,[RSP + 0x80] XOR R14D,R14D XOR R9D,R9D CALL 0x00155e55 MOV R15D,0x6 TEST EAX,EAX JS 0x00155415 JZ 0x001553fb MOV qword ptr [RSP + 0x38],RBP CVTTSD2SI R9D,qword ptr [RSP + 0x98] CVTTSD2SI R8D,qword ptr [RSP + 0xa0] CVTTSD2SI R14D,qword ptr [RSP + 0xa8] CVTTSD2SI EDX,qword ptr [RSP + 0xb0] CVTTSD2SI R15D,qword ptr [RSP + 0xc0] XOR EBP,EBP MOV ESI,R12D TEST BL,0x1 JZ 0x0015556e CMP R12D,0x3 JA 0x0015556e MOV dword ptr [RSP + 0x14],EDX MOV dword ptr [RSP + 0x18],R15D MOV qword ptr [RSP + 0x28],R9 MOV dword ptr [RSP + 0x1c],R8D CVTTSD2SI ECX,qword ptr [RSP + 0x80] CVTTSD2SI R15D,qword ptr [RSP + 0x88] CVTTSD2SI R10D,qword ptr [RSP + 0x90] CVTTSD2SI EAX,qword ptr [RSP + 0xb8] LEA RDX,[0x19b694] MOV qword ptr [RSP + 0x20],RSI MOVSXD RSI,dword ptr [RDX + RSI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_0: LEA EAX,[RAX + RAX*0x2] MOVSXD RDX,EAX LEA RAX,[0x19ce70] ADD RAX,RDX LEA EDX,[R15 + R15*0x2] MOVSXD RDX,EDX LEA R9,[0x19ce90] ADD R9,RDX MOV EDX,ECX SHR EDX,0x1f OR EDX,0x4 MOV dword ptr [RSP + 0x8],ECX MOV dword ptr [RSP],EDX LEA RDX,[0x19ef70] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV RCX,RAX MOV R8D,R10D XOR EAX,EAX CALL 0x0010e2d0 MOV EBP,EAX JMP 0x00155556 LAB_001553fb: CMP R12D,0x2 JNZ 0x0015541c LEA RSI,[0x19ef51] XOR R14D,R14D MOV RDI,RBP XOR EAX,EAX CALL 0x0011fec9 LAB_00155415: XOR EBX,EBX JMP 0x00155704 LAB_0015541c: LEA RSI,[0x19ef63] MOV RDI,RBP MOV EDX,0xc CALL 0x0011f5c9 MOV R14,RAX MOV R15,RDX MOV RBX,-0x100000000 JMP 0x001556de caseD_2: CMP ECX,0x2710 LEA RAX,[0x19ef9a] LEA RDX,[0x19ef9f] CMOVC RDX,RAX LEA RDI,[RSP + 0x40] MOV dword ptr [RSP + 0x34],R14D MOV R14D,0x40 MOV ESI,0x40 XOR EAX,EAX MOV R13D,R10D CALL 0x0010e2d0 MOVSXD RBP,EAX LEA RDI,[RSP + RBP*0x1] ADD RDI,0x40 SUB R14,RBP INC R15D LEA RDX,[0x19efa5] MOV RSI,R14 MOV R14D,dword ptr [RSP + 0x34] MOV ECX,R15D MOV R8D,R13D XOR EAX,EAX CALL 0x0010e2d0 ADD EBP,EAX JMP 0x00155556 caseD_3: INC R15D MOV R9D,ECX SHR R9D,0x1f OR R9D,0x4 MOV dword ptr [RSP],ECX LEA RDX,[0x19efb1] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV ECX,R15D MOV R8D,R10D XOR EAX,EAX CALL 0x0010e2d0 MOV EBP,EAX CMP R13D,0x3 JNZ 0x00155556 MOVSXD RAX,EBP MOV word ptr [RSP + RAX*0x1 + 0x40],0x202c ADD EBP,0x2 JMP 0x00155556 caseD_1: LEA EAX,[RAX + RAX*0x2] MOVSXD RDX,EAX LEA RAX,[0x19ce70] ADD RAX,RDX LEA EDX,[R15 + R15*0x2] MOVSXD RDX,EDX LEA R8,[0x19ce90] ADD R8,RDX MOV EDX,ECX SHR EDX,0x1f OR EDX,0x4 MOV dword ptr [RSP + 0x8],ECX MOV dword ptr [RSP],EDX LEA RDX,[0x19ef86] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV RCX,RAX MOV R9D,R10D XOR EAX,EAX CALL 0x0010e2d0 MOV EBP,EAX CMP R13D,0x3 JNZ 0x00155556 MOVSXD RAX,EBP INC EBP MOV byte ptr [RSP + RAX*0x1 + 0x40],0x20 LAB_00155556: MOV R8D,dword ptr [RSP + 0x1c] MOV R9,qword ptr [RSP + 0x28] MOV R15D,dword ptr [RSP + 0x18] MOV EDX,dword ptr [RSP + 0x14] MOV RSI,qword ptr [RSP + 0x20] LAB_0015556e: TEST BL,0x2 JZ 0x001556b9 CMP R12D,0x3 JA 0x001556b9 LEA RAX,[0x19b6a4] MOVSXD RCX,dword ptr [RAX + RSI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_0: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA RDX,[0x19efc0] JMP 0x001555ca caseD_2: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX MOV dword ptr [RSP],EDX LEA RDX,[0x19efdc] LAB_001555ca: MOV ECX,R9D JMP 0x00155626 caseD_3: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA EAX,[R9 + 0xb] CDQE IMUL RAX,RAX,0x2aaaaaab MOV RCX,RAX SHR RCX,0x3f SHR RAX,0x21 ADD EAX,ECX SHL EAX,0x2 LEA EAX,[RAX + RAX*0x2] NEG EAX LEA ECX,[R9 + RAX*0x1] ADD ECX,0xc CMP R9D,0xc MOV EAX,0x41 MOV EDX,0x50 CMOVL EDX,EAX MOV dword ptr [RSP],EDX LEA RDX,[0x19eff1] LAB_00155626: MOV R9D,R14D XOR EAX,EAX CALL 0x0010e2d0 ADD EAX,EBP MOV EBP,EAX JMP 0x001556b9 caseD_1: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA RDX,[0x19efc0] MOV ECX,R9D MOV R9D,R14D XOR EAX,EAX CALL 0x0010e2d0 ADD EAX,EBP MOVSXD RBX,EAX TEST R15D,R15D JS 0x00155671 MOV byte ptr [RSP + RBX*0x1 + 0x40],0x2b JMP 0x00155679 LAB_00155671: MOV byte ptr [RSP + RBX*0x1 + 0x40],0x2d NEG R15D LAB_00155679: LEA RAX,[RSP + 0x40] LEA RDI,[RBX + RAX*0x1] INC RDI MOV ESI,0x3f SUB RSI,RBX MOV EAX,R15D MOV ECX,0x88888889 IMUL RCX,RAX SHR RCX,0x25 IMUL EAX,ECX,0x3c SUB R15D,EAX LEA RDX,[0x19efd3] MOV R8D,R15D XOR EAX,EAX CALL 0x0010e2d0 LEA EBP,[RBX + RAX*0x1] INC EBP default: MOV RBX,-0x100000000 TEST EBP,EBP JZ 0x001556e3 LEA RSI,[RSP + 0x40] MOV RDI,qword ptr [RSP + 0x38] MOV EDX,EBP CALL 0x0011f5c9 MOV R14,RAX MOV R15,RDX LAB_001556de: AND RBX,RAX JMP 0x00155704 LAB_001556e3: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV R14,qword ptr [RAX + 0x178] INC dword ptr [R14] AND RBX,R14 MOV R15,-0x7 LAB_00155704: MOV EAX,R14D OR RAX,RBX MOV RDX,R15 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] get_date_string(long param_1) { int *piVar1; int iVar2; int iVar3; long lVar4; uint uVar5; char *pcVar6; ulong uVar7; int4 uVar8; uint in_R9D; uint uVar9; uint uVar10; uint uVar11; uint uVar12; int iVar13; int1 auVar14 [16]; int1 auVar15 [16]; char local_b8 [64]; double local_78; double local_70; double local_68; double local_60; double local_58; double local_50; double local_40; double local_38; uVar11 = in_R9D >> 4 & 0xf; uVar8 = 0; iVar2 = get_date_fields(); if (iVar2 < 0) { LAB_00155415: auVar14 = ZEXT816(6) << 0x40; uVar7 = 0; goto LAB_00155704; } if (iVar2 == 0) { if (uVar11 == 2) { JS_ThrowRangeError(param_1,"Date value is NaN"); goto LAB_00155415; } auVar14 = js_new_string8_len(param_1,"Invalid Date",0xc); goto LAB_001556de; } uVar9 = (uint)local_60; uVar7 = CONCAT44(uVar8,(int)local_58); uVar12 = (uint)local_38; iVar2 = 0; if (((in_R9D & 1) != 0) && (iVar2 = 0, uVar11 < 4)) { uVar5 = (uint)local_78; iVar13 = (int)local_70; uVar10 = (uint)local_68; switch(uVar11) { case 0: iVar2 = snprintf(local_b8,0x40,"%.3s, %02d %.3s %0*d ", "SunMonTueWedThuFriSat" + (int)local_40 * 3,(ulong)uVar10, "JanFebMarAprMayJunJulAugSepOctNovDec" + iVar13 * 3,uVar5 >> 0x1f | 4,uVar5); break; case 1: iVar2 = snprintf(local_b8,0x40,"%.3s %.3s %02d %0*d", "SunMonTueWedThuFriSat" + (int)local_40 * 3, "JanFebMarAprMayJunJulAugSepOctNovDec" + iVar13 * 3,(ulong)uVar10, uVar5 >> 0x1f | 4,uVar5); if ((in_R9D & 0xf) == 3) { lVar4 = (long)iVar2; iVar2 = iVar2 + 1; local_b8[lVar4] = ' '; } break; case 2: pcVar6 = "%+07d"; if (uVar5 < 10000) { pcVar6 = "%04d"; } iVar2 = snprintf(local_b8,0x40,pcVar6); iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,"-%02d-%02dT",(ulong)(iVar13 + 1), (ulong)uVar10); iVar2 = iVar2 + iVar13; break; case 3: iVar2 = snprintf(local_b8,0x40,"%02d/%02d/%0*d",(ulong)(iVar13 + 1),(ulong)uVar10, (ulong)(uVar5 >> 0x1f | 4),uVar5); if ((in_R9D & 0xf) == 3) { (local_b8 + iVar2)[0] = ','; (local_b8 + iVar2)[1] = ' '; iVar2 = iVar2 + 2; } } uVar7 = (ulong)(uint)(int)local_58; } if ((in_R9D & 2) == 0) goto switchD_0015558f_default; switch(uVar11) { case 0: pcVar6 = "%02d:%02d:%02d GMT"; break; case 1: iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,"%02d:%02d:%02d GMT",uVar9,uVar7, (ulong)(uint)(int)local_50); lVar4 = (long)(iVar13 + iVar2); if ((int)uVar12 < 0) { local_b8[lVar4] = '-'; uVar12 = -uVar12; } else { local_b8[lVar4] = '+'; } iVar3 = snprintf(local_b8 + lVar4 + 1,0x3f - lVar4,"%02d%02d",(ulong)uVar12 / 0x3c, (ulong)(uVar12 % 0x3c)); iVar2 = iVar13 + iVar2 + iVar3 + 1; goto switchD_0015558f_default; case 2: pcVar6 = "%02d:%02d:%02d.%03dZ"; break; case 3: iVar13 = (int)(uVar9 + 0xb) >> 0x1f; uVar9 = uVar9 + (((uint)((int)(uVar9 + 0xb) / 6 + iVar13) >> 1) - iVar13) * -0xc + 0xc; pcVar6 = "%02d:%02d:%02d %cM"; break; default: goto switchD_0015558f_default; } iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,pcVar6,(ulong)uVar9,uVar7, (ulong)(uint)(int)local_50); iVar2 = iVar13 + iVar2; switchD_0015558f_default: if (iVar2 == 0) { piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *piVar1 = *piVar1 + 1; uVar7 = (ulong)piVar1 & 0xffffffff00000000; auVar14._8_8_ = 0xfffffffffffffff9; auVar14._0_8_ = piVar1; } else { auVar14 = js_new_string8_len(param_1,local_b8,iVar2); LAB_001556de: uVar7 = auVar14._0_8_ & 0xffffffff00000000; } LAB_00155704: auVar15._0_8_ = auVar14._0_8_ & 0xffffffff | uVar7; auVar15._8_8_ = auVar14._8_8_; return auVar15; }
25,322
get_date_string
bluesky950520[P]quickjs/quickjs.c
static JSValue get_date_string(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // _string(obj, fmt, part) char buf[64]; double fields[9]; int res, fmt, part, pos; int y, mon, d, h, m, s, ms, wd, tz; fmt = (magic >> 4) & 0x0F; part = magic & 0x0F; res = get_date_fields(ctx, this_val, fields, fmt & 1, 0); if (res < 0) return JS_EXCEPTION; if (!res) { if (fmt == 2) return JS_ThrowRangeError(ctx, "Date value is NaN"); else return js_new_string8(ctx, "Invalid Date"); } y = fields[0]; mon = fields[1]; d = fields[2]; h = fields[3]; m = fields[4]; s = fields[5]; ms = fields[6]; wd = fields[7]; tz = fields[8]; pos = 0; if (part & 1) { /* date part */ switch(fmt) { case 0: pos += snprintf(buf + pos, sizeof(buf) - pos, "%.3s, %02d %.3s %0*d ", day_names + wd * 3, d, month_names + mon * 3, 4 + (y < 0), y); break; case 1: pos += snprintf(buf + pos, sizeof(buf) - pos, "%.3s %.3s %02d %0*d", day_names + wd * 3, month_names + mon * 3, d, 4 + (y < 0), y); if (part == 3) { buf[pos++] = ' '; } break; case 2: if (y >= 0 && y <= 9999) { pos += snprintf(buf + pos, sizeof(buf) - pos, "%04d", y); } else { pos += snprintf(buf + pos, sizeof(buf) - pos, "%+07d", y); } pos += snprintf(buf + pos, sizeof(buf) - pos, "-%02d-%02dT", mon + 1, d); break; case 3: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d/%02d/%0*d", mon + 1, d, 4 + (y < 0), y); if (part == 3) { buf[pos++] = ','; buf[pos++] = ' '; } break; } } if (part & 2) { /* time part */ switch(fmt) { case 0: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d GMT", h, m, s); break; case 1: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d GMT", h, m, s); if (tz < 0) { buf[pos++] = '-'; tz = -tz; } else { buf[pos++] = '+'; } /* tz is >= 0, can use % */ pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d%02d", tz / 60, tz % 60); /* XXX: tack the time zone code? */ break; case 2: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d.%03dZ", h, m, s, ms); break; case 3: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d %cM", (h + 11) % 12 + 1, m, s, (h < 12) ? 'A' : 'P'); break; } } if (!pos) { // XXX: should throw exception? return JS_AtomToString(ctx, JS_ATOM_empty_string); } return js_new_string8_len(ctx, buf, pos); }
O3
c
get_date_string: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movl %r9d, %ebx movq %rdi, %rbp movl %r9d, %r8d shrl $0x4, %r8d movl %r8d, %r12d andl $0xf, %r12d movl %r9d, %r13d andl $0xf, %r13d andl $0x1, %r8d leaq 0x80(%rsp), %rcx xorl %r14d, %r14d xorl %r9d, %r9d callq 0x59001 movl $0x6, %r15d testl %eax, %eax js 0x58562 je 0x58548 movq %rbp, 0x38(%rsp) cvttsd2si 0x98(%rsp), %r9d cvttsd2si 0xa0(%rsp), %r8d cvttsd2si 0xa8(%rsp), %r14d cvttsd2si 0xb0(%rsp), %edx cvttsd2si 0xc0(%rsp), %r15d xorl %ebp, %ebp movl %r12d, %esi testb $0x1, %bl je 0x586bb cmpl $0x3, %r12d ja 0x586bb movl %edx, 0x14(%rsp) movl %r15d, 0x18(%rsp) movq %r9, 0x28(%rsp) movl %r8d, 0x1c(%rsp) cvttsd2si 0x80(%rsp), %ecx cvttsd2si 0x88(%rsp), %r15d cvttsd2si 0x90(%rsp), %r10d cvttsd2si 0xb8(%rsp), %eax leaq 0x461a7(%rip), %rdx # 0x9e68c movq %rsi, 0x20(%rsp) movslq (%rdx,%rsi,4), %rsi addq %rdx, %rsi jmpq *%rsi leal (%rax,%rax,2), %eax movslq %eax, %rdx leaq 0x47900(%rip), %rax # 0x9fe00 addq %rdx, %rax leal (%r15,%r15,2), %edx movslq %edx, %rdx leaq 0x4790f(%rip), %r9 # 0x9fe20 addq %rdx, %r9 movl %ecx, %edx shrl $0x1f, %edx orl $0x4, %edx movl %ecx, 0x8(%rsp) movl %edx, (%rsp) leaq 0x49a00(%rip), %rdx # 0xa1f2a leaq 0x40(%rsp), %rdi movl $0x40, %esi movq %rax, %rcx movl %r10d, %r8d xorl %eax, %eax callq 0xe2d0 movl %eax, %ebp jmp 0x586a3 cmpl $0x2, %r12d jne 0x58569 leaq 0x499b6(%rip), %rsi # 0xa1f0b xorl %r14d, %r14d movq %rbp, %rdi xorl %eax, %eax callq 0x205f0 xorl %ebx, %ebx jmp 0x58851 leaq 0x499ad(%rip), %rsi # 0xa1f1d movq %rbp, %rdi movl $0xc, %edx callq 0x1fcd9 movq %rax, %r14 movq %rdx, %r15 movabsq $-0x100000000, %rbx # imm = 0xFFFFFFFF00000000 jmp 0x5882b cmpl $0x2710, %ecx # imm = 0x2710 leaq 0x499b5(%rip), %rax # 0xa1f54 leaq 0x499b3(%rip), %rdx # 0xa1f59 cmovbq %rax, %rdx leaq 0x40(%rsp), %rdi movl %r14d, 0x34(%rsp) movl $0x40, %r14d movl $0x40, %esi xorl %eax, %eax movl %r10d, %r13d callq 0xe2d0 movslq %eax, %rbp leaq (%rsp,%rbp), %rdi addq $0x40, %rdi subq %rbp, %r14 incl %r15d leaq 0x4997e(%rip), %rdx # 0xa1f5f movq %r14, %rsi movl 0x34(%rsp), %r14d movl %r15d, %ecx movl %r13d, %r8d xorl %eax, %eax callq 0xe2d0 addl %eax, %ebp jmp 0x586a3 incl %r15d movl %ecx, %r9d shrl $0x1f, %r9d orl $0x4, %r9d movl %ecx, (%rsp) leaq 0x49956(%rip), %rdx # 0xa1f6b leaq 0x40(%rsp), %rdi movl $0x40, %esi movl %r15d, %ecx movl %r10d, %r8d xorl %eax, %eax callq 0xe2d0 movl %eax, %ebp cmpl $0x3, %r13d jne 0x586a3 movslq %ebp, %rax movw $0x202c, 0x40(%rsp,%rax) # imm = 0x202C addl $0x2, %ebp jmp 0x586a3 leal (%rax,%rax,2), %eax movslq %eax, %rdx leaq 0x477b0(%rip), %rax # 0x9fe00 addq %rdx, %rax leal (%r15,%r15,2), %edx movslq %edx, %rdx leaq 0x477bf(%rip), %r8 # 0x9fe20 addq %rdx, %r8 movl %ecx, %edx shrl $0x1f, %edx orl $0x4, %edx movl %ecx, 0x8(%rsp) movl %edx, (%rsp) leaq 0x498c6(%rip), %rdx # 0xa1f40 leaq 0x40(%rsp), %rdi movl $0x40, %esi movq %rax, %rcx movl %r10d, %r9d xorl %eax, %eax callq 0xe2d0 movl %eax, %ebp cmpl $0x3, %r13d jne 0x586a3 movslq %ebp, %rax incl %ebp movb $0x20, 0x40(%rsp,%rax) movl 0x1c(%rsp), %r8d movq 0x28(%rsp), %r9 movl 0x18(%rsp), %r15d movl 0x14(%rsp), %edx movq 0x20(%rsp), %rsi testb $0x2, %bl je 0x58806 cmpl $0x3, %r12d ja 0x58806 leaq 0x45fc7(%rip), %rax # 0x9e69c movslq (%rax,%rsi,4), %rcx addq %rax, %rcx jmpq *%rcx movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leaq 0x49882(%rip), %rdx # 0xa1f7a jmp 0x58717 movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi movl %edx, (%rsp) leaq 0x4987f(%rip), %rdx # 0xa1f96 movl %r9d, %ecx jmp 0x58773 movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leal 0xb(%r9), %eax cltq imulq $0x2aaaaaab, %rax, %rax # imm = 0x2AAAAAAB movq %rax, %rcx shrq $0x3f, %rcx shrq $0x21, %rax addl %ecx, %eax shll $0x2, %eax leal (%rax,%rax,2), %eax negl %eax leal (%r9,%rax), %ecx addl $0xc, %ecx cmpl $0xc, %r9d movl $0x41, %eax movl $0x50, %edx cmovll %eax, %edx movl %edx, (%rsp) leaq 0x49838(%rip), %rdx # 0xa1fab movl %r14d, %r9d xorl %eax, %eax callq 0xe2d0 addl %ebp, %eax movl %eax, %ebp jmp 0x58806 movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leaq 0x497da(%rip), %rdx # 0xa1f7a movl %r9d, %ecx movl %r14d, %r9d xorl %eax, %eax callq 0xe2d0 addl %ebp, %eax movslq %eax, %rbx testl %r15d, %r15d js 0x587be movb $0x2b, 0x40(%rsp,%rbx) jmp 0x587c6 movb $0x2d, 0x40(%rsp,%rbx) negl %r15d leaq 0x40(%rsp), %rax leaq (%rbx,%rax), %rdi incq %rdi movl $0x3f, %esi subq %rbx, %rsi movl %r15d, %eax movl $0x88888889, %ecx # imm = 0x88888889 imulq %rax, %rcx shrq $0x25, %rcx imull $0x3c, %ecx, %eax subl %eax, %r15d leaq 0x49796(%rip), %rdx # 0xa1f8d movl %r15d, %r8d xorl %eax, %eax callq 0xe2d0 leal (%rbx,%rax), %ebp incl %ebp movabsq $-0x100000000, %rbx # imm = 0xFFFFFFFF00000000 testl %ebp, %ebp je 0x58830 leaq 0x40(%rsp), %rsi movq 0x38(%rsp), %rdi movl %ebp, %edx callq 0x1fcd9 movq %rax, %r14 movq %rdx, %r15 andq %rax, %rbx jmp 0x58851 movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %r14 incl (%r14) andq %r14, %rbx movq $-0x7, %r15 movl %r14d, %eax orq %rbx, %rax movq %r15, %rdx addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
get_date_string: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov ebx, r9d mov rbp, rdi mov r8d, r9d shr r8d, 4 mov r12d, r8d and r12d, 0Fh mov r13d, r9d and r13d, 0Fh and r8d, 1 lea rcx, [rsp+0F8h+var_78] xor r14d, r14d xor r9d, r9d call get_date_fields mov r15d, 6 test eax, eax js loc_58562 jz loc_58548 mov [rsp+0F8h+var_C0], rbp cvttsd2si r9d, [rsp+0F8h+var_60] cvttsd2si r8d, [rsp+0F8h+var_58] cvttsd2si r14d, [rsp+0F8h+var_50] cvttsd2si edx, [rsp+0F8h+var_48] cvttsd2si r15d, [rsp+0F8h+var_38] xor ebp, ebp mov esi, r12d test bl, 1 jz def_584F1; jumptable 00000000000584F1 default case cmp r12d, 3; switch 4 cases ja def_584F1; jumptable 00000000000584F1 default case mov [rsp+0F8h+var_E4], edx mov [rsp+0F8h+var_E0], r15d mov [rsp+0F8h+var_D0], r9 mov [rsp+0F8h+var_DC], r8d cvttsd2si ecx, [rsp+0F8h+var_78] cvttsd2si r15d, [rsp+0F8h+var_70] cvttsd2si r10d, [rsp+0F8h+var_68] cvttsd2si eax, [rsp+0F8h+var_40] lea rdx, jpt_584F1 mov [rsp+0F8h+var_D8], rsi movsxd rsi, ds:(jpt_584F1 - 9E68Ch)[rdx+rsi*4] add rsi, rdx jmp rsi; switch jump loc_584F3: lea eax, [rax+rax*2]; jumptable 00000000000584F1 case 0 movsxd rdx, eax lea rax, day_names; "SunMonTueWedThuFriSat" add rax, rdx lea edx, [r15+r15*2] movsxd rdx, edx lea r9, month_names; "JanFebMarAprMayJunJulAugSepOctNovDec" add r9, rdx mov edx, ecx shr edx, 1Fh or edx, 4 mov [rsp+0F8h+var_F0], ecx mov [rsp+0F8h+var_F8], edx lea rdx, a3s02d3s0D; "%.3s, %02d %.3s %0*d " lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov rcx, rax mov r8d, r10d xor eax, eax call _snprintf mov ebp, eax jmp loc_586A3 loc_58548: cmp r12d, 2 jnz short loc_58569 lea rsi, aDateValueIsNan; "Date value is NaN" xor r14d, r14d mov rdi, rbp xor eax, eax call JS_ThrowRangeError loc_58562: xor ebx, ebx jmp loc_58851 loc_58569: lea rsi, aInvalidDate; "Invalid Date" mov rdi, rbp mov edx, 0Ch call js_new_string8_len mov r14, rax mov r15, rdx mov rbx, 0FFFFFFFF00000000h jmp loc_5882B loc_58592: cmp ecx, 2710h; jumptable 00000000000584F1 case 2 lea rax, a04d; "%04d" lea rdx, a07d; "%+07d" cmovb rdx, rax lea rdi, [rsp+0F8h+var_B8] mov [rsp+0F8h+var_C4], r14d mov r14d, 40h ; '@' mov esi, 40h ; '@' xor eax, eax mov r13d, r10d call _snprintf movsxd rbp, eax lea rdi, [rsp+rbp+0F8h+var_F8] add rdi, 40h ; '@' sub r14, rbp inc r15d lea rdx, a02d02dt; "-%02d-%02dT" mov rsi, r14 mov r14d, [rsp+0F8h+var_C4] mov ecx, r15d mov r8d, r13d xor eax, eax call _snprintf add ebp, eax jmp loc_586A3 loc_585FD: inc r15d; jumptable 00000000000584F1 case 3 mov r9d, ecx shr r9d, 1Fh or r9d, 4 mov [rsp+0F8h+var_F8], ecx lea rdx, a02d02d0D; "%02d/%02d/%0*d" lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov ecx, r15d mov r8d, r10d xor eax, eax call _snprintf mov ebp, eax cmp r13d, 3 jnz short loc_586A3 movsxd rax, ebp mov [rsp+rax+0F8h+var_B8], 202Ch add ebp, 2 jmp short loc_586A3 loc_58643: lea eax, [rax+rax*2]; jumptable 00000000000584F1 case 1 movsxd rdx, eax lea rax, day_names; "SunMonTueWedThuFriSat" add rax, rdx lea edx, [r15+r15*2] movsxd rdx, edx lea r8, month_names; "JanFebMarAprMayJunJulAugSepOctNovDec" add r8, rdx mov edx, ecx shr edx, 1Fh or edx, 4 mov [rsp+0F8h+var_F0], ecx mov [rsp+0F8h+var_F8], edx lea rdx, a3s3s02d0D; "%.3s %.3s %02d %0*d" lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov rcx, rax mov r9d, r10d xor eax, eax call _snprintf mov ebp, eax cmp r13d, 3 jnz short loc_586A3 movsxd rax, ebp inc ebp mov byte ptr [rsp+rax+0F8h+var_B8], 20h ; ' ' loc_586A3: mov r8d, [rsp+0F8h+var_DC] mov r9, [rsp+0F8h+var_D0] mov r15d, [rsp+0F8h+var_E0] mov edx, [rsp+0F8h+var_E4] mov rsi, [rsp+0F8h+var_D8] def_584F1: test bl, 2; jumptable 00000000000584F1 default case jz def_586DC; jumptable 00000000000586DC default case cmp r12d, 3; switch 4 cases ja def_586DC; jumptable 00000000000586DC default case lea rax, jpt_586DC movsxd rcx, ds:(jpt_586DC - 9E69Ch)[rax+rsi*4] add rcx, rax jmp rcx; switch jump loc_586DE: movsxd rax, ebp; jumptable 00000000000586DC case 0 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea rdx, a02d02d02dGmt; "%02d:%02d:%02d GMT" jmp short loc_58717 loc_586FA: movsxd rax, ebp; jumptable 00000000000586DC case 2 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax mov [rsp+0F8h+var_F8], edx lea rdx, a02d02d02d03dz; "%02d:%02d:%02d.%03dZ" loc_58717: mov ecx, r9d jmp short loc_58773 loc_5871C: movsxd rax, ebp; jumptable 00000000000586DC case 3 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea eax, [r9+0Bh] cdqe imul rax, 2AAAAAABh mov rcx, rax shr rcx, 3Fh shr rax, 21h add eax, ecx shl eax, 2 lea eax, [rax+rax*2] neg eax lea ecx, [r9+rax] add ecx, 0Ch cmp r9d, 0Ch mov eax, 41h ; 'A' mov edx, 50h ; 'P' cmovl edx, eax mov [rsp+0F8h+var_F8], edx lea rdx, a02d02d02dCm; "%02d:%02d:%02d %cM" loc_58773: mov r9d, r14d xor eax, eax call _snprintf add eax, ebp mov ebp, eax jmp def_586DC; jumptable 00000000000586DC default case loc_58786: movsxd rax, ebp; jumptable 00000000000586DC case 1 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea rdx, a02d02d02dGmt; "%02d:%02d:%02d GMT" mov ecx, r9d mov r9d, r14d xor eax, eax call _snprintf add eax, ebp movsxd rbx, eax test r15d, r15d js short loc_587BE mov byte ptr [rsp+rbx+0F8h+var_B8], 2Bh ; '+' jmp short loc_587C6 loc_587BE: mov byte ptr [rsp+rbx+0F8h+var_B8], 2Dh ; '-' neg r15d loc_587C6: lea rax, [rsp+0F8h+var_B8] lea rdi, [rbx+rax] inc rdi mov esi, 3Fh ; '?' sub rsi, rbx mov eax, r15d mov ecx, 88888889h imul rcx, rax shr rcx, 25h imul eax, ecx, 3Ch ; '<' sub r15d, eax lea rdx, a02d02d; "%02d%02d" mov r8d, r15d xor eax, eax call _snprintf lea ebp, [rbx+rax] inc ebp def_586DC: mov rbx, 0FFFFFFFF00000000h; jumptable 00000000000586DC default case test ebp, ebp jz short loc_58830 lea rsi, [rsp+0F8h+var_B8] mov rdi, [rsp+0F8h+var_C0] mov edx, ebp call js_new_string8_len mov r14, rax mov r15, rdx loc_5882B: and rbx, rax jmp short loc_58851 loc_58830: mov rax, [rsp+0F8h+var_C0] mov rax, [rax+18h] mov rax, [rax+68h] mov r14, [rax+178h] inc dword ptr [r14] and rbx, r14 mov r15, 0FFFFFFFFFFFFFFF9h loc_58851: mov eax, r14d or rax, rbx mov rdx, r15 add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long get_date_string( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long a13, unsigned int a14) { char v14; // bl int v15; // r12d int v16; // r13d unsigned long long v17; // r14 int date_fields; // eax long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 long long v25; // r9 long long v26; // r8 unsigned int v27; // r14d int v28; // edx int v29; // r15d int v30; // ebp long long v31; // rcx int v32; // r10d int v33; // eax unsigned long long v34; // rbx long long v35; // rax const char *v36; // rdx int v37; // r13d int v38; // ebp long long v39; // rax char *v40; // rdi long long v41; // rsi const char *v42; // rdx long long v43; // rcx int v44; // edx int v45; // eax long long v47; // [rsp+0h] [rbp-F8h] int v48; // [rsp+14h] [rbp-E4h] int v49; // [rsp+18h] [rbp-E0h] unsigned int v50; // [rsp+1Ch] [rbp-DCh] int v51; // [rsp+28h] [rbp-D0h] _BYTE v53[64]; // [rsp+40h] [rbp-B8h] BYREF double v54[2]; // [rsp+80h] [rbp-78h] BYREF double v55; // [rsp+90h] [rbp-68h] double v56; // [rsp+98h] [rbp-60h] double v57; // [rsp+A0h] [rbp-58h] double v58; // [rsp+A8h] [rbp-50h] double v59; // [rsp+B0h] [rbp-48h] double v60; // [rsp+B8h] [rbp-40h] double v61; // [rsp+C0h] [rbp-38h] v14 = a14; v15 = (unsigned __int8)a14 >> 4; v16 = a14 & 0xF; LODWORD(v17) = 0; date_fields = get_date_fields(a1, a2, a3, v54, (a14 >> 4) & 1, 0LL); if ( date_fields >= 0 ) { if ( date_fields ) { v25 = (unsigned int)(int)v56; v26 = (unsigned int)(int)v57; v27 = (int)v58; v28 = (int)v59; v29 = (int)v61; v30 = 0; if ( (v14 & 1) != 0 ) { v48 = (int)v59; v49 = (int)v61; v51 = (int)v56; v50 = (int)v57; v31 = (unsigned int)(int)v54[0]; v29 = (int)v54[1]; v32 = (int)v55; v33 = (int)v60; switch ( v15 ) { case 0: v30 = snprintf( v53, 64LL, "%.3s, %02d %.3s %0*d ", &day_names[3 * v33], v32, &month_names[3 * v29], ((unsigned int)v31 >> 31) | 4, v31); goto LABEL_17; case 1: v30 = snprintf( v53, 64LL, "%.3s %.3s %02d %0*d", &day_names[3 * v33], &month_names[3 * v29], v32, ((unsigned int)v31 >> 31) | 4, v31); if ( v16 == 3 ) { v39 = v30++; v53[v39] = 32; } goto LABEL_17; case 2: v36 = "%+07d"; if ( (unsigned int)v31 < 0x2710 ) v36 = "%04d"; v37 = (int)v55; v38 = snprintf(v53, 64LL, v36, v31, v26, v25); v30 = snprintf(&v53[v38], 64LL - v38, "-%02d-%02dT", v29 + 1, v37) + v38; goto LABEL_17; case 3: v30 = snprintf(v53, 64LL, "%02d/%02d/%0*d", v29 + 1, v32, ((unsigned int)v31 >> 31) | 4, v31); if ( v16 == 3 ) { *(_WORD *)&v53[v30] = 8236; v30 += 2; } LABEL_17: v26 = v50; LODWORD(v25) = v51; v29 = v49; v28 = v48; break; default: break; } } if ( (v14 & 2) != 0 ) { switch ( v15 ) { case 0: v40 = &v53[v30]; v41 = 64LL - v30; v42 = "%02d:%02d:%02d GMT"; goto LABEL_22; case 1: v45 = v30 + snprintf(&v53[v30], 64LL - v30, "%02d:%02d:%02d GMT", v25, v26, v27); if ( v29 < 0 ) { v53[v45] = 45; v29 = -v29; } else { v53[v45] = 43; } v30 = v45 + snprintf(&v53[v45 + 1], 63LL - v45, "%02d%02d", v29 / 0x3Cu, v29 % 0x3Cu) + 1; break; case 2: v40 = &v53[v30]; v41 = 64LL - v30; LODWORD(v47) = v28; v42 = "%02d:%02d:%02d.%03dZ"; LABEL_22: v43 = (unsigned int)v25; goto LABEL_26; case 3: v40 = &v53[v30]; v41 = 64LL - v30; v43 = (unsigned int)(v25 - 12 * (((int)v25 + 11) / 12) + 12); v44 = 80; if ( (int)v25 < 12 ) v44 = 65; LODWORD(v47) = v44; v42 = "%02d:%02d:%02d %cM"; LABEL_26: v30 += snprintf(v40, v41, v42, v43, v26, v27, v47); break; default: break; } } if ( !v30 ) { v17 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*(_DWORD *)v17; v34 = v17 & 0xFFFFFFFF00000000LL; return v34 | (unsigned int)v17; } v35 = js_new_string8_len(a1, (long long)v53, v30); LODWORD(v17) = v35; goto LABEL_33; } if ( v15 != 2 ) { v35 = js_new_string8_len(a1, (long long)"Invalid Date", 12); LODWORD(v17) = v35; LABEL_33: v34 = v35 & 0xFFFFFFFF00000000LL; return v34 | (unsigned int)v17; } LODWORD(v17) = 0; JS_ThrowRangeError(a1, (long long)"Date value is NaN", v19, v20, v21, v22, a4, a5, a6, a7, v23, v24, a10, a11, v47); } v34 = 0LL; return v34 | (unsigned int)v17; }
get_date_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV EBX,R9D MOV RBP,RDI MOV R8D,R9D SHR R8D,0x4 MOV R12D,R8D AND R12D,0xf MOV R13D,R9D AND R13D,0xf AND R8D,0x1 LEA RCX,[RSP + 0x80] XOR R14D,R14D XOR R9D,R9D CALL 0x00159001 MOV R15D,0x6 TEST EAX,EAX JS 0x00158562 JZ 0x00158548 MOV qword ptr [RSP + 0x38],RBP CVTTSD2SI R9D,qword ptr [RSP + 0x98] CVTTSD2SI R8D,qword ptr [RSP + 0xa0] CVTTSD2SI R14D,qword ptr [RSP + 0xa8] CVTTSD2SI EDX,qword ptr [RSP + 0xb0] CVTTSD2SI R15D,qword ptr [RSP + 0xc0] XOR EBP,EBP MOV ESI,R12D TEST BL,0x1 JZ 0x001586bb CMP R12D,0x3 JA 0x001586bb MOV dword ptr [RSP + 0x14],EDX MOV dword ptr [RSP + 0x18],R15D MOV qword ptr [RSP + 0x28],R9 MOV dword ptr [RSP + 0x1c],R8D CVTTSD2SI ECX,qword ptr [RSP + 0x80] CVTTSD2SI R15D,qword ptr [RSP + 0x88] CVTTSD2SI R10D,qword ptr [RSP + 0x90] CVTTSD2SI EAX,qword ptr [RSP + 0xb8] LEA RDX,[0x19e68c] MOV qword ptr [RSP + 0x20],RSI MOVSXD RSI,dword ptr [RDX + RSI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_0: LEA EAX,[RAX + RAX*0x2] MOVSXD RDX,EAX LEA RAX,[0x19fe00] ADD RAX,RDX LEA EDX,[R15 + R15*0x2] MOVSXD RDX,EDX LEA R9,[0x19fe20] ADD R9,RDX MOV EDX,ECX SHR EDX,0x1f OR EDX,0x4 MOV dword ptr [RSP + 0x8],ECX MOV dword ptr [RSP],EDX LEA RDX,[0x1a1f2a] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV RCX,RAX MOV R8D,R10D XOR EAX,EAX CALL 0x0010e2d0 MOV EBP,EAX JMP 0x001586a3 LAB_00158548: CMP R12D,0x2 JNZ 0x00158569 LEA RSI,[0x1a1f0b] XOR R14D,R14D MOV RDI,RBP XOR EAX,EAX CALL 0x001205f0 LAB_00158562: XOR EBX,EBX JMP 0x00158851 LAB_00158569: LEA RSI,[0x1a1f1d] MOV RDI,RBP MOV EDX,0xc CALL 0x0011fcd9 MOV R14,RAX MOV R15,RDX MOV RBX,-0x100000000 JMP 0x0015882b caseD_2: CMP ECX,0x2710 LEA RAX,[0x1a1f54] LEA RDX,[0x1a1f59] CMOVC RDX,RAX LEA RDI,[RSP + 0x40] MOV dword ptr [RSP + 0x34],R14D MOV R14D,0x40 MOV ESI,0x40 XOR EAX,EAX MOV R13D,R10D CALL 0x0010e2d0 MOVSXD RBP,EAX LEA RDI,[RSP + RBP*0x1] ADD RDI,0x40 SUB R14,RBP INC R15D LEA RDX,[0x1a1f5f] MOV RSI,R14 MOV R14D,dword ptr [RSP + 0x34] MOV ECX,R15D MOV R8D,R13D XOR EAX,EAX CALL 0x0010e2d0 ADD EBP,EAX JMP 0x001586a3 caseD_3: INC R15D MOV R9D,ECX SHR R9D,0x1f OR R9D,0x4 MOV dword ptr [RSP],ECX LEA RDX,[0x1a1f6b] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV ECX,R15D MOV R8D,R10D XOR EAX,EAX CALL 0x0010e2d0 MOV EBP,EAX CMP R13D,0x3 JNZ 0x001586a3 MOVSXD RAX,EBP MOV word ptr [RSP + RAX*0x1 + 0x40],0x202c ADD EBP,0x2 JMP 0x001586a3 caseD_1: LEA EAX,[RAX + RAX*0x2] MOVSXD RDX,EAX LEA RAX,[0x19fe00] ADD RAX,RDX LEA EDX,[R15 + R15*0x2] MOVSXD RDX,EDX LEA R8,[0x19fe20] ADD R8,RDX MOV EDX,ECX SHR EDX,0x1f OR EDX,0x4 MOV dword ptr [RSP + 0x8],ECX MOV dword ptr [RSP],EDX LEA RDX,[0x1a1f40] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV RCX,RAX MOV R9D,R10D XOR EAX,EAX CALL 0x0010e2d0 MOV EBP,EAX CMP R13D,0x3 JNZ 0x001586a3 MOVSXD RAX,EBP INC EBP MOV byte ptr [RSP + RAX*0x1 + 0x40],0x20 LAB_001586a3: MOV R8D,dword ptr [RSP + 0x1c] MOV R9,qword ptr [RSP + 0x28] MOV R15D,dword ptr [RSP + 0x18] MOV EDX,dword ptr [RSP + 0x14] MOV RSI,qword ptr [RSP + 0x20] LAB_001586bb: TEST BL,0x2 JZ 0x00158806 CMP R12D,0x3 JA 0x00158806 LEA RAX,[0x19e69c] MOVSXD RCX,dword ptr [RAX + RSI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_0: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA RDX,[0x1a1f7a] JMP 0x00158717 caseD_2: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX MOV dword ptr [RSP],EDX LEA RDX,[0x1a1f96] LAB_00158717: MOV ECX,R9D JMP 0x00158773 caseD_3: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA EAX,[R9 + 0xb] CDQE IMUL RAX,RAX,0x2aaaaaab MOV RCX,RAX SHR RCX,0x3f SHR RAX,0x21 ADD EAX,ECX SHL EAX,0x2 LEA EAX,[RAX + RAX*0x2] NEG EAX LEA ECX,[R9 + RAX*0x1] ADD ECX,0xc CMP R9D,0xc MOV EAX,0x41 MOV EDX,0x50 CMOVL EDX,EAX MOV dword ptr [RSP],EDX LEA RDX,[0x1a1fab] LAB_00158773: MOV R9D,R14D XOR EAX,EAX CALL 0x0010e2d0 ADD EAX,EBP MOV EBP,EAX JMP 0x00158806 caseD_1: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA RDX,[0x1a1f7a] MOV ECX,R9D MOV R9D,R14D XOR EAX,EAX CALL 0x0010e2d0 ADD EAX,EBP MOVSXD RBX,EAX TEST R15D,R15D JS 0x001587be MOV byte ptr [RSP + RBX*0x1 + 0x40],0x2b JMP 0x001587c6 LAB_001587be: MOV byte ptr [RSP + RBX*0x1 + 0x40],0x2d NEG R15D LAB_001587c6: LEA RAX,[RSP + 0x40] LEA RDI,[RBX + RAX*0x1] INC RDI MOV ESI,0x3f SUB RSI,RBX MOV EAX,R15D MOV ECX,0x88888889 IMUL RCX,RAX SHR RCX,0x25 IMUL EAX,ECX,0x3c SUB R15D,EAX LEA RDX,[0x1a1f8d] MOV R8D,R15D XOR EAX,EAX CALL 0x0010e2d0 LEA EBP,[RBX + RAX*0x1] INC EBP default: MOV RBX,-0x100000000 TEST EBP,EBP JZ 0x00158830 LEA RSI,[RSP + 0x40] MOV RDI,qword ptr [RSP + 0x38] MOV EDX,EBP CALL 0x0011fcd9 MOV R14,RAX MOV R15,RDX LAB_0015882b: AND RBX,RAX JMP 0x00158851 LAB_00158830: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV R14,qword ptr [RAX + 0x178] INC dword ptr [R14] AND RBX,R14 MOV R15,-0x7 LAB_00158851: MOV EAX,R14D OR RAX,RBX MOV RDX,R15 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] get_date_string(long param_1) { int *piVar1; int iVar2; int iVar3; long lVar4; uint uVar5; char *pcVar6; ulong uVar7; int4 uVar8; uint in_R9D; uint uVar9; uint uVar10; uint uVar11; uint uVar12; int iVar13; int1 auVar14 [16]; int1 auVar15 [16]; char local_b8 [64]; double local_78; double local_70; double local_68; double local_60; double local_58; double local_50; double local_40; double local_38; uVar11 = in_R9D >> 4 & 0xf; uVar8 = 0; iVar2 = get_date_fields(); if (iVar2 < 0) { LAB_00158562: auVar14 = ZEXT816(6) << 0x40; uVar7 = 0; goto LAB_00158851; } if (iVar2 == 0) { if (uVar11 == 2) { JS_ThrowRangeError(param_1,"Date value is NaN"); goto LAB_00158562; } auVar14 = js_new_string8_len(param_1,"Invalid Date",0xc); goto LAB_0015882b; } uVar9 = (uint)local_60; uVar7 = CONCAT44(uVar8,(int)local_58); uVar12 = (uint)local_38; iVar2 = 0; if (((in_R9D & 1) != 0) && (iVar2 = 0, uVar11 < 4)) { uVar5 = (uint)local_78; iVar13 = (int)local_70; uVar10 = (uint)local_68; switch(uVar11) { case 0: iVar2 = snprintf(local_b8,0x40,"%.3s, %02d %.3s %0*d ", "SunMonTueWedThuFriSat" + (int)local_40 * 3,(ulong)uVar10, "JanFebMarAprMayJunJulAugSepOctNovDec" + iVar13 * 3,uVar5 >> 0x1f | 4,uVar5); break; case 1: iVar2 = snprintf(local_b8,0x40,"%.3s %.3s %02d %0*d", "SunMonTueWedThuFriSat" + (int)local_40 * 3, "JanFebMarAprMayJunJulAugSepOctNovDec" + iVar13 * 3,(ulong)uVar10, uVar5 >> 0x1f | 4,uVar5); if ((in_R9D & 0xf) == 3) { lVar4 = (long)iVar2; iVar2 = iVar2 + 1; local_b8[lVar4] = ' '; } break; case 2: pcVar6 = "%+07d"; if (uVar5 < 10000) { pcVar6 = "%04d"; } iVar2 = snprintf(local_b8,0x40,pcVar6); iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,"-%02d-%02dT",(ulong)(iVar13 + 1), (ulong)uVar10); iVar2 = iVar2 + iVar13; break; case 3: iVar2 = snprintf(local_b8,0x40,"%02d/%02d/%0*d",(ulong)(iVar13 + 1),(ulong)uVar10, (ulong)(uVar5 >> 0x1f | 4),uVar5); if ((in_R9D & 0xf) == 3) { (local_b8 + iVar2)[0] = ','; (local_b8 + iVar2)[1] = ' '; iVar2 = iVar2 + 2; } } uVar7 = (ulong)(uint)(int)local_58; } if ((in_R9D & 2) == 0) goto switchD_001586dc_default; switch(uVar11) { case 0: pcVar6 = "%02d:%02d:%02d GMT"; break; case 1: iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,"%02d:%02d:%02d GMT",uVar9,uVar7, (ulong)(uint)(int)local_50); lVar4 = (long)(iVar13 + iVar2); if ((int)uVar12 < 0) { local_b8[lVar4] = '-'; uVar12 = -uVar12; } else { local_b8[lVar4] = '+'; } iVar3 = snprintf(local_b8 + lVar4 + 1,0x3f - lVar4,"%02d%02d",(ulong)uVar12 / 0x3c, (ulong)(uVar12 % 0x3c)); iVar2 = iVar13 + iVar2 + iVar3 + 1; goto switchD_001586dc_default; case 2: pcVar6 = "%02d:%02d:%02d.%03dZ"; break; case 3: iVar13 = (int)(uVar9 + 0xb) >> 0x1f; uVar9 = uVar9 + (((uint)((int)(uVar9 + 0xb) / 6 + iVar13) >> 1) - iVar13) * -0xc + 0xc; pcVar6 = "%02d:%02d:%02d %cM"; break; default: goto switchD_001586dc_default; } iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,pcVar6,(ulong)uVar9,uVar7, (ulong)(uint)(int)local_50); iVar2 = iVar13 + iVar2; switchD_001586dc_default: if (iVar2 == 0) { piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *piVar1 = *piVar1 + 1; uVar7 = (ulong)piVar1 & 0xffffffff00000000; auVar14._8_8_ = 0xfffffffffffffff9; auVar14._0_8_ = piVar1; } else { auVar14 = js_new_string8_len(param_1,local_b8,iVar2); LAB_0015882b: uVar7 = auVar14._0_8_ & 0xffffffff00000000; } LAB_00158851: auVar15._0_8_ = auVar14._0_8_ & 0xffffffff | uVar7; auVar15._8_8_ = auVar14._8_8_; return auVar15; }
25,323
my_thread_global_end
eloqsql/mysys/my_thr_init.c
void my_thread_global_end(void) { struct timespec abstime; my_bool all_threads_killed= 1; set_timespec(abstime, my_thread_end_wait_time); mysql_mutex_lock(&THR_LOCK_threads); while (THR_thread_count > 0) { int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads, &abstime); if (error == ETIMEDOUT || error == ETIME) { #ifdef HAVE_PTHREAD_KILL /* We shouldn't give an error here, because if we don't have pthread_kill(), programs like mysqld can't ensure that all threads are killed when we enter here. */ if (THR_thread_count) fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); #endif all_threads_killed= 0; break; } } mysql_mutex_unlock(&THR_LOCK_threads); my_thread_destroy_common_mutex(); /* Only destroy the mutex & conditions if we don't have other threads around that could use them. */ if (all_threads_killed) { my_thread_destroy_internal_mutex(); } my_thread_global_init_done= 0; }
O0
c
my_thread_global_end: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb $0x1, -0x11(%rbp) callq 0x7e8b0 movq %rax, -0x28(%rbp) imulq $0x3e8, -0x28(%rbp), %rax # imm = 0x3E8 leaq 0x1b6644(%rip), %rcx # 0x237ef8 movl (%rcx), %ecx imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00 addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rax, -0x10(%rbp) movq -0x20(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rdx, -0x8(%rbp) leaq 0x378aa9(%rip), %rdi # 0x3fa398 leaq 0x5166a(%rip), %rsi # 0xd2f60 movl $0xce, %edx callq 0x819a0 leaq 0x378891(%rip), %rax # 0x3fa198 cmpl $0x0, (%rax) jbe 0x81974 leaq 0x378b15(%rip), %rdi # 0x3fa428 leaq 0x378a7e(%rip), %rsi # 0x3fa398 leaq -0x10(%rbp), %rdx leaq 0x5163b(%rip), %rcx # 0xd2f60 movl $0xd2, %r8d callq 0x81a10 movl %eax, -0x2c(%rbp) cmpl $0x6e, -0x2c(%rbp) je 0x8193f cmpl $0x3e, -0x2c(%rbp) jne 0x81972 leaq 0x378852(%rip), %rax # 0x3fa198 cmpl $0x0, (%rax) je 0x8196c movq 0x1b2686(%rip), %rax # 0x233fd8 movq (%rax), %rdi leaq 0x37883c(%rip), %rax # 0x3fa198 movl (%rax), %edx leaq 0x51638(%rip), %rsi # 0xd2f9d movb $0x0, %al callq 0x371e0 movb $0x0, -0x11(%rbp) jmp 0x81974 jmp 0x81900 leaq 0x378a1d(%rip), %rdi # 0x3fa398 callq 0x81a90 callq 0x81370 cmpb $0x0, -0x11(%rbp) je 0x81990 callq 0x81420 movb $0x0, 0x378ac9(%rip) # 0x3fa460 addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_thread_global_end: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_11], 1 call my_hrtime mov [rbp+var_28], rax imul rax, [rbp+var_28], 3E8h lea rcx, my_thread_end_wait_time mov ecx, [rcx] imul rcx, 3B9ACA00h add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_10], rax mov rax, [rbp+var_20] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_8], rdx lea rdi, THR_LOCK_threads lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0CEh call inline_mysql_mutex_lock_0 loc_81900: lea rax, THR_thread_count cmp dword ptr [rax], 0 jbe short loc_81974 lea rdi, THR_COND_threads lea rsi, THR_LOCK_threads lea rdx, [rbp+var_10] lea rcx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov r8d, 0D2h call inline_mysql_cond_timedwait mov [rbp+var_2C], eax cmp [rbp+var_2C], 6Eh ; 'n' jz short loc_8193F cmp [rbp+var_2C], 3Eh ; '>' jnz short loc_81972 loc_8193F: lea rax, THR_thread_count cmp dword ptr [rax], 0 jz short loc_8196C mov rax, cs:stderr_ptr mov rdi, [rax] lea rax, THR_thread_count mov edx, [rax] lea rsi, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"... mov al, 0 call _fprintf loc_8196C: mov [rbp+var_11], 0 jmp short loc_81974 loc_81972: jmp short loc_81900 loc_81974: lea rdi, THR_LOCK_threads call inline_mysql_mutex_unlock_0 call my_thread_destroy_common_mutex cmp [rbp+var_11], 0 jz short loc_81990 call my_thread_destroy_internal_mutex loc_81990: mov cs:my_thread_global_init_done, 0 add rsp, 30h pop rbp retn
long long my_thread_global_end() { long long result; // rax int v1; // [rsp+4h] [rbp-2Ch] unsigned long long v2; // [rsp+10h] [rbp-20h] char v3; // [rsp+1Fh] [rbp-11h] _QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF v3 = 1; v2 = 1000000000LL * my_thread_end_wait_time + 1000 * my_hrtime(); v4[0] = v2 / 0x3B9ACA00; v4[1] = v2 % 0x3B9ACA00; inline_mysql_mutex_lock_0(&THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 206LL); while ( THR_thread_count ) { v1 = inline_mysql_cond_timedwait( &THR_COND_threads, &THR_LOCK_threads, v4, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 210LL); if ( v1 == 110 || v1 == 62 ) { if ( THR_thread_count ) fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); v3 = 0; break; } } inline_mysql_mutex_unlock_0(&THR_LOCK_threads); result = my_thread_destroy_common_mutex(); if ( v3 ) result = my_thread_destroy_internal_mutex(); my_thread_global_init_done = 0; return result; }
my_thread_global_end: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV byte ptr [RBP + -0x11],0x1 CALL 0x0017e8b0 MOV qword ptr [RBP + -0x28],RAX IMUL RAX,qword ptr [RBP + -0x28],0x3e8 LEA RCX,[0x337ef8] MOV ECX,dword ptr [RCX] IMUL RCX,RCX,0x3b9aca00 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x8],RDX LEA RDI,[0x4fa398] LEA RSI,[0x1d2f60] MOV EDX,0xce CALL 0x001819a0 LAB_00181900: LEA RAX,[0x4fa198] CMP dword ptr [RAX],0x0 JBE 0x00181974 LEA RDI,[0x4fa428] LEA RSI,[0x4fa398] LEA RDX,[RBP + -0x10] LEA RCX,[0x1d2f60] MOV R8D,0xd2 CALL 0x00181a10 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x6e JZ 0x0018193f CMP dword ptr [RBP + -0x2c],0x3e JNZ 0x00181972 LAB_0018193f: LEA RAX,[0x4fa198] CMP dword ptr [RAX],0x0 JZ 0x0018196c MOV RAX,qword ptr [0x00333fd8] MOV RDI,qword ptr [RAX] LEA RAX,[0x4fa198] MOV EDX,dword ptr [RAX] LEA RSI,[0x1d2f9d] MOV AL,0x0 CALL 0x001371e0 LAB_0018196c: MOV byte ptr [RBP + -0x11],0x0 JMP 0x00181974 LAB_00181972: JMP 0x00181900 LAB_00181974: LEA RDI,[0x4fa398] CALL 0x00181a90 CALL 0x00181370 CMP byte ptr [RBP + -0x11],0x0 JZ 0x00181990 CALL 0x00181420 LAB_00181990: MOV byte ptr [0x004fa460],0x0 ADD RSP,0x30 POP RBP RET
void my_thread_global_end(void) { bool bVar1; int iVar2; long lVar3; ulong local_18; ulong local_10; bVar1 = true; lVar3 = my_hrtime(); local_10 = lVar3 * 1000 + (ulong)my_thread_end_wait_time * 1000000000; local_18 = local_10 / 1000000000; local_10 = local_10 % 1000000000; inline_mysql_mutex_lock (THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xce); do { if (THR_thread_count == 0) goto LAB_00181974; iVar2 = inline_mysql_cond_timedwait (THR_COND_threads,THR_LOCK_threads,&local_18, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2); } while ((iVar2 != 0x6e) && (iVar2 != 0x3e)); if (THR_thread_count != 0) { fprintf(*(FILE **)PTR_stderr_00333fd8, "Error in my_thread_global_end(): %d threads didn\'t exit\n",(ulong)THR_thread_count); } bVar1 = false; LAB_00181974: inline_mysql_mutex_unlock(THR_LOCK_threads); my_thread_destroy_common_mutex(); if (bVar1) { my_thread_destroy_internal_mutex(); } my_thread_global_init_done = 0; return; }
25,324
mysql_change_user_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_change_user_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_change_user, (parms->mysql, parms->user, parms->passwd, parms->db), parms->mysql, my_bool, r_my_bool) }
O0
c
mysql_change_user_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx callq 0x41c90 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_change_user_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+10h] mov rax, [rbp+var_10] mov rcx, [rax+18h] call mysql_change_user mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_change_user_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL); *(_BYTE *)(v2 + 8) = mysql_change_user(*a1, a1[1], a1[2], a1[3]); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_change_user_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] CALL 0x00141c90 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_change_user_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_change_user(*param_1,param_1[1],param_1[2],param_1[3]); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
25,325
my_is_symlink
eloqsql/mysys/my_symlink.c
int my_is_symlink(const char *filename __attribute__((unused))) { #if defined (HAVE_LSTAT) && defined (S_ISLNK) struct stat stat_buff; if (lstat(filename, &stat_buff)) return 0; MSAN_STAT_WORKAROUND(&stat_buff); return !!S_ISLNK(stat_buff.st_mode); #elif defined (_WIN32) DWORD dwAttr = GetFileAttributes(filename); return (dwAttr != INVALID_FILE_ATTRIBUTES) && (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT); #else /* No symlinks */ return 0; #endif }
O0
c
my_is_symlink: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0x2a560 cmpl $0x0, %eax je 0xfd80d movl $0x0, -0x4(%rbp) jmp 0xfd82c movl -0x88(%rbp), %eax andl $0xf000, %eax # imm = 0xF000 cmpl $0xa000, %eax # imm = 0xA000 sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xa0, %rsp popq %rbp retq nopl (%rax,%rax)
my_is_symlink: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] lea rsi, [rbp+var_A0] call _lstat64 cmp eax, 0 jz short loc_FD80D mov [rbp+var_4], 0 jmp short loc_FD82C loc_FD80D: mov eax, [rbp+var_88] and eax, 0F000h cmp eax, 0A000h setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_4], eax loc_FD82C: mov eax, [rbp+var_4] add rsp, 0A0h pop rbp retn
_BOOL8 my_is_symlink(long long a1) { _BYTE v2[24]; // [rsp+0h] [rbp-A0h] BYREF int v3; // [rsp+18h] [rbp-88h] long long v4; // [rsp+90h] [rbp-10h] v4 = a1; return !(unsigned int)lstat64(a1, v2) && (v3 & 0xF000) == 40960; }
my_is_symlink: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0xa0] CALL 0x0012a560 CMP EAX,0x0 JZ 0x001fd80d MOV dword ptr [RBP + -0x4],0x0 JMP 0x001fd82c LAB_001fd80d: MOV EAX,dword ptr [RBP + -0x88] AND EAX,0xf000 CMP EAX,0xa000 SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX LAB_001fd82c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xa0 POP RBP RET
bool my_is_symlink(char *param_1) { int iVar1; stat64 local_a8; char *local_18; local_18 = param_1; iVar1 = lstat64(param_1,&local_a8); return iVar1 == 0 && (local_a8.st_mode & 0xf000) == 0xa000; }
25,326
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [21], 0>(char const (&) [21])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O0
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [21], 0>(char const (&) [21]): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x8c4d0 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0x8c540 movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x8c500 testb $0x1, %al jne 0x1cc1d6 jmp 0x1cc216 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0x8c5a0 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0x1cc230 testb $0x1, %al jne 0x1cc206 jmp 0x1cc208 jmp 0x1cc225 jmp 0x1cc20a leaq 0x30(%rsp), %rdi callq 0x8c5e0 jmp 0x1cc1b2 movq 0x10(%rsp), %rdi callq 0x8c540 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rdi, [rsp+38h+var_10] mov [rsp+38h+var_28], rdi call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void) mov [rsp+38h+var_8], rax loc_1CC1B2: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_20], rax lea rdi, [rsp+38h+var_8] lea rsi, [rsp+38h+var_20] call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_1CC1D6 jmp short loc_1CC216 loc_1CC1D6: mov rax, [rsp+38h+var_28] add rax, 18h mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_8] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+38h+var_30] mov rsi, rax mov rdx, [rsp+38h+var_18] call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA21_KcEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSD_OSE_ test al, 1 jnz short loc_1CC206 jmp short loc_1CC208 loc_1CC206: jmp short loc_1CC225 loc_1CC208: jmp short $+2 loc_1CC20A: lea rdi, [rsp+38h+var_8] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void) jmp short loc_1CC1B2 loc_1CC216: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_8], rax loc_1CC225: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+18h] [rbp-20h] BYREF long long v5; // [rsp+20h] [rbp-18h] long long v6; // [rsp+28h] [rbp-10h] long long i; // [rsp+30h] [rbp-8h] BYREF v6 = a1; v5 = a2; for ( i = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(a1); ; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator++(&i) ) { v4 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); if ( !__gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)&i, (long long)&v4) ) break; v2 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)&i); if ( (std::equal_to<void>::operator()<std::string const&,char const(&)[21]>(a1 + 24, v2, v5) & 1) != 0 ) return i; } return std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); }
25,327
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [21], 0>(char const (&) [21])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [21], 0>(char const (&) [21]): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x915cd movq %r14, %rdi movq %rbx, %rsi callq 0x2ad45 testb %al, %al jne 0x915ca addq $0x30, %r14 jmp 0x915ac movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_915AC: mov rax, [r15+8] cmp r14, rax jz short loc_915CD mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_915CA add r14, 30h ; '0' jmp short loc_915AC loc_915CA: mov rax, r14 loc_915CD: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_001915ac: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x001915cd MOV RDI,R14 MOV RSI,RBX CALL 0x0012ad45 TEST AL,AL JNZ 0x001915ca ADD R14,0x30 JMP 0x001915ac LAB_001915ca: MOV RAX,R14 LAB_001915cd: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
25,328
ma_zlib_compress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_compress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t source_len) { int rc; if (!ctx) return 1; if ((rc= compress2((Bytef *)dst, (uLongf *)dst_len, (Bytef *)source, (uLong)source_len, ctx->compression_level)) != Z_OK) return 1; return 0; }
O3
c
ma_zlib_compress: testq %rdi, %rdi je 0x2f247 pushq %rbp movq %rsp, %rbp movl 0x10(%rdi), %eax movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx movl %eax, %r8d callq 0x13250 testl %eax, %eax setne %al popq %rbp retq movb $0x1, %al retq
ma_zlib_compress: test rdi, rdi jz short loc_2F247 push rbp mov rbp, rsp mov eax, [rdi+10h] mov rdi, rsi mov rsi, rdx mov rdx, rcx mov rcx, r8 mov r8d, eax call _compress2 test eax, eax setnz al pop rbp retn loc_2F247: mov al, 1 retn
bool ma_zlib_compress(long long a1, long long a2, long long a3, long long a4, long long a5) { return !a1 || (unsigned int)compress2(a2, a3, a4, a5, *(unsigned int *)(a1 + 16)) != 0; }
ma_zlib_compress: TEST RDI,RDI JZ 0x0012f247 PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI + 0x10] MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 MOV R8D,EAX CALL 0x00113250 TEST EAX,EAX SETNZ AL POP RBP RET LAB_0012f247: MOV AL,0x1 RET
bool ma_zlib_compress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; if (param_1 != 0) { iVar1 = compress2(param_2,param_3,param_4,param_5,*(int4 *)(param_1 + 0x10)); return iVar1 != 0; } return true; }
25,329
mi_memmap_file
eloqsql/storage/myisam/mi_packrec.c
my_bool _mi_memmap_file(MI_INFO *info) { MYISAM_SHARE *share=info->s; my_bool eom; DBUG_ENTER("mi_memmap_file"); if (!info->s->file_map) { my_off_t data_file_length= share->state.state.data_file_length; if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); eom= data_file_length > myisam_mmap_size - myisam_mmap_used - MEMMAP_EXTRA_MARGIN; if (!eom) myisam_mmap_used+= data_file_length + MEMMAP_EXTRA_MARGIN; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } else eom= data_file_length > myisam_mmap_size - MEMMAP_EXTRA_MARGIN; if (eom) { DBUG_PRINT("warning", ("File is too large for mmap")); DBUG_RETURN(0); } if (mysql_file_seek(info->dfile, 0L, MY_SEEK_END, MYF(0)) < share->state.state.data_file_length+MEMMAP_EXTRA_MARGIN) { DBUG_PRINT("warning",("File isn't extended for memmap")); if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= data_file_length + MEMMAP_EXTRA_MARGIN; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } DBUG_RETURN(0); } if (mi_dynmap_file(info, share->state.state.data_file_length + MEMMAP_EXTRA_MARGIN)) { if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= data_file_length + MEMMAP_EXTRA_MARGIN; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } DBUG_RETURN(0); } } info->opt_flag|= MEMMAP_USED; info->read_record= share->read_record= _mi_read_mempack_record; share->read_rnd= _mi_read_rnd_mempack_record; DBUG_RETURN(1); }
O3
c
mi_memmap_file: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx movq (%rdi), %r13 cmpq $0x0, 0x270(%r13) je 0x3cc0e orb $0x20, 0x1c8(%rbx) leaq 0x1cd(%rip), %rax # 0x3cdb8 movq %rax, 0x298(%r13) movq %rax, 0x140(%rbx) leaq 0x259(%rip), %rax # 0x3ce59 movq %rax, 0x2b8(%r13) movb $0x1, %al jmp 0x3cd58 movq 0x40(%r13), %r12 leaq 0x2f544f(%rip), %r14 # 0x332068 cmpq $-0x1, (%r14) je 0x3cc83 leaq 0x379ce2(%rip), %r15 # 0x3b6908 cmpq $0x0, 0x40(%r15) jne 0x3cd67 leaq 0x379cd0(%rip), %rdi # 0x3b6908 callq 0x28570 movq (%r14), %r14 leaq 0x370ec9(%rip), %rax # 0x3adb10 movq (%rax), %rcx subq %rcx, %r14 addq $-0x7, %r14 cmpq %r14, %r12 ja 0x3cc60 addq %r12, %rcx addq $0x7, %rcx movq %rcx, (%rax) movq 0x40(%r15), %rdi testq %rdi, %rdi jne 0x3cd71 leaq 0x379c94(%rip), %rdi # 0x3b6908 callq 0x28280 cmpq %r14, %r12 jbe 0x3cc8d jmp 0x3cd56 cmpq $-0x8, %r12 ja 0x3cd56 movl 0x1c0(%rbx), %r14d leaq 0x2f71c5(%rip), %r15 # 0x333e60 movq (%r15), %rax leaq -0x78(%rbp), %rdi movl %r14d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3cd86 movl %r14d, %edi xorl %esi, %esi movl $0x2, %edx xorl %ecx, %ecx callq 0x5ddc0 movq 0x40(%r13), %rsi addq $0x7, %rsi cmpq %rsi, %rax leaq 0x2f538c(%rip), %r14 # 0x332068 jae 0x3ccf9 cmpq $-0x1, (%r14) je 0x3cd56 leaq 0x379c1d(%rip), %rbx # 0x3b6908 cmpq $0x0, 0x40(%rbx) je 0x3cd21 callq 0x298db jmp 0x3cd2d movq %rbx, %rdi callq 0x316a8 testb %al, %al je 0x3cbdd cmpq $-0x1, (%r14) je 0x3cd56 leaq 0x379bf2(%rip), %rbx # 0x3b6908 cmpq $0x0, 0x40(%rbx) jne 0x3cdae leaq 0x379be0(%rip), %rdi # 0x3b6908 callq 0x28570 leaq 0x370ddc(%rip), %rax # 0x3adb10 movq (%rax), %rcx subq %r12, %rcx addq $-0x7, %rcx movq %rcx, (%rax) movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x3cda3 leaq 0x379bb7(%rip), %rdi # 0x3b6908 callq 0x28280 xorl %eax, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29843 jmp 0x3cc3d leaq 0x2f70e8(%rip), %rax # 0x333e60 movq (%rax), %rax callq *0x160(%rax) jmp 0x3cc6d leaq -0x30(%rbp), %rcx movq %rax, %rdi movl %r14d, %esi movq %rcx, %r14 movq %rcx, %rdx callq 0x29860 movq (%r14), %rax jmp 0x3ccca movq (%r15), %rax callq *0x160(%rax) jmp 0x3cd4a callq 0x298bd jmp 0x3cd2d
_mi_memmap_file: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi mov r13, [rdi] cmp qword ptr [r13+270h], 0 jz short loc_3CC0E loc_3CBDD: or byte ptr [rbx+1C8h], 20h lea rax, _mi_read_mempack_record mov [r13+298h], rax mov [rbx+140h], rax lea rax, _mi_read_rnd_mempack_record mov [r13+2B8h], rax mov al, 1 jmp loc_3CD58 loc_3CC0E: mov r12, [r13+40h] lea r14, myisam_mmap_size cmp qword ptr [r14], 0FFFFFFFFFFFFFFFFh jz short loc_3CC83 lea r15, THR_LOCK_myisam_mmap cmp qword ptr [r15+40h], 0 jnz loc_3CD67 lea rdi, THR_LOCK_myisam_mmap call _pthread_mutex_lock loc_3CC3D: mov r14, [r14] lea rax, myisam_mmap_used mov rcx, [rax] sub r14, rcx add r14, 0FFFFFFFFFFFFFFF9h cmp r12, r14 ja short loc_3CC60 add rcx, r12 add rcx, 7 mov [rax], rcx loc_3CC60: mov rdi, [r15+40h] test rdi, rdi jnz loc_3CD71 loc_3CC6D: lea rdi, THR_LOCK_myisam_mmap call _pthread_mutex_unlock cmp r12, r14 jbe short loc_3CC8D jmp loc_3CD56 loc_3CC83: cmp r12, 0FFFFFFFFFFFFFFF8h ja loc_3CD56 loc_3CC8D: mov r14d, [rbx+1C0h] lea r15, PSI_server mov rax, [r15] lea rdi, [rbp+var_78] mov esi, r14d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_3CD86 mov edi, r14d xor esi, esi mov edx, 2 xor ecx, ecx call my_seek loc_3CCCA: mov rsi, [r13+40h] add rsi, 7 cmp rax, rsi lea r14, myisam_mmap_size jnb short loc_3CCF9 cmp qword ptr [r14], 0FFFFFFFFFFFFFFFFh jz short loc_3CD56 lea rbx, THR_LOCK_myisam_mmap cmp qword ptr [rbx+40h], 0 jz short loc_3CD21 call _mi_memmap_file_cold_4 jmp short loc_3CD2D loc_3CCF9: mov rdi, rbx call mi_dynmap_file test al, al jz loc_3CBDD cmp qword ptr [r14], 0FFFFFFFFFFFFFFFFh jz short loc_3CD56 lea rbx, THR_LOCK_myisam_mmap cmp qword ptr [rbx+40h], 0 jnz loc_3CDAE loc_3CD21: lea rdi, THR_LOCK_myisam_mmap call _pthread_mutex_lock loc_3CD2D: lea rax, myisam_mmap_used mov rcx, [rax] sub rcx, r12 add rcx, 0FFFFFFFFFFFFFFF9h mov [rax], rcx mov rdi, [rbx+40h] test rdi, rdi jnz short loc_3CDA3 loc_3CD4A: lea rdi, THR_LOCK_myisam_mmap call _pthread_mutex_unlock loc_3CD56: xor eax, eax loc_3CD58: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3CD67: call _mi_memmap_file_cold_1 jmp loc_3CC3D loc_3CD71: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_3CC6D loc_3CD86: lea rcx, [rbp+var_30] mov rdi, rax mov esi, r14d mov r14, rcx mov rdx, rcx call _mi_memmap_file_cold_2 mov rax, [r14] jmp loc_3CCCA loc_3CDA3: mov rax, [r15] call qword ptr [rax+160h] jmp short loc_3CD4A loc_3CDAE: call _mi_memmap_file_cold_3 jmp loc_3CD2D
char mi_memmap_file(unsigned int *a1) { _QWORD *v1; // r13 unsigned long long v3; // r12 unsigned long long v4; // r14 unsigned int v5; // r14d long long v6; // rax unsigned long long v7; // rax unsigned long long v8; // rsi _BYTE v9[72]; // [rsp+8h] [rbp-78h] BYREF unsigned long long v10[6]; // [rsp+50h] [rbp-30h] BYREF v1 = *(_QWORD **)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 624LL) ) goto LABEL_2; v3 = v1[8]; if ( myisam_mmap_size == -1LL ) { if ( v3 > 0xFFFFFFFFFFFFFFF8LL ) return 0; } else { if ( THR_LOCK_myisam_mmap[8] ) mi_memmap_file_cold_1(); else pthread_mutex_lock(THR_LOCK_myisam_mmap); v4 = myisam_mmap_size - myisam_mmap_used - 7LL; if ( v3 <= v4 ) myisam_mmap_used += v3 + 7; if ( THR_LOCK_myisam_mmap[8] ) PSI_server[44](); pthread_mutex_unlock(THR_LOCK_myisam_mmap); if ( v3 > v4 ) return 0; } v5 = a1[112]; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, v5, 8LL); if ( v6 ) { mi_memmap_file_cold_2(v6, v5, v10); v7 = v10[0]; } else { v7 = my_seek(v5, 0LL, 2LL, 0LL); } v8 = v1[8] + 7LL; if ( v7 >= v8 ) { if ( !(unsigned __int8)mi_dynmap_file(a1, v8) ) { LABEL_2: *((_BYTE *)a1 + 456) |= 0x20u; v1[83] = mi_read_mempack_record; *((_QWORD *)a1 + 40) = mi_read_mempack_record; v1[87] = mi_read_rnd_mempack_record; return 1; } if ( myisam_mmap_size != -1LL ) { if ( THR_LOCK_myisam_mmap[8] ) { mi_memmap_file_cold_3(); goto LABEL_23; } goto LABEL_22; } } else if ( myisam_mmap_size != -1LL ) { if ( THR_LOCK_myisam_mmap[8] ) { mi_memmap_file_cold_4(); LABEL_23: myisam_mmap_used = myisam_mmap_used - v3 - 7; if ( THR_LOCK_myisam_mmap[8] ) PSI_server[44](); pthread_mutex_unlock(THR_LOCK_myisam_mmap); return 0; } LABEL_22: pthread_mutex_lock(THR_LOCK_myisam_mmap); goto LABEL_23; } return 0; }
_mi_memmap_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV R13,qword ptr [RDI] CMP qword ptr [R13 + 0x270],0x0 JZ 0x0013cc0e LAB_0013cbdd: OR byte ptr [RBX + 0x1c8],0x20 LEA RAX,[0x13cdb8] MOV qword ptr [R13 + 0x298],RAX MOV qword ptr [RBX + 0x140],RAX LEA RAX,[0x13ce59] MOV qword ptr [R13 + 0x2b8],RAX MOV AL,0x1 JMP 0x0013cd58 LAB_0013cc0e: MOV R12,qword ptr [R13 + 0x40] LEA R14,[0x432068] CMP qword ptr [R14],-0x1 JZ 0x0013cc83 LEA R15,[0x4b6908] CMP qword ptr [R15 + 0x40],0x0 JNZ 0x0013cd67 LEA RDI,[0x4b6908] CALL 0x00128570 LAB_0013cc3d: MOV R14,qword ptr [R14] LEA RAX,[0x4adb10] MOV RCX,qword ptr [RAX] SUB R14,RCX ADD R14,-0x7 CMP R12,R14 JA 0x0013cc60 ADD RCX,R12 ADD RCX,0x7 MOV qword ptr [RAX],RCX LAB_0013cc60: MOV RDI,qword ptr [R15 + 0x40] TEST RDI,RDI JNZ 0x0013cd71 LAB_0013cc6d: LEA RDI,[0x4b6908] CALL 0x00128280 CMP R12,R14 JBE 0x0013cc8d JMP 0x0013cd56 LAB_0013cc83: CMP R12,-0x8 JA 0x0013cd56 LAB_0013cc8d: MOV R14D,dword ptr [RBX + 0x1c0] LEA R15,[0x433e60] MOV RAX,qword ptr [R15] LEA RDI,[RBP + -0x78] MOV ESI,R14D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013cd86 MOV EDI,R14D XOR ESI,ESI MOV EDX,0x2 XOR ECX,ECX CALL 0x0015ddc0 LAB_0013ccca: MOV RSI,qword ptr [R13 + 0x40] ADD RSI,0x7 CMP RAX,RSI LEA R14,[0x432068] JNC 0x0013ccf9 CMP qword ptr [R14],-0x1 JZ 0x0013cd56 LEA RBX,[0x4b6908] CMP qword ptr [RBX + 0x40],0x0 JZ 0x0013cd21 CALL 0x001298db JMP 0x0013cd2d LAB_0013ccf9: MOV RDI,RBX CALL 0x001316a8 TEST AL,AL JZ 0x0013cbdd CMP qword ptr [R14],-0x1 JZ 0x0013cd56 LEA RBX,[0x4b6908] CMP qword ptr [RBX + 0x40],0x0 JNZ 0x0013cdae LAB_0013cd21: LEA RDI,[0x4b6908] CALL 0x00128570 LAB_0013cd2d: LEA RAX,[0x4adb10] MOV RCX,qword ptr [RAX] SUB RCX,R12 ADD RCX,-0x7 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x0013cda3 LAB_0013cd4a: LEA RDI,[0x4b6908] CALL 0x00128280 LAB_0013cd56: XOR EAX,EAX LAB_0013cd58: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013cd67: CALL 0x00129843 JMP 0x0013cc3d LAB_0013cd71: LEA RAX,[0x433e60] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013cc6d LAB_0013cd86: LEA RCX,[RBP + -0x30] MOV RDI,RAX MOV ESI,R14D MOV R14,RCX MOV RDX,RCX CALL 0x00129860 MOV RAX,qword ptr [R14] JMP 0x0013ccca LAB_0013cda3: MOV RAX,qword ptr [R15] CALL qword ptr [RAX + 0x160] JMP 0x0013cd4a LAB_0013cdae: CALL 0x001298bd JMP 0x0013cd2d
int8 _mi_memmap_file(long *param_1) { int4 uVar1; long lVar2; ulong uVar3; char cVar4; long lVar5; ulong uVar6; int1 local_80 [72]; ulong local_38; lVar2 = *param_1; if (*(long *)(lVar2 + 0x270) != 0) { LAB_0013cbdd: *(byte *)(param_1 + 0x39) = *(byte *)(param_1 + 0x39) | 0x20; *(code **)(lVar2 + 0x298) = _mi_read_mempack_record; param_1[0x28] = (long)_mi_read_mempack_record; *(code **)(lVar2 + 0x2b8) = _mi_read_rnd_mempack_record; return 0x13ce01; } uVar3 = *(ulong *)(lVar2 + 0x40); if (myisam_mmap_size == -1) { if (0xfffffffffffffff8 < uVar3) { return 0; } } else { if (THR_LOCK_myisam_mmap._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_myisam_mmap); } else { _mi_memmap_file_cold_1(); } uVar6 = (myisam_mmap_size - myisam_mmap_used) - 7; if (uVar3 <= uVar6) { myisam_mmap_used = myisam_mmap_used + uVar3 + 7; } if (THR_LOCK_myisam_mmap._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_myisam_mmap); if (uVar6 < uVar3) { return 0; } } uVar1 = (int4)param_1[0x38]; lVar5 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,8); if (lVar5 == 0) { local_38 = my_seek(uVar1,0,2,0); } else { _mi_memmap_file_cold_2(lVar5,uVar1,&local_38); } if (local_38 < *(long *)(lVar2 + 0x40) + 7U) { if (myisam_mmap_size == -1) { return 0; } if (THR_LOCK_myisam_mmap._64_8_ != 0) { _mi_memmap_file_cold_4(); goto LAB_0013cd2d; } } else { cVar4 = mi_dynmap_file(param_1); if (cVar4 == '\0') goto LAB_0013cbdd; if (myisam_mmap_size == -1) { return 0; } if (THR_LOCK_myisam_mmap._64_8_ != 0) { _mi_memmap_file_cold_3(); goto LAB_0013cd2d; } } pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_myisam_mmap); LAB_0013cd2d: myisam_mmap_used = (myisam_mmap_used - uVar3) + -7; if (THR_LOCK_myisam_mmap._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_myisam_mmap); return 0; }
25,330
LefDefParser::lefwAntennaInOutDiffArea(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwAntennaInOutDiffArea(double inOutDiffArea) { lefw54Num = LEFW_ANTENNAINOUTDIFFAREA; if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_INIT && lefwState < LEFW_END) return LEFW_BAD_ORDER; // not of the ENDs if (lefwSynArray[LEFW_ANTENNAINOUTDIFFAREA]) return LEFW_ALREADY_DEFINED; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "ANTENNAINOUTDIFFAREA %.11g ;\n", inOutDiffArea); else fprintf(lefwFile, "ANTENNAINOUTDIFFAREA %.11g ;\n", inOutDiffArea); lefwLines++; lefwSynArray[LEFW_ANTENNAINOUTDIFFAREA] = 1; return LEFW_OK; }
O3
cpp
LefDefParser::lefwAntennaInOutDiffArea(double): pushq %rbx movl $0x62, 0x6b105(%rip) # 0x8cebc leaq 0x6b332(%rip), %rax # 0x8d0f0 movq (%rax), %rdi testq %rdi, %rdi je 0x21e35 leaq 0x6b577(%rip), %rcx # 0x8d344 movl $0x2, %eax cmpl $0x0, (%rcx) je 0x21e3a leaq 0x6b562(%rip), %rcx # 0x8d340 movl (%rcx), %ecx cmpl $0x1, %ecx setne %dl cmpl $0x4f, %ecx setl %cl testb %cl, %dl jne 0x21e3a leaq 0x6b309(%rip), %rbx # 0x8d100 movl $0x4, %eax cmpl $0x0, 0x188(%rbx) jne 0x21e3a movl $0x5, %eax movsd 0x48cde(%rip), %xmm1 # 0x6aaf0 ucomisd 0x6b096(%rip), %xmm1 # 0x8ceb0 ja 0x21e3a cmpb $0x1, 0x6b5b9(%rip) # 0x8d3dc jne 0x21e3c leaq 0x3aaf3(%rip), %rsi # 0x5c91f movb $0x1, %al callq 0x55afd jmp 0x21e4a movl $0x1, %eax popq %rbx retq leaq 0x3aadc(%rip), %rsi # 0x5c91f movb $0x1, %al callq 0x22e0 leaq 0x6b4eb(%rip), %rax # 0x8d33c incl (%rax) movl $0x1, 0x188(%rbx) xorl %eax, %eax jmp 0x21e3a
_ZN12LefDefParser24lefwAntennaInOutDiffAreaEd: push rbx mov cs:_ZN12LefDefParserL9lefw54NumE, 62h ; 'b'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_21E35 lea rcx, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit mov eax, 2 cmp dword ptr [rcx], 0 jz short loc_21E3A lea rcx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rcx] cmp ecx, 1 setnz dl cmp ecx, 4Fh ; 'O' setl cl test dl, cl jnz short loc_21E3A lea rbx, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov eax, 4 cmp dword ptr [rbx+188h], 0 jnz short loc_21E3A mov eax, 5 movsd xmm1, cs:qword_6AAF0 ucomisd xmm1, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum ja short loc_21E3A cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_21E3C lea rsi, aAntennainoutdi_0; "ANTENNAINOUTDIFFAREA %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_21E4A loc_21E35: mov eax, 1 loc_21E3A: pop rbx retn loc_21E3C: lea rsi, aAntennainoutdi_0; "ANTENNAINOUTDIFFAREA %.11g ;\n" mov al, 1 call _fprintf loc_21E4A: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx+188h], 1 xor eax, eax jmp short loc_21E3A
long long LefDefParser::lefwAntennaInOutDiffArea( LefDefParser *this, double a2, long long a3, long long a4, long long a5, int a6, int a7) { long long result; // rax unsigned int v8; // ecx LefDefParser::lefw54Num = 98; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwDidInit ) { v8 = LefDefParser::lefwState; if ( (int)LefDefParser::lefwState >= 79 || LefDefParser::lefwState == 1 ) { result = 4LL; if ( !LefDefParser::lefwSynArray[98] ) { result = 5LL; if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) { LOBYTE(v8) = (int)LefDefParser::lefwState < 79; LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"ANTENNAINOUTDIFFAREA %.11g ;\n", LefDefParser::lefwState != 1, v8, a6, a7); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, "ANTENNAINOUTDIFFAREA %.11g ;\n", a2); } ++LefDefParser::lefwLines; LefDefParser::lefwSynArray[98] = 1; return 0LL; } } } } return result; }
lefwAntennaInOutDiffArea: PUSH RBX MOV dword ptr [0x0018cebc],0x62 LEA RAX,[0x18d0f0] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00121e35 LEA RCX,[0x18d344] MOV EAX,0x2 CMP dword ptr [RCX],0x0 JZ 0x00121e3a LEA RCX,[0x18d340] MOV ECX,dword ptr [RCX] CMP ECX,0x1 SETNZ DL CMP ECX,0x4f SETL CL TEST DL,CL JNZ 0x00121e3a LEA RBX,[0x18d100] MOV EAX,0x4 CMP dword ptr [RBX + 0x188],0x0 JNZ 0x00121e3a MOV EAX,0x5 MOVSD XMM1,qword ptr [0x0016aaf0] UCOMISD XMM1,qword ptr [0x0018ceb0] JA 0x00121e3a CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00121e3c LEA RSI,[0x15c91f] MOV AL,0x1 CALL 0x00155afd JMP 0x00121e4a LAB_00121e35: MOV EAX,0x1 LAB_00121e3a: POP RBX RET LAB_00121e3c: LEA RSI,[0x15c91f] MOV AL,0x1 CALL 0x001022e0 LAB_00121e4a: LEA RAX,[0x18d33c] INC dword ptr [RAX] MOV dword ptr [RBX + 0x188],0x1 XOR EAX,EAX JMP 0x00121e3a
/* LefDefParser::lefwAntennaInOutDiffArea(double) */ int8 LefDefParser::lefwAntennaInOutDiffArea(double param_1) { int8 uVar1; lefw54Num = 0x62; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (lefwDidInit != 0) { if ((lefwState == 1 || 0x4e < lefwState) && (uVar1 = 4, lefwSynArray._392_4_ == 0)) { uVar1 = 5; if (DAT_0016aaf0 <= versionNum) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"ANTENNAINOUTDIFFAREA %.11g ;\n"); } else { fprintf(lefwFile,"ANTENNAINOUTDIFFAREA %.11g ;\n"); } lefwLines = lefwLines + 1; lefwSynArray._392_4_ = 1; uVar1 = 0; } } } } return uVar1; }
25,331
fmt::v11::detail::parse_align(char)
zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/base.h
FMT_CONSTEXPR inline auto parse_align(char c) -> align { switch (c) { case '<': return align::left; case '>': return align::right; case '^': return align::center; } return align::none; }
O0
c
fmt::v11::detail::parse_align(char): movb %dil, %al movb %al, -0x5(%rsp) movsbl -0x5(%rsp), %eax movl %eax, -0xc(%rsp) subl $0x3c, %eax je 0xbedcd jmp 0xbedb7 movl -0xc(%rsp), %eax subl $0x3e, %eax je 0xbedd7 jmp 0xbedc2 movl -0xc(%rsp), %eax subl $0x5e, %eax je 0xbede1 jmp 0xbedeb movl $0x1, -0x4(%rsp) jmp 0xbedf3 movl $0x2, -0x4(%rsp) jmp 0xbedf3 movl $0x3, -0x4(%rsp) jmp 0xbedf3 movl $0x0, -0x4(%rsp) movl -0x4(%rsp), %eax retq nopl (%rax,%rax)
_ZN3fmt3v116detail11parse_alignEc: mov al, dil mov [rsp+var_5], al movsx eax, [rsp+var_5] mov [rsp+var_C], eax sub eax, 3Ch ; '<' jz short loc_BEDCD jmp short $+2 loc_BEDB7: mov eax, [rsp+var_C] sub eax, 3Eh ; '>' jz short loc_BEDD7 jmp short $+2 loc_BEDC2: mov eax, [rsp+var_C] sub eax, 5Eh ; '^' jz short loc_BEDE1 jmp short loc_BEDEB loc_BEDCD: mov [rsp+var_4], 1 jmp short loc_BEDF3 loc_BEDD7: mov [rsp+var_4], 2 jmp short loc_BEDF3 loc_BEDE1: mov [rsp+var_4], 3 jmp short loc_BEDF3 loc_BEDEB: mov [rsp+var_4], 0 loc_BEDF3: mov eax, [rsp+var_4] retn
long long fmt::v11::detail::parse_align(fmt::v11::detail *this) { switch ( (char)this ) { case '<': return 1; case '>': return 2; case '^': return 3; default: return 0; } }
parse_align: MOV AL,DIL MOV byte ptr [RSP + -0x5],AL MOVSX EAX,byte ptr [RSP + -0x5] MOV dword ptr [RSP + -0xc],EAX SUB EAX,0x3c JZ 0x001bedcd JMP 0x001bedb7 LAB_001bedb7: MOV EAX,dword ptr [RSP + -0xc] SUB EAX,0x3e JZ 0x001bedd7 JMP 0x001bedc2 LAB_001bedc2: MOV EAX,dword ptr [RSP + -0xc] SUB EAX,0x5e JZ 0x001bede1 JMP 0x001bedeb LAB_001bedcd: MOV dword ptr [RSP + -0x4],0x1 JMP 0x001bedf3 LAB_001bedd7: MOV dword ptr [RSP + -0x4],0x2 JMP 0x001bedf3 LAB_001bede1: MOV dword ptr [RSP + -0x4],0x3 JMP 0x001bedf3 LAB_001bedeb: MOV dword ptr [RSP + -0x4],0x0 LAB_001bedf3: MOV EAX,dword ptr [RSP + -0x4] RET
/* fmt::v11::detail::parse_align(char) */ int4 fmt::v11::detail::parse_align(char param_1) { int4 local_4; if (param_1 == '<') { local_4 = 1; } else if (param_1 == '>') { local_4 = 2; } else if (param_1 == '^') { local_4 = 3; } else { local_4 = 0; } return local_4; }
25,332
maria_page_crc
eloqsql/storage/maria/ma_pagecrc.c
static uint32 maria_page_crc(uint32 start, uchar *data, uint length) { uint32 crc= my_checksum(start, data, length); /* we need this assert to get following comparison working */ compile_time_assert(MARIA_NO_CRC_BITMAP_PAGE == MARIA_NO_CRC_NORMAL_PAGE - 1 && MARIA_NO_CRC_NORMAL_PAGE == 0xffffffff); if (crc >= MARIA_NO_CRC_BITMAP_PAGE) crc= MARIA_NO_CRC_BITMAP_PAGE - 1; return(crc); }
O0
c
maria_page_crc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %eax movl %eax, %edx callq 0x102200 movl %eax, -0x18(%rbp) jmp 0x5d578 cmpl $-0x2, -0x18(%rbp) jb 0x5d585 movl $0xfffffffd, -0x18(%rbp) # imm = 0xFFFFFFFD movl -0x18(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
maria_page_crc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov edi, [rbp+var_4] mov rsi, [rbp+var_10] mov eax, [rbp+var_14] mov edx, eax call my_checksum mov [rbp+var_18], eax jmp short $+2 loc_5D578: cmp [rbp+var_18], 0FFFFFFFEh jb short loc_5D585 mov [rbp+var_18], 0FFFFFFFDh loc_5D585: mov eax, [rbp+var_18] add rsp, 20h pop rbp retn
long long maria_page_crc(unsigned int a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+8h] [rbp-18h] v4 = my_checksum(a1, a2, a3); if ( v4 >= 0xFFFFFFFE ) return (unsigned int)-3; return v4; }
maria_page_crc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX CALL 0x00202200 MOV dword ptr [RBP + -0x18],EAX JMP 0x0015d578 LAB_0015d578: CMP dword ptr [RBP + -0x18],-0x2 JC 0x0015d585 MOV dword ptr [RBP + -0x18],0xfffffffd LAB_0015d585: MOV EAX,dword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
uint maria_page_crc(int4 param_1,int8 param_2,int4 param_3) { int4 local_20; local_20 = my_checksum(param_1,param_2,param_3); if (0xfffffffd < local_20) { local_20 = 0xfffffffd; } return local_20; }
25,333
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_caseup_str_utf8mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0x53c03 movq 0x78(%rdi), %r15 movq %rbx, %r12 movq %rbx, %r14 leaq -0x30(%rbp), %rdi movq %r12, %rsi callq 0x56f47 testl %eax, %eax je 0x53c03 movl %eax, %r13d movq -0x30(%rbp), %rdi cmpq (%r15), %rdi ja 0x53be4 movq 0x8(%r15), %rax movq %rdi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x53be4 movzbl %dil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %edi movq %rdi, -0x30(%rbp) movq %r14, %rsi callq 0x57063 testl %eax, %eax je 0x53c03 movl %r13d, %ecx movl %eax, %eax addq %rax, %r14 cmpb $0x0, (%r12,%rcx) leaq (%r12,%rcx), %r12 jne 0x53ba5 movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_utf8mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz short loc_53C03 mov r15, [rdi+78h] mov r12, rbx mov r14, rbx loc_53BA5: lea rdi, [rbp+var_30] mov rsi, r12 call my_mb_wc_utf8mb4_no_range test eax, eax jz short loc_53C03 mov r13d, eax mov rdi, [rbp+var_30] cmp rdi, [r15] ja short loc_53BE4 mov rax, [r15+8] mov rcx, rdi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_53BE4 movzx ecx, dil lea rcx, [rcx+rcx*2] mov edi, [rax+rcx*4] mov [rbp+var_30], rdi loc_53BE4: mov rsi, r14 call my_wc_mb_utf8mb4_no_range test eax, eax jz short loc_53C03 mov ecx, r13d mov eax, eax add r14, rax cmp byte ptr [r12+rcx], 0 lea r12, [r12+rcx] jnz short loc_53BA5 loc_53C03: mov byte ptr [r14], 0 sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_caseup_str_utf8mb4(long long a1, _BYTE *a2) { long long v2; // rax _BYTE *v3; // r14 _QWORD *v4; // r15 _BYTE *v5; // r12 unsigned int v6; // eax unsigned int v7; // r13d long long v8; // rdi long long v9; // rax unsigned int v10; // eax bool v11; // zf _QWORD v13[6]; // [rsp+0h] [rbp-30h] BYREF v13[0] = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD **)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_mb_wc_utf8mb4_no_range(v13, v5); if ( !v6 ) break; v7 = v6; v8 = v13[0]; if ( v13[0] <= *v4 ) { v9 = *(_QWORD *)(v4[1] + 8LL * (v13[0] >> 8)); if ( v9 ) { v8 = *(unsigned int *)(v9 + 12LL * LOBYTE(v13[0])); v13[0] = v8; } } v10 = my_wc_mb_utf8mb4_no_range(v8, v3); if ( !v10 ) break; v3 += v10; v11 = v5[v7] == 0; v5 += v7; } while ( !v11 ); } *v3 = 0; return v3 - a2; }
my_caseup_str_utf8mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x00153c03 MOV R15,qword ptr [RDI + 0x78] MOV R12,RBX MOV R14,RBX LAB_00153ba5: LEA RDI,[RBP + -0x30] MOV RSI,R12 CALL 0x00156f47 TEST EAX,EAX JZ 0x00153c03 MOV R13D,EAX MOV RDI,qword ptr [RBP + -0x30] CMP RDI,qword ptr [R15] JA 0x00153be4 MOV RAX,qword ptr [R15 + 0x8] MOV RCX,RDI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x00153be4 MOVZX ECX,DIL LEA RCX,[RCX + RCX*0x2] MOV EDI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x30],RDI LAB_00153be4: MOV RSI,R14 CALL 0x00157063 TEST EAX,EAX JZ 0x00153c03 MOV ECX,R13D MOV EAX,EAX ADD R14,RAX CMP byte ptr [R12 + RCX*0x1],0x0 LEA R12,[R12 + RCX*0x1] JNZ 0x00153ba5 LAB_00153c03: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_str_utf8mb4(long param_1,char *param_2) { char *pcVar1; ulong *puVar2; long lVar3; uint uVar4; uint uVar5; ulong in_RAX; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { puVar2 = *(ulong **)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar4 = my_mb_wc_utf8mb4_no_range(&local_38,pcVar6); if (uVar4 == 0) break; if ((local_38 <= *puVar2) && (lVar3 = *(long *)(puVar2[1] + (local_38 >> 8) * 8), lVar3 != 0)) { local_38 = (ulong)*(uint *)(lVar3 + (local_38 & 0xff) * 0xc); } uVar5 = my_wc_mb_utf8mb4_no_range(local_38,pcVar7); if (uVar5 == 0) break; pcVar7 = pcVar7 + uVar5; pcVar1 = pcVar6 + uVar4; pcVar6 = pcVar6 + uVar4; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
25,334
void ImPlot3D::PlotScatterEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<unsigned short>, ImPlot3D::IndexerIdx<unsigned short>, ImPlot3D::IndexerIdx<unsigned short>>>(char const*, ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<unsigned short>, ImPlot3D::IndexerIdx<unsigned short>, ImPlot3D::IndexerIdx<unsigned short>> const&, int)
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d_items.cpp
void PlotScatterEx(const char* label_id, const Getter& getter, ImPlot3DScatterFlags flags) { if (BeginItemEx(label_id, getter, flags, ImPlot3DCol_MarkerOutline)) { const ImPlot3DNextItemData& n = GetItemData(); ImPlot3DMarker marker = n.Marker == ImPlot3DMarker_None ? ImPlot3DMarker_Circle : n.Marker; const ImU32 col_line = ImGui::GetColorU32(n.Colors[ImPlot3DCol_MarkerOutline]); const ImU32 col_fill = ImGui::GetColorU32(n.Colors[ImPlot3DCol_MarkerFill]); if (marker != ImPlot3DMarker_None) RenderMarkers<Getter>(getter, marker, n.MarkerSize, n.RenderMarkerFill, col_fill, n.RenderMarkerLine, col_line, n.MarkerWeight); EndItem(); } }
O0
cpp
void ImPlot3D::PlotScatterEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<unsigned short>, ImPlot3D::IndexerIdx<unsigned short>, ImPlot3D::IndexerIdx<unsigned short>>>(char const*, ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<unsigned short>, ImPlot3D::IndexerIdx<unsigned short>, ImPlot3D::IndexerIdx<unsigned short>> const&, int): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movl %edx, 0x24(%rsp) movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi movl 0x24(%rsp), %edx movl $0x2, %ecx callq 0x101510 testb $0x1, %al jne 0xe0113 jmp 0xe01bc callq 0xd7150 movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax cmpl $-0x1, 0x44(%rax) jne 0xe0130 xorl %eax, %eax movl %eax, 0x8(%rsp) jmp 0xe013c movq 0x18(%rsp), %rax movl 0x44(%rax), %eax movl %eax, 0x8(%rsp) movl 0x8(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x18(%rsp), %rdi addq $0x20, %rdi callq 0x4f6eb0 movl %eax, 0x10(%rsp) movq 0x18(%rsp), %rdi addq $0x30, %rdi callq 0x4f6eb0 movl %eax, 0xc(%rsp) cmpl $-0x1, 0x14(%rsp) je 0xe01b7 movq 0x28(%rsp), %rdi movl 0x14(%rsp), %esi movq 0x18(%rsp), %rax movss 0x48(%rax), %xmm0 movq 0x18(%rsp), %rax movb 0x57(%rax), %dl movl 0xc(%rsp), %ecx movq 0x18(%rsp), %rax movb 0x56(%rax), %al movl 0x10(%rsp), %r9d movq 0x18(%rsp), %r8 movss 0x4c(%r8), %xmm1 andb $0x1, %dl andb $0x1, %al movzbl %dl, %edx movzbl %al, %r8d callq 0x101ba0 callq 0xdda10 addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN8ImPlot3D13PlotScatterExINS_9GetterXYZINS_10IndexerIdxIdEES3_S3_EEEEvPKcRKT_i: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_14], edx mov rdi, [rsp+38h+var_8]; this mov rsi, [rsp+38h+var_10]; ImVec4 * mov edx, [rsp+38h+var_14] loc_E0100: mov ecx, 2 call _ZN8ImPlot3D11BeginItemExINS_9GetterXYZINS_10IndexerIdxIdEES3_S3_EEEEbPKcRKT_ii; ImPlot3D::BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>(char const*,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>> const&,int,int) test al, 1 jnz short loc_E0113 jmp loc_E01BC loc_E0113: call _ZN8ImPlot3D11GetItemDataEv; ImPlot3D::GetItemData(void) mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_20] cmp dword ptr [rax+44h], 0FFFFFFFFh jnz short loc_E0130 xor eax, eax mov [rsp+38h+var_30], eax jmp short loc_E013C loc_E0130: mov rax, [rsp+38h+var_20] mov eax, [rax+44h] mov [rsp+38h+var_30], eax loc_E013C: mov eax, [rsp+38h+var_30] mov [rsp+38h+var_24], eax mov rdi, [rsp+38h+var_20] add rdi, 20h ; ' '; this call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&) mov [rsp+38h+var_28], eax mov rdi, [rsp+38h+var_20] add rdi, 30h ; '0'; this call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&) mov [rsp+38h+var_2C], eax cmp [rsp+38h+var_24], 0FFFFFFFFh jz short loc_E01B7 mov rdi, [rsp+38h+var_10]; this mov esi, [rsp+38h+var_24] mov rax, [rsp+38h+var_20] movss xmm0, dword ptr [rax+48h] mov rax, [rsp+38h+var_20] mov dl, [rax+57h] mov ecx, [rsp+38h+var_2C] mov rax, [rsp+38h+var_20] mov al, [rax+56h] mov r9d, [rsp+38h+var_28] mov r8, [rsp+38h+var_20] movss xmm1, dword ptr [r8+4Ch] and dl, 1 and al, 1 movzx edx, dl movzx r8d, al call _ZN8ImPlot3D13RenderMarkersINS_9GetterXYZINS_10IndexerIdxIdEES3_S3_EEEEvRKT_ifbjbjf; ImPlot3D::RenderMarkers<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>(ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>> const&,int,float,bool,uint,bool,uint,float) loc_E01B7: call _ZN8ImPlot3D7EndItemEv; ImPlot3D::EndItem(void) loc_E01BC: add rsp, 38h retn
long long ImPlot3D::PlotScatterEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>( ImPlot3D *a1, const ImVec4 *a2, unsigned int a3) { long long result; // rax ImPlot3D *v4; // rdi unsigned int v5; // [rsp+8h] [rbp-30h] unsigned int v6; // [rsp+Ch] [rbp-2Ch] unsigned int ColorU32; // [rsp+10h] [rbp-28h] long long ItemData; // [rsp+18h] [rbp-20h] result = ImPlot3D::BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>( a1, a2, a3, 2LL); if ( (result & 1) != 0 ) { ItemData = ImPlot3D::GetItemData(a1); if ( *(_DWORD *)(ItemData + 68) == -1 ) v5 = 0; else v5 = *(_DWORD *)(ItemData + 68); ColorU32 = ImGui::GetColorU32((ImGui *)(ItemData + 32), a2); v4 = (ImPlot3D *)(ItemData + 48); v6 = ImGui::GetColorU32((ImGui *)(ItemData + 48), a2); if ( v5 != -1 ) { v4 = a2; ImPlot3D::RenderMarkers<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>( a2, v5, *(_BYTE *)(ItemData + 87) & 1, v6, *(_BYTE *)(ItemData + 86) & 1, ColorU32, *(float *)(ItemData + 72), *(float *)(ItemData + 76)); } return ImPlot3D::EndItem(v4); } return result; }
PlotScatterEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV dword ptr [RSP + 0x24],EDX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] MOV EDX,dword ptr [RSP + 0x24] MOV ECX,0x2 CALL 0x00201510 TEST AL,0x1 JNZ 0x001e0113 JMP 0x001e01bc LAB_001e0113: CALL 0x001d7150 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x44],-0x1 JNZ 0x001e0130 XOR EAX,EAX MOV dword ptr [RSP + 0x8],EAX JMP 0x001e013c LAB_001e0130: MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x44] MOV dword ptr [RSP + 0x8],EAX LAB_001e013c: MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x20 CALL 0x005f6eb0 MOV dword ptr [RSP + 0x10],EAX MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x30 CALL 0x005f6eb0 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0x14],-0x1 JZ 0x001e01b7 MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x14] MOV RAX,qword ptr [RSP + 0x18] MOVSS XMM0,dword ptr [RAX + 0x48] MOV RAX,qword ptr [RSP + 0x18] MOV DL,byte ptr [RAX + 0x57] MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x18] MOV AL,byte ptr [RAX + 0x56] MOV R9D,dword ptr [RSP + 0x10] MOV R8,qword ptr [RSP + 0x18] MOVSS XMM1,dword ptr [R8 + 0x4c] AND DL,0x1 AND AL,0x1 MOVZX EDX,DL MOVZX R8D,AL CALL 0x00201ba0 LAB_001e01b7: CALL 0x001dda10 LAB_001e01bc: ADD RSP,0x38 RET
/* void ImPlot3D::PlotScatterEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double> > >(char const*, ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double> > const&, int) */ void ImPlot3D:: PlotScatterEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> (char *param_1,GetterXYZ *param_2,int param_3) { bool bVar1; uint uVar2; uint uVar3; long lVar4; int4 local_30; bVar1 = BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> (param_1,param_2,param_3,2); if (bVar1) { lVar4 = GetItemData(); if (*(int *)(lVar4 + 0x44) == -1) { local_30 = 0; } else { local_30 = *(int *)(lVar4 + 0x44); } uVar2 = ImGui::GetColorU32((ImVec4 *)(lVar4 + 0x20)); uVar3 = ImGui::GetColorU32((ImVec4 *)(lVar4 + 0x30)); if (local_30 != -1) { RenderMarkers<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> (param_2,local_30,*(float *)(lVar4 + 0x48),(bool)(*(byte *)(lVar4 + 0x57) & 1),uVar3 ,(bool)(*(byte *)(lVar4 + 0x56) & 1),uVar2,*(float *)(lVar4 + 0x4c)); } EndItem(); } return; }
25,335
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool)
monkey531[P]llama/common/./json.hpp
json_sax_dom_callback_parser(BasicJsonType& r, const parser_callback_t cb, const bool allow_exceptions_ = true) : root(r), callback(cb), allow_exceptions(allow_exceptions_) { keep_stack.push_back(true); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdi, %rbx movq %rsi, (%rdi) leaq 0x20(%rdi), %r14 leaq 0x80(%rdi), %r12 xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movups %xmm0, 0x18(%rdi) movups %xmm0, 0x28(%rdi) movups %xmm0, 0x38(%rdi) movups %xmm0, 0x48(%rdi) movups %xmm0, 0x58(%rdi) movups %xmm0, 0x68(%rdi) movb $0x0, 0x78(%rdi) movq %r12, %rdi movq %rdx, %rsi callq 0x31140 movb %bpl, 0xa0(%rbx) leaq 0xa8(%rbx), %r13 movb $0x9, 0xa8(%rbx) movq $0x0, 0xb0(%rbx) movq %r13, %rdi movl $0x1, %esi callq 0x3175a movq %r14, %rdi movl $0x1, %esi callq 0x34f80 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq %r13, %rdi xorl %esi, %esi callq 0x3175a movq %r13, %rdi callq 0x36dc4 movq 0x90(%rbx), %rax testq %rax, %rax je 0x32a9a movq %r12, %rdi movq %r12, %rsi movl $0x3, %edx callq *%rax jmp 0x32a9a jmp 0x32ac1 movq %rax, %r15 leaq 0x48(%rbx), %rdi callq 0x35188 movq %r14, %rdi callq 0x35188 leaq 0x8(%rbx), %rdi movq %rbx, %rsi callq 0x1b2c2 movq %r15, %rdi callq 0x19c00 jmp 0x32ac1 movq %rax, %rdi callq 0x22f37 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, ecx mov rbx, rdi mov [rdi], rsi lea r14, [rdi+20h] lea r12, [rdi+80h] xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm0 movups xmmword ptr [rdi+28h], xmm0 movups xmmword ptr [rdi+38h], xmm0 movups xmmword ptr [rdi+48h], xmm0 movups xmmword ptr [rdi+58h], xmm0 movups xmmword ptr [rdi+68h], xmm0 mov byte ptr [rdi+78h], 0 mov rdi, r12 mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) mov [rbx+0A0h], bpl lea r13, [rbx+0A8h] mov byte ptr [rbx+0A8h], 9 mov qword ptr [rbx+0B0h], 0 mov rdi, r13 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 _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, r13 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, r13 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 rax, [rbx+90h] test rax, rax jz short loc_32A9A mov rdi, r12 mov rsi, r12 mov edx, 3 call rax jmp short loc_32A9A jmp short loc_32AC1 mov r15, rax loc_32A9A: lea rdi, [rbx+48h] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, r14 call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) lea rdi, [rbx+8] mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb_cold_1; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool) [clone] mov rdi, r15 call __Unwind_Resume jmp short $+2 loc_32AC1: mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( long long a1, long long a2, long long a3, char a4) { *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_OWORD *)(a1 + 24) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 104) = 0LL; *(_BYTE *)(a1 + 120) = 0; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( (_OWORD *)(a1 + 128), a3); *(_BYTE *)(a1 + 160) = a4; *(_BYTE *)(a1 + 168) = 9; *(_QWORD *)(a1 + 176) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 168)); return std::vector<bool>::push_back(a1 + 32, 1LL); }
json_sax_dom_callback_parser: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ECX MOV RBX,RDI MOV qword ptr [RDI],RSI LEA R14,[RDI + 0x20] LEA R12,[RDI + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOVUPS xmmword ptr [RDI + 0x38],XMM0 MOVUPS xmmword ptr [RDI + 0x48],XMM0 MOVUPS xmmword ptr [RDI + 0x58],XMM0 MOVUPS xmmword ptr [RDI + 0x68],XMM0 MOV byte ptr [RDI + 0x78],0x0 LAB_00132a11: MOV RDI,R12 MOV RSI,RDX CALL 0x00131140 MOV byte ptr [RBX + 0xa0],BPL LEA R13,[RBX + 0xa8] MOV byte ptr [RBX + 0xa8],0x9 MOV qword ptr [RBX + 0xb0],0x0 MOV RDI,R13 MOV ESI,0x1 CALL 0x0013175a LAB_00132a49: MOV RDI,R14 MOV ESI,0x1 CALL 0x00134f80 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_sax_dom_callback_parser (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,int8 param_1,function *param_3, json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> param_4) { *(int8 *)this = param_1; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; /* try { // try from 00132a11 to 00132a1b has its CatchHandler @ 00132a97 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)(this + 0x80),param_3); this[0xa0] = param_4; this[0xa8] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x9; *(int8 *)(this + 0xb0) = 0; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant((bool)((char)this + -0x58)); /* try { // try from 00132a49 to 00132a55 has its CatchHandler @ 00132a65 */ std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),true); return; }
25,336
minja::Value::operator-(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
Value operator-(const Value& rhs) const { if (is_number_integer() && rhs.is_number_integer()) return get<int64_t>() - rhs.get<int64_t>(); else return get<double>() - rhs.get<double>(); }
O3
cpp
minja::Value::operator-(minja::Value const&) const: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r14 movq %rdi, %rbx movb 0x40(%rsi), %al addb $-0x5, %al cmpb $0x1, %al ja 0x5b80b movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x1, %al ja 0x5b80b movq %rsi, %rdi callq 0x40c92 movq %rax, %r15 movq %r14, %rdi callq 0x40c92 subq %rax, %r15 leaq 0x40(%rbx), %r14 xorpd %xmm0, %xmm0 movupd %xmm0, (%rbx) movupd %xmm0, 0x10(%rbx) movupd %xmm0, 0x20(%rbx) movupd %xmm0, 0x30(%rbx) movupd %xmm0, 0x40(%rbx) movq %r14, %rdi movq %r15, %rsi callq 0x41dfc jmp 0x5b857 movq %rsi, %rdi callq 0x40ddc movsd %xmm0, 0x8(%rsp) movq %r14, %rdi callq 0x40ddc movsd 0x8(%rsp), %xmm1 subsd %xmm0, %xmm1 leaq 0x40(%rbx), %r14 xorpd %xmm0, %xmm0 movupd %xmm0, (%rbx) movupd %xmm0, 0x10(%rbx) movupd %xmm0, 0x20(%rbx) movupd %xmm0, 0x30(%rbx) movupd %xmm0, 0x40(%rbx) movq %r14, %rdi movapd %xmm1, %xmm0 callq 0x42766 movq %r14, %rdi movl $0x1, %esi callq 0x40bf2 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZNK5minja5ValuemiERKS0_: push r15 push r14 push rbx sub rsp, 10h mov r14, rdx mov rbx, rdi mov al, [rsi+40h] add al, 0FBh cmp al, 1 ja short loc_5B80B mov al, [r14+40h] add al, 0FBh cmp al, 1 ja short loc_5B80B mov rdi, rsi call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) sub r15, rax lea r14, [rbx+40h] xorpd xmm0, xmm0 movupd xmmword ptr [rbx], xmm0 movupd xmmword ptr [rbx+10h], xmm0 movupd xmmword ptr [rbx+20h], xmm0 movupd xmmword ptr [rbx+30h], xmm0 movupd xmmword ptr [rbx+40h], xmm0 mov rdi, r14 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t) jmp short loc_5B857 loc_5B80B: mov rdi, rsi call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+28h+var_20], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd xmm1, [rsp+28h+var_20] subsd xmm1, xmm0 lea r14, [rbx+40h] xorpd xmm0, xmm0 movupd xmmword ptr [rbx], xmm0 movupd xmmword ptr [rbx+10h], xmm0 movupd xmmword ptr [rbx+20h], xmm0 movupd xmmword ptr [rbx+30h], xmm0 movupd xmmword ptr [rbx+40h], xmm0 mov rdi, r14 movapd xmm0, xmm1 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t) loc_5B857: mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn
long long minja::Value::operator-(long long a1, long long a2, long long a3) { long long v4; // r15 long long v5; // rax char *v6; // r14 double v7; // xmm1_8 double v9; // [rsp+8h] [rbp-20h] if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u || (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u ) { v9 = minja::Value::get<double>(a2); v7 = v9 - minja::Value::get<double>(a3); v6 = (char *)(a1 + 64); *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (unsigned __int8 *)(a1 + 64), v7); } else { v4 = minja::Value::get<long>(a2); v5 = minja::Value::get<long>(a3); v6 = (char *)(a1 + 64); *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( a1 + 64, v4 - v5); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6); return a1; }
operator-: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDX MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x0015b80b MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x0015b80b MOV RDI,RSI CALL 0x00140c92 MOV R15,RAX MOV RDI,R14 CALL 0x00140c92 SUB R15,RAX LEA R14,[RBX + 0x40] XORPD XMM0,XMM0 MOVUPD xmmword ptr [RBX],XMM0 MOVUPD xmmword ptr [RBX + 0x10],XMM0 MOVUPD xmmword ptr [RBX + 0x20],XMM0 MOVUPD xmmword ptr [RBX + 0x30],XMM0 MOVUPD xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOV RSI,R15 CALL 0x00141dfc JMP 0x0015b857 LAB_0015b80b: MOV RDI,RSI CALL 0x00140ddc MOVSD qword ptr [RSP + 0x8],XMM0 MOV RDI,R14 CALL 0x00140ddc MOVSD XMM1,qword ptr [RSP + 0x8] SUBSD XMM1,XMM0 LEA R14,[RBX + 0x40] XORPD XMM0,XMM0 MOVUPD xmmword ptr [RBX],XMM0 MOVUPD xmmword ptr [RBX + 0x10],XMM0 MOVUPD xmmword ptr [RBX + 0x20],XMM0 MOVUPD xmmword ptr [RBX + 0x30],XMM0 MOVUPD xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOVAPD XMM0,XMM1 CALL 0x00142766 LAB_0015b857: MOV RDI,R14 MOV ESI,0x1 CALL 0x00140bf2 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ Value * __thiscall minja::Value::operator-(Value *this,Value *param_1) { long lVar1; long lVar2; Value *in_RDX; double dVar3; double dVar4; if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) { lVar1 = get<long>(param_1); lVar2 = get<long>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (this + 0x40,lVar1 - lVar2); } else { dVar3 = get<double>(param_1); dVar4 = get<double>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (dVar3 - dVar4,this + 0x40); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant((bool)((char)this + '@')); return this; }
25,337
nglog::base_logging::LogStreamBuf::~LogStreamBuf()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStreamBuf : public std::streambuf { public: // REQUIREMENTS: "len" must be >= 2 to account for the '\n' and '\0'. LogStreamBuf(char* buf, int len) { setp(buf, buf + len - 2); } // This effectively ignores overflow. int_type overflow(int_type ch) { return ch; } // Legacy public ostrstream method. size_t pcount() const { return static_cast<size_t>(pptr() - pbase()); } char* pbase() const { return std::streambuf::pbase(); } }
O2
c
nglog::base_logging::LogStreamBuf::~LogStreamBuf(): pushq %rbx movq %rdi, %rbx callq 0x7b20 pushq $0x40 popq %rsi movq %rbx, %rdi popq %rbx jmp 0x75c0 nop
_ZN5nglog12base_logging12LogStreamBufD0Ev: push rbx mov rbx, rdi call __ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev; std::streambuf::~streambuf() push 40h ; '@' pop rsi; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void nglog::base_logging::LogStreamBuf::~LogStreamBuf(nglog::base_logging::LogStreamBuf *this) { std::streambuf::~streambuf(); operator delete(this, 0x40uLL); }
~LogStreamBuf: PUSH RBX MOV RBX,RDI CALL 0x00107b20 PUSH 0x40 POP RSI MOV RDI,RBX POP RBX JMP 0x001075c0
/* nglog::base_logging::LogStreamBuf::~LogStreamBuf() */ void __thiscall nglog::base_logging::LogStreamBuf::~LogStreamBuf(LogStreamBuf *this) { std::streambuf::~streambuf((streambuf *)this); operator_delete(this,0x40); return; }
25,338
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 0x4bf4e 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 0x7f170 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_4BF4E 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_4BF4E: 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 0x0014bf4e 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_0014bf4e: 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 0x0017f170 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; }
25,339
get_charset_number
eloqsql/mysys/charset.c
uint get_charset_number(const char *charset_name, uint cs_flags, myf flags) { uint id; const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" : "utf8mb4"; my_pthread_once(&charsets_initialized, init_available_charsets); if ((id= get_charset_number_internal(charset_name, cs_flags))) return id; if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ? new_charset_name : NULL)) return get_charset_number_internal(charset_name, cs_flags); return 0; }
O3
c
get_charset_number: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movl %esi, %ebx movq %rdi, %r15 leaq 0x390fad(%rip), %rdi # 0x3d9b90 leaq -0x20b(%rip), %rsi # 0x489df callq 0x26300 movq %r15, %rdi movl %ebx, %esi callq 0x48c50 testl %eax, %eax jne 0x48c20 leaq 0x2f523c(%rip), %rdi # 0x33de40 movq 0xc0(%rdi), %rax leaq 0x33b98(%rip), %rdx # 0x7c7aa movq %r15, %rsi callq *0x40(%rax) movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx je 0x48c2b addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq btl $0xa, %r14d leaq 0x33b6b(%rip), %rax # 0x7c7a2 leaq 0x33b5c(%rip), %rdi # 0x7c79a cmovaeq %rax, %rdi movl %ebx, %esi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x48c50
get_charset_number: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdx mov ebx, esi mov r15, rdi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, r15 mov esi, ebx call get_charset_number_internal test eax, eax jnz short loc_48C20 lea rdi, my_charset_latin1 mov rax, [rdi+0C0h] lea rdx, aUtf8; "utf8" mov rsi, r15 call qword ptr [rax+40h] mov ecx, eax xor eax, eax test ecx, ecx jz short loc_48C2B loc_48C20: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_48C2B: bt r14d, 0Ah lea rax, aUtf8mb4; "utf8mb4" lea rdi, aUtf8mb3; "utf8mb3" cmovnb rdi, rax mov esi, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp short $+2
long long get_charset_number(long long a1, unsigned int a2, __int16 a3) { long long result; // rax int v5; // ecx const char *v6; // rdi pthread_once(&charsets_initialized, init_available_charsets); result = get_charset_number_internal(a1, a2); if ( !(_DWORD)result ) { v5 = (*(long long ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a1, "utf8"); result = 0LL; if ( !v5 ) { v6 = "utf8mb3"; if ( (a3 & 0x400) == 0 ) v6 = "utf8mb4"; return get_charset_number_internal(v6, a2); } } return result; }
get_charset_number: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV EBX,ESI MOV R15,RDI LEA RDI,[0x4d9b90] LEA RSI,[0x1489df] CALL 0x00126300 MOV RDI,R15 MOV ESI,EBX CALL 0x00148c50 TEST EAX,EAX JNZ 0x00148c20 LEA RDI,[0x43de40] MOV RAX,qword ptr [RDI + 0xc0] LEA RDX,[0x17c7aa] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV ECX,EAX XOR EAX,EAX TEST ECX,ECX JZ 0x00148c2b LAB_00148c20: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00148c2b: BT R14D,0xa LEA RAX,[0x17c7a2] LEA RDI,[0x17c79a] CMOVNC RDI,RAX MOV ESI,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00148c50
int8 get_charset_number(int8 param_1,int4 param_2,uint param_3) { int iVar1; int8 uVar2; char *pcVar3; pthread_once(&charsets_initialized,init_available_charsets); uVar2 = get_charset_number_internal(param_1,param_2); if ((int)uVar2 == 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40)) (&my_charset_latin1,param_1,&DAT_0017c7aa); uVar2 = 0; if (iVar1 == 0) { pcVar3 = "utf8mb3"; if ((param_3 >> 10 & 1) == 0) { pcVar3 = "utf8mb4"; } uVar2 = get_charset_number_internal(pcVar3,param_2); return uVar2; } } return uVar2; }
25,340
ggml_threadpool_pause
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_threadpool_pause(struct ggml_threadpool * threadpool) { #ifndef GGML_USE_OPENMP ggml_mutex_lock(&threadpool->mutex); if (!threadpool->pause) { ggml_threadpool_pause_locked(threadpool); } ggml_mutex_unlock(&threadpool->mutex); #else UNUSED(threadpool); #endif }
O2
c
ggml_threadpool_pause: pushq %rbx movq %rdi, %rbx callq 0x8980 movb 0xc9(%rbx), %al testb $0x1, %al jne 0xa371 movb $0x1, %al xchgb %al, 0xc9(%rbx) leaq 0x28(%rbx), %rdi callq 0x8220 movq %rbx, %rdi popq %rbx jmp 0x84f0
ggml_threadpool_pause: push rbx mov rbx, rdi call _pthread_mutex_lock mov al, [rbx+0C9h] test al, 1 jnz short loc_A371 mov al, 1 xchg al, [rbx+0C9h] lea rdi, [rbx+28h] call _pthread_cond_broadcast loc_A371: mov rdi, rbx pop rbx jmp _pthread_mutex_unlock
long long ggml_threadpool_pause(long long a1) { pthread_mutex_lock(); if ( (*(_BYTE *)(a1 + 201) & 1) == 0 ) { *(_BYTE *)(a1 + 201) = 1; pthread_cond_broadcast(a1 + 40); } return pthread_mutex_unlock(a1); }
ggml_threadpool_pause: PUSH RBX MOV RBX,RDI CALL 0x00108980 MOV AL,byte ptr [RBX + 0xc9] TEST AL,0x1 JNZ 0x0010a371 MOV AL,0x1 XCHG byte ptr [RBX + 0xc9],AL LEA RDI,[RBX + 0x28] CALL 0x00108220 LAB_0010a371: MOV RDI,RBX POP RBX JMP 0x001084f0
void ggml_threadpool_pause(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); if ((*(byte *)((long)param_1 + 0xc9) & 1) == 0) { LOCK(); *(int1 *)((long)param_1 + 0xc9) = 1; UNLOCK(); pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); return; }
25,341
quantize_q4_0
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
size_t quantize_q4_0(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) { if (!quant_weights) { quantize_row_q4_0_ref(src, dst, (int64_t)nrow*n_per_row); return nrow * ggml_row_size(GGML_TYPE_Q4_0, n_per_row); } size_t row_size = ggml_row_size(GGML_TYPE_Q4_0, n_per_row); char * qrow = (char *)dst; for (int64_t row = 0; row < nrow; ++row) { quantize_row_q4_0_impl(src, (block_q4_0*)qrow, n_per_row, quant_weights); src += n_per_row; qrow += row_size; } return nrow * row_size; }
O0
c
quantize_q4_0: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x76a30 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx imulq -0x28(%rbp), %rdx callq 0x46b10 movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rsi movl $0x2, %edi callq 0x47a50 movq %rax, %rcx movq -0x50(%rbp), %rax imulq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x76aa8 movq -0x28(%rbp), %rsi movl $0x2, %edi callq 0x47a50 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq $0x0, -0x48(%rbp) movq -0x48(%rbp), %rax cmpq -0x20(%rbp), %rax jge 0x76a9b movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0x76ac0 movq -0x28(%rbp), %rax shlq $0x2, %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rax addq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) jmp 0x76a52 movq -0x20(%rbp), %rax imulq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
quantize_q4_0: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 cmp [rbp+var_30], 0 jnz short loc_76A30 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] imul rdx, [rbp+var_28] call _quantize_row_q4_0_ref mov rax, [rbp+var_20] mov [rbp+var_50], rax mov rsi, [rbp+var_28] mov edi, 2 call _ggml_row_size mov rcx, rax mov rax, [rbp+var_50] imul rax, rcx mov [rbp+var_8], rax jmp short loc_76AA8 loc_76A30: mov rsi, [rbp+var_28] mov edi, 2 call _ggml_row_size mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_40], rax mov [rbp+var_48], 0 loc_76A52: mov rax, [rbp+var_48] cmp rax, [rbp+var_20] jge short loc_76A9B mov rdi, [rbp+var_10] mov rsi, [rbp+var_40] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call quantize_row_q4_0_impl mov rax, [rbp+var_28] shl rax, 2 add rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_38] add rax, [rbp+var_40] mov [rbp+var_40], rax mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax jmp short loc_76A52 loc_76A9B: mov rax, [rbp+var_20] imul rax, [rbp+var_38] mov [rbp+var_8], rax loc_76AA8: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
unsigned long long quantize_q4_0(long long a1, long long a2, long long a3, long long a4, long long a5, double a6) { long long i; // [rsp+8h] [rbp-48h] long long v8; // [rsp+10h] [rbp-40h] unsigned long long v9; // [rsp+18h] [rbp-38h] long long v13; // [rsp+40h] [rbp-10h] v13 = a1; if ( a5 ) { v9 = ggml_row_size(2u, a4, a6); v8 = a2; for ( i = 0LL; i < a3; ++i ) { quantize_row_q4_0_impl(v13, v8, a4, a5); v13 += 4 * a4; v8 += v9; } return v9 * a3; } else { quantize_row_q4_0_ref(a1, a2, a4 * a3); return ggml_row_size(2u, a4, a6) * a3; } }
quantize_q4_0: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 CMP qword ptr [RBP + -0x30],0x0 JNZ 0x00176a30 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] IMUL RDX,qword ptr [RBP + -0x28] CALL 0x00146b10 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX MOV RSI,qword ptr [RBP + -0x28] MOV EDI,0x2 CALL 0x00147a50 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x50] IMUL RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x00176aa8 LAB_00176a30: MOV RSI,qword ptr [RBP + -0x28] MOV EDI,0x2 CALL 0x00147a50 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x48],0x0 LAB_00176a52: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x20] JGE 0x00176a9b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x00176ac0 MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x2 ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x00176a52 LAB_00176a9b: MOV RAX,qword ptr [RBP + -0x20] IMUL RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_00176aa8: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long quantize_q4_0(long param_1,long param_2,long param_3,long param_4,long param_5) { int8 local_50; int8 local_48; int8 local_18; int8 local_10; if (param_5 == 0) { quantize_row_q4_0_ref(param_1,param_2,param_3 * param_4); local_10 = ggml_row_size(2,param_4); } else { local_10 = ggml_row_size(2,param_4); local_48 = param_2; local_18 = param_1; for (local_50 = 0; local_50 < param_3; local_50 = local_50 + 1) { quantize_row_q4_0_impl(local_18,local_48,param_4,param_5); local_18 = param_4 * 4 + local_18; local_48 = local_10 + local_48; } } local_10 = param_3 * local_10; return local_10; }
25,342
quantize_q4_0
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
size_t quantize_q4_0(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) { if (!quant_weights) { quantize_row_q4_0_ref(src, dst, (int64_t)nrow*n_per_row); return nrow * ggml_row_size(GGML_TYPE_Q4_0, n_per_row); } size_t row_size = ggml_row_size(GGML_TYPE_Q4_0, n_per_row); char * qrow = (char *)dst; for (int64_t row = 0; row < nrow; ++row) { quantize_row_q4_0_impl(src, (block_q4_0*)qrow, n_per_row, quant_weights); src += n_per_row; qrow += row_size; } return nrow * row_size; }
O1
c
quantize_q4_0: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %rbp movq %rdi, %r15 movq %r8, 0x20(%rsp) testq %r8, %r8 je 0x32f8e movl $0x2, %edi movq %r14, %rsi callq 0x188c0 testq %rbx, %rbx jle 0x32fad cvtsi2ss %r14, %xmm0 movss %xmm0, 0x10(%rsp) leaq 0x1f(%r14), %rcx testq %r14, %r14 cmovnsq %r14, %rcx sarq $0x5, %rcx movq %rcx, 0x50(%rsp) leaq (,%r14,4), %rcx movq %rcx, 0x28(%rsp) leaq 0x2(%rbp), %rcx movq %rcx, 0x18(%rsp) xorl %ecx, %ecx movq %rbx, 0x40(%rsp) movq %r14, 0x38(%rsp) movq %rax, 0x30(%rsp) movq %rcx, 0x48(%rsp) xorps %xmm1, %xmm1 testq %r14, %r14 jle 0x32dec xorl %eax, %eax movss (%r15,%rax,4), %xmm0 mulss %xmm0, %xmm0 addss %xmm0, %xmm1 incq %rax cmpq %rax, %r14 jne 0x32dd6 movq %r15, 0x8(%rsp) cmpq $0x20, %r14 jl 0x32f5a divss 0x10(%rsp), %xmm1 movq 0x18(%rsp), %r13 movq 0x20(%rsp), %rbx movq 0x8(%rsp), %r12 xorl %r15d, %r15d movss %xmm1, 0x4(%rsp) movq %rbp, 0x58(%rsp) movq %r15, %rbp shlq $0x7, %rbp addq 0x8(%rsp), %rbp xorl %r14d, %r14d movss (%rbx,%r14,4), %xmm2 movss (%r12,%r14,4), %xmm0 mulss %xmm0, %xmm0 addss %xmm1, %xmm0 ucomiss 0x1df7c(%rip), %xmm0 # 0x50dc4 jb 0x32e50 sqrtss %xmm0, %xmm0 jmp 0x32e67 movss %xmm2, 0x14(%rsp) callq 0x18f90 movss 0x14(%rsp), %xmm2 movss 0x4(%rsp), %xmm1 mulss %xmm0, %xmm2 movss %xmm2, 0x80(%rsp,%r14,4) incq %r14 cmpq $0x20, %r14 jne 0x32e2d movl $0x20, %edi movl $0x8, %esi movq %rbp, %rdx leaq 0x60(%rsp), %rcx leaq 0x80(%rsp), %r8 callq 0x323b0 movd %xmm0, %eax andps 0x19178(%rip), %xmm0 # 0x4c020 mulss 0x19198(%rip), %xmm0 # 0x4c048 mulss 0x19194(%rip), %xmm0 # 0x4c04c leal (%rax,%rax), %ecx movl %eax, %edx andl $0x7f800000, %edx # imm = 0x7F800000 addl $0x7800000, %edx # imm = 0x7800000 cmpl $0x71000000, %ecx # imm = 0x71000000 movl $0x40000000, %esi # imm = 0x40000000 cmovbl %esi, %edx movd %edx, %xmm1 addss %xmm0, %xmm1 movd %xmm1, %edx movl %edx, %esi shrl $0xd, %esi andl $0x7c00, %esi # imm = 0x7C00 andl $0xfff, %edx # imm = 0xFFF addl %esi, %edx shrl $0x10, %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0xff000001, %ecx # imm = 0xFF000001 movl $0x7e00, %ecx # imm = 0x7E00 cmovael %ecx, %edx orl %eax, %edx leaq (%r15,%r15,8), %rax movq 0x58(%rsp), %rbp movw %dx, (%rbp,%rax,2) xorl %eax, %eax movb 0x70(%rsp,%rax), %cl shlb $0x4, %cl orb 0x60(%rsp,%rax), %cl movb %cl, (%r13,%rax) incq %rax cmpq $0x10, %rax jne 0x32f1e incq %r15 movl $0x80, %eax addq %rax, %r12 addq %rax, %rbx addq $0x12, %r13 cmpq 0x50(%rsp), %r15 movss 0x4(%rsp), %xmm1 jne 0x32e1e movq 0x8(%rsp), %r15 addq 0x28(%rsp), %r15 movq 0x30(%rsp), %rax addq %rax, %rbp movq 0x48(%rsp), %rcx incq %rcx addq %rax, 0x18(%rsp) movq 0x40(%rsp), %rbx cmpq %rbx, %rcx movq 0x38(%rsp), %r14 jne 0x32dc7 jmp 0x32fad movq %r14, %rdx imulq %rbx, %rdx movq %r15, %rdi movq %rbp, %rsi callq 0x18440 movl $0x2, %edi movq %r14, %rsi callq 0x188c0 imulq %rbx, %rax addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
quantize_q4_0: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h mov r14, rcx mov rbx, rdx mov rbp, rsi mov r15, rdi mov [rsp+138h+var_118], r8 test r8, r8 jz loc_32F8E mov edi, 2 mov rsi, r14 call _ggml_row_size test rbx, rbx jle loc_32FAD cvtsi2ss xmm0, r14 movss [rsp+138h+var_128], xmm0 lea rcx, [r14+1Fh] test r14, r14 cmovns rcx, r14 sar rcx, 5 mov [rsp+138h+var_E8], rcx lea rcx, ds:0[r14*4] mov [rsp+138h+var_110], rcx lea rcx, [rbp+2] mov [rsp+138h+var_120], rcx xor ecx, ecx mov [rsp+138h+var_F8], rbx mov [rsp+138h+var_100], r14 mov [rsp+138h+var_108], rax loc_32DC7: mov [rsp+138h+var_F0], rcx xorps xmm1, xmm1 test r14, r14 jle short loc_32DEC xor eax, eax loc_32DD6: movss xmm0, dword ptr [r15+rax*4] mulss xmm0, xmm0 addss xmm1, xmm0 inc rax cmp r14, rax jnz short loc_32DD6 loc_32DEC: mov [rsp+138h+var_130], r15 cmp r14, 20h ; ' ' jl loc_32F5A divss xmm1, [rsp+138h+var_128] mov r13, [rsp+138h+var_120] mov rbx, [rsp+138h+var_118] mov r12, [rsp+138h+var_130] xor r15d, r15d movss [rsp+138h+var_134], xmm1 mov [rsp+138h+var_E0], rbp loc_32E1E: mov rbp, r15 shl rbp, 7 add rbp, [rsp+138h+var_130] xor r14d, r14d loc_32E2D: movss xmm2, dword ptr [rbx+r14*4] movss xmm0, dword ptr [r12+r14*4] mulss xmm0, xmm0 addss xmm0, xmm1 ucomiss xmm0, cs:dword_50DC4 jb short loc_32E50 sqrtss xmm0, xmm0 jmp short loc_32E67 loc_32E50: movss [rsp+138h+var_124], xmm2 call _sqrtf movss xmm2, [rsp+138h+var_124] movss xmm1, [rsp+138h+var_134] loc_32E67: mulss xmm2, xmm0 movss [rsp+r14*4+138h+var_B8], xmm2 inc r14 cmp r14, 20h ; ' ' jnz short loc_32E2D mov edi, 20h ; ' ' mov esi, 8 mov rdx, rbp lea rcx, [rsp+138h+var_D8] lea r8, [rsp+138h+var_B8] call make_qx_quants movd eax, xmm0 andps xmm0, cs:xmmword_4C020 mulss xmm0, cs:dword_4C048 mulss xmm0, cs:dword_4C04C lea ecx, [rax+rax] mov edx, eax and edx, 7F800000h add edx, 7800000h cmp ecx, 71000000h mov esi, 40000000h cmovb edx, esi movd xmm1, edx addss xmm1, xmm0 movd edx, xmm1 mov esi, edx shr esi, 0Dh and esi, 7C00h and edx, 0FFFh add edx, esi shr eax, 10h and eax, 8000h cmp ecx, 0FF000001h mov ecx, 7E00h cmovnb edx, ecx or edx, eax lea rax, [r15+r15*8] mov rbp, [rsp+138h+var_E0] mov [rbp+rax*2+0], dx xor eax, eax loc_32F1E: mov cl, [rsp+rax+138h+var_C8] shl cl, 4 or cl, [rsp+rax+138h+var_D8] mov [r13+rax+0], cl inc rax cmp rax, 10h jnz short loc_32F1E inc r15 mov eax, 80h add r12, rax add rbx, rax add r13, 12h cmp r15, [rsp+138h+var_E8] movss xmm1, [rsp+138h+var_134] jnz loc_32E1E loc_32F5A: mov r15, [rsp+138h+var_130] add r15, [rsp+138h+var_110] mov rax, [rsp+138h+var_108] add rbp, rax mov rcx, [rsp+138h+var_F0] inc rcx add [rsp+138h+var_120], rax mov rbx, [rsp+138h+var_F8] cmp rcx, rbx mov r14, [rsp+138h+var_100] jnz loc_32DC7 jmp short loc_32FAD loc_32F8E: mov rdx, r14 imul rdx, rbx mov rdi, r15 mov rsi, rbp call _quantize_row_q4_0_ref mov edi, 2 mov rsi, r14 call _ggml_row_size loc_32FAD: imul rax, rbx add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long quantize_q4_0(long long a1, long long a2, long long a3, long long a4, long long a5, double a6) { long long v6; // r14 long long v7; // rbx long long v8; // rbp long long v9; // r15 long long v10; // rdi unsigned long long v11; // rax long long v12; // rcx float v13; // xmm1_4 long long i; // rax float v15; // xmm1_4 long long v16; // r13 long long v17; // rbx long long v18; // r12 long long v19; // r15 long long j; // r14 float v21; // xmm2_4 __m128i v22; // xmm0 unsigned int v23; // eax float v24; // xmm0_4 unsigned int v25; // ecx unsigned int v26; // edx __m128i v27; // xmm1 unsigned int v28; // edx int v29; // edx int v30; // eax long long k; // rax float v33; // [rsp+4h] [rbp-134h] long long v34; // [rsp+8h] [rbp-130h] float v35; // [rsp+10h] [rbp-128h] float v36; // [rsp+14h] [rbp-124h] long long v37; // [rsp+18h] [rbp-120h] long long v39; // [rsp+28h] [rbp-110h] unsigned long long v40; // [rsp+30h] [rbp-108h] long long v41; // [rsp+38h] [rbp-100h] long long v42; // [rsp+40h] [rbp-F8h] long long v43; // [rsp+48h] [rbp-F0h] long long v44; // [rsp+50h] [rbp-E8h] long long v45; // [rsp+58h] [rbp-E0h] _BYTE v46[32]; // [rsp+60h] [rbp-D8h] BYREF float v47[46]; // [rsp+80h] [rbp-B8h] BYREF v6 = a4; v7 = a3; v8 = a2; v9 = a1; if ( a5 ) { v10 = 2LL; v11 = ggml_row_size(2u, a4, a6); if ( v7 > 0 ) { v35 = (float)(int)v6; v44 = v6 / 32; v39 = 4 * v6; v37 = a2 + 2; v12 = 0LL; v42 = v7; v41 = v6; v40 = v11; do { v43 = v12; v13 = 0.0; if ( v6 > 0 ) { for ( i = 0LL; i != v6; ++i ) v13 = v13 + (float)(*(float *)(v9 + 4 * i) * *(float *)(v9 + 4 * i)); } v34 = v9; if ( v6 >= 32 ) { v15 = v13 / v35; v16 = v37; v17 = a5; v18 = v9; v19 = 0LL; v33 = v15; v45 = v8; do { for ( j = 0LL; j != 32; ++j ) { v21 = *(float *)(v17 + 4 * j); v22 = (__m128i)*(unsigned int *)(v18 + 4 * j); *(float *)v22.m128i_i32 = (float)(*(float *)v22.m128i_i32 * *(float *)v22.m128i_i32) + v15; if ( *(float *)v22.m128i_i32 < 0.0 ) { v36 = *(float *)(v17 + 4 * j); sqrtf(v10); v21 = v36; v15 = v33; } else { *(float *)v22.m128i_i32 = fsqrt(*(float *)v22.m128i_i32); } v47[j] = v21 * *(float *)v22.m128i_i32; } v10 = 32LL; make_qx_quants(32, 8, v34 + (v19 << 7), (long long)v46, (long long)v47); v23 = _mm_cvtsi128_si32(v22); v24 = (float)(fabs(*(float *)v22.m128i_i32) * 5.1922969e33) * 7.7037198e-34; v25 = 2 * v23; v26 = (v23 & 0x7F800000) + 125829120; if ( 2 * v23 < 0x71000000 ) v26 = 0x40000000; v27 = _mm_cvtsi32_si128(v26); *(float *)v27.m128i_i32 = *(float *)v27.m128i_i32 + v24; v28 = _mm_cvtsi128_si32(v27); v29 = ((v28 >> 13) & 0x7C00) + (v28 & 0xFFF); v30 = HIWORD(v23) & 0x8000; if ( v25 >= 0xFF000001 ) LOWORD(v29) = 32256; v8 = v45; *(_WORD *)(v45 + 18 * v19) = v30 | v29; for ( k = 0LL; k != 16; ++k ) *(_BYTE *)(v16 + k) = v46[k] | (16 * v46[k + 16]); ++v19; v18 += 128LL; v17 += 128LL; v16 += 18LL; v15 = v33; } while ( v19 != v44 ); } v9 = v39 + v34; v11 = v40; v8 += v40; v12 = v43 + 1; v37 += v40; v7 = v42; v6 = v41; } while ( v43 + 1 != v42 ); } } else { quantize_row_q4_0_ref(a1, a2, a3 * a4); v11 = ggml_row_size(2u, v6, a6); } return v7 * v11; }
quantize_q4_0: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 MOV R14,RCX MOV RBX,RDX MOV RBP,RSI MOV R15,RDI MOV qword ptr [RSP + 0x20],R8 TEST R8,R8 JZ 0x00132f8e MOV EDI,0x2 MOV RSI,R14 CALL 0x001188c0 TEST RBX,RBX JLE 0x00132fad CVTSI2SS XMM0,R14 MOVSS dword ptr [RSP + 0x10],XMM0 LEA RCX,[R14 + 0x1f] TEST R14,R14 CMOVNS RCX,R14 SAR RCX,0x5 MOV qword ptr [RSP + 0x50],RCX LEA RCX,[R14*0x4] MOV qword ptr [RSP + 0x28],RCX LEA RCX,[RBP + 0x2] MOV qword ptr [RSP + 0x18],RCX XOR ECX,ECX MOV qword ptr [RSP + 0x40],RBX MOV qword ptr [RSP + 0x38],R14 MOV qword ptr [RSP + 0x30],RAX LAB_00132dc7: MOV qword ptr [RSP + 0x48],RCX XORPS XMM1,XMM1 TEST R14,R14 JLE 0x00132dec XOR EAX,EAX LAB_00132dd6: MOVSS XMM0,dword ptr [R15 + RAX*0x4] MULSS XMM0,XMM0 ADDSS XMM1,XMM0 INC RAX CMP R14,RAX JNZ 0x00132dd6 LAB_00132dec: MOV qword ptr [RSP + 0x8],R15 CMP R14,0x20 JL 0x00132f5a DIVSS XMM1,dword ptr [RSP + 0x10] MOV R13,qword ptr [RSP + 0x18] MOV RBX,qword ptr [RSP + 0x20] MOV R12,qword ptr [RSP + 0x8] XOR R15D,R15D MOVSS dword ptr [RSP + 0x4],XMM1 MOV qword ptr [RSP + 0x58],RBP LAB_00132e1e: MOV RBP,R15 SHL RBP,0x7 ADD RBP,qword ptr [RSP + 0x8] XOR R14D,R14D LAB_00132e2d: MOVSS XMM2,dword ptr [RBX + R14*0x4] MOVSS XMM0,dword ptr [R12 + R14*0x4] MULSS XMM0,XMM0 ADDSS XMM0,XMM1 UCOMISS XMM0,dword ptr [0x00150dc4] JC 0x00132e50 SQRTSS XMM0,XMM0 JMP 0x00132e67 LAB_00132e50: MOVSS dword ptr [RSP + 0x14],XMM2 CALL 0x00118f90 MOVSS XMM2,dword ptr [RSP + 0x14] MOVSS XMM1,dword ptr [RSP + 0x4] LAB_00132e67: MULSS XMM2,XMM0 MOVSS dword ptr [RSP + R14*0x4 + 0x80],XMM2 INC R14 CMP R14,0x20 JNZ 0x00132e2d MOV EDI,0x20 MOV ESI,0x8 MOV RDX,RBP LEA RCX,[RSP + 0x60] LEA R8,[RSP + 0x80] CALL 0x001323b0 MOVD EAX,XMM0 ANDPS XMM0,xmmword ptr [0x0014c020] MULSS XMM0,dword ptr [0x0014c048] MULSS XMM0,dword ptr [0x0014c04c] LEA ECX,[RAX + RAX*0x1] MOV EDX,EAX AND EDX,0x7f800000 ADD EDX,0x7800000 CMP ECX,0x71000000 MOV ESI,0x40000000 CMOVC EDX,ESI MOVD XMM1,EDX ADDSS XMM1,XMM0 MOVD EDX,XMM1 MOV ESI,EDX SHR ESI,0xd AND ESI,0x7c00 AND EDX,0xfff ADD EDX,ESI SHR EAX,0x10 AND EAX,0x8000 CMP ECX,0xff000001 MOV ECX,0x7e00 CMOVNC EDX,ECX OR EDX,EAX LEA RAX,[R15 + R15*0x8] MOV RBP,qword ptr [RSP + 0x58] MOV word ptr [RBP + RAX*0x2],DX XOR EAX,EAX LAB_00132f1e: MOV CL,byte ptr [RSP + RAX*0x1 + 0x70] SHL CL,0x4 OR CL,byte ptr [RSP + RAX*0x1 + 0x60] MOV byte ptr [R13 + RAX*0x1],CL INC RAX CMP RAX,0x10 JNZ 0x00132f1e INC R15 MOV EAX,0x80 ADD R12,RAX ADD RBX,RAX ADD R13,0x12 CMP R15,qword ptr [RSP + 0x50] MOVSS XMM1,dword ptr [RSP + 0x4] JNZ 0x00132e1e LAB_00132f5a: MOV R15,qword ptr [RSP + 0x8] ADD R15,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] ADD RBP,RAX MOV RCX,qword ptr [RSP + 0x48] INC RCX ADD qword ptr [RSP + 0x18],RAX MOV RBX,qword ptr [RSP + 0x40] CMP RCX,RBX MOV R14,qword ptr [RSP + 0x38] JNZ 0x00132dc7 JMP 0x00132fad LAB_00132f8e: MOV RDX,R14 IMUL RDX,RBX MOV RDI,R15 MOV RSI,RBP CALL 0x00118440 MOV EDI,0x2 MOV RSI,R14 CALL 0x001188c0 LAB_00132fad: IMUL RAX,RBX ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ long quantize_q4_0(long param_1,long param_2,long param_3,long param_4,long param_5) { long lVar1; long lVar2; long lVar3; long lVar4; ushort uVar5; float fVar6; long lVar7; long lVar8; long lVar9; long lVar10; float fVar11; uint uVar12; float fVar13; long local_120; byte local_d8 [16]; char acStack_c8 [16]; float local_b8 [34]; if (param_5 == 0) { quantize_row_q4_0_ref(param_1,param_2,param_4 * param_3); lVar1 = ggml_row_size(2,param_4); } else { lVar1 = ggml_row_size(2,param_4); if (0 < param_3) { lVar3 = param_4 + 0x1f; if (-1 < param_4) { lVar3 = param_4; } local_120 = param_2 + 2; lVar4 = 0; do { fVar13 = 0.0; if (0 < param_4) { lVar2 = 0; do { fVar6 = *(float *)(param_1 + lVar2 * 4); fVar13 = fVar13 + fVar6 * fVar6; lVar2 = lVar2 + 1; } while (param_4 != lVar2); } if (0x1f < param_4) { lVar10 = 0; lVar2 = param_5; lVar7 = param_1; lVar8 = local_120; do { lVar9 = 0; do { fVar6 = *(float *)(lVar2 + lVar9 * 4); fVar11 = *(float *)(lVar7 + lVar9 * 4); fVar11 = fVar11 * fVar11 + fVar13 / (float)param_4; if (fVar11 < DAT_00150dc4) { fVar11 = sqrtf(fVar11); } else { fVar11 = SQRT(fVar11); } local_b8[lVar9] = fVar6 * fVar11; lVar9 = lVar9 + 1; } while (lVar9 != 0x20); uVar12 = make_qx_quants(0x20,8,lVar10 * 0x80 + param_1,local_d8,local_b8); fVar6 = (float)((uVar12 & 0x7f800000) + 0x7800000); if (uVar12 * 2 < 0x71000000) { fVar6 = 2.0; } fVar6 = fVar6 + (float)(uVar12 & _DAT_0014c020) * DAT_0014c048 * DAT_0014c04c; uVar5 = (SUB42(fVar6,0) & 0xfff) + ((ushort)((uint)fVar6 >> 0xd) & 0x7c00); if (0xff000000 < uVar12 * 2) { uVar5 = 0x7e00; } *(ushort *)(param_2 + lVar10 * 0x12) = uVar5 | (ushort)(uVar12 >> 0x10) & 0x8000; lVar9 = 0; do { *(byte *)(lVar8 + lVar9) = acStack_c8[lVar9] << 4 | local_d8[lVar9]; lVar9 = lVar9 + 1; } while (lVar9 != 0x10); lVar10 = lVar10 + 1; lVar7 = lVar7 + 0x80; lVar2 = lVar2 + 0x80; lVar8 = lVar8 + 0x12; } while (lVar10 != lVar3 >> 5); } param_1 = param_1 + param_4 * 4; param_2 = param_2 + lVar1; lVar4 = lVar4 + 1; local_120 = local_120 + lVar1; } while (lVar4 != param_3); } } return lVar1 * param_3; }
25,343
quantize_q4_0
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
size_t quantize_q4_0(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) { if (!quant_weights) { quantize_row_q4_0_ref(src, dst, (int64_t)nrow*n_per_row); return nrow * ggml_row_size(GGML_TYPE_Q4_0, n_per_row); } size_t row_size = ggml_row_size(GGML_TYPE_Q4_0, n_per_row); char * qrow = (char *)dst; for (int64_t row = 0; row < nrow; ++row) { quantize_row_q4_0_impl(src, (block_q4_0*)qrow, n_per_row, quant_weights); src += n_per_row; qrow += row_size; } return nrow * row_size; }
O3
c
quantize_q4_0: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %rbx movq %r8, 0x20(%rsp) testq %r8, %r8 je 0x31f18 movq %rdi, 0x8(%rsp) movl $0x2, %edi movq %r15, %rsi callq 0x178b0 testq %r14, %r14 jle 0x31f34 cvtsi2ss %r15, %xmm0 movss %xmm0, 0x10(%rsp) movq %r15, %rcx shrq $0x5, %rcx movq %rcx, 0x48(%rsp) leaq (,%r15,4), %rcx movq %rcx, 0x28(%rsp) xorl %ecx, %ecx movq %r14, 0x38(%rsp) movq %r15, 0x18(%rsp) movq %rax, 0x30(%rsp) movq %rcx, 0x40(%rsp) testq %r15, %r15 movq 0x8(%rsp), %rdx jle 0x31ee9 xorps %xmm1, %xmm1 xorl %eax, %eax movq 0x18(%rsp), %rcx movss (%rdx,%rax,4), %xmm0 mulss %xmm0, %xmm0 addss %xmm0, %xmm1 incq %rax cmpq %rax, %rcx jne 0x31d7f cmpq $0x20, %rcx jl 0x31ee9 divss 0x10(%rsp), %xmm1 movq 0x20(%rsp), %r13 movq %rdx, %r12 xorl %r14d, %r14d movss %xmm1, 0x4(%rsp) movq %r14, %rbp shlq $0x7, %rbp addq %rdx, %rbp xorl %r15d, %r15d movss (%r13,%r15,4), %xmm2 movss (%r12,%r15,4), %xmm0 mulss %xmm0, %xmm0 addss %xmm1, %xmm0 ucomiss 0x1f4e6(%rip), %xmm0 # 0x512c4 jb 0x31de6 sqrtss %xmm0, %xmm0 jmp 0x31dfd movss %xmm2, 0x14(%rsp) callq 0x17f80 movss 0x14(%rsp), %xmm2 movss 0x4(%rsp), %xmm1 mulss %xmm0, %xmm2 movss %xmm2, 0x70(%rsp,%r15,4) incq %r15 cmpq $0x20, %r15 jne 0x31dc2 movl $0x20, %edi movl $0x8, %esi movq %rbp, %rdx leaq 0x50(%rsp), %rcx leaq 0x70(%rsp), %r8 callq 0x31310 movd %xmm0, %eax andps 0x1a1e8(%rip), %xmm0 # 0x4c020 mulss 0x1a2a8(%rip), %xmm0 # 0x4c0e8 mulss 0x1a2a4(%rip), %xmm0 # 0x4c0ec leal (%rax,%rax), %ecx movl %eax, %edx andl $0x7f800000, %edx # imm = 0x7F800000 addl $0x7800000, %edx # imm = 0x7800000 cmpl $0x71000000, %ecx # imm = 0x71000000 movl $0x40000000, %esi # imm = 0x40000000 cmovbl %esi, %edx movd %edx, %xmm1 addss %xmm0, %xmm1 movd %xmm1, %edx movss 0x4(%rsp), %xmm1 movl %edx, %esi shrl $0xd, %esi andl $0x7c00, %esi # imm = 0x7C00 andl $0xfff, %edx # imm = 0xFFF addl %esi, %edx shrl $0x10, %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0xff000001, %ecx # imm = 0xFF000001 movl $0x7e00, %ecx # imm = 0x7E00 cmovael %ecx, %edx orl %eax, %edx leaq (%r14,%r14,8), %rax movw %dx, (%rbx,%rax,2) movdqa 0x60(%rsp), %xmm0 psllw $0x4, %xmm0 pand 0x1ef91(%rip), %xmm0 # 0x50e50 por 0x50(%rsp), %xmm0 movdqu %xmm0, 0x2(%rbx,%rax,2) incq %r14 movl $0x80, %eax addq %rax, %r12 addq %rax, %r13 cmpq 0x48(%rsp), %r14 movq 0x8(%rsp), %rdx jne 0x31db5 addq 0x28(%rsp), %rdx movq %rdx, 0x8(%rsp) movq 0x30(%rsp), %rax addq %rax, %rbx movq 0x40(%rsp), %rcx incq %rcx movq 0x38(%rsp), %r14 cmpq %r14, %rcx movq 0x18(%rsp), %r15 jne 0x31d62 jmp 0x31f34 movq %r15, %rdx imulq %r14, %rdx movq %rbx, %rsi callq 0x17430 movl $0x2, %edi movq %r15, %rsi callq 0x178b0 imulq %r14, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
quantize_q4_0: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r14, rdx mov rbx, rsi mov [rsp+128h+var_108], r8 test r8, r8 jz loc_31F18 mov [rsp+128h+var_120], rdi mov edi, 2 mov rsi, r15 call _ggml_row_size test r14, r14 jle loc_31F34 cvtsi2ss xmm0, r15 movss [rsp+128h+var_118], xmm0 mov rcx, r15 shr rcx, 5 mov [rsp+128h+var_E0], rcx lea rcx, ds:0[r15*4] mov [rsp+128h+var_100], rcx xor ecx, ecx mov [rsp+128h+var_F0], r14 mov [rsp+128h+var_110], r15 mov [rsp+128h+var_F8], rax loc_31D62: mov [rsp+128h+var_E8], rcx test r15, r15 mov rdx, [rsp+128h+var_120] jle loc_31EE9 xorps xmm1, xmm1 xor eax, eax mov rcx, [rsp+128h+var_110] loc_31D7F: movss xmm0, dword ptr [rdx+rax*4] mulss xmm0, xmm0 addss xmm1, xmm0 inc rax cmp rcx, rax jnz short loc_31D7F cmp rcx, 20h ; ' ' jl loc_31EE9 divss xmm1, [rsp+128h+var_118] mov r13, [rsp+128h+var_108] mov r12, rdx xor r14d, r14d movss [rsp+128h+var_124], xmm1 loc_31DB5: mov rbp, r14 shl rbp, 7 add rbp, rdx xor r15d, r15d loc_31DC2: movss xmm2, dword ptr [r13+r15*4+0] movss xmm0, dword ptr [r12+r15*4] mulss xmm0, xmm0 addss xmm0, xmm1 ucomiss xmm0, cs:dword_512C4 jb short loc_31DE6 sqrtss xmm0, xmm0 jmp short loc_31DFD loc_31DE6: movss [rsp+128h+var_114], xmm2 call _sqrtf movss xmm2, [rsp+128h+var_114] movss xmm1, [rsp+128h+var_124] loc_31DFD: mulss xmm2, xmm0 movss [rsp+r15*4+128h+var_B8], xmm2 inc r15 cmp r15, 20h ; ' ' jnz short loc_31DC2 mov edi, 20h ; ' ' mov esi, 8 mov rdx, rbp lea rcx, [rsp+128h+var_D8] lea r8, [rsp+128h+var_B8] call make_qx_quants movd eax, xmm0 andps xmm0, cs:xmmword_4C020 mulss xmm0, cs:dword_4C0E8 mulss xmm0, cs:dword_4C0EC lea ecx, [rax+rax] mov edx, eax and edx, 7F800000h add edx, 7800000h cmp ecx, 71000000h mov esi, 40000000h cmovb edx, esi movd xmm1, edx addss xmm1, xmm0 movd edx, xmm1 movss xmm1, [rsp+128h+var_124] mov esi, edx shr esi, 0Dh and esi, 7C00h and edx, 0FFFh add edx, esi shr eax, 10h and eax, 8000h cmp ecx, 0FF000001h mov ecx, 7E00h cmovnb edx, ecx or edx, eax lea rax, [r14+r14*8] mov [rbx+rax*2], dx movdqa xmm0, [rsp+128h+var_C8] psllw xmm0, 4 pand xmm0, cs:xmmword_50E50 por xmm0, [rsp+128h+var_D8] movdqu xmmword ptr [rbx+rax*2+2], xmm0 inc r14 mov eax, 80h add r12, rax add r13, rax cmp r14, [rsp+128h+var_E0] mov rdx, [rsp+128h+var_120] jnz loc_31DB5 loc_31EE9: add rdx, [rsp+128h+var_100] mov [rsp+128h+var_120], rdx mov rax, [rsp+128h+var_F8] add rbx, rax mov rcx, [rsp+128h+var_E8] inc rcx mov r14, [rsp+128h+var_F0] cmp rcx, r14 mov r15, [rsp+128h+var_110] jnz loc_31D62 jmp short loc_31F34 loc_31F18: mov rdx, r15 imul rdx, r14 mov rsi, rbx call _quantize_row_q4_0_ref mov edi, 2 mov rsi, r15 call _ggml_row_size loc_31F34: imul rax, r14 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long quantize_q4_0(long long a1, long long a2, long long a3, long long a4, long long a5, double a6) { long long v6; // r15 long long v7; // r14 long long v8; // rbx unsigned long long v9; // rax long long v10; // rcx long long v11; // rdx float v12; // xmm1_4 long long v13; // rax float v14; // xmm1_4 long long v15; // r13 long long v16; // r12 long long v17; // r14 long long v18; // rbp long long i; // r15 float v20; // xmm2_4 __m128 v21; // xmm0 unsigned int v22; // eax float v23; // xmm0_4 unsigned int v24; // ecx unsigned int v25; // edx __m128i v26; // xmm1 unsigned int v27; // edx int v28; // edx int v29; // eax __int16 v30; // dx long long v31; // rax float v33; // [rsp+4h] [rbp-124h] long long v34; // [rsp+8h] [rbp-120h] float v35; // [rsp+10h] [rbp-118h] float v36; // [rsp+14h] [rbp-114h] long long v37; // [rsp+18h] [rbp-110h] long long v39; // [rsp+28h] [rbp-100h] unsigned long long v40; // [rsp+30h] [rbp-F8h] long long v41; // [rsp+38h] [rbp-F0h] long long v42; // [rsp+40h] [rbp-E8h] unsigned long long v43; // [rsp+48h] [rbp-E0h] __m128i v44; // [rsp+50h] [rbp-D8h] BYREF __m128i v45; // [rsp+60h] [rbp-C8h] BYREF float v46[46]; // [rsp+70h] [rbp-B8h] BYREF v6 = a4; v7 = a3; v8 = a2; if ( a5 ) { v34 = a1; v9 = ggml_row_size(2u, a4, a6); if ( v7 > 0 ) { v35 = (float)(int)v6; v43 = (unsigned long long)v6 >> 5; v39 = 4 * v6; v10 = 0LL; v41 = v7; v37 = v6; v40 = v9; do { v42 = v10; v11 = v34; if ( v6 > 0 ) { v12 = 0.0; v13 = 0LL; do { v12 = v12 + (float)(*(float *)(v34 + 4 * v13) * *(float *)(v34 + 4 * v13)); ++v13; } while ( v37 != v13 ); if ( v37 >= 32 ) { v14 = v12 / v35; v15 = a5; v16 = v34; v17 = 0LL; v33 = v14; do { v18 = v11 + (v17 << 7); for ( i = 0LL; i != 32; ++i ) { v20 = *(float *)(v15 + 4 * i); v21 = (__m128)*(unsigned int *)(v16 + 4 * i); v21.m128_f32[0] = (float)(v21.m128_f32[0] * v21.m128_f32[0]) + v14; if ( v21.m128_f32[0] < 0.0 ) { v36 = *(float *)(v15 + 4 * i); *(double *)v21.m128_u64 = sqrtf(*(double *)v21.m128_u64); v20 = v36; v14 = v33; } else { v21.m128_f32[0] = fsqrt(v21.m128_f32[0]); } v46[i] = v20 * v21.m128_f32[0]; } make_qx_quants(32, 8, v18, (long long)&v44, (long long)v46, v21); v22 = _mm_cvtsi128_si32((__m128i)v21); v23 = (float)(fabs(v21.m128_f32[0]) * 5.1922969e33) * 7.7037198e-34; v24 = 2 * v22; v25 = (v22 & 0x7F800000) + 125829120; if ( 2 * v22 < 0x71000000 ) v25 = 0x40000000; v26 = _mm_cvtsi32_si128(v25); *(float *)v26.m128i_i32 = *(float *)v26.m128i_i32 + v23; v27 = _mm_cvtsi128_si32(v26); v14 = v33; v28 = ((v27 >> 13) & 0x7C00) + (v27 & 0xFFF); v29 = HIWORD(v22) & 0x8000; if ( v24 >= 0xFF000001 ) LOWORD(v28) = 32256; v30 = v29 | v28; v31 = 9 * v17; *(_WORD *)(v8 + 2 * v31) = v30; *(__m128i *)(v8 + 2 * v31 + 2) = _mm_or_si128( _mm_and_si128( _mm_slli_epi16(_mm_load_si128(&v45), 4u), (__m128i)xmmword_50E50), v44); ++v17; v16 += 128LL; v15 += 128LL; v11 = v34; } while ( v17 != v43 ); } } v34 = v39 + v11; v9 = v40; v8 += v40; v10 = v42 + 1; v7 = v41; v6 = v37; } while ( v42 + 1 != v41 ); } } else { quantize_row_q4_0_ref(a1, a2, a3 * a4); v9 = ggml_row_size(2u, v6, a6); } return v7 * v9; }
quantize_q4_0: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R14,RDX MOV RBX,RSI MOV qword ptr [RSP + 0x20],R8 TEST R8,R8 JZ 0x00131f18 MOV qword ptr [RSP + 0x8],RDI MOV EDI,0x2 MOV RSI,R15 CALL 0x001178b0 TEST R14,R14 JLE 0x00131f34 CVTSI2SS XMM0,R15 MOVSS dword ptr [RSP + 0x10],XMM0 MOV RCX,R15 SHR RCX,0x5 MOV qword ptr [RSP + 0x48],RCX LEA RCX,[R15*0x4] MOV qword ptr [RSP + 0x28],RCX XOR ECX,ECX MOV qword ptr [RSP + 0x38],R14 MOV qword ptr [RSP + 0x18],R15 MOV qword ptr [RSP + 0x30],RAX LAB_00131d62: MOV qword ptr [RSP + 0x40],RCX TEST R15,R15 MOV RDX,qword ptr [RSP + 0x8] JLE 0x00131ee9 XORPS XMM1,XMM1 XOR EAX,EAX MOV RCX,qword ptr [RSP + 0x18] LAB_00131d7f: MOVSS XMM0,dword ptr [RDX + RAX*0x4] MULSS XMM0,XMM0 ADDSS XMM1,XMM0 INC RAX CMP RCX,RAX JNZ 0x00131d7f CMP RCX,0x20 JL 0x00131ee9 DIVSS XMM1,dword ptr [RSP + 0x10] MOV R13,qword ptr [RSP + 0x20] MOV R12,RDX XOR R14D,R14D MOVSS dword ptr [RSP + 0x4],XMM1 LAB_00131db5: MOV RBP,R14 SHL RBP,0x7 ADD RBP,RDX XOR R15D,R15D LAB_00131dc2: MOVSS XMM2,dword ptr [R13 + R15*0x4] MOVSS XMM0,dword ptr [R12 + R15*0x4] MULSS XMM0,XMM0 ADDSS XMM0,XMM1 UCOMISS XMM0,dword ptr [0x001512c4] JC 0x00131de6 SQRTSS XMM0,XMM0 JMP 0x00131dfd LAB_00131de6: MOVSS dword ptr [RSP + 0x14],XMM2 CALL 0x00117f80 MOVSS XMM2,dword ptr [RSP + 0x14] MOVSS XMM1,dword ptr [RSP + 0x4] LAB_00131dfd: MULSS XMM2,XMM0 MOVSS dword ptr [RSP + R15*0x4 + 0x70],XMM2 INC R15 CMP R15,0x20 JNZ 0x00131dc2 MOV EDI,0x20 MOV ESI,0x8 MOV RDX,RBP LEA RCX,[RSP + 0x50] LEA R8,[RSP + 0x70] CALL 0x00131310 MOVD EAX,XMM0 ANDPS XMM0,xmmword ptr [0x0014c020] MULSS XMM0,dword ptr [0x0014c0e8] MULSS XMM0,dword ptr [0x0014c0ec] LEA ECX,[RAX + RAX*0x1] MOV EDX,EAX AND EDX,0x7f800000 ADD EDX,0x7800000 CMP ECX,0x71000000 MOV ESI,0x40000000 CMOVC EDX,ESI MOVD XMM1,EDX ADDSS XMM1,XMM0 MOVD EDX,XMM1 MOVSS XMM1,dword ptr [RSP + 0x4] MOV ESI,EDX SHR ESI,0xd AND ESI,0x7c00 AND EDX,0xfff ADD EDX,ESI SHR EAX,0x10 AND EAX,0x8000 CMP ECX,0xff000001 MOV ECX,0x7e00 CMOVNC EDX,ECX OR EDX,EAX LEA RAX,[R14 + R14*0x8] MOV word ptr [RBX + RAX*0x2],DX MOVDQA XMM0,xmmword ptr [RSP + 0x60] PSLLW XMM0,0x4 PAND XMM0,xmmword ptr [0x00150e50] POR XMM0,xmmword ptr [RSP + 0x50] MOVDQU xmmword ptr [RBX + RAX*0x2 + 0x2],XMM0 INC R14 MOV EAX,0x80 ADD R12,RAX ADD R13,RAX CMP R14,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x8] JNZ 0x00131db5 LAB_00131ee9: ADD RDX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP + 0x30] ADD RBX,RAX MOV RCX,qword ptr [RSP + 0x40] INC RCX MOV R14,qword ptr [RSP + 0x38] CMP RCX,R14 MOV R15,qword ptr [RSP + 0x18] JNZ 0x00131d62 JMP 0x00131f34 LAB_00131f18: MOV RDX,R15 IMUL RDX,R14 MOV RSI,RBX CALL 0x00117430 MOV EDI,0x2 MOV RSI,R15 CALL 0x001178b0 LAB_00131f34: IMUL RAX,R14 ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ long quantize_q4_0(long param_1,long param_2,long param_3,ulong param_4,long param_5) { long lVar1; ulong uVar2; long lVar3; ushort uVar4; float fVar5; long lVar6; long lVar7; long lVar8; float fVar9; uint uVar10; int1 auVar11 [16]; float fVar12; long local_120; int1 local_d8 [16]; int1 local_c8 [16]; float local_b8 [34]; if (param_5 == 0) { quantize_row_q4_0_ref(param_1,param_2,param_4 * param_3); lVar1 = ggml_row_size(2,param_4); } else { lVar1 = ggml_row_size(2,param_4); if (0 < param_3) { lVar3 = 0; local_120 = param_1; do { if (0 < (long)param_4) { fVar12 = 0.0; uVar2 = 0; do { fVar5 = *(float *)(local_120 + uVar2 * 4); fVar12 = fVar12 + fVar5 * fVar5; uVar2 = uVar2 + 1; } while (param_4 != uVar2); if (0x1f < (long)param_4) { uVar2 = 0; lVar6 = local_120; lVar7 = param_5; do { lVar8 = 0; do { fVar5 = *(float *)(lVar7 + lVar8 * 4); fVar9 = *(float *)(lVar6 + lVar8 * 4); fVar9 = fVar9 * fVar9 + fVar12 / (float)(long)param_4; if (fVar9 < DAT_001512c4) { fVar9 = sqrtf(fVar9); } else { fVar9 = SQRT(fVar9); } local_b8[lVar8] = fVar5 * fVar9; lVar8 = lVar8 + 1; } while (lVar8 != 0x20); uVar10 = make_qx_quants(0x20,8,uVar2 * 0x80 + local_120,local_d8,local_b8); fVar5 = (float)((uVar10 & 0x7f800000) + 0x7800000); if (uVar10 * 2 < 0x71000000) { fVar5 = 2.0; } fVar5 = fVar5 + (float)(uVar10 & _DAT_0014c020) * DAT_0014c0e8 * DAT_0014c0ec; uVar4 = (SUB42(fVar5,0) & 0xfff) + ((ushort)((uint)fVar5 >> 0xd) & 0x7c00); if (0xff000000 < uVar10 * 2) { uVar4 = 0x7e00; } *(ushort *)(param_2 + uVar2 * 0x12) = uVar4 | (ushort)(uVar10 >> 0x10) & 0x8000; auVar11 = psllw(local_c8,4); *(int1 (*) [16])(param_2 + 2 + uVar2 * 0x12) = auVar11 & _DAT_00150e50 | local_d8; uVar2 = uVar2 + 1; lVar6 = lVar6 + 0x80; lVar7 = lVar7 + 0x80; } while (uVar2 != param_4 >> 5); } } local_120 = local_120 + param_4 * 4; param_2 = param_2 + lVar1; lVar3 = lVar3 + 1; } while (lVar3 != param_3); } } return lVar1 * param_3; }
25,344
ft_parse
eloqsql/storage/myisam/ft_parser.c
int ft_parse(TREE *wtree, uchar *doc, int doclen, struct st_mysql_ftparser *parser, MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root) { MY_FT_PARSER_PARAM my_param; DBUG_ENTER("ft_parse"); DBUG_ASSERT(parser); my_param.wtree= wtree; my_param.mem_root= mem_root; param->mysql_parse= ft_parse_internal; param->mysql_add_word= ft_add_word; param->mysql_ftparam= &my_param; param->cs= wtree->custom_arg; param->doc= (char*) doc; param->length= doclen; param->mode= MYSQL_FTPARSER_SIMPLE_MODE; DBUG_RETURN(parser->parse(param)); }
O3
c
ft_parse: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq -0x10(%rbp), %rax movq %rdi, (%rax) movq %r9, 0x8(%rax) leaq 0x39(%rip), %r9 # 0x74cdd movq %r9, (%r8) leaq 0xa6(%rip), %r9 # 0x74d54 movq %r9, 0x8(%r8) movq %rax, 0x18(%r8) movq 0x230(%rdi), %rax movq %rax, 0x20(%r8) movq %rsi, 0x28(%r8) movl %edx, 0x30(%r8) movl $0x0, 0x38(%r8) movq %r8, %rdi callq *0x8(%rcx) addq $0x10, %rsp popq %rbp retq
ft_parse: push rbp mov rbp, rsp sub rsp, 10h lea rax, [rbp+var_10] mov [rax], rdi mov [rax+8], r9 lea r9, ft_parse_internal mov [r8], r9 lea r9, ft_add_word mov [r8+8], r9 mov [r8+18h], rax mov rax, [rdi+230h] mov [r8+20h], rax mov [r8+28h], rsi mov [r8+30h], edx mov dword ptr [r8+38h], 0 mov rdi, r8 call qword ptr [rcx+8] add rsp, 10h pop rbp retn
long long ft_parse(long long a1, long long a2, int a3, long long a4, long long a5, long long a6) { _QWORD v7[2]; // [rsp+0h] [rbp-10h] BYREF v7[0] = a1; v7[1] = a6; *(_QWORD *)a5 = ft_parse_internal; *(_QWORD *)(a5 + 8) = ft_add_word; *(_QWORD *)(a5 + 24) = v7; *(_QWORD *)(a5 + 32) = *(_QWORD *)(a1 + 560); *(_QWORD *)(a5 + 40) = a2; *(_DWORD *)(a5 + 48) = a3; *(_DWORD *)(a5 + 56) = 0; return (*(long long ( **)(long long))(a4 + 8))(a5); }
ft_parse: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[RBP + -0x10] MOV qword ptr [RAX],RDI MOV qword ptr [RAX + 0x8],R9 LEA R9,[0x174cdd] MOV qword ptr [R8],R9 LEA R9,[0x174d54] MOV qword ptr [R8 + 0x8],R9 MOV qword ptr [R8 + 0x18],RAX MOV RAX,qword ptr [RDI + 0x230] MOV qword ptr [R8 + 0x20],RAX MOV qword ptr [R8 + 0x28],RSI MOV dword ptr [R8 + 0x30],EDX MOV dword ptr [R8 + 0x38],0x0 MOV RDI,R8 CALL qword ptr [RCX + 0x8] ADD RSP,0x10 POP RBP RET
void ft_parse(long param_1,int8 param_2,int4 param_3,long param_4,int8 *param_5, int8 param_6) { long local_18; int8 local_10; *param_5 = ft_parse_internal; param_5[1] = ft_add_word; param_5[3] = &local_18; param_5[4] = *(int8 *)(param_1 + 0x230); param_5[5] = param_2; *(int4 *)(param_5 + 6) = param_3; *(int4 *)(param_5 + 7) = 0; local_18 = param_1; local_10 = param_6; (**(code **)(param_4 + 8))(param_5); return; }
25,345
MemoryManager::getByte(unsigned int, unsigned int*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
uint8_t MemoryManager::getByte(uint32_t addr, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Byte read to invalid addr 0x%x!\n", addr); return false; } if (this->cache != nullptr) { return this->cache->getByte(addr, cycles); } return this->memory[addr]; }
O0
cpp
MemoryManager::getByte(unsigned int, unsigned int*): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movq %rdx, 0x8(%rsp) movq 0x18(%rsp), %rdi movq %rdi, (%rsp) movl 0x14(%rsp), %esi callq 0x7140 testb $0x1, %al jne 0x72b1 movl 0x14(%rsp), %esi leaq 0x3e4f(%rip), %rdi # 0xb0f2 movb $0x0, %al callq 0x6930 movb $0x0, 0x27(%rsp) jmp 0x72ea movq (%rsp), %rax cmpq $0x0, 0x8(%rax) je 0x72d8 movq (%rsp), %rax movq 0x8(%rax), %rdi movl 0x14(%rsp), %esi movq 0x8(%rsp), %rdx callq 0x8100 movb %al, 0x27(%rsp) jmp 0x72ea movq (%rsp), %rax movq (%rax), %rax movl 0x14(%rsp), %ecx movb (%rax,%rcx), %al movb %al, 0x27(%rsp) movb 0x27(%rsp), %al addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN13MemoryManager7getByteEjPj: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov [rsp+28h+var_20], rdx mov rdi, [rsp+28h+var_10]; this mov [rsp+28h+var_28], rdi mov esi, [rsp+28h+var_14]; unsigned int call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint) test al, 1 jnz short loc_72B1 mov esi, [rsp+28h+var_14] lea rdi, aByteReadToInva; "Byte read to invalid addr 0x%x!\n" mov al, 0 call _Z9dbgprintfPKcz; dbgprintf(char const*,...) mov [rsp+28h+var_1], 0 jmp short loc_72EA loc_72B1: mov rax, [rsp+28h+var_28] cmp qword ptr [rax+8], 0 jz short loc_72D8 mov rax, [rsp+28h+var_28] mov rdi, [rax+8]; this mov esi, [rsp+28h+var_14]; unsigned int mov rdx, [rsp+28h+var_20]; unsigned int * call _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *) mov [rsp+28h+var_1], al jmp short loc_72EA loc_72D8: mov rax, [rsp+28h+var_28] mov rax, [rax] mov ecx, [rsp+28h+var_14] mov al, [rax+rcx] mov [rsp+28h+var_1], al loc_72EA: mov al, [rsp+28h+var_1] add rsp, 28h retn
char MemoryManager::getByte( Cache **this, unsigned int a2, unsigned int *a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 if ( MemoryManager::isAddrExist((MemoryManager *)this, a2) ) { if ( this[1] ) return Cache::getByte(this[1], a2, a3); else return *((_BYTE *)*this + a2); } else { dbgprintf( "Byte read to invalid addr 0x%x!\n", a2, v11, v12, v13, v14, a4, a5, a6, a7, v15, v16, a10, a11, (char)this); return 0; } }
getByte: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV qword ptr [RSP + 0x8],RDX MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI MOV ESI,dword ptr [RSP + 0x14] CALL 0x00107140 TEST AL,0x1 JNZ 0x001072b1 MOV ESI,dword ptr [RSP + 0x14] LEA RDI,[0x10b0f2] MOV AL,0x0 CALL 0x00106930 MOV byte ptr [RSP + 0x27],0x0 JMP 0x001072ea LAB_001072b1: MOV RAX,qword ptr [RSP] CMP qword ptr [RAX + 0x8],0x0 JZ 0x001072d8 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x8] MOV ESI,dword ptr [RSP + 0x14] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00108100 MOV byte ptr [RSP + 0x27],AL JMP 0x001072ea LAB_001072d8: MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RSP + 0x14] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RSP + 0x27],AL LAB_001072ea: MOV AL,byte ptr [RSP + 0x27] ADD RSP,0x28 RET
/* MemoryManager::getByte(unsigned int, unsigned int*) */ int8 __thiscall MemoryManager::getByte(MemoryManager *this,uint param_1,uint *param_2) { int1 extraout_AL; ulong uVar1; int7 extraout_var; int7 extraout_var_00; int7 uVar2; int1 local_1; uVar1 = isAddrExist(this,param_1); if ((uVar1 & 1) == 0) { dbgprintf("Byte read to invalid addr 0x%x!\n",(ulong)param_1); local_1 = 0; uVar2 = extraout_var; } else if (*(long *)(this + 8) == 0) { local_1 = *(int1 *)(*(long *)this + (ulong)param_1); uVar2 = (int7)((ulong)*(long *)this >> 8); } else { Cache::getByte(*(Cache **)(this + 8),param_1,param_2); uVar2 = extraout_var_00; local_1 = extraout_AL; } return CONCAT71(uVar2,local_1); }
25,346
find_set
eloqsql/extra/replace.c
static short find_set(REP_SETS *sets,REP_SET *find) { uint i; for (i=0 ; i < sets->count-1 ; i++) { if (!cmp_bits(sets->set+i,find)) { free_last_set(sets); return (short) i; } } return (short) i; /* return new position */ }
O3
c
find_set: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl (%rdi), %ebx decl %ebx je 0x267df movq %rdi, -0x30(%rbp) movq 0x10(%rdi), %r13 movq (%rsi), %r15 movl %ebx, %r14d xorl %r12d, %r12d movq (%r13), %rdi movl 0x21c(%r13), %edx shlq $0x2, %rdx movq %r15, %rsi callq 0x24340 testl %eax, %eax je 0x267e3 incq %r12 addq $0x220, %r13 # imm = 0x220 cmpq %r12, %r14 jne 0x267b3 jmp 0x267ef xorl %ebx, %ebx jmp 0x267ef movq -0x30(%rbp), %rax movl %ebx, (%rax) incl 0x4(%rax) movl %r12d, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
find_set: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, [rdi] dec ebx jz short loc_267DF mov [rbp+var_30], rdi mov r13, [rdi+10h] mov r15, [rsi] mov r14d, ebx xor r12d, r12d loc_267B3: mov rdi, [r13+0] mov edx, [r13+21Ch] shl rdx, 2 mov rsi, r15 call _bcmp test eax, eax jz short loc_267E3 inc r12 add r13, 220h cmp r14, r12 jnz short loc_267B3 jmp short loc_267EF loc_267DF: xor ebx, ebx jmp short loc_267EF loc_267E3: mov rax, [rbp+var_30] mov [rax], ebx inc dword ptr [rax+4] mov ebx, r12d loc_267EF: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long find_set(long long a1, long long *a2) { unsigned int v2; // ebx long long v3; // r13 long long v4; // r15 long long v5; // r12 v2 = *(_DWORD *)a1 - 1; if ( *(_DWORD *)a1 == 1 ) { return 0; } else { v3 = *(_QWORD *)(a1 + 16); v4 = *a2; v5 = 0LL; while ( (unsigned int)bcmp(*(_QWORD *)v3, v4, 4LL * *(unsigned int *)(v3 + 540)) ) { ++v5; v3 += 544LL; if ( v2 == v5 ) return v2; } *(_DWORD *)a1 = v2; ++*(_DWORD *)(a1 + 4); return (unsigned int)v5; } }
find_set: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,dword ptr [RDI] DEC EBX JZ 0x001267df MOV qword ptr [RBP + -0x30],RDI MOV R13,qword ptr [RDI + 0x10] MOV R15,qword ptr [RSI] MOV R14D,EBX XOR R12D,R12D LAB_001267b3: MOV RDI,qword ptr [R13] MOV EDX,dword ptr [R13 + 0x21c] SHL RDX,0x2 MOV RSI,R15 CALL 0x00124340 TEST EAX,EAX JZ 0x001267e3 INC R12 ADD R13,0x220 CMP R14,R12 JNZ 0x001267b3 JMP 0x001267ef LAB_001267df: XOR EBX,EBX JMP 0x001267ef LAB_001267e3: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],EBX INC dword ptr [RAX + 0x4] MOV EBX,R12D LAB_001267ef: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint find_set(uint *param_1,int8 *param_2) { void *__s2; int iVar1; uint uVar2; ulong uVar3; int8 *puVar4; uVar2 = *param_1 - 1; if (uVar2 == 0) { uVar2 = 0; } else { puVar4 = *(int8 **)(param_1 + 4); __s2 = (void *)*param_2; uVar3 = 0; do { iVar1 = bcmp((void *)*puVar4,__s2,(ulong)*(uint *)((long)puVar4 + 0x21c) << 2); if (iVar1 == 0) { *param_1 = uVar2; param_1[1] = param_1[1] + 1; return (uint)uVar3; } uVar3 = uVar3 + 1; puVar4 = puVar4 + 0x44; } while (uVar2 != uVar3); } return uVar2; }
25,347
set_process_priority(ggml_sched_priority)
monkey531[P]llama/common/common.cpp
bool set_process_priority(enum ggml_sched_priority prio) { if (prio == GGML_SCHED_PRIO_NORMAL) { return true; } int p = 0; switch (prio) { case GGML_SCHED_PRIO_NORMAL: p = 0; break; case GGML_SCHED_PRIO_MEDIUM: p = -5; break; case GGML_SCHED_PRIO_HIGH: p = -10; break; case GGML_SCHED_PRIO_REALTIME: p = -20; break; } if (!setpriority(PRIO_PROCESS, 0, p)) { LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno); return false; } return true; }
O2
cpp
set_process_priority(ggml_sched_priority): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx cmpl $0x3, %edi ja 0x489aa movl %ebx, %eax leaq 0x4ed39(%rip), %rcx # 0x976c8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, %bpl jmp 0x489fe pushq $-0xa jmp 0x489a7 pushq $-0x14 jmp 0x489a7 pushq $-0x5 popq %rdx jmp 0x489ac xorl %edx, %edx xorl %edi, %edi xorl %esi, %esi callq 0x211e0 testl %eax, %eax setne %bpl jne 0x489fe leaq 0x9289c(%rip), %rax # 0xdb260 cmpl $0x0, (%rax) js 0x489fe callq 0x76516 movq %rax, %r14 callq 0x21050 movq %rax, %r15 movl (%rax), %edi callq 0x21260 movl (%r15), %r9d leaq 0x4f0b0(%rip), %rdx # 0x97a9a xorl %ebp, %ebp pushq $0x3 popq %rsi movq %r14, %rdi movl %ebx, %ecx movq %rax, %r8 xorl %eax, %eax callq 0x765ae movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_Z20set_process_priority19ggml_sched_priority: push rbp push r15 push r14 push rbx push rax mov ebx, edi cmp edi, 3; switch 4 cases ja short def_48996; jumptable 0000000000048996 default case mov eax, ebx lea rcx, jpt_48996 movsxd rax, ds:(jpt_48996 - 976C8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_48998: mov bpl, 1; jumptable 0000000000048996 case 0 jmp short loc_489FE loc_4899D: push 0FFFFFFFFFFFFFFF6h; jumptable 0000000000048996 case 2 jmp short loc_489A7 loc_489A1: push 0FFFFFFFFFFFFFFECh; jumptable 0000000000048996 case 3 jmp short loc_489A7 loc_489A5: push 0FFFFFFFFFFFFFFFBh; jumptable 0000000000048996 case 1 loc_489A7: pop rdx jmp short loc_489AC def_48996: xor edx, edx; jumptable 0000000000048996 default case loc_489AC: xor edi, edi xor esi, esi call _setpriority test eax, eax setnz bpl jnz short loc_489FE lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_489FE call _Z15common_log_mainv; common_log_main(void) mov r14, rax call ___errno_location mov r15, rax mov edi, [rax] call _strerror mov r9d, [r15] lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "... xor ebp, ebp push 3 pop rsi mov rdi, r14 mov ecx, ebx mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_489FE: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long set_process_priority(int a1) { char v1; // al unsigned int v2; // ebp long long v3; // rdx int v4; // eax int v5; // r14d unsigned int *v6; // r15 int v7; // eax long long v9; // [rsp-10h] [rbp-30h] char v10; // [rsp-8h] [rbp-28h] v10 = v1; switch ( a1 ) { case 0: LOBYTE(v2) = 1; return v2; case 1: v9 = -5LL; goto LABEL_6; case 2: v9 = -10LL; goto LABEL_6; case 3: v9 = -20LL; LABEL_6: v3 = v9; break; default: v3 = 0LL; break; } v4 = setpriority(0LL, 0LL, v3); LOBYTE(v2) = v4 != 0; if ( !v4 && common_log_verbosity_thold >= 0 ) { v5 = common_log_main(); v6 = (unsigned int *)__errno_location(); v7 = strerror(*v6); v2 = 0; common_log_add(v5, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v7, *v6, v10); } return v2; }
set_process_priority: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI CMP EDI,0x3 JA 0x001489aa MOV EAX,EBX LEA RCX,[0x1976c8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BPL,0x1 JMP 0x001489fe caseD_2: PUSH -0xa JMP 0x001489a7 caseD_3: PUSH -0x14 JMP 0x001489a7 caseD_1: PUSH -0x5 LAB_001489a7: POP RDX JMP 0x001489ac default: XOR EDX,EDX LAB_001489ac: XOR EDI,EDI XOR ESI,ESI CALL 0x001211e0 TEST EAX,EAX SETNZ BPL JNZ 0x001489fe LEA RAX,[0x1db260] CMP dword ptr [RAX],0x0 JS 0x001489fe CALL 0x00176516 MOV R14,RAX CALL 0x00121050 MOV R15,RAX MOV EDI,dword ptr [RAX] CALL 0x00121260 MOV R9D,dword ptr [R15] LEA RDX,[0x197a9a] XOR EBP,EBP PUSH 0x3 POP RSI MOV RDI,R14 MOV ECX,EBX MOV R8,RAX XOR EAX,EAX CALL 0x001765ae LAB_001489fe: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* set_process_priority(ggml_sched_priority) */ ulong set_process_priority(int4 param_1) { int iVar1; int8 uVar2; int *piVar3; char *pcVar4; int8 unaff_RBP; int7 uVar6; ulong uVar5; uVar6 = (int7)((ulong)unaff_RBP >> 8); switch(param_1) { case 0: uVar5 = CONCAT71(uVar6,1); goto LAB_001489fe; case 1: iVar1 = -5; break; case 2: iVar1 = -10; break; case 3: iVar1 = -0x14; break; default: iVar1 = 0; } iVar1 = setpriority(PRIO_PROCESS,0,iVar1); uVar5 = CONCAT71(uVar6,iVar1 != 0); if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); uVar5 = 0; common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3); } LAB_001489fe: return uVar5 & 0xffffffff; }
25,348
PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex, 1024, 1024, PFS_buffer_default_array<PFS_mutex>, PFS_buffer_default_allocator<PFS_mutex>>, 2>::PFS_partitioned_buffer_scalable_container(PFS_buffer_default_allocator<PFS_mutex>*)
eloqsql/storage/perfschema/pfs_buffer_container.h
PFS_partitioned_buffer_scalable_container(allocator_type *allocator) { for (int i=0 ; i < PFS_PARTITION_COUNT; i++) { m_partitions[i]= new B(allocator); } }
O0
c
PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex, 1024, 1024, PFS_buffer_default_array<PFS_mutex>, PFS_buffer_default_allocator<PFS_mutex>>, 2>::PFS_partitioned_buffer_scalable_container(PFS_buffer_default_allocator<PFS_mutex>*): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movl $0x0, -0x14(%rbp) cmpl $0x2, -0x14(%rbp) jge 0x36eab movl $0x20d8, %edi # imm = 0x20D8 callq 0x26310 movq %rax, %rdi movq %rdi, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rsi callq 0x37820 jmp 0x36e74 movq -0x30(%rbp), %rax movq -0x38(%rbp), %rdx movslq -0x14(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x36e4f movq -0x38(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) movl $0x20d8, %esi # imm = 0x20D8 callq 0x26320 jmp 0x36eb1 addq $0x40, %rsp popq %rbp retq movq -0x20(%rbp), %rdi callq 0x265f0 nopw (%rax,%rax)
_ZN41PFS_partitioned_buffer_scalable_containerI29PFS_buffer_scalable_containerI9PFS_mutexLi1024ELi1024E24PFS_buffer_default_arrayIS1_E28PFS_buffer_default_allocatorIS1_EELi2EEC2EPS5_: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_30], rax mov [rbp+var_14], 0 loc_36E4F: cmp [rbp+var_14], 2 jge short loc_36EAB mov edi, 20D8h; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax mov rax, rdi mov [rbp+var_38], rax mov rsi, [rbp+var_10] call _ZN29PFS_buffer_scalable_containerI9PFS_mutexLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EEC2EPS4_; PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::PFS_buffer_scalable_container(PFS_buffer_default_allocator<PFS_mutex>*) jmp short $+2 loc_36E74: mov rax, [rbp+var_30] mov rdx, [rbp+var_38] movsxd rcx, [rbp+var_14] mov [rax+rcx*8], rdx mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_36E4F mov rdi, [rbp+var_38]; void * mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax mov esi, 20D8h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_36EB1 loc_36EAB: add rsp, 40h pop rbp retn loc_36EB1: mov rdi, [rbp+var_20] call __Unwind_Resume
long long PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>,2>::PFS_partitioned_buffer_scalable_container( long long a1, long long a2) { long long result; // rax void *v3; // [rsp+8h] [rbp-38h] int i; // [rsp+2Ch] [rbp-14h] result = a1; for ( i = 0; i < 2; ++i ) { v3 = (void *)operator new(0x20D8uLL); PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::PFS_buffer_scalable_container( v3, a2); *(_QWORD *)(a1 + 8LL * i) = v3; result = (unsigned int)(i + 1); } return result; }
PFS_partitioned_buffer_scalable_container: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x14],0x0 LAB_00136e4f: CMP dword ptr [RBP + -0x14],0x2 JGE 0x00136eab MOV EDI,0x20d8 CALL 0x00126310 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RBP + -0x38],RAX MOV RSI,qword ptr [RBP + -0x10] LAB_00136e6d: CALL 0x00137820 LAB_00136e72: JMP 0x00136e74 LAB_00136e74: MOV RAX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x38] MOVSXD RCX,dword ptr [RBP + -0x14] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00136e4f LAB_00136eab: ADD RSP,0x40 POP RBP RET
/* PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex, 1024, 1024, PFS_buffer_default_array<PFS_mutex>, PFS_buffer_default_allocator<PFS_mutex> >, 2>::PFS_partitioned_buffer_scalable_container(PFS_buffer_default_allocator<PFS_mutex>*) */ void __thiscall PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>,2> ::PFS_partitioned_buffer_scalable_container (PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>,2> *this,PFS_buffer_default_allocator *param_1) { PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> *this_00; int local_1c; for (local_1c = 0; local_1c < 2; local_1c = local_1c + 1) { this_00 = (PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> *)operator_new(0x20d8); /* try { // try from 00136e6d to 00136e71 has its CatchHandler @ 00136e8f */ PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> ::PFS_buffer_scalable_container(this_00,param_1); *(PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> **)(this + (long)local_1c * 8) = this_00; } return; }
25,349
qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
QVariant QObjectTreeModel::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { switch (section) { case 0: return QStringLiteral("Type"); case 1: return QStringLiteral("Name"); case 2: return QStringLiteral("Addr"); case 3: return QStringLiteral("Thread"); } } return {}; }
O0
cpp
qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const: pushq %rbp movq %rsp, %rbp subq $0x190, %rsp # imm = 0x190 movq %rdi, -0x160(%rbp) movq %rdi, %rax movq %rax, -0x158(%rbp) movq %rdi, -0x68(%rbp) movq %rsi, -0x70(%rbp) movl %edx, -0x74(%rbp) movl %ecx, -0x78(%rbp) movl %r8d, -0x7c(%rbp) cmpl $0x1, -0x78(%rbp) jne 0x12dbd cmpl $0x0, -0x7c(%rbp) jne 0x12dbd movl -0x74(%rbp), %eax movq %rax, -0x168(%rbp) subq $0x3, %rax ja 0x12dbb movq -0x168(%rbp), %rax leaq 0x28aa8(%rip), %rcx # 0x3b55c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq -0xb0(%rbp), %rdi movq %rdi, -0x170(%rbp) movq %rdi, -0x20(%rbp) leaq 0x28b8a(%rip), %rax # 0x3b660 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdx xorl %eax, %eax movl %eax, %esi movl $0x4, %ecx callq 0x2a710 movq -0x170(%rbp), %rsi leaq -0x98(%rbp), %rdi callq 0x1b1b0 jmp 0x12b09 movq -0x160(%rbp), %rdi leaq -0x98(%rbp), %rsi callq 0xfcc0 jmp 0x12b1e leaq -0x98(%rbp), %rdi callq 0x1b1e0 leaq -0xb0(%rbp), %rdi callq 0x1b200 jmp 0x12dc9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb8(%rbp) movl %eax, -0xbc(%rbp) jmp 0x12b6d movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb8(%rbp) movl %eax, -0xbc(%rbp) leaq -0x98(%rbp), %rdi callq 0x1b1e0 leaq -0xb0(%rbp), %rdi callq 0x1b200 jmp 0x12dd9 leaq -0xf0(%rbp), %rdi movq %rdi, -0x178(%rbp) movq %rdi, -0x38(%rbp) leaq 0x28ad3(%rip), %rax # 0x3b66a movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rdx xorl %eax, %eax movl %eax, %esi movl $0x4, %ecx callq 0x2a710 movq -0x178(%rbp), %rsi leaq -0xd8(%rbp), %rdi callq 0x1b1b0 jmp 0x12bca movq -0x160(%rbp), %rdi leaq -0xd8(%rbp), %rsi callq 0xfcc0 jmp 0x12bdf leaq -0xd8(%rbp), %rdi callq 0x1b1e0 leaq -0xf0(%rbp), %rdi callq 0x1b200 jmp 0x12dc9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb8(%rbp) movl %eax, -0xbc(%rbp) jmp 0x12c2e movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb8(%rbp) movl %eax, -0xbc(%rbp) leaq -0xd8(%rbp), %rdi callq 0x1b1e0 leaq -0xf0(%rbp), %rdi callq 0x1b200 jmp 0x12dd9 leaq -0x120(%rbp), %rdi movq %rdi, -0x180(%rbp) movq %rdi, -0x50(%rbp) leaq 0x28a1c(%rip), %rax # 0x3b674 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rdx xorl %eax, %eax movl %eax, %esi movl $0x4, %ecx callq 0x2a710 movq -0x180(%rbp), %rsi leaq -0x108(%rbp), %rdi callq 0x1b1b0 jmp 0x12c8b movq -0x160(%rbp), %rdi leaq -0x108(%rbp), %rsi callq 0xfcc0 jmp 0x12ca0 leaq -0x108(%rbp), %rdi callq 0x1b1e0 leaq -0x120(%rbp), %rdi callq 0x1b200 jmp 0x12dc9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb8(%rbp) movl %eax, -0xbc(%rbp) jmp 0x12cef movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb8(%rbp) movl %eax, -0xbc(%rbp) leaq -0x108(%rbp), %rdi callq 0x1b1e0 leaq -0x120(%rbp), %rdi callq 0x1b200 jmp 0x12dd9 leaq -0x150(%rbp), %rdi movq %rdi, -0x188(%rbp) movq %rdi, -0x8(%rbp) leaq 0x28965(%rip), %rax # 0x3b67e movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdx xorl %eax, %eax movl %eax, %esi movl $0x6, %ecx callq 0x2a710 movq -0x188(%rbp), %rsi leaq -0x138(%rbp), %rdi callq 0x1b1b0 jmp 0x12d4c movq -0x160(%rbp), %rdi leaq -0x138(%rbp), %rsi callq 0xfcc0 jmp 0x12d61 leaq -0x138(%rbp), %rdi callq 0x1b1e0 leaq -0x150(%rbp), %rdi callq 0x1b200 jmp 0x12dc9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb8(%rbp) movl %eax, -0xbc(%rbp) jmp 0x12dad movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb8(%rbp) movl %eax, -0xbc(%rbp) leaq -0x138(%rbp), %rdi callq 0x1b1e0 leaq -0x150(%rbp), %rdi callq 0x1b200 jmp 0x12dd9 jmp 0x12dbd movq -0x160(%rbp), %rdi callq 0x1b240 movq -0x158(%rbp), %rax addq $0x190, %rsp # imm = 0x190 popq %rbp retq movq -0xb8(%rbp), %rdi callq 0xf410 nopw %cs:(%rax,%rax)
_ZNK9qdevtools16QObjectTreeModel10headerDataEiN2Qt11OrientationEi: push rbp mov rbp, rsp sub rsp, 190h mov [rbp+var_160], rdi mov rax, rdi mov [rbp+var_158], rax mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov [rbp+var_74], edx mov [rbp+var_78], ecx mov [rbp+var_7C], r8d cmp [rbp+var_78], 1 jnz loc_12DBD cmp [rbp+var_7C], 0 jnz loc_12DBD mov eax, [rbp+var_74] mov [rbp+var_168], rax sub rax, 3; switch 4 cases ja def_12ABB; jumptable 0000000000012ABB default case mov rax, [rbp+var_168] lea rcx, jpt_12ABB movsxd rax, ds:(jpt_12ABB - 3B55Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_12ABD: lea rdi, [rbp+var_B0]; jumptable 0000000000012ABB case 0 mov [rbp+var_170], rdi mov [rbp+var_20], rdi lea rax, aType; "Type" mov [rbp+var_28], rax mov rax, [rbp+var_28] mov [rbp+var_30], rax mov rdx, [rbp+var_30] xor eax, eax mov esi, eax mov ecx, 4 call _ZN17QArrayDataPointerIDsEC2EP15QTypedArrayDataIDsEPDsx; QArrayDataPointer<char16_t>::QArrayDataPointer(QTypedArrayData<char16_t> *,char16_t *,long long) mov rsi, [rbp+var_170] lea rdi, [rbp+var_98] call _ZN7QStringC2EO17QArrayDataPointerIDsE; QString::QString(QArrayDataPointer<char16_t> &&) jmp short $+2 loc_12B09: mov rdi, [rbp+var_160]; this lea rsi, [rbp+var_98]; QString * call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp short $+2 loc_12B1E: lea rdi, [rbp+var_98]; this call _ZN7QStringD2Ev; QString::~QString() lea rdi, [rbp+var_B0] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp loc_12DC9 mov rcx, rax mov eax, edx mov [rbp+var_B8], rcx mov [rbp+var_BC], eax jmp short loc_12B6D mov rcx, rax mov eax, edx mov [rbp+var_B8], rcx mov [rbp+var_BC], eax lea rdi, [rbp+var_98]; this call _ZN7QStringD2Ev; QString::~QString() loc_12B6D: lea rdi, [rbp+var_B0] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp loc_12DD9 loc_12B7E: lea rdi, [rbp+var_F0]; jumptable 0000000000012ABB case 1 mov [rbp+var_178], rdi mov [rbp+var_38], rdi lea rax, aN; "N" mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_48], rax mov rdx, [rbp+var_48] xor eax, eax mov esi, eax mov ecx, 4 call _ZN17QArrayDataPointerIDsEC2EP15QTypedArrayDataIDsEPDsx; QArrayDataPointer<char16_t>::QArrayDataPointer(QTypedArrayData<char16_t> *,char16_t *,long long) mov rsi, [rbp+var_178] lea rdi, [rbp+var_D8] call _ZN7QStringC2EO17QArrayDataPointerIDsE; QString::QString(QArrayDataPointer<char16_t> &&) jmp short $+2 loc_12BCA: mov rdi, [rbp+var_160]; this lea rsi, [rbp+var_D8]; QString * call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp short $+2 loc_12BDF: lea rdi, [rbp+var_D8]; this call _ZN7QStringD2Ev; QString::~QString() lea rdi, [rbp+var_F0] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp loc_12DC9 mov rcx, rax mov eax, edx mov [rbp+var_B8], rcx mov [rbp+var_BC], eax jmp short loc_12C2E mov rcx, rax mov eax, edx mov [rbp+var_B8], rcx mov [rbp+var_BC], eax lea rdi, [rbp+var_D8]; this call _ZN7QStringD2Ev; QString::~QString() loc_12C2E: lea rdi, [rbp+var_F0] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp loc_12DD9 loc_12C3F: lea rdi, [rbp+var_120]; jumptable 0000000000012ABB case 2 mov [rbp+var_180], rdi mov [rbp+var_50], rdi lea rax, aAddr; "Addr" mov [rbp+var_58], rax mov rax, [rbp+var_58] mov [rbp+var_60], rax mov rdx, [rbp+var_60] xor eax, eax mov esi, eax mov ecx, 4 call _ZN17QArrayDataPointerIDsEC2EP15QTypedArrayDataIDsEPDsx; QArrayDataPointer<char16_t>::QArrayDataPointer(QTypedArrayData<char16_t> *,char16_t *,long long) mov rsi, [rbp+var_180] lea rdi, [rbp+var_108] call _ZN7QStringC2EO17QArrayDataPointerIDsE; QString::QString(QArrayDataPointer<char16_t> &&) jmp short $+2 loc_12C8B: mov rdi, [rbp+var_160]; this lea rsi, [rbp+var_108]; QString * call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp short $+2 loc_12CA0: lea rdi, [rbp+var_108]; this call _ZN7QStringD2Ev; QString::~QString() lea rdi, [rbp+var_120] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp loc_12DC9 mov rcx, rax mov eax, edx mov [rbp+var_B8], rcx mov [rbp+var_BC], eax jmp short loc_12CEF mov rcx, rax mov eax, edx mov [rbp+var_B8], rcx mov [rbp+var_BC], eax lea rdi, [rbp+var_108]; this call _ZN7QStringD2Ev; QString::~QString() loc_12CEF: lea rdi, [rbp+var_120] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp loc_12DD9 loc_12D00: lea rdi, [rbp+var_150]; jumptable 0000000000012ABB case 3 mov [rbp+var_188], rdi mov [rbp+var_8], rdi lea rax, aT; "T" mov [rbp+var_10], rax mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rdx, [rbp+var_18] xor eax, eax mov esi, eax mov ecx, 6 call _ZN17QArrayDataPointerIDsEC2EP15QTypedArrayDataIDsEPDsx; QArrayDataPointer<char16_t>::QArrayDataPointer(QTypedArrayData<char16_t> *,char16_t *,long long) mov rsi, [rbp+var_188] lea rdi, [rbp+var_138] call _ZN7QStringC2EO17QArrayDataPointerIDsE; QString::QString(QArrayDataPointer<char16_t> &&) jmp short $+2 loc_12D4C: mov rdi, [rbp+var_160]; this lea rsi, [rbp+var_138]; QString * call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp short $+2 loc_12D61: lea rdi, [rbp+var_138]; this call _ZN7QStringD2Ev; QString::~QString() lea rdi, [rbp+var_150] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp short loc_12DC9 mov rcx, rax mov eax, edx mov [rbp+var_B8], rcx mov [rbp+var_BC], eax jmp short loc_12DAD mov rcx, rax mov eax, edx mov [rbp+var_B8], rcx mov [rbp+var_BC], eax lea rdi, [rbp+var_138]; this call _ZN7QStringD2Ev; QString::~QString() loc_12DAD: lea rdi, [rbp+var_150] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp short loc_12DD9 def_12ABB: jmp short $+2; jumptable 0000000000012ABB default case loc_12DBD: mov rdi, [rbp+var_160]; this call _ZN8QVariantC2Ev; QVariant::QVariant(void) loc_12DC9: mov rax, [rbp+var_158] add rsp, 190h pop rbp retn loc_12DD9: mov rdi, [rbp+var_B8] call __Unwind_Resume
QVariant * qdevtools::QObjectTreeModel::headerData(QVariant *a1, long long a2, int a3, int a4, int a5) { _BYTE v6[24]; // [rsp+40h] [rbp-150h] BYREF _BYTE v7[24]; // [rsp+58h] [rbp-138h] BYREF _BYTE v8[24]; // [rsp+70h] [rbp-120h] BYREF _BYTE v9[24]; // [rsp+88h] [rbp-108h] BYREF _BYTE v10[24]; // [rsp+A0h] [rbp-F0h] BYREF _BYTE v11[28]; // [rsp+B8h] [rbp-D8h] BYREF _BYTE v12[24]; // [rsp+E0h] [rbp-B0h] BYREF _BYTE v13[28]; // [rsp+F8h] [rbp-98h] BYREF int v14; // [rsp+114h] [rbp-7Ch] int v15; // [rsp+118h] [rbp-78h] int v16; // [rsp+11Ch] [rbp-74h] long long v17; // [rsp+120h] [rbp-70h] QVariant *v18; // [rsp+128h] [rbp-68h] const __int16 *v19; // [rsp+130h] [rbp-60h] const __int16 *v20; // [rsp+138h] [rbp-58h] _BYTE *v21; // [rsp+140h] [rbp-50h] const char *v22; // [rsp+148h] [rbp-48h] const char *v23; // [rsp+150h] [rbp-40h] _BYTE *v24; // [rsp+158h] [rbp-38h] const __int16 *v25; // [rsp+160h] [rbp-30h] const __int16 *v26; // [rsp+168h] [rbp-28h] _BYTE *v27; // [rsp+170h] [rbp-20h] const char *v28; // [rsp+178h] [rbp-18h] const char *v29; // [rsp+180h] [rbp-10h] _BYTE *v30; // [rsp+188h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; if ( a4 != 1 || v14 ) { LABEL_8: QVariant::QVariant(a1); } else { switch ( v16 ) { case 0: v27 = v12; v26 = L"Type"; v25 = L"Type"; QArrayDataPointer<char16_t>::QArrayDataPointer(v12, 0LL, L"Type", 4LL); QString::QString(v13, v12); QVariant::QVariant(a1, (const QString *)v13); QString::~QString((QString *)v13); QArrayDataPointer<char16_t>::~QArrayDataPointer(v12); break; case 1: v24 = v10; v23 = "N"; v22 = "N"; QArrayDataPointer<char16_t>::QArrayDataPointer(v10, 0LL, "N", 4LL); QString::QString(v11, v10); QVariant::QVariant(a1, (const QString *)v11); QString::~QString((QString *)v11); QArrayDataPointer<char16_t>::~QArrayDataPointer(v10); break; case 2: v21 = v8; v20 = L"Addr"; v19 = L"Addr"; QArrayDataPointer<char16_t>::QArrayDataPointer(v8, 0LL, L"Addr", 4LL); QString::QString(v9, v8); QVariant::QVariant(a1, (const QString *)v9); QString::~QString((QString *)v9); QArrayDataPointer<char16_t>::~QArrayDataPointer(v8); break; case 3: v30 = v6; v29 = "T"; v28 = "T"; QArrayDataPointer<char16_t>::QArrayDataPointer(v6, 0LL, "T", 6LL); QString::QString(v7, v6); QVariant::QVariant(a1, (const QString *)v7); QString::~QString((QString *)v7); QArrayDataPointer<char16_t>::~QArrayDataPointer(v6); break; default: goto LABEL_8; } } return a1; }
headerData: PUSH RBP MOV RBP,RSP SUB RSP,0x190 MOV qword ptr [RBP + -0x160],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x158],RAX MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV dword ptr [RBP + -0x74],EDX MOV dword ptr [RBP + -0x78],ECX MOV dword ptr [RBP + -0x7c],R8D CMP dword ptr [RBP + -0x78],0x1 JNZ 0x00112dbd CMP dword ptr [RBP + -0x7c],0x0 JNZ 0x00112dbd MOV EAX,dword ptr [RBP + -0x74] MOV qword ptr [RBP + -0x168],RAX SUB RAX,0x3 JA 0x00112dbb MOV RAX,qword ptr [RBP + -0x168] LEA RCX,[0x13b55c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RDI,[RBP + -0xb0] MOV qword ptr [RBP + -0x170],RDI MOV qword ptr [RBP + -0x20],RDI LEA RAX,[0x13b660] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RDX,qword ptr [RBP + -0x30] XOR EAX,EAX MOV ESI,EAX MOV ECX,0x4 CALL 0x0012a710 MOV RSI,qword ptr [RBP + -0x170] LAB_00112afb: LEA RDI,[RBP + -0x98] CALL 0x0011b1b0 JMP 0x00112b09 LAB_00112b09: MOV RDI,qword ptr [RBP + -0x160] LEA RSI,[RBP + -0x98] CALL 0x0010fcc0 JMP 0x00112b1e LAB_00112b1e: LEA RDI,[RBP + -0x98] CALL 0x0011b1e0 LEA RDI,[RBP + -0xb0] CALL 0x0011b200 JMP 0x00112dc9 caseD_1: LEA RDI,[RBP + -0xf0] MOV qword ptr [RBP + -0x178],RDI MOV qword ptr [RBP + -0x38],RDI LEA RAX,[0x13b66a] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX MOV RDX,qword ptr [RBP + -0x48] XOR EAX,EAX MOV ESI,EAX MOV ECX,0x4 CALL 0x0012a710 MOV RSI,qword ptr [RBP + -0x178] LAB_00112bbc: LEA RDI,[RBP + -0xd8] CALL 0x0011b1b0 JMP 0x00112bca LAB_00112bca: MOV RDI,qword ptr [RBP + -0x160] LEA RSI,[RBP + -0xd8] CALL 0x0010fcc0 JMP 0x00112bdf LAB_00112bdf: LEA RDI,[RBP + -0xd8] CALL 0x0011b1e0 LEA RDI,[RBP + -0xf0] CALL 0x0011b200 JMP 0x00112dc9 caseD_2: LEA RDI,[RBP + -0x120] MOV qword ptr [RBP + -0x180],RDI MOV qword ptr [RBP + -0x50],RDI LEA RAX,[0x13b674] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x60],RAX MOV RDX,qword ptr [RBP + -0x60] XOR EAX,EAX MOV ESI,EAX MOV ECX,0x4 CALL 0x0012a710 MOV RSI,qword ptr [RBP + -0x180] LAB_00112c7d: LEA RDI,[RBP + -0x108] CALL 0x0011b1b0 JMP 0x00112c8b LAB_00112c8b: MOV RDI,qword ptr [RBP + -0x160] LEA RSI,[RBP + -0x108] CALL 0x0010fcc0 JMP 0x00112ca0 LAB_00112ca0: LEA RDI,[RBP + -0x108] CALL 0x0011b1e0 LEA RDI,[RBP + -0x120] CALL 0x0011b200 JMP 0x00112dc9 caseD_3: LEA RDI,[RBP + -0x150] MOV qword ptr [RBP + -0x188],RDI MOV qword ptr [RBP + -0x8],RDI LEA RAX,[0x13b67e] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RDX,qword ptr [RBP + -0x18] XOR EAX,EAX MOV ESI,EAX MOV ECX,0x6 CALL 0x0012a710 MOV RSI,qword ptr [RBP + -0x188] LAB_00112d3e: LEA RDI,[RBP + -0x138] CALL 0x0011b1b0 JMP 0x00112d4c LAB_00112d4c: MOV RDI,qword ptr [RBP + -0x160] LEA RSI,[RBP + -0x138] CALL 0x0010fcc0 LAB_00112d5f: JMP 0x00112d61 LAB_00112d61: LEA RDI,[RBP + -0x138] CALL 0x0011b1e0 LEA RDI,[RBP + -0x150] CALL 0x0011b200 JMP 0x00112dc9 LAB_00112dbb: JMP 0x00112dbd default: MOV RDI,qword ptr [RBP + -0x160] CALL 0x0011b240 LAB_00112dc9: MOV RAX,qword ptr [RBP + -0x158] ADD RSP,0x190 POP RBP RET
/* qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const */ QVariant_conflict * qdevtools::QObjectTreeModel::headerData (QVariant_conflict *param_1,int8 param_2,int4 param_3,int param_4,int param_5) { QArrayDataPointer<char16_t> local_158 [24]; QString local_140 [24]; QArrayDataPointer<char16_t> local_128 [24]; QString local_110 [24]; QArrayDataPointer<char16_t> local_f8 [24]; QString local_e0 [40]; QArrayDataPointer<char16_t> local_b8 [24]; QString local_a0 [28]; int local_84; int local_80; int4 local_7c; int8 local_78; QVariant_conflict *local_70; wchar16 *local_68; wchar16 *local_60; QArrayDataPointer<char16_t> *local_58; wchar16 *local_50; wchar16 *local_48; QArrayDataPointer<char16_t> *local_40; wchar16 *local_38; wchar16 *local_30; QArrayDataPointer<char16_t> *local_28; wchar16 *local_20; wchar16 *local_18; QArrayDataPointer<char16_t> *local_10; local_84 = param_5; local_80 = param_4; local_7c = param_3; local_78 = param_2; local_70 = param_1; if ((param_4 == 1) && (param_5 == 0)) { switch(param_3) { case 0: local_30 = L"Type"; local_38 = L"Type"; local_28 = local_b8; QArrayDataPointer<char16_t>::QArrayDataPointer(local_b8,(QTypedArrayData *)0x0,L"Type",4); /* try { // try from 00112afb to 00112b06 has its CatchHandler @ 00112b3b */ QString::QString(local_a0,(QArrayDataPointer *)local_b8); /* try { // try from 00112b09 to 00112b1b has its CatchHandler @ 00112b4f */ QVariant::QVariant(param_1,local_a0); QString::~QString(local_a0); QArrayDataPointer<char16_t>::~QArrayDataPointer(local_b8); break; case 1: local_48 = L"Name"; local_50 = L"Name"; local_40 = local_f8; QArrayDataPointer<char16_t>::QArrayDataPointer(local_f8,(QTypedArrayData *)0x0,L"Name",4); /* try { // try from 00112bbc to 00112bc7 has its CatchHandler @ 00112bfc */ QString::QString(local_e0,(QArrayDataPointer *)local_f8); /* try { // try from 00112bca to 00112bdc has its CatchHandler @ 00112c10 */ QVariant::QVariant(param_1,local_e0); QString::~QString(local_e0); QArrayDataPointer<char16_t>::~QArrayDataPointer(local_f8); break; case 2: local_60 = L"Addr"; local_68 = L"Addr"; local_58 = local_128; QArrayDataPointer<char16_t>::QArrayDataPointer(local_128,(QTypedArrayData *)0x0,L"Addr",4); /* try { // try from 00112c7d to 00112c88 has its CatchHandler @ 00112cbd */ QString::QString(local_110,(QArrayDataPointer *)local_128); /* try { // try from 00112c8b to 00112c9d has its CatchHandler @ 00112cd1 */ QVariant::QVariant(param_1,local_110); QString::~QString(local_110); QArrayDataPointer<char16_t>::~QArrayDataPointer(local_128); break; case 3: local_18 = L"Thread"; local_20 = L"Thread"; local_10 = local_158; QArrayDataPointer<char16_t>::QArrayDataPointer(local_158,(QTypedArrayData *)0x0,L"Thread",6); /* try { // try from 00112d3e to 00112d49 has its CatchHandler @ 00112d7b */ QString::QString(local_140,(QArrayDataPointer *)local_158); /* try { // try from 00112d4c to 00112d5e has its CatchHandler @ 00112d8f */ QVariant::QVariant(param_1,local_140); QString::~QString(local_140); QArrayDataPointer<char16_t>::~QArrayDataPointer(local_158); break; default: goto switchD_00112abb_default; } } else { switchD_00112abb_default: QVariant::QVariant(param_1); } return param_1; }
25,350
qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
QVariant QObjectTreeModel::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { switch (section) { case 0: return QStringLiteral("Type"); case 1: return QStringLiteral("Name"); case 2: return QStringLiteral("Addr"); case 3: return QStringLiteral("Thread"); } } return {}; }
O1
cpp
qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const: pushq %rbx subq $0x20, %rsp movq %rdi, %rbx xorl $0x1, %ecx orl %r8d, %ecx jne 0x11625 cmpl $0x3, %edx ja 0x11625 movl %edx, %eax leaq 0x11f6c(%rip), %rcx # 0x2355c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x8(%rsp), %rsi movq $0x0, (%rsi) leaq 0x12064(%rip), %rax # 0x23670 movq %rax, 0x8(%rsi) movq $0x4, 0x10(%rsi) movq %rbx, %rdi callq 0xfcb0 jmp 0x116bd xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq $0x2, 0x18(%rbx) movq %rbx, %rax addq $0x20, %rsp popq %rbx retq leaq 0x8(%rsp), %rsi movq $0x0, (%rsi) leaq 0x1202d(%rip), %rax # 0x23684 movq %rax, 0x8(%rsi) movq $0x4, 0x10(%rsi) movq %rbx, %rdi callq 0xfcb0 jmp 0x116bd leaq 0x8(%rsp), %rsi movq $0x0, (%rsi) leaq 0x1200e(%rip), %rax # 0x2368e movq %rax, 0x8(%rsi) movq $0x6, 0x10(%rsi) movq %rbx, %rdi callq 0xfcb0 jmp 0x116bd leaq 0x8(%rsp), %rsi movq $0x0, (%rsi) leaq 0x11fd1(%rip), %rax # 0x2367a movq %rax, 0x8(%rsi) movq $0x4, 0x10(%rsi) movq %rbx, %rdi callq 0xfcb0 movq 0x8(%rsp), %rax testq %rax, %rax je 0x1163b lock decl (%rax) jne 0x1163b movq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0xf610 jmp 0x1163b movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1174f leaq 0x8(%rsp), %rsi callq 0x1012f jmp 0x1174f movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1174f leaq 0x8(%rsp), %rsi callq 0x10148 jmp 0x1174f movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1174f leaq 0x8(%rsp), %rsi callq 0x100fd jmp 0x1174f movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1174f leaq 0x8(%rsp), %rsi callq 0x10116 movq %rbx, %rdi callq 0xf410 nop
_ZNK9qdevtools16QObjectTreeModel10headerDataEiN2Qt11OrientationEi: push rbx sub rsp, 20h mov rbx, rdi xor ecx, 1 or ecx, r8d jnz short def_115F7; jumptable 00000000000115F7 default case cmp edx, 3; switch 4 cases ja short def_115F7; jumptable 00000000000115F7 default case mov eax, edx lea rcx, jpt_115F7 movsxd rax, ds:(jpt_115F7 - 2355Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_115F9: lea rsi, [rsp+28h+var_20]; jumptable 00000000000115F7 case 0 mov qword ptr [rsi], 0 lea rax, aType; "Type" mov [rsi+8], rax mov qword ptr [rsi+10h], 4 mov rdi, rbx; this call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp loc_116BD def_115F7: xorps xmm0, xmm0; jumptable 00000000000115F7 default case movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov qword ptr [rbx+18h], 2 loc_1163B: mov rax, rbx add rsp, 20h pop rbx retn loc_11644: lea rsi, [rsp+28h+var_20]; jumptable 00000000000115F7 case 2 mov qword ptr [rsi], 0 lea rax, aAddr; "Addr" mov [rsi+8], rax mov qword ptr [rsi+10h], 4 mov rdi, rbx; this call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp short loc_116BD loc_1166D: lea rsi, [rsp+28h+var_20]; jumptable 00000000000115F7 case 3 mov qword ptr [rsi], 0 lea rax, aT; "T" mov [rsi+8], rax mov qword ptr [rsi+10h], 6 mov rdi, rbx; this call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp short loc_116BD loc_11696: lea rsi, [rsp+28h+var_20]; jumptable 00000000000115F7 case 1 mov qword ptr [rsi], 0 lea rax, aN; "N" mov [rsi+8], rax mov qword ptr [rsi+10h], 4 mov rdi, rbx; this call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) loc_116BD: mov rax, [rsp+28h+var_20] test rax, rax jz loc_1163B lock dec dword ptr [rax] jnz loc_1163B mov rdi, [rsp+28h+var_20] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp loc_1163B mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_1174F lea rsi, [rsp+arg_0] call _ZNK9qdevtools16QObjectTreeModel10headerDataEiN2Qt11OrientationEi_cold_3; qdevtools::QObjectTreeModel::headerData(int,Qt::Orientation,int) [clone] jmp short loc_1174F mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_1174F lea rsi, [rsp+arg_0] call _ZNK9qdevtools16QObjectTreeModel10headerDataEiN2Qt11OrientationEi_cold_4; qdevtools::QObjectTreeModel::headerData(int,Qt::Orientation,int) [clone] jmp short loc_1174F mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_1174F lea rsi, [rsp+arg_0] call _ZNK9qdevtools16QObjectTreeModel10headerDataEiN2Qt11OrientationEi_cold_1; qdevtools::QObjectTreeModel::headerData(int,Qt::Orientation,int) [clone] jmp short loc_1174F mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_1174F lea rsi, [rsp+arg_0] call _ZNK9qdevtools16QObjectTreeModel10headerDataEiN2Qt11OrientationEi_cold_2; qdevtools::QObjectTreeModel::headerData(int,Qt::Orientation,int) [clone] loc_1174F: mov rdi, rbx call __Unwind_Resume
QVariant * qdevtools::QObjectTreeModel::headerData(QVariant *this, long long a2, int a3, int a4, int a5) { volatile signed __int32 *v6; // [rsp+8h] [rbp-20h] BYREF const __int16 *v7; // [rsp+10h] [rbp-18h] long long v8; // [rsp+18h] [rbp-10h] if ( a5 | a4 ^ 1 ) { LABEL_4: *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = 0LL; *((_QWORD *)this + 3) = 2LL; } else { switch ( a3 ) { case 0: v6 = 0LL; v7 = L"Type"; v8 = 4LL; QVariant::QVariant(this, (const QString *)&v6); break; case 1: v6 = 0LL; v7 = (const __int16 *)"N"; v8 = 4LL; QVariant::QVariant(this, (const QString *)&v6); break; case 2: v6 = 0LL; v7 = L"Addr"; v8 = 4LL; QVariant::QVariant(this, (const QString *)&v6); break; case 3: v6 = 0LL; v7 = (const __int16 *)"T"; v8 = 6LL; QVariant::QVariant(this, (const QString *)&v6); break; default: goto LABEL_4; } if ( v6 && !_InterlockedDecrement(v6) ) QArrayData::deallocate(v6, 2LL); } return this; }
headerData: PUSH RBX SUB RSP,0x20 MOV RBX,RDI XOR ECX,0x1 OR ECX,R8D JNZ 0x00111625 CMP EDX,0x3 JA 0x00111625 MOV EAX,EDX LEA RCX,[0x12355c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],0x0 LEA RAX,[0x123670] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],0x4 LAB_00111618: MOV RDI,RBX CALL 0x0010fcb0 JMP 0x001116bd default: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV qword ptr [RBX + 0x18],0x2 LAB_0011163b: MOV RAX,RBX ADD RSP,0x20 POP RBX RET caseD_2: LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],0x0 LEA RAX,[0x123684] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],0x4 LAB_00111663: MOV RDI,RBX CALL 0x0010fcb0 JMP 0x001116bd caseD_3: LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],0x0 LEA RAX,[0x12368e] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],0x6 LAB_0011168c: MOV RDI,RBX CALL 0x0010fcb0 JMP 0x001116bd caseD_1: LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],0x0 LEA RAX,[0x12367a] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],0x4 LAB_001116b5: MOV RDI,RBX CALL 0x0010fcb0 LAB_001116bd: MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x0011163b DEC.LOCK dword ptr [RAX] JNZ 0x0011163b MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x2 MOV EDX,0x8 CALL 0x0010f610 JMP 0x0011163b
/* qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const */ QVariant * qdevtools::QObjectTreeModel::headerData (QVariant *param_1,int8 param_2,int4 param_3,int param_4,int param_5) { QArrayData *local_20; wchar16 *local_18; int8 local_10; if (param_4 == 1 && param_5 == 0) { switch(param_3) { case 0: local_20 = (QArrayData *)0x0; local_18 = L"Type"; local_10 = 4; /* try { // try from 00111618 to 0011161f has its CatchHandler @ 00111706 */ QVariant::QVariant(param_1,(QString *)&local_20); break; case 1: local_20 = (QArrayData *)0x0; local_18 = L"Name"; local_10 = 4; /* try { // try from 001116b5 to 001116bc has its CatchHandler @ 001116ed */ QVariant::QVariant(param_1,(QString *)&local_20); break; case 2: local_20 = (QArrayData *)0x0; local_18 = L"Addr"; local_10 = 4; /* try { // try from 00111663 to 0011166a has its CatchHandler @ 00111738 */ QVariant::QVariant(param_1,(QString *)&local_20); break; case 3: local_20 = (QArrayData *)0x0; local_18 = L"Thread"; local_10 = 6; /* try { // try from 0011168c to 00111693 has its CatchHandler @ 0011171f */ QVariant::QVariant(param_1,(QString *)&local_20); break; default: goto switchD_001115f7_default; } if (local_20 != (QArrayData *)0x0) { LOCK(); *(int *)local_20 = *(int *)local_20 + -1; UNLOCK(); if (*(int *)local_20 == 0) { QArrayData::deallocate(local_20,2,8); } } } else { switchD_001115f7_default: *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 2; } return param_1; }
25,351
qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
QVariant QObjectTreeModel::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { switch (section) { case 0: return QStringLiteral("Type"); case 1: return QStringLiteral("Name"); case 2: return QStringLiteral("Addr"); case 3: return QStringLiteral("Thread"); } } return {}; }
O2
cpp
qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const: pushq %rbx subq $0x30, %rsp movq %rdi, %rbx xorl $0x1, %ecx orl %r8d, %ecx jne 0x10de1 cmpl $0x3, %edx ja 0x10de1 movl %edx, %eax leaq 0xf7ba(%rip), %rcx # 0x2055c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x18(%rsp), %rsi andq $0x0, (%rsi) leaq 0xf8b5(%rip), %rax # 0x20670 movq %rax, 0x8(%rsi) movq $0x4, 0x10(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) movq %rbx, %rdi callq 0xfce0 jmp 0x10e90 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) andq $0x0, 0x10(%rbx) movq $0x2, 0x18(%rbx) jmp 0x10ea2 leaq 0x18(%rsp), %rsi andq $0x0, (%rsi) leaq 0xf87b(%rip), %rax # 0x20684 movq %rax, 0x8(%rsi) movq $0x4, 0x10(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) movq %rbx, %rdi callq 0xfce0 jmp 0x10e90 leaq 0x18(%rsp), %rsi andq $0x0, (%rsi) leaq 0xf852(%rip), %rax # 0x2068e movq %rax, 0x8(%rsi) movq $0x6, 0x10(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) movq %rbx, %rdi callq 0xfce0 jmp 0x10e90 leaq 0x18(%rsp), %rsi andq $0x0, (%rsi) leaq 0xf80b(%rip), %rax # 0x2067a movq %rax, 0x8(%rsi) movq $0x4, 0x10(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) movq %rbx, %rdi callq 0xfce0 leaq 0x18(%rsp), %rdi callq 0x14530 movq %rsp, %rdi callq 0x14530 movq %rbx, %rax addq $0x30, %rsp popq %rbx retq jmp 0x10eb1 jmp 0x10eb1 jmp 0x10eb1 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x14530 movq %rsp, %rdi callq 0x14530 movq %rbx, %rdi callq 0xf410
_ZNK9qdevtools16QObjectTreeModel10headerDataEiN2Qt11OrientationEi: push rbx sub rsp, 30h mov rbx, rdi xor ecx, 1 or ecx, r8d jnz short def_10DA9; jumptable 0000000000010DA9 default case cmp edx, 3; switch 4 cases ja short def_10DA9; jumptable 0000000000010DA9 default case mov eax, edx lea rcx, jpt_10DA9 movsxd rax, ds:(jpt_10DA9 - 2055Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_10DAB: lea rsi, [rsp+38h+var_20]; jumptable 0000000000010DA9 case 0 and qword ptr [rsi], 0 lea rax, aType; "Type" mov [rsi+8], rax mov qword ptr [rsi+10h], 4 xorps xmm0, xmm0 movaps [rsp+38h+var_38], xmm0 and [rsp+38h+var_28], 0 mov rdi, rbx; this call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp loc_10E90 def_10DA9: xorps xmm0, xmm0; jumptable 0000000000010DA9 default case movups xmmword ptr [rbx], xmm0 and qword ptr [rbx+10h], 0 mov qword ptr [rbx+18h], 2 jmp loc_10EA2 loc_10DF9: lea rsi, [rsp+38h+var_20]; jumptable 0000000000010DA9 case 2 and qword ptr [rsi], 0 lea rax, aAddr; "Addr" mov [rsi+8], rax mov qword ptr [rsi+10h], 4 xorps xmm0, xmm0 movaps [rsp+38h+var_38], xmm0 and [rsp+38h+var_28], 0 mov rdi, rbx; this call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp short loc_10E90 loc_10E2C: lea rsi, [rsp+38h+var_20]; jumptable 0000000000010DA9 case 3 and qword ptr [rsi], 0 lea rax, aT; "T" mov [rsi+8], rax mov qword ptr [rsi+10h], 6 xorps xmm0, xmm0 movaps [rsp+38h+var_38], xmm0 and [rsp+38h+var_28], 0 mov rdi, rbx; this call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) jmp short loc_10E90 loc_10E5F: lea rsi, [rsp+38h+var_20]; jumptable 0000000000010DA9 case 1 and qword ptr [rsi], 0 lea rax, aN; "N" mov [rsi+8], rax mov qword ptr [rsi+10h], 4 xorps xmm0, xmm0 movaps [rsp+38h+var_38], xmm0 and [rsp+38h+var_28], 0 mov rdi, rbx; this call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&) loc_10E90: lea rdi, [rsp+38h+var_20] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() mov rdi, rsp call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() loc_10EA2: mov rax, rbx add rsp, 30h pop rbx retn jmp short loc_10EB1 jmp short loc_10EB1 jmp short $+2 loc_10EB1: mov rbx, rax lea rdi, [rsp+arg_10] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() mov rdi, rsp call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() mov rdi, rbx call __Unwind_Resume
QVariant * qdevtools::QObjectTreeModel::headerData(QVariant *this, long long a2, int a3, int a4, int a5) { long long v5; // rdx long long v6; // rcx long long v7; // r8 long long v8; // r9 long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 __int128 v14; // [rsp+0h] [rbp-38h] BYREF long long v15; // [rsp+10h] [rbp-28h] long long v16; // [rsp+18h] [rbp-20h] BYREF const __int16 *v17; // [rsp+20h] [rbp-18h] long long v18; // [rsp+28h] [rbp-10h] if ( a5 | a4 ^ 1 ) { LABEL_4: *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = 0LL; *((_QWORD *)this + 3) = 2LL; } else { switch ( a3 ) { case 0: v16 = 0LL; v17 = L"Type"; v18 = 4LL; v14 = 0LL; v15 = 0LL; QVariant::QVariant(this, (const QString *)&v16); break; case 1: v16 = 0LL; v17 = (const __int16 *)"N"; v18 = 4LL; v14 = 0LL; v15 = 0LL; QVariant::QVariant(this, (const QString *)&v16); break; case 2: v16 = 0LL; v17 = L"Addr"; v18 = 4LL; v14 = 0LL; v15 = 0LL; QVariant::QVariant(this, (const QString *)&v16); break; case 3: v16 = 0LL; v17 = (const __int16 *)"T"; v18 = 6LL; v14 = 0LL; v15 = 0LL; QVariant::QVariant(this, (const QString *)&v16); break; default: goto LABEL_4; } QArrayDataPointer<char16_t>::~QArrayDataPointer(&v16, &v16, v5, v6, v7, v8, v14, *((_QWORD *)&v14 + 1), v15); ((void ( *)(__int128 *, long long *, long long, long long, long long, long long))QArrayDataPointer<char16_t>::~QArrayDataPointer)( &v14, &v16, v9, v10, v11, v12); } return this; }
headerData: PUSH RBX SUB RSP,0x30 MOV RBX,RDI XOR ECX,0x1 OR ECX,R8D JNZ 0x00110de1 CMP EDX,0x3 JA 0x00110de1 MOV EAX,EDX LEA RCX,[0x12055c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[RSP + 0x18] AND qword ptr [RSI],0x0 LEA RAX,[0x120670] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],0x4 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_00110dd4: MOV RDI,RBX CALL 0x0010fce0 JMP 0x00110e90 default: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RBX + 0x10],0x0 MOV qword ptr [RBX + 0x18],0x2 JMP 0x00110ea2 caseD_2: LEA RSI,[RSP + 0x18] AND qword ptr [RSI],0x0 LEA RAX,[0x120684] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],0x4 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_00110e22: MOV RDI,RBX CALL 0x0010fce0 JMP 0x00110e90 caseD_3: LEA RSI,[RSP + 0x18] AND qword ptr [RSI],0x0 LEA RAX,[0x12068e] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],0x6 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_00110e55: MOV RDI,RBX CALL 0x0010fce0 JMP 0x00110e90 caseD_1: LEA RSI,[RSP + 0x18] AND qword ptr [RSI],0x0 LEA RAX,[0x12067a] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],0x4 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_00110e88: MOV RDI,RBX CALL 0x0010fce0 LAB_00110e90: LEA RDI,[RSP + 0x18] CALL 0x00114530 MOV RDI,RSP CALL 0x00114530 LAB_00110ea2: MOV RAX,RBX ADD RSP,0x30 POP RBX RET
/* qdevtools::QObjectTreeModel::headerData(int, Qt::Orientation, int) const */ QVariant_conflict * qdevtools::QObjectTreeModel::headerData (QVariant_conflict *param_1,int8 param_2,int4 param_3,int param_4,int param_5) { int8 local_38; int8 uStack_30; int8 local_28; int8 local_20; wchar16 *local_18; int8 local_10; if (param_4 == 1 && param_5 == 0) { switch(param_3) { case 0: local_20 = 0; local_18 = L"Type"; local_10 = 4; local_38 = 0; uStack_30 = 0; local_28 = 0; /* try { // try from 00110dd4 to 00110ddb has its CatchHandler @ 00110ead */ QVariant::QVariant(param_1,(QString *)&local_20); break; case 1: local_20 = 0; local_18 = L"Name"; local_10 = 4; local_38 = 0; uStack_30 = 0; local_28 = 0; /* try { // try from 00110e88 to 00110e8f has its CatchHandler @ 00110eab */ QVariant::QVariant(param_1,(QString *)&local_20); break; case 2: local_20 = 0; local_18 = L"Addr"; local_10 = 4; local_38 = 0; uStack_30 = 0; local_28 = 0; /* try { // try from 00110e22 to 00110e29 has its CatchHandler @ 00110eb1 */ QVariant::QVariant(param_1,(QString *)&local_20); break; case 3: local_20 = 0; local_18 = L"Thread"; local_10 = 6; local_38 = 0; uStack_30 = 0; local_28 = 0; /* try { // try from 00110e55 to 00110e5c has its CatchHandler @ 00110eaf */ QVariant::QVariant(param_1,(QString *)&local_20); break; default: goto switchD_00110da9_default; } QArrayDataPointer<char16_t>::~QArrayDataPointer((QArrayDataPointer<char16_t> *)&local_20); QArrayDataPointer<char16_t>::~QArrayDataPointer((QArrayDataPointer<char16_t> *)&local_38); } else { switchD_00110da9_default: *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 2; } return param_1; }
25,352
js_create_module_function
bluesky950520[P]quickjs/quickjs.c
static int js_create_module_function(JSContext *ctx, JSModuleDef *m) { BOOL is_c_module; int i; JSVarRef *var_ref; if (m->func_created) return 0; is_c_module = (m->init_func != NULL); if (is_c_module) { /* initialize the exported variables */ for(i = 0; i < m->export_entries_count; i++) { JSExportEntry *me = &m->export_entries[i]; if (me->export_type == JS_EXPORT_TYPE_LOCAL) { var_ref = js_create_module_var(ctx, FALSE); if (!var_ref) return -1; me->u.local.var_ref = var_ref; } } } else { if (js_create_module_bytecode_function(ctx, m)) return -1; } m->func_created = TRUE; /* do it on the dependencies */ for(i = 0; i < m->req_module_entries_count; i++) { JSReqModuleEntry *rme = &m->req_module_entries[i]; if (js_create_module_function(ctx, rme->module) < 0) return -1; } return 0; }
O1
c
js_create_module_function: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp xorl %ebp, %ebp cmpb $0x0, 0x82(%rsi) jne 0x4458a movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x78(%rsi) je 0x444c0 cmpl $0x0, 0x30(%r14) jle 0x44548 movl $0x10, %r15d xorl %r12d, %r12d movq 0x28(%r14), %r13 cmpl $0x0, (%r13,%r15) je 0x444aa incq %r12 movslq 0x30(%r14), %rax addq $0x20, %r15 cmpq %rax, %r12 jl 0x44489 jmp 0x44548 movq %rbx, %rdi xorl %esi, %esi callq 0x1103b testq %rax, %rax je 0x444f3 movq %rax, -0x8(%r13,%r15) jmp 0x44495 movsd 0x68(%r14), %xmm0 movsd %xmm0, 0x10(%rsp) movq 0x70(%r14), %r15 movq 0x48(%rbx), %rsi movq 0x50(%rbx), %rdx movq %rbx, %rdi movl $0xd, %ecx callq 0x20f05 movq %rdx, %r12 movq %rax, 0x8(%rsp) cmpl $0x6, %r12d jne 0x444fd movl $0xffffffff, %ebp # imm = 0xFFFFFFFF jmp 0x4458a movq %r15, 0x20(%rsp) movq 0x10(%rsp), %r13 movq 0x8(%rsp), %r15 movq %r13, 0x30(%r15) incl (%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x38(%r15) movslq 0x5c(%r13), %rsi testq %rsi, %rsi jne 0x4459b movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0x68(%r14) movq %r12, 0x70(%r14) movq 0x10(%rsp), %rsi movq 0x18(%rbx), %rdi movq 0x20(%rsp), %rdx callq 0x1d8c6 movb $0x1, 0x82(%r14) cmpl $0x0, 0x20(%r14) jle 0x4458a movl $0x8, %r15d xorl %r12d, %r12d movq 0x18(%r14), %rax movq (%rax,%r15), %rsi movq %rbx, %rdi callq 0x4444b testl %eax, %eax js 0x444f3 incq %r12 movslq 0x20(%r14), %rax addq $0x10, %r15 cmpq %rax, %r12 jl 0x44560 xorl %ebp, %ebp movl %ebp, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq shlq $0x3, %rsi movq %rbx, %rdi callq 0xee06 testq %rax, %rax je 0x44607 movq %rax, %rcx addq $0x38, %r15 movq %rax, (%r15) cmpl $0x0, 0x5c(%r13) jle 0x44525 xorl %r15d, %r15d movq %rcx, 0x18(%rsp) movq 0x38(%r13), %rax movzbl (%rax,%r15,8), %esi testb $0x1, %sil jne 0x445e9 incq %r15 movslq 0x5c(%r13), %rax cmpq %rax, %r15 jl 0x445c9 jmp 0x44525 shrl $0x3, %esi andl $0x1, %esi movq %rbx, %rdi callq 0x1103b movq 0x18(%rsp), %rcx testq %rax, %rax je 0x44607 movq %rax, (%rcx,%r15,8) jmp 0x445d8 movq 0x8(%rsp), %rsi movq 0x18(%rbx), %rdi movq %r12, %rdx callq 0x1d8c6 jmp 0x444f3
js_create_module_function: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h xor ebp, ebp cmp byte ptr [rsi+82h], 0 jnz loc_4458A mov r14, rsi mov rbx, rdi cmp qword ptr [rsi+78h], 0 jz short loc_444C0 cmp dword ptr [r14+30h], 0 jle loc_44548 mov r15d, 10h xor r12d, r12d loc_44489: mov r13, [r14+28h] cmp dword ptr [r13+r15+0], 0 jz short loc_444AA loc_44495: inc r12 movsxd rax, dword ptr [r14+30h] add r15, 20h ; ' ' cmp r12, rax jl short loc_44489 jmp loc_44548 loc_444AA: mov rdi, rbx xor esi, esi call js_create_module_var test rax, rax jz short loc_444F3 mov [r13+r15-8], rax jmp short loc_44495 loc_444C0: movsd xmm0, qword ptr [r14+68h] movsd [rsp+58h+var_48], xmm0 mov r15, [r14+70h] mov rsi, [rbx+48h] mov rdx, [rbx+50h] mov rdi, rbx mov ecx, 0Dh call JS_NewObjectProtoClass mov r12, rdx mov [rsp+58h+var_50], rax cmp r12d, 6 jnz short loc_444FD loc_444F3: mov ebp, 0FFFFFFFFh jmp loc_4458A loc_444FD: mov [rsp+58h+var_38], r15 mov r13, [rsp+58h+var_48] mov r15, [rsp+58h+var_50] mov [r15+30h], r13 inc dword ptr [r13+0] xorps xmm0, xmm0 movups xmmword ptr [r15+38h], xmm0 movsxd rsi, dword ptr [r13+5Ch] test rsi, rsi jnz short loc_4459B loc_44525: movsd xmm0, [rsp+58h+var_50] movsd qword ptr [r14+68h], xmm0 mov [r14+70h], r12 mov rsi, [rsp+58h+var_48] mov rdi, [rbx+18h] mov rdx, [rsp+58h+var_38] call JS_FreeValueRT loc_44548: mov byte ptr [r14+82h], 1 cmp dword ptr [r14+20h], 0 jle short loc_4458A mov r15d, 8 xor r12d, r12d loc_44560: mov rax, [r14+18h] mov rsi, [rax+r15] mov rdi, rbx call js_create_module_function test eax, eax js loc_444F3 inc r12 movsxd rax, dword ptr [r14+20h] add r15, 10h cmp r12, rax jl short loc_44560 xor ebp, ebp loc_4458A: mov eax, ebp add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4459B: shl rsi, 3 mov rdi, rbx call js_mallocz test rax, rax jz short loc_44607 mov rcx, rax add r15, 38h ; '8' mov [r15], rax cmp dword ptr [r13+5Ch], 0 jle loc_44525 xor r15d, r15d mov [rsp+58h+var_40], rcx loc_445C9: mov rax, [r13+38h] movzx esi, byte ptr [rax+r15*8] test sil, 1 jnz short loc_445E9 loc_445D8: inc r15 movsxd rax, dword ptr [r13+5Ch] cmp r15, rax jl short loc_445C9 jmp loc_44525 loc_445E9: shr esi, 3 and esi, 1 mov rdi, rbx call js_create_module_var mov rcx, [rsp+58h+var_40] test rax, rax jz short loc_44607 mov [rcx+r15*8], rax jmp short loc_445D8 loc_44607: mov rsi, [rsp+58h+var_50] mov rdi, [rbx+18h] mov rdx, r12 call JS_FreeValueRT jmp loc_444F3
long long js_create_module_function(long long *a1, long long a2) { unsigned int v2; // ebp long long v4; // r15 long long v5; // r12 long long v6; // r13 long long module_var; // rax long long v8; // r15 long long v9; // rax long long v10; // rdx long long v11; // r12 long long v12; // r15 long long v13; // r12 long long v15; // rax long long v16; // r15 unsigned int v17; // esi long long v18; // rax long long v19; // [rsp+8h] [rbp-50h] long long v20; // [rsp+10h] [rbp-48h] long long v21; // [rsp+18h] [rbp-40h] long long v22; // [rsp+20h] [rbp-38h] v2 = 0; if ( !*(_BYTE *)(a2 + 130) ) { if ( *(_QWORD *)(a2 + 120) ) { if ( *(int *)(a2 + 48) > 0 ) { v4 = 16LL; v5 = 0LL; while ( 1 ) { v6 = *(_QWORD *)(a2 + 40); if ( !*(_DWORD *)(v6 + v4) ) { module_var = js_create_module_var((long long)a1, 0); if ( !module_var ) return (unsigned int)-1; *(_QWORD *)(v6 + v4 - 8) = module_var; } ++v5; v4 += 32LL; if ( v5 >= *(int *)(a2 + 48) ) goto LABEL_14; } } goto LABEL_14; } v20 = *(_QWORD *)(a2 + 104); v8 = *(_QWORD *)(a2 + 112); v9 = JS_NewObjectProtoClass((long long)a1, a1[9], a1[10], 0xDu); v11 = v10; v19 = v9; if ( (_DWORD)v10 == 6 ) return (unsigned int)-1; v22 = v8; *(_QWORD *)(v9 + 48) = v20; ++*(_DWORD *)v20; *(_OWORD *)(v9 + 56) = 0LL; if ( *(_DWORD *)(v20 + 92) ) { v15 = js_mallocz((long long)a1, 8LL * *(int *)(v20 + 92)); if ( !v15 ) { LABEL_28: JS_FreeValueRT(a1[3], (_DWORD *)v19, v11); return (unsigned int)-1; } *(_QWORD *)(v19 + 56) = v15; if ( *(int *)(v20 + 92) > 0 ) { v16 = 0LL; v21 = v15; do { v17 = *(unsigned __int8 *)(*(_QWORD *)(v20 + 56) + 8 * v16); if ( (v17 & 1) != 0 ) { v18 = js_create_module_var((long long)a1, (v17 >> 3) & 1); if ( !v18 ) goto LABEL_28; *(_QWORD *)(v21 + 8 * v16) = v18; } ++v16; } while ( v16 < *(int *)(v20 + 92) ); } } *(_QWORD *)(a2 + 104) = v19; *(_QWORD *)(a2 + 112) = v11; JS_FreeValueRT(a1[3], (_DWORD *)v20, v22); LABEL_14: *(_BYTE *)(a2 + 130) = 1; if ( *(int *)(a2 + 32) <= 0 ) return v2; v12 = 8LL; v13 = 0LL; while ( (int)js_create_module_function(a1, *(_QWORD *)(*(_QWORD *)(a2 + 24) + v12)) >= 0 ) { ++v13; v12 += 16LL; if ( v13 >= *(int *)(a2 + 32) ) return 0; } return (unsigned int)-1; } return v2; }
25,353
js_create_module_function
bluesky950520[P]quickjs/quickjs.c
static int js_create_module_function(JSContext *ctx, JSModuleDef *m) { BOOL is_c_module; int i; JSVarRef *var_ref; if (m->func_created) return 0; is_c_module = (m->init_func != NULL); if (is_c_module) { /* initialize the exported variables */ for(i = 0; i < m->export_entries_count; i++) { JSExportEntry *me = &m->export_entries[i]; if (me->export_type == JS_EXPORT_TYPE_LOCAL) { var_ref = js_create_module_var(ctx, FALSE); if (!var_ref) return -1; me->u.local.var_ref = var_ref; } } } else { if (js_create_module_bytecode_function(ctx, m)) return -1; } m->func_created = TRUE; /* do it on the dependencies */ for(i = 0; i < m->req_module_entries_count; i++) { JSReqModuleEntry *rme = &m->req_module_entries[i]; if (js_create_module_function(ctx, rme->module) < 0) return -1; } return 0; }
O2
c
js_create_module_function: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp cmpb $0x0, 0x82(%rsi) je 0x3bfcd xorl %ebx, %ebx movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rsi, %r15 movq %rdi, %r14 cmpq $0x0, 0x78(%rsi) pushq $-0x1 popq %rbx je 0x3c01a pushq $0x10 popq %r12 xorl %r13d, %r13d movslq 0x30(%r15), %rax cmpq %rax, %r13 jge 0x3c0df movq 0x28(%r15), %rbp cmpl $0x0, (%rbp,%r12) jne 0x3c011 movq %r14, %rdi xorl %esi, %esi callq 0x3c132 testq %rax, %rax je 0x3bfbc movq %rax, -0x8(%rbp,%r12) incq %r13 addq $0x20, %r12 jmp 0x3bfe4 movq 0x68(%r15), %r12 movq 0x70(%r15), %r13 movq 0x48(%r14), %rsi movq 0x50(%r14), %rdx pushq $0xd popq %rcx movq %r14, %rdi callq 0x1b069 cmpl $0x6, %edx je 0x3bfbc movq %rdx, 0x8(%rsp) movq %r13, 0x10(%rsp) movq %r12, 0x30(%rax) incl (%r12) xorps %xmm0, %xmm0 movq %rax, (%rsp) movups %xmm0, 0x38(%rax) movslq 0x5c(%r12), %rsi testq %rsi, %rsi je 0x3c0be shlq $0x3, %rsi movq %r14, %rdi callq 0x17241 testq %rax, %rax je 0x3c11c movq %rax, %rbp movq (%rsp), %rax addq $0x38, %rax movq %rbp, (%rax) xorl %r13d, %r13d movslq 0x5c(%r12), %rax cmpq %rax, %r13 jge 0x3c0be movq 0x38(%r12), %rax movzbl (%rax,%r13,8), %esi testb $0x1, %sil je 0x3c0b9 shrl $0x3, %esi andl $0x1, %esi movq %r14, %rdi callq 0x3c132 testq %rax, %rax je 0x3c11c movq %rax, (%rbp,%r13,8) incq %r13 jmp 0x3c087 movq (%rsp), %rax movq %rax, 0x68(%r15) movq 0x8(%rsp), %rax movq %rax, 0x70(%r15) movq %r14, %rdi movq %r12, %rsi movq 0x10(%rsp), %rdx callq 0x1801e movb $0x1, 0x82(%r15) pushq $0x8 popq %r12 pushq $-0x1 popq %r13 movslq 0x20(%r15), %rax incq %r13 cmpq %rax, %r13 jge 0x3bfba movq 0x18(%r15), %rax movq (%rax,%r12), %rsi addq $0x10, %r12 movq %r14, %rdi callq 0x3bfa3 testl %eax, %eax jns 0x3c0ef jmp 0x3bfbc movq %r14, %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x1801e jmp 0x3bfbc
js_create_module_function: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h cmp byte ptr [rsi+82h], 0 jz short loc_3BFCD loc_3BFBA: xor ebx, ebx loc_3BFBC: mov eax, ebx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3BFCD: mov r15, rsi mov r14, rdi cmp qword ptr [rsi+78h], 0 push 0FFFFFFFFFFFFFFFFh pop rbx jz short loc_3C01A push 10h pop r12 xor r13d, r13d loc_3BFE4: movsxd rax, dword ptr [r15+30h] cmp r13, rax jge loc_3C0DF mov rbp, [r15+28h] cmp dword ptr [rbp+r12+0], 0 jnz short loc_3C011 mov rdi, r14 xor esi, esi call js_create_module_var test rax, rax jz short loc_3BFBC mov [rbp+r12-8], rax loc_3C011: inc r13 add r12, 20h ; ' ' jmp short loc_3BFE4 loc_3C01A: mov r12, [r15+68h] mov r13, [r15+70h] mov rsi, [r14+48h] mov rdx, [r14+50h] push 0Dh pop rcx mov rdi, r14 call JS_NewObjectProtoClass cmp edx, 6 jz short loc_3BFBC mov [rsp+48h+var_40], rdx mov [rsp+48h+var_38], r13 mov [rax+30h], r12 inc dword ptr [r12] xorps xmm0, xmm0 mov [rsp+48h+var_48], rax movups xmmword ptr [rax+38h], xmm0 movsxd rsi, dword ptr [r12+5Ch] test rsi, rsi jz short loc_3C0BE shl rsi, 3 mov rdi, r14 call js_mallocz test rax, rax jz loc_3C11C mov rbp, rax mov rax, [rsp+48h+var_48] add rax, 38h ; '8' mov [rax], rbp xor r13d, r13d loc_3C087: movsxd rax, dword ptr [r12+5Ch] cmp r13, rax jge short loc_3C0BE mov rax, [r12+38h] movzx esi, byte ptr [rax+r13*8] test sil, 1 jz short loc_3C0B9 shr esi, 3 and esi, 1 mov rdi, r14 call js_create_module_var test rax, rax jz short loc_3C11C mov [rbp+r13*8+0], rax loc_3C0B9: inc r13 jmp short loc_3C087 loc_3C0BE: mov rax, [rsp+48h+var_48] mov [r15+68h], rax mov rax, [rsp+48h+var_40] mov [r15+70h], rax mov rdi, r14 mov rsi, r12 mov rdx, [rsp+48h+var_38] call JS_FreeValue loc_3C0DF: mov byte ptr [r15+82h], 1 push 8 pop r12 push 0FFFFFFFFFFFFFFFFh pop r13 loc_3C0EF: movsxd rax, dword ptr [r15+20h] inc r13 cmp r13, rax jge loc_3BFBA mov rax, [r15+18h] mov rsi, [rax+r12] add r12, 10h mov rdi, r14 call js_create_module_function test eax, eax jns short loc_3C0EF jmp loc_3BFBC loc_3C11C: mov rdi, r14 mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] call JS_FreeValue jmp loc_3BFBC
long long js_create_module_function(long long a1, long long a2) { unsigned int v2; // ebx long long v5; // r12 long long i; // r13 long long v7; // rbp long long module_var; // rax long long v9; // r12 long long v10; // r13 long long v11; // rax long long v12; // rdx long long v13; // rax long long v14; // rbp long long j; // r13 unsigned int v16; // esi long long v17; // rax long long v18; // r12 long long v19; // r13 long long v20; // rsi long long v21; // [rsp+0h] [rbp-48h] long long v22; // [rsp+8h] [rbp-40h] long long v23; // [rsp+10h] [rbp-38h] if ( !*(_BYTE *)(a2 + 130) ) { v2 = -1; if ( *(_QWORD *)(a2 + 120) ) { v5 = 16LL; for ( i = 0LL; i < *(int *)(a2 + 48); ++i ) { v7 = *(_QWORD *)(a2 + 40); if ( !*(_DWORD *)(v7 + v5) ) { module_var = js_create_module_var(a1, 0LL); if ( !module_var ) return v2; *(_QWORD *)(v7 + v5 - 8) = module_var; } v5 += 32LL; } } else { v9 = *(_QWORD *)(a2 + 104); v10 = *(_QWORD *)(a2 + 112); v11 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), 0xDu); if ( (_DWORD)v12 == 6 ) return v2; v22 = v12; v23 = v10; *(_QWORD *)(v11 + 48) = v9; ++*(_DWORD *)v9; v21 = v11; *(_OWORD *)(v11 + 56) = 0LL; if ( *(_DWORD *)(v9 + 92) ) { v13 = js_mallocz(a1, 8LL * *(int *)(v9 + 92)); if ( !v13 ) { LABEL_25: JS_FreeValue(a1, v21, v22); return v2; } v14 = v13; *(_QWORD *)(v21 + 56) = v13; for ( j = 0LL; j < *(int *)(v9 + 92); ++j ) { v16 = *(unsigned __int8 *)(*(_QWORD *)(v9 + 56) + 8 * j); if ( (v16 & 1) != 0 ) { v17 = js_create_module_var(a1, (v16 >> 3) & 1); if ( !v17 ) goto LABEL_25; *(_QWORD *)(v14 + 8 * j) = v17; } } } *(_QWORD *)(a2 + 104) = v21; *(_QWORD *)(a2 + 112) = v22; JS_FreeValue(a1, v9, v23); } *(_BYTE *)(a2 + 130) = 1; v18 = 8LL; v19 = -1LL; while ( ++v19 < *(int *)(a2 + 32) ) { v20 = *(_QWORD *)(*(_QWORD *)(a2 + 24) + v18); v18 += 16LL; if ( (int)js_create_module_function(a1, v20) < 0 ) return v2; } } return 0; }
js_create_module_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 CMP byte ptr [RSI + 0x82],0x0 JZ 0x0013bfcd LAB_0013bfba: XOR EBX,EBX LAB_0013bfbc: MOV EAX,EBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013bfcd: MOV R15,RSI MOV R14,RDI CMP qword ptr [RSI + 0x78],0x0 PUSH -0x1 POP RBX JZ 0x0013c01a PUSH 0x10 POP R12 XOR R13D,R13D LAB_0013bfe4: MOVSXD RAX,dword ptr [R15 + 0x30] CMP R13,RAX JGE 0x0013c0df MOV RBP,qword ptr [R15 + 0x28] CMP dword ptr [RBP + R12*0x1],0x0 JNZ 0x0013c011 MOV RDI,R14 XOR ESI,ESI CALL 0x0013c132 TEST RAX,RAX JZ 0x0013bfbc MOV qword ptr [RBP + R12*0x1 + -0x8],RAX LAB_0013c011: INC R13 ADD R12,0x20 JMP 0x0013bfe4 LAB_0013c01a: MOV R12,qword ptr [R15 + 0x68] MOV R13,qword ptr [R15 + 0x70] MOV RSI,qword ptr [R14 + 0x48] MOV RDX,qword ptr [R14 + 0x50] PUSH 0xd POP RCX MOV RDI,R14 CALL 0x0011b069 CMP EDX,0x6 JZ 0x0013bfbc MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x10],R13 MOV qword ptr [RAX + 0x30],R12 INC dword ptr [R12] XORPS XMM0,XMM0 MOV qword ptr [RSP],RAX MOVUPS xmmword ptr [RAX + 0x38],XMM0 MOVSXD RSI,dword ptr [R12 + 0x5c] TEST RSI,RSI JZ 0x0013c0be SHL RSI,0x3 MOV RDI,R14 CALL 0x00117241 TEST RAX,RAX JZ 0x0013c11c MOV RBP,RAX MOV RAX,qword ptr [RSP] ADD RAX,0x38 MOV qword ptr [RAX],RBP XOR R13D,R13D LAB_0013c087: MOVSXD RAX,dword ptr [R12 + 0x5c] CMP R13,RAX JGE 0x0013c0be MOV RAX,qword ptr [R12 + 0x38] MOVZX ESI,byte ptr [RAX + R13*0x8] TEST SIL,0x1 JZ 0x0013c0b9 SHR ESI,0x3 AND ESI,0x1 MOV RDI,R14 CALL 0x0013c132 TEST RAX,RAX JZ 0x0013c11c MOV qword ptr [RBP + R13*0x8],RAX LAB_0013c0b9: INC R13 JMP 0x0013c087 LAB_0013c0be: MOV RAX,qword ptr [RSP] MOV qword ptr [R15 + 0x68],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [R15 + 0x70],RAX MOV RDI,R14 MOV RSI,R12 MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011801e LAB_0013c0df: MOV byte ptr [R15 + 0x82],0x1 PUSH 0x8 POP R12 PUSH -0x1 POP R13 LAB_0013c0ef: MOVSXD RAX,dword ptr [R15 + 0x20] INC R13 CMP R13,RAX JGE 0x0013bfba MOV RAX,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RAX + R12*0x1] ADD R12,0x10 MOV RDI,R14 CALL 0x0013bfa3 TEST EAX,EAX JNS 0x0013c0ef JMP 0x0013bfbc LAB_0013c11c: MOV RDI,R14 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0011801e JMP 0x0013bfbc
int4 js_create_module_function(long param_1,long param_2) { int8 *puVar1; byte bVar2; int *piVar3; int8 uVar4; int iVar5; long lVar6; int4 uVar7; long lVar8; long lVar9; long lVar10; int1 auVar11 [16]; if (*(char *)(param_2 + 0x82) == '\0') { uVar7 = 0xffffffff; if (*(long *)(param_2 + 0x78) == 0) { piVar3 = *(int **)(param_2 + 0x68); uVar4 = *(int8 *)(param_2 + 0x70); auVar11 = JS_NewObjectProtoClass (param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50), 0xd); lVar8 = auVar11._0_8_; if (auVar11._8_4_ == 6) { return 0xffffffff; } *(int **)(lVar8 + 0x30) = piVar3; *piVar3 = *piVar3 + 1; *(int8 *)(lVar8 + 0x38) = 0; *(int8 *)(lVar8 + 0x40) = 0; if ((long)piVar3[0x17] != 0) { lVar9 = js_mallocz(param_1,(long)piVar3[0x17] << 3); if (lVar9 == 0) { LAB_0013c11c: JS_FreeValue(param_1,lVar8,auVar11._8_8_); return 0xffffffff; } *(long *)(lVar8 + 0x38) = lVar9; for (lVar10 = 0; lVar10 < piVar3[0x17]; lVar10 = lVar10 + 1) { bVar2 = *(byte *)(*(long *)(piVar3 + 0xe) + lVar10 * 8); if ((bVar2 & 1) != 0) { lVar6 = js_create_module_var(param_1,bVar2 >> 3 & 1); if (lVar6 == 0) goto LAB_0013c11c; *(long *)(lVar9 + lVar10 * 8) = lVar6; } } } *(int1 (*) [16])(param_2 + 0x68) = auVar11; JS_FreeValue(param_1,piVar3,uVar4); } else { lVar8 = 0x10; for (lVar9 = 0; lVar9 < *(int *)(param_2 + 0x30); lVar9 = lVar9 + 1) { lVar10 = *(long *)(param_2 + 0x28); if (*(int *)(lVar10 + lVar8) == 0) { lVar6 = js_create_module_var(param_1,0); if (lVar6 == 0) { return 0xffffffff; } *(long *)(lVar10 + -8 + lVar8) = lVar6; } lVar8 = lVar8 + 0x20; } } *(int1 *)(param_2 + 0x82) = 1; lVar8 = 8; lVar9 = -1; do { lVar9 = lVar9 + 1; if (*(int *)(param_2 + 0x20) <= lVar9) goto LAB_0013bfba; puVar1 = (int8 *)(*(long *)(param_2 + 0x18) + lVar8); lVar8 = lVar8 + 0x10; iVar5 = js_create_module_function(param_1,*puVar1); } while (-1 < iVar5); } else { LAB_0013bfba: uVar7 = 0; } return uVar7; }
25,354
CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/Option_inl.hpp
Option *Option::ignore_underscore(bool value) { if(!ignore_underscore_ && value) { ignore_underscore_ = value; auto *parent = static_cast<T *>(parent_); for(const Option_p &opt : parent->options_) { if(opt.get() == this) { continue; } const auto &omatch = opt->matching_name(*this); if(!omatch.empty()) { ignore_underscore_ = false; throw OptionAlreadyAdded("adding ignore underscore caused a name conflict with " + omatch); } } } else { ignore_underscore_ = value; } return this; }
O1
cpp
CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movb 0x22(%rdi), %al movb %sil, 0x22(%rdi) testl %esi, %esi je 0x1d529 testb %al, %al jne 0x1d529 movq 0x1f0(%rbx), %rax movq 0xd8(%rax), %r15 movq 0xe0(%rax), %r12 cmpq %r12, %r15 je 0x1d529 movq (%r15), %rdi cmpq %rbx, %rdi je 0x1d523 movq %rbx, %rsi callq 0x1be1a cmpq $0x0, 0x8(%rax) jne 0x1d539 addq $0x8, %r15 jmp 0x1d507 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movb $0x0, 0x22(%rbx) movl $0x38, %edi callq 0x71d0 movq %rax, %rbx leaq 0x1a243(%rip), %rsi # 0x37797 movq %rsp, %rdi movq %r14, %rdx callq 0x11ef8 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x1c110 xorl %ebp, %ebp leaq 0x2bf0a(%rip), %rsi # 0x49480 leaq 0xc487(%rip), %rdx # 0x29a04 movq %rbx, %rdi callq 0x7750 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1d5ab movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x1d5ab movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x1d5b8 movq %rbx, %rdi callq 0x7310 movq %r14, %rdi callq 0x7780
_ZN3CLI6Option17ignore_underscoreINS_3AppEEEPS0_b: push rbp; __int64 push r15; int push r14; int push r12; int push rbx; __int64 sub rsp, 20h mov rbx, rdi mov al, [rdi+22h] mov [rdi+22h], sil test esi, esi jz short loc_1D529 test al, al jnz short loc_1D529 mov rax, [rbx+1F0h] mov r15, [rax+0D8h] mov r12, [rax+0E0h] loc_1D507: cmp r15, r12 jz short loc_1D529 mov rdi, [r15]; int cmp rdi, rbx jz short loc_1D523 mov rsi, rbx; int call _ZNK3CLI6Option13matching_nameB5cxx11ERKS0_; CLI::Option::matching_name(CLI::Option const&) cmp qword ptr [rax+8], 0 jnz short loc_1D539 loc_1D523: add r15, 8 jmp short loc_1D507 loc_1D529: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1D539: mov r14, rax mov byte ptr [rbx+22h], 0 mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aAddingIgnoreUn; "adding ignore underscore caused a name "... mov rdi, rsp mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 mov rsi, rsp mov rdi, rbx; int call _ZN3CLI18OptionAlreadyAddedC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::OptionAlreadyAdded::OptionAlreadyAdded(std::string) xor ebp, ebp lea rsi, _ZTIN3CLI18OptionAlreadyAddedE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1D5AB mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1D5AB mov r14, rax mov bpl, 1 loc_1D5AB: test bpl, bpl jz short loc_1D5B8 mov rdi, rbx; void * call ___cxa_free_exception loc_1D5B8: mov rdi, r14 call __Unwind_Resume
long long CLI::Option::ignore_underscore<CLI::App>(long long a1, int a2) { char v2; // al long long v3; // rax long long *v4; // r15 long long *v5; // r12 long long *v6; // rax long long *v8; // r14 void *exception; // rbx _BYTE v10[16]; // [rsp+0h] [rbp-48h] BYREF v2 = *(_BYTE *)(a1 + 34); *(_BYTE *)(a1 + 34) = a2; if ( a2 && !v2 ) { v3 = *(_QWORD *)(a1 + 496); v4 = *(long long **)(v3 + 216); v5 = *(long long **)(v3 + 224); while ( v4 != v5 ) { if ( *v4 != a1 ) { v6 = CLI::Option::matching_name[abi:cxx11](*v4, (_QWORD *)a1); if ( v6[1] ) { v8 = v6; *(_BYTE *)(a1 + 34) = 0; exception = __cxa_allocate_exception(0x38uLL); std::operator+<char>((long long)v10, (long long)"adding ignore underscore caused a name conflict with ", v8); CLI::OptionAlreadyAdded::OptionAlreadyAdded((int)exception, (long long)v10); __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::OptionAlreadyAdded, CLI::Error::~Error); } } ++v4; } } return a1; }
ignore_underscore<CLI::App>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV AL,byte ptr [RDI + 0x22] MOV byte ptr [RDI + 0x22],SIL TEST ESI,ESI JZ 0x0011d529 TEST AL,AL JNZ 0x0011d529 MOV RAX,qword ptr [RBX + 0x1f0] MOV R15,qword ptr [RAX + 0xd8] MOV R12,qword ptr [RAX + 0xe0] LAB_0011d507: CMP R15,R12 JZ 0x0011d529 MOV RDI,qword ptr [R15] CMP RDI,RBX JZ 0x0011d523 MOV RSI,RBX CALL 0x0011be1a CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0011d539 LAB_0011d523: ADD R15,0x8 JMP 0x0011d507 LAB_0011d529: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011d539: MOV R14,RAX MOV byte ptr [RBX + 0x22],0x0 MOV EDI,0x38 CALL 0x001071d0 MOV RBX,RAX LAB_0011d54d: LEA RSI,[0x137797] MOV RDI,RSP MOV RDX,R14 CALL 0x00111ef8 MOV BPL,0x1 LAB_0011d562: MOV RSI,RSP MOV RDI,RBX CALL 0x0011c110 XOR EBP,EBP LEA RSI,[0x149480] LEA RDX,[0x129a04] MOV RDI,RBX CALL 0x00107750
/* CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool) */ Option * __thiscall CLI::Option::ignore_underscore<CLI::App>(Option *this,bool param_1) { Option OVar1; int8 *puVar2; long lVar3; OptionAlreadyAdded *pOVar4; int7 in_register_00000031; int8 *puVar5; char acStack_48 [32]; OVar1 = this[0x22]; this[0x22] = (Option)param_1; if (((int)CONCAT71(in_register_00000031,param_1) != 0) && (OVar1 == (Option)0x0)) { puVar2 = *(int8 **)(*(long *)(this + 0x1f0) + 0xe0); for (puVar5 = *(int8 **)(*(long *)(this + 0x1f0) + 0xd8); puVar5 != puVar2; puVar5 = puVar5 + 1) { if ((Option *)*puVar5 != this) { lVar3 = matching_name_abi_cxx11_((Option *)*puVar5,this); if (*(long *)(lVar3 + 8) != 0) { this[0x22] = (Option)0x0; pOVar4 = (OptionAlreadyAdded *)__cxa_allocate_exception(0x38); /* try { // try from 0011d54d to 0011d55e has its CatchHandler @ 0011d5a5 */ std::operator+(acStack_48, (string *)"adding ignore underscore caused a name conflict with "); /* try { // try from 0011d562 to 0011d584 has its CatchHandler @ 0011d585 */ OptionAlreadyAdded::OptionAlreadyAdded(pOVar4,acStack_48); /* WARNING: Subroutine does not return */ __cxa_throw(pOVar4,&OptionAlreadyAdded::typeinfo,Error::~Error); } } } } return this; }
25,355
PFS_account::aggregate_waits(PFS_user*, PFS_host*)
eloqsql/storage/perfschema/pfs_account.cc
void PFS_account::aggregate_waits(PFS_user *safe_user, PFS_host *safe_host) { if (read_instr_class_waits_stats() == NULL) return; if (likely(safe_user != NULL && safe_host != NULL)) { /* Aggregate EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: - EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME - EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME in parallel. */ aggregate_all_event_names(write_instr_class_waits_stats(), safe_user->write_instr_class_waits_stats(), safe_host->write_instr_class_waits_stats()); return; } if (safe_user != NULL) { /* Aggregate EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: - EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME */ aggregate_all_event_names(write_instr_class_waits_stats(), safe_user->write_instr_class_waits_stats()); return; } if (safe_host != NULL) { /* Aggregate EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: - EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME */ aggregate_all_event_names(write_instr_class_waits_stats(), safe_host->write_instr_class_waits_stats()); return; } /* Orphan account, no parent to aggregate to. */ reset_waits_stats(); return; }
O3
cpp
PFS_account::aggregate_waits(PFS_user*, PFS_host*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq 0x8(%rdi), %rbx testq %rbx, %rbx setne %al andb (%rdi), %al cmpb $0x1, %al jne 0x4516b movq %rdx, %r14 movq %rsi, %r15 testq %rsi, %rsi je 0x45176 testq %r14, %r14 je 0x45176 testb $0x1, (%r15) jne 0x4513c movq %r15, %rdi callq 0x46378 movb $0x1, (%r15) movq 0x8(%r15), %r15 cmpb $0x0, (%r14) jne 0x45152 movq %r14, %rdi callq 0x46378 movb $0x1, (%r14) movq 0x8(%r14), %rdx movq %rbx, %rdi movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x37866 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq testq %r15, %r15 je 0x45193 testb $0x1, (%r15) jne 0x4518d movq %r15, %rdi callq 0x46378 movb $0x1, (%r15) movq 0x8(%r15), %rsi jmp 0x451ae testq %r14, %r14 je 0x451c0 testb $0x1, (%r14) jne 0x451aa movq %r14, %rdi callq 0x46378 movb $0x1, (%r14) movq 0x8(%r14), %rsi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x377f0 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x46378 nop
_ZN11PFS_account15aggregate_waitsEP8PFS_userP8PFS_host: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, [rdi+8] test rbx, rbx setnz al and al, [rdi] cmp al, 1 jnz short loc_4516B mov r14, rdx mov r15, rsi test rsi, rsi jz short loc_45176 test r14, r14 jz short loc_45176 test byte ptr [r15], 1 jnz short loc_4513C mov rdi, r15; this call _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void) mov byte ptr [r15], 1 loc_4513C: mov r15, [r15+8] cmp byte ptr [r14], 0 jnz short loc_45152 mov rdi, r14; this call _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void) mov byte ptr [r14], 1 loc_45152: mov rdx, [r14+8] mov rdi, rbx mov rsi, r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _Z25aggregate_all_event_namesP15PFS_single_statS0_S0_; aggregate_all_event_names(PFS_single_stat *,PFS_single_stat *,PFS_single_stat *) loc_4516B: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_45176: test r15, r15 jz short loc_45193 test byte ptr [r15], 1 jnz short loc_4518D mov rdi, r15; this call _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void) mov byte ptr [r15], 1 loc_4518D: mov rsi, [r15+8] jmp short loc_451AE loc_45193: test r14, r14 jz short loc_451C0 test byte ptr [r14], 1 jnz short loc_451AA mov rdi, r14; this call _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void) mov byte ptr [r14], 1 loc_451AA: mov rsi, [r14+8] loc_451AE: mov rdi, rbx; this add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _Z25aggregate_all_event_namesP15PFS_single_statS0_; aggregate_all_event_names(PFS_single_stat *,PFS_single_stat *) loc_451C0: add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void)
char PFS_account::aggregate_waits(PFS_account *this, PFS_user *a2, PFS_host *a3) { _QWORD *v3; // rbx char result; // al long long v6; // r15 long long v7; // rsi v3 = (_QWORD *)*((_QWORD *)this + 1); result = *(_BYTE *)this & (v3 != 0LL); if ( result == 1 ) { if ( !a2 || !a3 ) { if ( a2 ) { if ( (*(_BYTE *)a2 & 1) == 0 ) { PFS_connection_slice::reset_waits_stats(a2); *(_BYTE *)a2 = 1; } v7 = *((_QWORD *)a2 + 1); } else { if ( !a3 ) return PFS_connection_slice::reset_waits_stats(this); if ( (*(_BYTE *)a3 & 1) == 0 ) { PFS_connection_slice::reset_waits_stats(a3); *(_BYTE *)a3 = 1; } v7 = *((_QWORD *)a3 + 1); } return aggregate_all_event_names(v3, v7); } if ( (*(_BYTE *)a2 & 1) == 0 ) { PFS_connection_slice::reset_waits_stats(a2); *(_BYTE *)a2 = 1; } v6 = *((_QWORD *)a2 + 1); if ( !*(_BYTE *)a3 ) { PFS_connection_slice::reset_waits_stats(a3); *(_BYTE *)a3 = 1; } return aggregate_all_event_names((long long)v3, v6, *((_QWORD *)a3 + 1)); } return result; }
aggregate_waits: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,qword ptr [RDI + 0x8] TEST RBX,RBX SETNZ AL AND AL,byte ptr [RDI] CMP AL,0x1 JNZ 0x0014516b MOV R14,RDX MOV R15,RSI TEST RSI,RSI JZ 0x00145176 TEST R14,R14 JZ 0x00145176 TEST byte ptr [R15],0x1 JNZ 0x0014513c MOV RDI,R15 CALL 0x00146378 MOV byte ptr [R15],0x1 LAB_0014513c: MOV R15,qword ptr [R15 + 0x8] CMP byte ptr [R14],0x0 JNZ 0x00145152 MOV RDI,R14 CALL 0x00146378 MOV byte ptr [R14],0x1 LAB_00145152: MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00137866 LAB_0014516b: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00145176: TEST R15,R15 JZ 0x00145193 TEST byte ptr [R15],0x1 JNZ 0x0014518d MOV RDI,R15 CALL 0x00146378 MOV byte ptr [R15],0x1 LAB_0014518d: MOV RSI,qword ptr [R15 + 0x8] JMP 0x001451ae LAB_00145193: TEST R14,R14 JZ 0x001451c0 TEST byte ptr [R14],0x1 JNZ 0x001451aa MOV RDI,R14 CALL 0x00146378 MOV byte ptr [R14],0x1 LAB_001451aa: MOV RSI,qword ptr [R14 + 0x8] LAB_001451ae: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001377f0 LAB_001451c0: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00146378
/* PFS_account::aggregate_waits(PFS_user*, PFS_host*) */ void __thiscall PFS_account::aggregate_waits(PFS_account *this,PFS_user *param_1,PFS_host *param_2) { PFS_single_stat *pPVar1; PFS_single_stat *pPVar2; pPVar1 = *(PFS_single_stat **)(this + 8); if ((pPVar1 != (PFS_single_stat *)0x0 & (byte)*this) != 1) { return; } if ((param_1 != (PFS_user *)0x0) && (param_2 != (PFS_host *)0x0)) { if (((byte)*param_1 & 1) == 0) { PFS_connection_slice::reset_waits_stats((PFS_connection_slice *)param_1); *param_1 = (PFS_user)0x1; } pPVar2 = *(PFS_single_stat **)(param_1 + 8); if (*param_2 == (PFS_host)0x0) { PFS_connection_slice::reset_waits_stats((PFS_connection_slice *)param_2); *param_2 = (PFS_host)0x1; } aggregate_all_event_names(pPVar1,pPVar2,*(PFS_single_stat **)(param_2 + 8)); return; } if (param_1 == (PFS_user *)0x0) { if (param_2 == (PFS_host *)0x0) { PFS_connection_slice::reset_waits_stats((PFS_connection_slice *)this); return; } if (((byte)*param_2 & 1) == 0) { PFS_connection_slice::reset_waits_stats((PFS_connection_slice *)param_2); *param_2 = (PFS_host)0x1; } pPVar2 = *(PFS_single_stat **)(param_2 + 8); } else { if (((byte)*param_1 & 1) == 0) { PFS_connection_slice::reset_waits_stats((PFS_connection_slice *)param_1); *param_1 = (PFS_user)0x1; } pPVar2 = *(PFS_single_stat **)(param_1 + 8); } aggregate_all_event_names(pPVar1,pPVar2); return; }
25,356
check_struct_option
eloqsql/mysys/my_getopt.c
static char *check_struct_option(char *cur_arg, char *key_name) { char *ptr, *end; DBUG_ENTER("check_struct_option"); ptr= strcend(cur_arg + 1, '.'); /* Skip the first character */ end= strcend(cur_arg, '='); /* If the first dot is after an equal sign, then it is part of a variable value and the option is not a struct option. Also, if the last character in the string before the ending NULL, or the character right before equal sign is the first dot found, the option is not a struct option. */ if (end - ptr > 1) { uint len= (uint) (ptr - cur_arg); set_if_smaller(len, FN_REFLEN-1); strmake(key_name, cur_arg, len); DBUG_RETURN(++ptr); } else { key_name[0]= 0; DBUG_RETURN(cur_arg); } }
O0
c
check_struct_option: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi addq $0x1, %rdi movl $0x2e, %esi callq 0xc61f0 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movl $0x3d, %esi callq 0xc61f0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x20(%rbp), %rcx subq %rcx, %rax cmpq $0x1, %rax jle 0x7870d movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movl %eax, -0x2c(%rbp) cmpl $0x1ff, -0x2c(%rbp) # imm = 0x1FF jbe 0x786e7 movl $0x1ff, -0x2c(%rbp) # imm = 0x1FF jmp 0x786e9 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x2c(%rbp), %eax movl %eax, %edx callq 0xc62d0 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq %rax, -0x8(%rbp) jmp 0x7871c movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
check_struct_option: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] add rdi, 1 mov esi, 2Eh ; '.' call strcend mov [rbp+var_20], rax mov rdi, [rbp+var_10] mov esi, 3Dh ; '=' call strcend mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_20] sub rax, rcx cmp rax, 1 jle short loc_7870D mov rax, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_2C], eax cmp [rbp+var_2C], 1FFh jbe short loc_786E7 mov [rbp+var_2C], 1FFh loc_786E7: jmp short $+2 loc_786E9: mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] mov eax, [rbp+var_2C] mov edx, eax call strmake mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov [rbp+var_8], rax jmp short loc_7871C loc_7870D: mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_7871C: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long check_struct_option(long long a1, _BYTE *a2) { unsigned int v3; // [rsp+4h] [rbp-2Ch] long long v4; // [rsp+10h] [rbp-20h] v4 = strcend(a1 + 1, 46LL); if ( strcend(a1, 61LL) - v4 <= 1 ) { *a2 = 0; return a1; } else { v3 = v4 - a1; if ( (unsigned int)(v4 - a1) > 0x1FF ) v3 = 511; strmake(a2, a1, v3); return v4 + 1; } }
check_struct_option: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x1 MOV ESI,0x2e CALL 0x001c61f0 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x3d CALL 0x001c61f0 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,RCX CMP RAX,0x1 JLE 0x0017870d MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x1ff JBE 0x001786e7 MOV dword ptr [RBP + -0x2c],0x1ff LAB_001786e7: JMP 0x001786e9 LAB_001786e9: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x2c] MOV EDX,EAX CALL 0x001c62d0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x8],RAX JMP 0x0017871c LAB_0017870d: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0017871c: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long check_struct_option(long param_1,int1 *param_2) { long lVar1; int4 local_34; int8 local_10; local_10 = strcend(param_1 + 1,0x2e); lVar1 = strcend(param_1,0x3d); if (lVar1 - local_10 < 2) { *param_2 = 0; local_10 = param_1; } else { local_34 = (int)local_10 - (int)param_1; if (0x1ff < local_34) { local_34 = 0x1ff; } strmake(param_2,param_1,local_34); local_10 = local_10 + 1; } return local_10; }
25,357
google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*, int, unsigned char*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc
uint8_t* EpsCopyOutputStream::WriteRawFallback(const void* data, int size, uint8_t* ptr) { int s = GetSize(ptr); while (s < size) { std::memcpy(ptr, data, s); size -= s; data = static_cast<const uint8_t*>(data) + s; ptr = EnsureSpaceFallback(ptr + s); s = GetSize(ptr); } std::memcpy(ptr, data, size); return ptr + size; }
O3
cpp
google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*, int, unsigned char*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movl %edx, %ebp movq %rsi, %r14 movq (%rdi), %rax subq %rcx, %rax addq $0x10, %rax cmpl %edx, %eax jge 0xfb412 movq %rdi, %r15 subl %eax, %ebp movslq %eax, %r12 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x1f400 addq %r12, %r14 addq %r12, %rbx movq %r15, %rdi movq %rbx, %rsi callq 0x202fc movq %rax, %rbx movq (%r15), %rax subq %rbx, %rax addq $0x10, %rax cmpl %eax, %ebp jg 0xfb3dd movslq %ebp, %r15 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1f400 addq %r15, %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN6google8protobuf2io19EpsCopyOutputStream16WriteRawFallbackEPKviPh: push rbp push r15 push r14 push r12 push rbx mov rbx, rcx mov ebp, edx mov r14, rsi mov rax, [rdi] sub rax, rcx add rax, 10h cmp eax, edx jge short loc_FB412 mov r15, rdi loc_FB3DD: sub ebp, eax movsxd r12, eax mov rdi, rbx mov rsi, r14 mov rdx, r12 call _memcpy add r14, r12 add rbx, r12 mov rdi, r15; this mov rsi, rbx; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *) mov rbx, rax mov rax, [r15] sub rax, rbx add rax, 10h cmp ebp, eax jg short loc_FB3DD loc_FB412: movsxd r15, ebp mov rdi, rbx mov rsi, r14 mov rdx, r15 call _memcpy add rbx, r15 mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
char * google::protobuf::io::EpsCopyOutputStream::WriteRawFallback( google::protobuf::io::EpsCopyOutputStream *this, char *a2, int a3, char *a4) { char *v4; // rbx int v5; // ebp long long v7; // rax long long v8; // r12 v4 = a4; v5 = a3; v7 = *(_QWORD *)this - (_QWORD)a4 + 16LL; if ( (int)v7 < a3 ) { do { v5 -= v7; v8 = (int)v7; memcpy(v4, a2, (int)v7); a2 += v8; v4 = google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(this, (unsigned __int8 *)&v4[v8]); v7 = *(_QWORD *)this - (_QWORD)v4 + 16LL; } while ( v5 > (int)v7 ); } memcpy(v4, a2, v5); return &v4[v5]; }
WriteRawFallback: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV EBP,EDX MOV R14,RSI MOV RAX,qword ptr [RDI] SUB RAX,RCX ADD RAX,0x10 CMP EAX,EDX JGE 0x001fb412 MOV R15,RDI LAB_001fb3dd: SUB EBP,EAX MOVSXD R12,EAX MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 CALL 0x0011f400 ADD R14,R12 ADD RBX,R12 MOV RDI,R15 MOV RSI,RBX CALL 0x001202fc MOV RBX,RAX MOV RAX,qword ptr [R15] SUB RAX,RBX ADD RAX,0x10 CMP EBP,EAX JG 0x001fb3dd LAB_001fb412: MOVSXD R15,EBP MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011f400 ADD RBX,R15 MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*, int, unsigned char*) */ uchar * __thiscall google::protobuf::io::EpsCopyOutputStream::WriteRawFallback (EpsCopyOutputStream *this,void *param_1,int param_2,uchar *param_3) { long lVar1; size_t __n; lVar1 = (*(long *)this - (long)param_3) + 0x10; if ((int)lVar1 < param_2) { do { param_2 = param_2 - (int)lVar1; __n = (size_t)(int)lVar1; memcpy(param_3,param_1,__n); param_1 = (void *)((long)param_1 + __n); param_3 = (uchar *)EnsureSpaceFallback(this,param_3 + __n); lVar1 = (*(long *)this - (long)param_3) + 0x10; } while ((int)lVar1 < param_2); } memcpy(param_3,param_1,(long)param_2); return param_3 + param_2; }
25,358
unreg_request
eloqsql/storage/maria/ma_pagecache.c
static void unreg_request(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, int at_end) { DBUG_ENTER("unreg_request"); DBUG_PRINT("enter", ("block %p (%u) status: %x requests: %u", block, PCBLOCK_NUMBER(pagecache, block), block->status, block->requests)); PCBLOCK_INFO(block); DBUG_ASSERT(block->requests > 0); if (! --block->requests) { my_bool hot; if (block->hits_left) block->hits_left--; hot= !block->hits_left && at_end && pagecache->warm_blocks > pagecache->min_warm_blocks; if (hot) { if (block->temperature == PCBLOCK_WARM) pagecache->warm_blocks--; block->temperature= PCBLOCK_HOT; KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %zu", pagecache->warm_blocks)); } link_block(pagecache, block, hot, (my_bool)at_end); block->last_hit_time= pagecache->time; pagecache->time++; block= pagecache->used_ins; /* Check if we should link a hot block to the warm block */ if (block && pagecache->time - block->last_hit_time > pagecache->age_threshold) { unlink_block(pagecache, block); link_block(pagecache, block, 0, 0); if (block->temperature != PCBLOCK_WARM) { pagecache->warm_blocks++; block->temperature= PCBLOCK_WARM; } KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %zu", pagecache->warm_blocks)); } } DBUG_VOID_RETURN; }
O3
c
unreg_request: decl 0x60(%rsi) je 0x3dad5 retq pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movl 0x80(%rsi), %eax testl %eax, %eax je 0x3dafa decl %eax movl %eax, 0x80(%r14) sete %al jmp 0x3dafc movb $0x1, %al testl %edx, %edx sete %cl xorb $0x1, %al orb %cl, %al jne 0x3db54 movq 0x60(%rbx), %rax cmpq 0x8(%rbx), %rax jbe 0x3db54 cmpl $0x1, 0x78(%r14) jne 0x3db1f decq %rax movq %rax, 0x60(%rbx) movl $0x2, 0x78(%r14) movq 0xc0(%rbx), %rax testq %rax, %rax je 0x3dbbb movq (%rax), %rcx movq %r14, 0x8(%rcx) movq (%rax), %rcx movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rax) movq %r14, 0xc0(%rbx) jmp 0x3db64 movsbl %dl, %ecx movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x40a9d movq 0x18(%rbx), %rax movq %rax, 0x40(%r14) incq %rax movq %rax, 0x18(%rbx) movq 0xc0(%rbx), %r14 testq %r14, %r14 je 0x3dbb6 subq 0x40(%r14), %rax cmpq 0x10(%rbx), %rax jbe 0x3dbb6 movq %rbx, %rdi movq %r14, %rsi callq 0x40941 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0x40a9d cmpl $0x1, 0x78(%r14) je 0x3dbb6 incq 0x60(%rbx) movl $0x1, 0x78(%r14) popq %rbx popq %r14 popq %rbp retq movq %r14, (%r14) movq %r14, 0xc0(%rbx) movq %r14, 0xb8(%rbx) movq %r14, 0x8(%r14) jmp 0x3db64
unreg_request: dec dword ptr [rsi+60h] jz short loc_3DAD5 retn loc_3DAD5: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi mov eax, [rsi+80h] test eax, eax jz short loc_3DAFA dec eax mov [r14+80h], eax setz al jmp short loc_3DAFC loc_3DAFA: mov al, 1 loc_3DAFC: test edx, edx setz cl xor al, 1 or al, cl jnz short loc_3DB54 mov rax, [rbx+60h] cmp rax, [rbx+8] jbe short loc_3DB54 cmp dword ptr [r14+78h], 1 jnz short loc_3DB1F dec rax mov [rbx+60h], rax loc_3DB1F: mov dword ptr [r14+78h], 2 mov rax, [rbx+0C0h] test rax, rax jz loc_3DBBB mov rcx, [rax] mov [rcx+8], r14 mov rcx, [rax] mov [r14], rcx mov [r14+8], rax mov [rax], r14 mov [rbx+0C0h], r14 jmp short loc_3DB64 loc_3DB54: movsx ecx, dl mov rdi, rbx mov rsi, r14 xor edx, edx call link_block loc_3DB64: mov rax, [rbx+18h] mov [r14+40h], rax inc rax mov [rbx+18h], rax mov r14, [rbx+0C0h] test r14, r14 jz short loc_3DBB6 sub rax, [r14+40h] cmp rax, [rbx+10h] jbe short loc_3DBB6 mov rdi, rbx mov rsi, r14 call unlink_block mov rdi, rbx mov rsi, r14 xor edx, edx xor ecx, ecx call link_block cmp dword ptr [r14+78h], 1 jz short loc_3DBB6 inc qword ptr [rbx+60h] mov dword ptr [r14+78h], 1 loc_3DBB6: pop rbx pop r14 pop rbp retn loc_3DBBB: mov [r14], r14 mov [rbx+0C0h], r14 mov [rbx+0B8h], r14 mov [r14+8], r14 jmp short loc_3DB64
void unreg_request(_QWORD *a1, long long a2, int a3) { int v4; // eax int v5; // eax bool v6; // al unsigned long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // r14 if ( (*(_DWORD *)(a2 + 96))-- == 1 ) { v4 = *(_DWORD *)(a2 + 128); if ( v4 ) { v5 = v4 - 1; *(_DWORD *)(a2 + 128) = v5; v6 = v5 == 0; } else { v6 = 1; } if ( a3 == 0 || !v6 || (v7 = a1[12], v7 <= a1[1]) ) { link_block(a1, a2, 0LL, (unsigned int)(char)a3); } else { if ( *(_DWORD *)(a2 + 120) == 1 ) a1[12] = v7 - 1; *(_DWORD *)(a2 + 120) = 2; v8 = a1[24]; if ( v8 ) { *(_QWORD *)(*(_QWORD *)v8 + 8LL) = a2; *(_QWORD *)a2 = *(_QWORD *)v8; *(_QWORD *)(a2 + 8) = v8; *(_QWORD *)v8 = a2; a1[24] = a2; } else { *(_QWORD *)a2 = a2; a1[24] = a2; a1[23] = a2; *(_QWORD *)(a2 + 8) = a2; } } v9 = a1[3]; *(_QWORD *)(a2 + 64) = v9; v10 = v9 + 1; a1[3] = v10; v11 = a1[24]; if ( v11 && (unsigned long long)(v10 - *(_QWORD *)(v11 + 64)) > a1[2] ) { unlink_block(a1, a1[24]); link_block(a1, v11, 0LL, 0LL); if ( *(_DWORD *)(v11 + 120) != 1 ) { ++a1[12]; *(_DWORD *)(v11 + 120) = 1; } } } }
unreg_request: DEC dword ptr [RSI + 0x60] JZ 0x0013dad5 RET LAB_0013dad5: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV EAX,dword ptr [RSI + 0x80] TEST EAX,EAX JZ 0x0013dafa DEC EAX MOV dword ptr [R14 + 0x80],EAX SETZ AL JMP 0x0013dafc LAB_0013dafa: MOV AL,0x1 LAB_0013dafc: TEST EDX,EDX SETZ CL XOR AL,0x1 OR AL,CL JNZ 0x0013db54 MOV RAX,qword ptr [RBX + 0x60] CMP RAX,qword ptr [RBX + 0x8] JBE 0x0013db54 CMP dword ptr [R14 + 0x78],0x1 JNZ 0x0013db1f DEC RAX MOV qword ptr [RBX + 0x60],RAX LAB_0013db1f: MOV dword ptr [R14 + 0x78],0x2 MOV RAX,qword ptr [RBX + 0xc0] TEST RAX,RAX JZ 0x0013dbbb MOV RCX,qword ptr [RAX] MOV qword ptr [RCX + 0x8],R14 MOV RCX,qword ptr [RAX] MOV qword ptr [R14],RCX MOV qword ptr [R14 + 0x8],RAX MOV qword ptr [RAX],R14 MOV qword ptr [RBX + 0xc0],R14 JMP 0x0013db64 LAB_0013db54: MOVSX ECX,DL MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00140a9d LAB_0013db64: MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [R14 + 0x40],RAX INC RAX MOV qword ptr [RBX + 0x18],RAX MOV R14,qword ptr [RBX + 0xc0] TEST R14,R14 JZ 0x0013dbb6 SUB RAX,qword ptr [R14 + 0x40] CMP RAX,qword ptr [RBX + 0x10] JBE 0x0013dbb6 MOV RDI,RBX MOV RSI,R14 CALL 0x00140941 MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX XOR ECX,ECX CALL 0x00140a9d CMP dword ptr [R14 + 0x78],0x1 JZ 0x0013dbb6 INC qword ptr [RBX + 0x60] MOV dword ptr [R14 + 0x78],0x1 LAB_0013dbb6: POP RBX POP R14 POP RBP RET LAB_0013dbbb: MOV qword ptr [R14],R14 MOV qword ptr [RBX + 0xc0],R14 MOV qword ptr [RBX + 0xb8],R14 MOV qword ptr [R14 + 0x8],R14 JMP 0x0013db64
void unreg_request(long param_1,long *param_2,int param_3) { long *plVar1; long lVar2; int iVar3; long lVar4; bool bVar5; plVar1 = param_2 + 0xc; *(int *)plVar1 = (int)*plVar1 + -1; if ((int)*plVar1 != 0) { return; } if ((int)param_2[0x10] == 0) { bVar5 = true; } else { iVar3 = (int)param_2[0x10] + -1; bVar5 = iVar3 == 0; *(int *)(param_2 + 0x10) = iVar3; } if (((bool)(bVar5 ^ 1U | param_3 == 0)) || (*(ulong *)(param_1 + 0x60) <= *(ulong *)(param_1 + 8)) ) { link_block(param_1,param_2,0,(int)(char)param_3); } else { if ((int)param_2[0xf] == 1) { *(ulong *)(param_1 + 0x60) = *(ulong *)(param_1 + 0x60) - 1; } *(int4 *)(param_2 + 0xf) = 2; plVar1 = *(long **)(param_1 + 0xc0); if (plVar1 == (long *)0x0) { *param_2 = (long)param_2; *(long **)(param_1 + 0xc0) = param_2; *(long **)(param_1 + 0xb8) = param_2; param_2[1] = (long)param_2; } else { *(long **)(*plVar1 + 8) = param_2; *param_2 = *plVar1; param_2[1] = (long)plVar1; *plVar1 = (long)param_2; *(long **)(param_1 + 0xc0) = param_2; } } lVar4 = *(long *)(param_1 + 0x18); param_2[8] = lVar4; lVar4 = lVar4 + 1; *(long *)(param_1 + 0x18) = lVar4; lVar2 = *(long *)(param_1 + 0xc0); if ((lVar2 != 0) && (*(ulong *)(param_1 + 0x10) < (ulong)(lVar4 - *(long *)(lVar2 + 0x40)))) { unlink_block(param_1,lVar2); link_block(param_1,lVar2,0,0); if (*(int *)(lVar2 + 0x78) != 1) { *(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + 1; *(int4 *)(lVar2 + 0x78) = 1; } } return; }
25,359
Item_char_typecast::adjusted_length_with_warn(unsigned int)
eloqsql/sql/item_timefunc.cc
uint Item_char_typecast::adjusted_length_with_warn(uint length) { if (length <= current_thd->variables.max_allowed_packet) return length; THD *thd= current_thd; push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WARN_ALLOWED_PACKET_OVERFLOWED, ER_THD(thd, ER_WARN_ALLOWED_PACKET_OVERFLOWED), cast_cs == &my_charset_bin ? "cast_as_binary" : func_name(), thd->variables.max_allowed_packet); return thd->variables.max_allowed_packet; }
O0
cpp
Item_char_typecast::adjusted_length_with_warn(unsigned int): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movl -0x14(%rbp), %eax movq %rax, -0x28(%rbp) callq 0x88f160 movq %rax, %rcx movq -0x28(%rbp), %rax cmpq 0x978(%rcx), %rax ja 0xe0708e movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xe0711f callq 0x88f160 movq %rax, %rcx movq -0x30(%rbp), %rax movq %rcx, -0x20(%rbp) movq -0x20(%rbp), %rcx movq %rcx, -0x40(%rbp) movq -0x20(%rbp), %rcx movq 0xb90(%rcx), %rcx movq (%rcx), %rcx movq 0x968(%rcx), %rcx movq %rcx, -0x38(%rbp) leaq 0xd84d4a(%rip), %rcx # 0x1b8be10 cmpq %rcx, 0xb8(%rax) jne 0xe070dc leaq 0x63ce9c(%rip), %rax # 0x1443f72 movq %rax, -0x48(%rbp) jmp 0xe070e9 movq -0x30(%rbp), %rdi callq 0x9d2420 movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rcx movq -0x40(%rbp), %rdi movq -0x48(%rbp), %r8 movq -0x20(%rbp), %rax movq 0x978(%rax), %r9 movl $0x1, %esi movl $0x515, %edx # imm = 0x515 movb $0x0, %al callq 0x999510 movq -0x20(%rbp), %rax movq 0x978(%rax), %rax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN18Item_char_typecast25adjusted_length_with_warnEj: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rax, [rbp+var_10] mov [rbp+var_30], rax mov eax, [rbp+var_14] mov [rbp+var_28], rax call _current_thd mov rcx, rax mov rax, [rbp+var_28] cmp rax, [rcx+978h] ja short loc_E0708E mov eax, [rbp+var_14] mov [rbp+var_4], eax jmp loc_E0711F loc_E0708E: call _current_thd mov rcx, rax mov rax, [rbp+var_30] mov [rbp+var_20], rcx mov rcx, [rbp+var_20] mov [rbp+var_40], rcx mov rcx, [rbp+var_20] mov rcx, [rcx+0B90h] mov rcx, [rcx] mov rcx, [rcx+968h] mov [rbp+var_38], rcx lea rcx, my_charset_bin cmp [rax+0B8h], rcx jnz short loc_E070DC lea rax, aCastAsBinary; "cast_as_binary" mov [rbp+var_48], rax jmp short loc_E070E9 loc_E070DC: mov rdi, [rbp+var_30]; this call _ZNK16Item_func_or_sum9func_nameEv; Item_func_or_sum::func_name(void) mov [rbp+var_48], rax loc_E070E9: mov rcx, [rbp+var_38] mov rdi, [rbp+var_40] mov r8, [rbp+var_48] mov rax, [rbp+var_20] mov r9, [rax+978h] mov esi, 1 mov edx, 515h mov al, 0 call _Z19push_warning_printfP3THDN21Sql_state_errno_level18enum_warning_levelEjPKcz; push_warning_printf(THD *,Sql_state_errno_level::enum_warning_level,uint,char const*,...) mov rax, [rbp+var_20] mov rax, [rax+978h] mov [rbp+var_4], eax loc_E0711F: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long Item_char_typecast::adjusted_length_with_warn(Item_char_typecast *this, unsigned int a2) { long long v2; // rcx long long v4; // [rsp+8h] [rbp-48h] THD *v5; // [rsp+10h] [rbp-40h] long long v6; // [rsp+18h] [rbp-38h] long long v7; // [rsp+30h] [rbp-20h] if ( (unsigned long long)a2 > *(_QWORD *)(current_thd() + 2424) ) { v2 = current_thd(); v7 = v2; v5 = (THD *)v2; v6 = *(_QWORD *)(**(_QWORD **)(v2 + 2960) + 2408LL); if ( *((_UNKNOWN **)this + 23) == &my_charset_bin ) { push_warning_printf((THD *)v2, 1u, 0x515u, v6, "cast_as_binary", *(_QWORD *)(v2 + 2424)); } else { v4 = Item_func_or_sum::func_name(this); push_warning_printf(v5, 1u, 0x515u, v6, v4, *(_QWORD *)(v7 + 2424)); } return (unsigned int)*(_QWORD *)(v7 + 2424); } else { return a2; } }
get_raw_buf: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV RDI,qword ptr [RBP + -0x18] CALL 0x00e07700 MOV qword ptr [RBP + -0x10],RAX MOV qword ptr [RBP + -0x8],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
/* SORT_INFO::get_raw_buf() */ int1 [16] __thiscall SORT_INFO::get_raw_buf(SORT_INFO *this) { int1 auVar1 [16]; auVar1 = Filesort_buffer::get_raw_buf((Filesort_buffer *)this); return auVar1; }
25,360
mi_update_status
eloqsql/storage/myisam/mi_locking.c
void mi_update_status(void* param) { MI_INFO *info=(MI_INFO*) param; DBUG_ENTER("mi_update_status"); /* Because someone may have closed the table we point at, we only update the state if its our own state. This isn't a problem as we are always pointing at our own lock or at a read lock. (This is enforced by thr_multi_lock.c) */ if (info->state == &info->save_state) { DBUG_PRINT("info", ("updating status: key_file: %lu data_file: %lu rows: %lu", (ulong) info->state->key_file_length, (ulong) info->state->data_file_length, (ulong) info->state->records)); if (info->state->key_file_length < info->s->state.state.key_file_length || info->state->data_file_length < info->s->state.state.data_file_length) DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld", (long) info->s->state.state.key_file_length, (long) info->s->state.state.data_file_length)); info->s->state.state= *info->state; #ifdef HAVE_QUERY_CACHE DBUG_PRINT("info", ("invalidator... '%s' (status update)", info->filename)); DBUG_ASSERT(info->s->chst_invalidator != NULL); (*info->s->chst_invalidator)((const char *)info->filename); #endif } info->state= &info->s->state.state; info->append_insert_at_end= 0; /* We have to flush the write cache here as other threads may start reading the table before mi_lock_database() is called */ if (info->opt_flag & WRITE_CACHE_USED) { if (end_io_cache(&info->rec_cache)) { mi_print_error(info->s, HA_ERR_CRASHED); mi_mark_crashed(info); } info->opt_flag&= ~WRITE_CACHE_USED; } DBUG_VOID_RETURN; }
O0
c
mi_update_status: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx addq $0x10, %rcx cmpq %rcx, %rax jne 0xb3df3 jmp 0xb3d7b jmp 0xb3d7d movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpq 0x38(%rcx), %rax jb 0xb3daf movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x28(%rax), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpq 0x40(%rcx), %rax jae 0xb3db5 jmp 0xb3db1 jmp 0xb3db3 jmp 0xb3db5 movq -0x10(%rbp), %rax movq (%rax), %rdi addq $0x18, %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movl $0x38, %edx callq 0x2a0c0 jmp 0xb3dd4 jmp 0xb3dd6 jmp 0xb3dd8 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x2f8(%rax), %rax movq -0x10(%rbp), %rcx movq 0xf8(%rcx), %rdi callq *%rax movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x18, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33a(%rax) movq -0x10(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xb3e97 movq -0x10(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 callq 0xe5150 cmpl $0x0, %eax je 0xb3e84 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xb1420 movq -0x10(%rbp), %rax movq (%rax), %rax movzbl 0xf0(%rax), %ecx orl $0x2, %ecx movb %cl, 0xf0(%rax) jmp 0xb3e69 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi leaq 0xa8fbd(%rip), %rdx # 0x15ce35 movl $0x164, %ecx # imm = 0x164 callq 0x2b700 jmp 0xb3e84 movq -0x10(%rbp), %rax movl 0x1c8(%rax), %ecx andl $-0x11, %ecx movl %ecx, 0x1c8(%rax) jmp 0xb3e99 jmp 0xb3e9b addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mi_update_status: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] add rcx, 10h cmp rax, rcx jnz short loc_B3DF3 jmp short $+2 loc_B3D7B: jmp short $+2 loc_B3D7D: mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+20h] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp rax, [rcx+38h] jb short loc_B3DAF mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+28h] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp rax, [rcx+40h] jnb short loc_B3DB5 loc_B3DAF: jmp short $+2 loc_B3DB1: jmp short $+2 loc_B3DB3: jmp short $+2 loc_B3DB5: mov rax, [rbp+var_10] mov rdi, [rax] add rdi, 18h mov rax, [rbp+var_10] mov rsi, [rax+8] mov edx, 38h ; '8' call _memcpy jmp short $+2 loc_B3DD4: jmp short $+2 loc_B3DD6: jmp short $+2 loc_B3DD8: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+2F8h] mov rcx, [rbp+var_10] mov rdi, [rcx+0F8h] call rax loc_B3DF3: mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 18h mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov byte ptr [rax+33Ah], 0 mov rax, [rbp+var_10] mov eax, [rax+1C8h] and eax, 10h cmp eax, 0 jz short loc_B3E97 mov rdi, [rbp+var_10] add rdi, 220h call end_io_cache cmp eax, 0 jz short loc_B3E84 mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error mov rax, [rbp+var_10] mov rax, [rax] movzx ecx, byte ptr [rax+0F0h] or ecx, 2 mov [rax+0F0h], cl jmp short $+2 loc_B3E69: mov rdi, [rbp+var_10] xor eax, eax mov esi, eax lea rdx, aWorkspaceLlm4b_31; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 164h call _mi_report_crashed jmp short $+2 loc_B3E84: mov rax, [rbp+var_10] mov ecx, [rax+1C8h] and ecx, 0FFFFFFEFh mov [rax+1C8h], ecx loc_B3E97: jmp short $+2 loc_B3E99: jmp short $+2 loc_B3E9B: add rsp, 10h pop rbp retn
_DWORD * mi_update_status(_DWORD *a1) { _DWORD *result; // rax if ( *((_DWORD **)a1 + 1) == a1 + 4 ) { memcpy(*(_QWORD *)a1 + 24LL, *((_QWORD *)a1 + 1), 56LL); (*(void ( **)(_QWORD))(*(_QWORD *)a1 + 760LL))(*((_QWORD *)a1 + 31)); } *((_QWORD *)a1 + 1) = *(_QWORD *)a1 + 24LL; *((_BYTE *)a1 + 826) = 0; result = (_DWORD *)(a1[114] & 0x10); if ( (_DWORD)result ) { if ( (unsigned int)end_io_cache(a1 + 136) ) { mi_report_error(126, *(_QWORD *)(*(_QWORD *)a1 + 616LL)); *(_BYTE *)(*(_QWORD *)a1 + 240LL) |= 2u; mi_report_crashed(); } result = a1; a1[114] &= ~0x10u; } return result; }
mi_update_status: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x10 CMP RAX,RCX JNZ 0x001b3df3 JMP 0x001b3d7b LAB_001b3d7b: JMP 0x001b3d7d LAB_001b3d7d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x38] JC 0x001b3daf MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x40] JNC 0x001b3db5 LAB_001b3daf: JMP 0x001b3db1 LAB_001b3db1: JMP 0x001b3db3 LAB_001b3db3: JMP 0x001b3db5 LAB_001b3db5: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV EDX,0x38 CALL 0x0012a0c0 JMP 0x001b3dd4 LAB_001b3dd4: JMP 0x001b3dd6 LAB_001b3dd6: JMP 0x001b3dd8 LAB_001b3dd8: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x2f8] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0xf8] CALL RAX LAB_001b3df3: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33a],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x10 CMP EAX,0x0 JZ 0x001b3e97 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x220 CALL 0x001e5150 CMP EAX,0x0 JZ 0x001b3e84 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001b1420 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVZX ECX,byte ptr [RAX + 0xf0] OR ECX,0x2 MOV byte ptr [RAX + 0xf0],CL JMP 0x001b3e69 LAB_001b3e69: MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX LEA RDX,[0x25ce35] MOV ECX,0x164 CALL 0x0012b700 JMP 0x001b3e84 LAB_001b3e84: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x1c8] AND ECX,0xffffffef MOV dword ptr [RAX + 0x1c8],ECX LAB_001b3e97: JMP 0x001b3e99 LAB_001b3e99: JMP 0x001b3e9b LAB_001b3e9b: ADD RSP,0x10 POP RBP RET
void mi_update_status(long *param_1) { int iVar1; if ((long *)param_1[1] == param_1 + 2) { memcpy((void *)(*param_1 + 0x18),(void *)param_1[1],0x38); (**(code **)(*param_1 + 0x2f8))(param_1[0x1f]); } param_1[1] = *param_1 + 0x18; *(int1 *)((long)param_1 + 0x33a) = 0; if ((*(uint *)(param_1 + 0x39) & 0x10) != 0) { iVar1 = end_io_cache(param_1 + 0x44); if (iVar1 != 0) { mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); *(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 2; _mi_report_crashed(param_1,0, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 0x164); } *(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffef; } return; }
25,361
handle_hash_object(int, char**)
mog/src/commands/hash_object.cpp
int handle_hash_object(int argc, char *argv[]) { if (argc <= 3) { cerr << "Invalid arguments, please provide valid arguments \n"; return EXIT_FAILURE; } const string flag = argv[2]; const set<string> supported_flags = {"-w"}; if (supported_flags.find(flag) == supported_flags.end()) { cerr << "Invalid flag for hash-object, expected one of "; for (const auto &f : supported_flags) cerr << f << " "; cerr << "\n"; return EXIT_FAILURE; } if (flag == "-w") { string file_path = argv[3]; if (!filesystem::exists(file_path)) { cerr << "File does not exist\n"; return EXIT_FAILURE; } string digest = write_blob(file_path); cout << digest << endl; } return EXIT_SUCCESS; }
O0
cpp
handle_hash_object(int, char**): pushq %rbp movq %rsp, %rbp subq $0x200, %rsp # imm = 0x200 movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpl $0x3, -0x8(%rbp) jg 0x12b07 movq 0x134f9(%rip), %rdi # 0x25fe8 leaq 0x9be9(%rip), %rsi # 0x1c6df callq 0x7480 movl $0x1, -0x4(%rbp) jmp 0x13092 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x170(%rbp) leaq -0x31(%rbp), %rdi movq %rdi, -0x168(%rbp) callq 0x7760 movq -0x170(%rbp), %rsi movq -0x168(%rbp), %rdx leaq -0x30(%rbp), %rdi callq 0x7e70 jmp 0x12b3f leaq -0x31(%rbp), %rdi callq 0x74f0 movb $0x1, -0xb2(%rbp) leaq -0xa8(%rbp), %rax movq %rax, -0x180(%rbp) movq %rax, -0xb0(%rbp) leaq -0xb1(%rbp), %rdi movq %rdi, -0x178(%rbp) callq 0x7760 movq -0x180(%rbp), %rdi movq -0x178(%rbp), %rdx leaq 0x9b87(%rip), %rsi # 0x1c713 callq 0x7e70 jmp 0x12b93 movb $0x0, -0xb2(%rbp) leaq -0xa8(%rbp), %rax movq %rax, -0x88(%rbp) movq $0x1, -0x80(%rbp) leaq -0xb4(%rbp), %rdi movq %rdi, -0x188(%rbp) callq 0x9380 movq -0x188(%rbp), %r8 movq -0x88(%rbp), %rsi movq -0x80(%rbp), %rdx leaq -0x78(%rbp), %rdi leaq -0xb3(%rbp), %rcx callq 0x93a0 jmp 0x12be7 leaq -0xb4(%rbp), %rdi callq 0x9470 leaq -0xa8(%rbp), %rax movq %rax, -0x198(%rbp) addq $0x20, %rax movq %rax, -0x190(%rbp) movq -0x190(%rbp), %rdi addq $-0x20, %rdi movq %rdi, -0x1a0(%rbp) callq 0x7f50 movq -0x198(%rbp), %rcx movq -0x1a0(%rbp), %rax cmpq %rcx, %rax movq %rax, -0x190(%rbp) jne 0x12c0c leaq -0xb1(%rbp), %rdi callq 0x74f0 leaq -0x78(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x94b0 movq %rax, -0x1a8(%rbp) jmp 0x12c5f movq -0x1a8(%rbp), %rax movq %rax, -0xc0(%rbp) leaq -0x78(%rbp), %rdi callq 0x94e0 movq %rax, -0xc8(%rbp) leaq -0xc0(%rbp), %rdi leaq -0xc8(%rbp), %rsi callq 0x9480 testb $0x1, %al jne 0x12c99 jmp 0x12e82 movq 0x13348(%rip), %rdi # 0x25fe8 leaq 0x9a6f(%rip), %rsi # 0x1c716 callq 0x7480 jmp 0x12cae leaq -0x78(%rbp), %rax movq %rax, -0xd0(%rbp) movq -0xd0(%rbp), %rdi callq 0x9510 movq %rax, -0xd8(%rbp) movq -0xd0(%rbp), %rdi callq 0x94e0 movq %rax, -0xe0(%rbp) leaq -0xd8(%rbp), %rdi leaq -0xe0(%rbp), %rsi callq 0x9480 xorb $-0x1, %al testb $0x1, %al jne 0x12cfd jmp 0x12e57 leaq -0xd8(%rbp), %rdi callq 0x9540 movq %rax, -0xe8(%rbp) movq -0xe8(%rbp), %rsi movq 0x132ca(%rip), %rdi # 0x25fe8 callq 0x7440 movq %rax, -0x1b0(%rbp) jmp 0x12d2c movq -0x1b0(%rbp), %rdi leaq 0x96ea(%rip), %rsi # 0x1c424 callq 0x7480 jmp 0x12d41 jmp 0x12d43 leaq -0xd8(%rbp), %rdi callq 0x9560 jmp 0x12cdf movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x31(%rbp), %rdi callq 0x74f0 jmp 0x1309e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x12ddd movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0xb4(%rbp), %rdi callq 0x9470 leaq -0xa8(%rbp), %rax movq %rax, -0x1c0(%rbp) addq $0x20, %rax movq %rax, -0x1b8(%rbp) movq -0x1b8(%rbp), %rdi addq $-0x20, %rdi movq %rdi, -0x1c8(%rbp) callq 0x7f50 movq -0x1c0(%rbp), %rcx movq -0x1c8(%rbp), %rax cmpq %rcx, %rax movq %rax, -0x1b8(%rbp) jne 0x12daa jmp 0x12ddd leaq -0xb1(%rbp), %rdi callq 0x74f0 testb $0x1, -0xb2(%rbp) jne 0x12df4 jmp 0x12e41 movq -0xb0(%rbp), %rax leaq -0xa8(%rbp), %rcx cmpq %rax, %rcx movq %rax, -0x1d0(%rbp) je 0x12e3f movq -0x1d0(%rbp), %rdi addq $-0x20, %rdi movq %rdi, -0x1d8(%rbp) callq 0x7f50 movq -0x1d8(%rbp), %rax leaq -0xa8(%rbp), %rcx cmpq %rcx, %rax movq %rax, -0x1d0(%rbp) jne 0x12e0e jmp 0x12e41 jmp 0x13087 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x1307e movq 0x1318a(%rip), %rdi # 0x25fe8 leaq 0x98ac(%rip), %rsi # 0x1c711 callq 0x7480 jmp 0x12e6c movl $0x1, -0x4(%rbp) movl $0x1, -0xec(%rbp) jmp 0x1306a leaq 0x988a(%rip), %rsi # 0x1c713 leaq -0x30(%rbp), %rdi callq 0x7f20 movb %al, -0x1d9(%rbp) jmp 0x12e9a movb -0x1d9(%rbp), %al testb $0x1, %al jne 0x12ea9 jmp 0x13059 movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x1f0(%rbp) leaq -0x111(%rbp), %rdi movq %rdi, -0x1e8(%rbp) callq 0x7760 movq -0x1f0(%rbp), %rsi movq -0x1e8(%rbp), %rdx leaq -0x110(%rbp), %rdi callq 0x7e70 jmp 0x12ee7 leaq -0x111(%rbp), %rdi callq 0x74f0 leaq -0x140(%rbp), %rdi leaq -0x110(%rbp), %rsi movl $0x2, %edx callq 0x130e0 jmp 0x12f0d leaq -0x140(%rbp), %rdi callq 0x130b0 movb %al, -0x1f1(%rbp) jmp 0x12f21 movb -0x1f1(%rbp), %al xorb $-0x1, %al movb %al, -0x1f2(%rbp) leaq -0x140(%rbp), %rdi callq 0x123c0 movb -0x1f2(%rbp), %al testb $0x1, %al jne 0x12f47 jmp 0x12fbd movq 0x1309a(%rip), %rdi # 0x25fe8 leaq 0x97f0(%rip), %rsi # 0x1c745 callq 0x7480 jmp 0x12f5c movl $0x1, -0x4(%rbp) movl $0x1, -0xec(%rbp) jmp 0x13019 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x111(%rbp), %rdi callq 0x74f0 jmp 0x1307e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x1304b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x140(%rbp), %rdi callq 0x123c0 jmp 0x1304b leaq -0x160(%rbp), %rdi leaq -0x110(%rbp), %rsi callq 0x16300 jmp 0x12fd2 movq 0x12fe7(%rip), %rdi # 0x25fc0 leaq -0x160(%rbp), %rsi callq 0x7440 movq %rax, -0x200(%rbp) jmp 0x12fee movq -0x200(%rbp), %rdi movq 0x12f94(%rip), %rsi # 0x25f90 callq 0x74d0 jmp 0x13003 leaq -0x160(%rbp), %rdi callq 0x7f50 movl $0x0, -0xec(%rbp) leaq -0x110(%rbp), %rdi callq 0x7f50 movl -0xec(%rbp), %eax testl %eax, %eax jne 0x1306a jmp 0x13031 jmp 0x13059 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x160(%rbp), %rdi callq 0x7f50 leaq -0x110(%rbp), %rdi callq 0x7f50 jmp 0x1307e movl $0x0, -0x4(%rbp) movl $0x1, -0xec(%rbp) leaq -0x78(%rbp), %rdi callq 0x9c50 leaq -0x30(%rbp), %rdi callq 0x7f50 jmp 0x13092 leaq -0x78(%rbp), %rdi callq 0x9c50 leaq -0x30(%rbp), %rdi callq 0x7f50 jmp 0x1309e movl -0x4(%rbp), %eax addq $0x200, %rsp # imm = 0x200 popq %rbp retq movq -0x40(%rbp), %rdi callq 0x7750 nopw (%rax,%rax)
_Z18handle_hash_objectiPPc: push rbp mov rbp, rsp sub rsp, 200h mov [rbp+var_8], edi mov [rbp+var_10], rsi cmp [rbp+var_8], 3 jg short loc_12B07 mov rdi, cs:_ZSt4cerr_ptr lea rsi, aInvalidArgumen_0; "Invalid arguments, please provide valid"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_4], 1 jmp loc_13092 loc_12B07: mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_170], rax lea rdi, [rbp+var_31] mov [rbp+var_168], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_170] mov rdx, [rbp+var_168] lea rdi, [rbp+var_30] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_12B3F: lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_B2], 1 lea rax, [rbp+var_A8] mov [rbp+var_180], rax mov [rbp+var_B0], rax lea rdi, [rbp+var_B1] mov [rbp+var_178], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_180] mov rdx, [rbp+var_178] lea rsi, aW; "-w" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_12B93: mov [rbp+var_B2], 0 lea rax, [rbp+var_A8] mov [rbp+var_88], rax mov [rbp+var_80], 1 lea rdi, [rbp+var_B4] mov [rbp+var_188], rdi call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; std::allocator<std::string>::allocator(void) mov r8, [rbp+var_188] mov rsi, [rbp+var_88] mov rdx, [rbp+var_80] lea rdi, [rbp+var_78] lea rcx, [rbp+var_B3] call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EEC2ESt16initializer_listIS5_ERKS7_RKS8_; std::set<std::string>::set(std::initializer_list<std::string>,std::less<std::string> const&,std::allocator<std::string> const&) jmp short $+2 loc_12BE7: lea rdi, [rbp+var_B4] call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator() lea rax, [rbp+var_A8] mov [rbp+var_198], rax add rax, 20h ; ' ' mov [rbp+var_190], rax loc_12C0C: mov rdi, [rbp+var_190] add rdi, 0FFFFFFFFFFFFFFE0h mov [rbp+var_1A0], rdi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rcx, [rbp+var_198] mov rax, [rbp+var_1A0] cmp rax, rcx mov [rbp+var_190], rax jnz short loc_12C0C lea rdi, [rbp+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rbp+var_78] lea rsi, [rbp+var_30] call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE4findERKS5_; std::set<std::string>::find(std::string const&) mov [rbp+var_1A8], rax jmp short $+2 loc_12C5F: mov rax, [rbp+var_1A8] mov [rbp+var_C0], rax lea rdi, [rbp+var_78] call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE3endEv; std::set<std::string>::end(void) mov [rbp+var_C8], rax lea rdi, [rbp+var_C0] lea rsi, [rbp+var_C8] call _ZSteqRKSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES8_; std::operator==(std::_Rb_tree_const_iterator<std::string> const&,std::_Rb_tree_const_iterator<std::string> const&) test al, 1 jnz short loc_12C99 jmp loc_12E82 loc_12C99: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aInvalidFlagFor_0; "Invalid flag for hash-object, expected "... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_12CAE: lea rax, [rbp+var_78] mov [rbp+var_D0], rax mov rdi, [rbp+var_D0] call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5beginEv; std::set<std::string>::begin(void) mov [rbp+var_D8], rax mov rdi, [rbp+var_D0] call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE3endEv; std::set<std::string>::end(void) mov [rbp+var_E0], rax loc_12CDF: lea rdi, [rbp+var_D8] lea rsi, [rbp+var_E0] call _ZSteqRKSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES8_; std::operator==(std::_Rb_tree_const_iterator<std::string> const&,std::_Rb_tree_const_iterator<std::string> const&) xor al, 0FFh test al, 1 jnz short loc_12CFD jmp loc_12E57 loc_12CFD: lea rdi, [rbp+var_D8] call _ZNKSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; std::_Rb_tree_const_iterator<std::string>::operator*(void) mov [rbp+var_E8], rax mov rsi, [rbp+var_E8] mov rdi, cs:_ZSt4cerr_ptr call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_1B0], rax jmp short $+2 loc_12D2C: mov rdi, [rbp+var_1B0] lea rsi, aZDataError+0Dh; " " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_12D41: jmp short $+2 loc_12D43: lea rdi, [rbp+var_D8] call _ZNSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; std::_Rb_tree_const_iterator<std::string>::operator++(void) jmp short loc_12CDF mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_1309E mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_12DDD mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_B4] call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator() lea rax, [rbp+var_A8] mov [rbp+var_1C0], rax add rax, 20h ; ' ' mov [rbp+var_1B8], rax loc_12DAA: mov rdi, [rbp+var_1B8] add rdi, 0FFFFFFFFFFFFFFE0h mov [rbp+var_1C8], rdi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rcx, [rbp+var_1C0] mov rax, [rbp+var_1C8] cmp rax, rcx mov [rbp+var_1B8], rax jnz short loc_12DAA jmp short $+2 loc_12DDD: lea rdi, [rbp+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rbp+var_B2], 1 jnz short loc_12DF4 jmp short loc_12E41 loc_12DF4: mov rax, [rbp+var_B0] lea rcx, [rbp+var_A8] cmp rcx, rax mov [rbp+var_1D0], rax jz short loc_12E3F loc_12E0E: mov rdi, [rbp+var_1D0] add rdi, 0FFFFFFFFFFFFFFE0h mov [rbp+var_1D8], rdi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rbp+var_1D8] lea rcx, [rbp+var_A8] cmp rax, rcx mov [rbp+var_1D0], rax jnz short loc_12E0E loc_12E3F: jmp short $+2 loc_12E41: jmp loc_13087 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_1307E loc_12E57: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aInvalidArgumen_0+32h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_12E6C: mov [rbp+var_4], 1 mov [rbp+var_EC], 1 jmp loc_1306A loc_12E82: lea rsi, aW; "-w" lea rdi, [rbp+var_30] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_1D9], al jmp short $+2 loc_12E9A: mov al, [rbp+var_1D9] test al, 1 jnz short loc_12EA9 jmp loc_13059 loc_12EA9: mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_1F0], rax lea rdi, [rbp+var_111] mov [rbp+var_1E8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_1F0] mov rdx, [rbp+var_1E8] lea rdi, [rbp+var_110] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_12EE7: lea rdi, [rbp+var_111] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rbp+var_140] lea rsi, [rbp+var_110]; std::filesystem::__cxx11::path * mov edx, 2 call _ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(std::string const&,std::filesystem::__cxx11::path::format) jmp short $+2 loc_12F0D: lea rdi, [rbp+var_140]; this call _ZNSt10filesystem6existsERKNS_7__cxx114pathE; std::filesystem::exists(std::filesystem::__cxx11::path const&) mov [rbp+var_1F1], al jmp short $+2 loc_12F21: mov al, [rbp+var_1F1] xor al, 0FFh mov [rbp+var_1F2], al lea rdi, [rbp+var_140]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov al, [rbp+var_1F2] test al, 1 jnz short loc_12F47 jmp short loc_12FBD loc_12F47: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aFileDoesNotExi; "File does not exist\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_12F5C: mov [rbp+var_4], 1 mov [rbp+var_EC], 1 jmp loc_13019 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_111] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_1307E mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_1304B mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_140]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() jmp loc_1304B loc_12FBD: lea rdi, [rbp+var_160] lea rsi, [rbp+var_110] call _Z10write_blobRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; write_blob(std::string const&) jmp short $+2 loc_12FD2: mov rdi, cs:_ZSt4cout_ptr lea rsi, [rbp+var_160] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_200], rax jmp short $+2 loc_12FEE: mov rdi, [rbp+var_200] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_13003: lea rdi, [rbp+var_160] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov [rbp+var_EC], 0 loc_13019: lea rdi, [rbp+var_110] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, [rbp+var_EC] test eax, eax jnz short loc_1306A jmp short $+2 loc_13031: jmp short loc_13059 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_160] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1304B: lea rdi, [rbp+var_110] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1307E loc_13059: mov [rbp+var_4], 0 mov [rbp+var_EC], 1 loc_1306A: lea rdi, [rbp+var_78] call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EED2Ev; std::set<std::string>::~set() lea rdi, [rbp+var_30] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_13092 loc_1307E: lea rdi, [rbp+var_78] call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EED2Ev; std::set<std::string>::~set() loc_13087: lea rdi, [rbp+var_30] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1309E loc_13092: mov eax, [rbp+var_4] add rsp, 200h pop rbp retn loc_1309E: mov rdi, [rbp+var_40] call __Unwind_Resume
long long handle_hash_object(int a1, char **a2) { long long v3; // [rsp+0h] [rbp-200h] char v4; // [rsp+Eh] [rbp-1F2h] long long v5; // [rsp+10h] [rbp-1F0h] long long v6; // [rsp+50h] [rbp-1B0h] _BYTE *v7; // [rsp+70h] [rbp-190h] long long v8; // [rsp+90h] [rbp-170h] _BYTE v9[32]; // [rsp+A0h] [rbp-160h] BYREF _BYTE v10[47]; // [rsp+C0h] [rbp-140h] BYREF char v11; // [rsp+EFh] [rbp-111h] BYREF _BYTE v12[36]; // [rsp+F0h] [rbp-110h] BYREF int v13; // [rsp+114h] [rbp-ECh] long long v14; // [rsp+118h] [rbp-E8h] long long v15; // [rsp+120h] [rbp-E0h] BYREF long long v16[2]; // [rsp+128h] [rbp-D8h] BYREF long long v17; // [rsp+138h] [rbp-C8h] BYREF long long v18; // [rsp+140h] [rbp-C0h] BYREF char v19; // [rsp+14Ch] [rbp-B4h] BYREF _BYTE v20[2]; // [rsp+14Dh] [rbp-B3h] BYREF char v21; // [rsp+14Fh] [rbp-B1h] BYREF _BYTE *v22; // [rsp+150h] [rbp-B0h] _BYTE v23[32]; // [rsp+158h] [rbp-A8h] BYREF _BYTE *v24; // [rsp+178h] [rbp-88h] BYREF long long v25; // [rsp+180h] [rbp-80h] _BYTE v26[52]; // [rsp+188h] [rbp-78h] BYREF char v27; // [rsp+1CFh] [rbp-31h] BYREF _BYTE v28[32]; // [rsp+1D0h] [rbp-30h] BYREF char **v29; // [rsp+1F0h] [rbp-10h] int v30; // [rsp+1F8h] [rbp-8h] unsigned int v31; // [rsp+1FCh] [rbp-4h] v30 = a1; v29 = a2; if ( a1 > 3 ) { v8 = (long long)v29[2]; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v28, v8, (long long)&v27); std::allocator<char>::~allocator(&v27); v22 = v23; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v23, (long long)"-w", (long long)&v21); v20[1] = 0; v24 = v23; v25 = 1LL; std::allocator<std::string>::allocator((long long)&v19); std::set<std::string>::set((long long)v26, (long long)v24, v25, (long long)v20, (long long)&v19); std::allocator<std::string>::~allocator(); v7 = &v24; do { std::string::~string((long long)(v7 - 32)); v7 -= 32; } while ( v7 != v23 ); std::allocator<char>::~allocator(&v21); v18 = std::set<std::string>::find((long long)v26, (long long)v28); v17 = std::set<std::string>::end((long long)v26); if ( std::operator==(&v18, &v17) ) { std::operator<<<std::char_traits<char>>(&std::cerr, "Invalid flag for hash-object, expected one of "); v16[1] = (long long)v26; v16[0] = std::set<std::string>::begin((long long)v26); v15 = std::set<std::string>::end((long long)v26); while ( !std::operator==(v16, &v15) ) { v14 = std::_Rb_tree_const_iterator<std::string>::operator*(v16); v6 = std::operator<<<char>(&std::cerr, v14); std::operator<<<std::char_traits<char>>(v6, " "); std::_Rb_tree_const_iterator<std::string>::operator++(v16); } std::operator<<<std::char_traits<char>>(&std::cerr, "\n"); v31 = 1; v13 = 1; } else { if ( !std::operator==<char>((long long)v28, (long long)"-w") ) goto LABEL_15; v5 = (long long)v29[3]; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v12, v5, (long long)&v11); std::allocator<char>::~allocator(&v11); std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(v10, v12, 2LL); v4 = ~(unsigned __int8)std::filesystem::exists( (std::filesystem *)v10, (const std::filesystem::__cxx11::path *)v12); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v10); if ( (v4 & 1) != 0 ) { std::operator<<<std::char_traits<char>>(&std::cerr, "File does not exist\n"); v31 = 1; v13 = 1; } else { write_blob(v9, v12); v3 = std::operator<<<char>(&std::cout, v9); std::ostream::operator<<(v3, &std::endl<char,std::char_traits<char>>); std::string::~string((long long)v9); v13 = 0; } std::string::~string((long long)v12); if ( !v13 ) { LABEL_15: v31 = 0; v13 = 1; } } std::set<std::string>::~set((long long)v26); std::string::~string((long long)v28); } else { std::operator<<<std::char_traits<char>>(&std::cerr, "Invalid arguments, please provide valid arguments \n"); return 1; } return v31; }
handle_hash_object: PUSH RBP MOV RBP,RSP SUB RSP,0x200 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI CMP dword ptr [RBP + -0x8],0x3 JG 0x00112b07 MOV RDI,qword ptr [0x00125fe8] LEA RSI,[0x11c6df] CALL 0x00107480 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00113092 LAB_00112b07: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x170],RAX LEA RDI,[RBP + -0x31] MOV qword ptr [RBP + -0x168],RDI CALL 0x00107760 MOV RSI,qword ptr [RBP + -0x170] MOV RDX,qword ptr [RBP + -0x168] LAB_00112b34: LEA RDI,[RBP + -0x30] CALL 0x00107e70 JMP 0x00112b3f LAB_00112b3f: LEA RDI,[RBP + -0x31] CALL 0x001074f0 MOV byte ptr [RBP + -0xb2],0x1 LEA RAX,[RBP + -0xa8] MOV qword ptr [RBP + -0x180],RAX MOV qword ptr [RBP + -0xb0],RAX LEA RDI,[RBP + -0xb1] MOV qword ptr [RBP + -0x178],RDI CALL 0x00107760 MOV RDI,qword ptr [RBP + -0x180] MOV RDX,qword ptr [RBP + -0x178] LAB_00112b85: LEA RSI,[0x11c713] CALL 0x00107e70 JMP 0x00112b93 LAB_00112b93: MOV byte ptr [RBP + -0xb2],0x0 LEA RAX,[RBP + -0xa8] MOV qword ptr [RBP + -0x88],RAX MOV qword ptr [RBP + -0x80],0x1 LEA RDI,[RBP + -0xb4] MOV qword ptr [RBP + -0x188],RDI CALL 0x00109380 MOV R8,qword ptr [RBP + -0x188] MOV RSI,qword ptr [RBP + -0x88] MOV RDX,qword ptr [RBP + -0x80] LAB_00112bd5: LEA RDI,[RBP + -0x78] LEA RCX,[RBP + -0xb3] CALL 0x001093a0 JMP 0x00112be7 LAB_00112be7: LEA RDI,[RBP + -0xb4] CALL 0x00109470 LEA RAX,[RBP + -0xa8] MOV qword ptr [RBP + -0x198],RAX ADD RAX,0x20 MOV qword ptr [RBP + -0x190],RAX LAB_00112c0c: MOV RDI,qword ptr [RBP + -0x190] ADD RDI,-0x20 MOV qword ptr [RBP + -0x1a0],RDI CALL 0x00107f50 MOV RCX,qword ptr [RBP + -0x198] MOV RAX,qword ptr [RBP + -0x1a0] CMP RAX,RCX MOV qword ptr [RBP + -0x190],RAX JNZ 0x00112c0c LEA RDI,[RBP + -0xb1] CALL 0x001074f0 LAB_00112c49: LEA RDI,[RBP + -0x78] LEA RSI,[RBP + -0x30] CALL 0x001094b0 MOV qword ptr [RBP + -0x1a8],RAX JMP 0x00112c5f LAB_00112c5f: MOV RAX,qword ptr [RBP + -0x1a8] MOV qword ptr [RBP + -0xc0],RAX LEA RDI,[RBP + -0x78] CALL 0x001094e0 MOV qword ptr [RBP + -0xc8],RAX LEA RDI,[RBP + -0xc0] LEA RSI,[RBP + -0xc8] CALL 0x00109480 TEST AL,0x1 JNZ 0x00112c99 JMP 0x00112e82 LAB_00112c99: MOV RDI,qword ptr [0x00125fe8] LEA RSI,[0x11c716] CALL 0x00107480 JMP 0x00112cae LAB_00112cae: LEA RAX,[RBP + -0x78] MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0xd0] CALL 0x00109510 MOV qword ptr [RBP + -0xd8],RAX MOV RDI,qword ptr [RBP + -0xd0] CALL 0x001094e0 MOV qword ptr [RBP + -0xe0],RAX LAB_00112cdf: LEA RDI,[RBP + -0xd8] LEA RSI,[RBP + -0xe0] CALL 0x00109480 XOR AL,0xff TEST AL,0x1 JNZ 0x00112cfd JMP 0x00112e57 LAB_00112cfd: LEA RDI,[RBP + -0xd8] CALL 0x00109540 MOV qword ptr [RBP + -0xe8],RAX MOV RSI,qword ptr [RBP + -0xe8] MOV RDI,qword ptr [0x00125fe8] CALL 0x00107440 MOV qword ptr [RBP + -0x1b0],RAX JMP 0x00112d2c LAB_00112d2c: MOV RDI,qword ptr [RBP + -0x1b0] LEA RSI,[0x11c424] CALL 0x00107480 JMP 0x00112d41 LAB_00112d41: JMP 0x00112d43 LAB_00112d43: LEA RDI,[RBP + -0xd8] CALL 0x00109560 JMP 0x00112cdf LAB_00112e57: MOV RDI,qword ptr [0x00125fe8] LEA RSI,[0x11c711] CALL 0x00107480 JMP 0x00112e6c LAB_00112e6c: MOV dword ptr [RBP + -0x4],0x1 MOV dword ptr [RBP + -0xec],0x1 JMP 0x0011306a LAB_00112e82: LEA RSI,[0x11c713] LEA RDI,[RBP + -0x30] CALL 0x00107f20 MOV byte ptr [RBP + -0x1d9],AL JMP 0x00112e9a LAB_00112e9a: MOV AL,byte ptr [RBP + -0x1d9] TEST AL,0x1 JNZ 0x00112ea9 JMP 0x00113059 LAB_00112ea9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x1f0],RAX LEA RDI,[RBP + -0x111] MOV qword ptr [RBP + -0x1e8],RDI CALL 0x00107760 MOV RSI,qword ptr [RBP + -0x1f0] MOV RDX,qword ptr [RBP + -0x1e8] LAB_00112ed9: LEA RDI,[RBP + -0x110] CALL 0x00107e70 JMP 0x00112ee7 LAB_00112ee7: LEA RDI,[RBP + -0x111] CALL 0x001074f0 LAB_00112ef3: LEA RDI,[RBP + -0x140] LEA RSI,[RBP + -0x110] MOV EDX,0x2 CALL 0x001130e0 JMP 0x00112f0d LAB_00112f0d: LEA RDI,[RBP + -0x140] CALL 0x001130b0 MOV byte ptr [RBP + -0x1f1],AL JMP 0x00112f21 LAB_00112f21: MOV AL,byte ptr [RBP + -0x1f1] XOR AL,0xff MOV byte ptr [RBP + -0x1f2],AL LEA RDI,[RBP + -0x140] CALL 0x001123c0 MOV AL,byte ptr [RBP + -0x1f2] TEST AL,0x1 JNZ 0x00112f47 JMP 0x00112fbd LAB_00112f47: MOV RDI,qword ptr [0x00125fe8] LEA RSI,[0x11c745] CALL 0x00107480 JMP 0x00112f5c LAB_00112f5c: MOV dword ptr [RBP + -0x4],0x1 MOV dword ptr [RBP + -0xec],0x1 JMP 0x00113019 LAB_00112fbd: LEA RDI,[RBP + -0x160] LEA RSI,[RBP + -0x110] CALL 0x00116300 JMP 0x00112fd2 LAB_00112fd2: MOV RDI,qword ptr [0x00125fc0] LEA RSI,[RBP + -0x160] CALL 0x00107440 MOV qword ptr [RBP + -0x200],RAX JMP 0x00112fee LAB_00112fee: MOV RDI,qword ptr [RBP + -0x200] MOV RSI,qword ptr [0x00125f90] CALL 0x001074d0 LAB_00113001: JMP 0x00113003 LAB_00113003: LEA RDI,[RBP + -0x160] CALL 0x00107f50 MOV dword ptr [RBP + -0xec],0x0 LAB_00113019: LEA RDI,[RBP + -0x110] CALL 0x00107f50 MOV EAX,dword ptr [RBP + -0xec] TEST EAX,EAX JNZ 0x0011306a JMP 0x00113031 LAB_00113031: JMP 0x00113059 LAB_00113059: MOV dword ptr [RBP + -0x4],0x0 MOV dword ptr [RBP + -0xec],0x1 LAB_0011306a: LEA RDI,[RBP + -0x78] CALL 0x00109c50 LEA RDI,[RBP + -0x30] CALL 0x00107f50 JMP 0x00113092 LAB_00113092: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x200 POP RBP RET
/* handle_hash_object(int, char**) */ int4 handle_hash_object(int param_1,char **param_2) { char *pcVar1; bool bVar2; byte bVar3; ulong uVar4; ostream *poVar5; string *local_198; string local_168 [32]; path local_148 [47]; allocator local_119; string local_118 [36]; uint local_f4; string *local_f0; int8 local_e8; int8 local_e0; set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *local_d8; int8 local_d0; int8 local_c8; allocator<std::__cxx11::string> local_bc; int1 local_bb; int1 local_ba; allocator local_b9; string *local_b8; string local_b0 [32]; string *local_90; int8 local_88; set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> local_80 [71]; allocator local_39; string local_38 [32]; char **local_18; int local_10; int4 local_c; local_18 = param_2; local_10 = param_1; if (param_1 < 4) { std::operator<<((ostream *)PTR_cerr_00125fe8, "Invalid arguments, please provide valid arguments \n"); return 1; } pcVar1 = param_2[2]; std::allocator<char>::allocator(); /* try { // try from 00112b34 to 00112b3c has its CatchHandler @ 00112d51 */ std::__cxx11::string::string<std::allocator<char>>(local_38,pcVar1,&local_39); std::allocator<char>::~allocator((allocator<char> *)&local_39); local_ba = 1; local_b8 = local_b0; std::allocator<char>::allocator(); /* try { // try from 00112b85 to 00112b90 has its CatchHandler @ 00112d6b */ std::__cxx11::string::string<std::allocator<char>>(local_b0,"-w",&local_b9); local_ba = 0; local_90 = local_b0; local_88 = 1; std::allocator<std::__cxx11::string>::allocator(); /* try { // try from 00112bd5 to 00112be4 has its CatchHandler @ 00112d79 */ std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>:: set(local_80,local_90,local_88,&local_bb,&local_bc); std::allocator<std::__cxx11::string>::~allocator(&local_bc); local_198 = (string *)&local_90; do { local_198 = local_198 + -0x20; std::__cxx11::string::~string(local_198); } while (local_198 != local_b0); std::allocator<char>::~allocator((allocator<char> *)&local_b9); /* try { // try from 00112c49 to 00112e91 has its CatchHandler @ 00112e46 */ local_c8 = std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::find(local_80,local_38); local_d0 = std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::end(local_80); uVar4 = std::operator==((_Rb_tree_const_iterator *)&local_c8,(_Rb_tree_const_iterator *)&local_d0) ; if ((uVar4 & 1) == 0) { bVar2 = std::operator==(local_38,"-w"); if (bVar2) { pcVar1 = local_18[3]; std::allocator<char>::allocator(); /* try { // try from 00112ed9 to 00112ee4 has its CatchHandler @ 00112f72 */ std::__cxx11::string::string<std::allocator<char>>(local_118,pcVar1,&local_119); std::allocator<char>::~allocator((allocator<char> *)&local_119); /* try { // try from 00112ef3 to 00112f0a has its CatchHandler @ 00112f8f */ std::filesystem::__cxx11::path::path<std::__cxx11::string,std::filesystem::__cxx11::path> (local_148,local_118,2); /* try { // try from 00112f0d to 00112f18 has its CatchHandler @ 00112fa0 */ bVar3 = std::filesystem::exists(local_148); std::filesystem::__cxx11::path::~path(local_148); bVar2 = ((bVar3 ^ 0xff) & 1) != 0; if (bVar2) { /* try { // try from 00112f47 to 00112fcf has its CatchHandler @ 00112f8f */ std::operator<<((ostream *)PTR_cerr_00125fe8,"File does not exist\n"); local_c = 1; } else { write_blob(local_168); /* try { // try from 00112fd2 to 00113000 has its CatchHandler @ 00113033 */ poVar5 = std::operator<<((ostream *)PTR_cout_00125fc0,local_168); std::ostream::operator<< (poVar5,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_00125f90); std::__cxx11::string::~string(local_168); } local_f4 = (uint)bVar2; std::__cxx11::string::~string(local_118); if (local_f4 != 0) goto LAB_0011306a; } local_c = 0; local_f4 = 1; } else { std::operator<<((ostream *)PTR_cerr_00125fe8,"Invalid flag for hash-object, expected one of "); local_d8 = local_80; local_e0 = std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::begin(local_d8); local_e8 = std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::end(local_d8); while (bVar3 = std::operator==((_Rb_tree_const_iterator *)&local_e0, (_Rb_tree_const_iterator *)&local_e8), ((bVar3 ^ 0xff) & 1) != 0) { local_f0 = (string *) std::_Rb_tree_const_iterator<std::__cxx11::string>::operator* ((_Rb_tree_const_iterator<std::__cxx11::string> *)&local_e0); poVar5 = std::operator<<((ostream *)PTR_cerr_00125fe8,local_f0); std::operator<<(poVar5," "); std::_Rb_tree_const_iterator<std::__cxx11::string>::operator++ ((_Rb_tree_const_iterator<std::__cxx11::string> *)&local_e0); } std::operator<<((ostream *)PTR_cerr_00125fe8,"\n"); local_c = 1; local_f4 = 1; } LAB_0011306a: std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>:: ~set(local_80); std::__cxx11::string::~string(local_38); return local_c; }
25,362
handle_node
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia.c
static int handle_node(bytes_t* raw, uint8_t** k, int last_node, bytes_t* last_val, uint8_t* next_hash, size_t* depth) { bytes_t val; bytes_t node; if (MAX_DEPTH < (++(*depth))) return 0; rlp_decode(raw, 0, &node); switch ((int) rlp_decode(&node, -1, NULL)) { case NODE_BRANCH: if (**k == 0xFF) { if (!last_node || rlp_decode(&node, 16, &node) != RLP_ITEM) return 0; *last_val = node; return node.len == 0 ? 2 : 3; } if (rlp_decode(&node, **k, &val) == RLP_LIST) { // found embedded node in branch rlp_decode(&node, (**k) - 1, &node); *k += 1; node = bytes(node.data + node.len, val.data + val.len - node.data); // decode the embedded node return handle_node(&node, k, **k == 0xFF || *(*k + 1) == 0xFF, last_val, next_hash, depth); } else if (val.len != 32) // we got a NULL, which means value does not exists return 2; else memcpy(next_hash, val.data, 32); // the hash of the next node *k += 1; return 1; case NODE_LEAF: if (rlp_decode(&node, 0, &val) != RLP_ITEM) return 0; else { uint8_t* pn = patricia_to_nibbles(val, 1); int match = patricia_match_nibbles(pn, *k); int np_len = count_nibbles(pn); int is_leaf = *val.data & 32; safe_free(pn); if (match < np_len) return last_node ? 2 : 0; *k += np_len; if (rlp_decode(&node, 1, &val) == RLP_LIST) { // embedded rlp_decode(&node, 0, &node); node.data += node.len; node.len = val.data + val.len - node.data; return handle_node(&node, k, k && *k && *(k + 1) == NULL, last_val, next_hash, depth); } else if (**k == 0xFF) { // we reached the end of the path if (is_leaf) { *last_val = val; return last_node ? 3 : 0; } else if (last_node) return 0; // this is an extension node, but the path is not complete // follow the extension, which should lead to branch with the value. *last_val = val; memcpy(next_hash, val.data, (val.len >= 32) ? 32 : val.len); return 1; // if (!last_node || (expected_val == NULL && is_leaf)) return 0; } else if (is_leaf) // we found a leaf matching the path, but the patch is not complete yet. return last_node ? 2 : 0; // it is either a proof, that the account does not exist or an error. else { // it is an extension and we follow the extension to the branch. *last_val = val; memcpy(next_hash, val.data, (val.len >= 32) ? 32 : val.len); return 1; } } default: return 0; } return 1; }
O3
c
handle_node: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq (%r9), %rax incq %rax movq %rax, (%r9) cmpq $0x40, %rax jbe 0x2d22a xorl %r13d, %r13d jmp 0x2d4e2 movq %r9, %r12 movq %r8, %r14 movl %edx, %ebp movq %rsi, %r15 movq %rcx, 0x18(%rsp) xorl %r13d, %r13d leaq 0x20(%rsp), %rbx xorl %esi, %esi movq %rbx, %rdx callq 0x2d520 movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF xorl %edx, %edx callq 0x2d520 cmpl $0x2, %eax je 0x2d2ea cmpl $0x11, %eax jne 0x2d4e2 movq (%r15), %rax movzbl (%rax), %esi cmpl $0xff, %esi je 0x2d346 leaq 0x20(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x2d520 cmpl $0x2, %eax jne 0x2d38a movq (%r15), %rax movzbl (%rax), %esi decl %esi leaq 0x20(%rsp), %rbx movq %rbx, %rdi movq %rbx, %rdx callq 0x2d520 movq (%r15), %rax leaq 0x1(%rax), %rcx movq %rcx, (%r15) movl 0x10(%rsp), %ecx addl 0x8(%rsp), %ecx movq 0x8(%rbx), %rdx subl %edx, %ecx movl (%rbx), %esi addq %rdx, %rsi movl %ecx, (%rbx) movq %rsi, 0x8(%rbx) cmpb $-0x1, 0x1(%rax) je 0x2d4c2 xorl %edx, %edx cmpb $-0x1, 0x2(%rax) sete %dl jmp 0x2d4c7 leaq 0x20(%rsp), %rdi xorl %r13d, %r13d leaq 0x8(%rsp), %rdx xorl %esi, %esi callq 0x2d520 cmpl $0x1, %eax jne 0x2d4e2 movl 0x8(%rsp), %edi movq 0x10(%rsp), %rsi movl $0x1, %edx callq 0x2d189 movb (%rax), %dl cmpb $-0x1, %dl movq %r14, 0x30(%rsp) je 0x2d3b8 movq (%r15), %rcx xorl %ebx, %ebx cmpb (%rcx,%rbx), %dl jne 0x2d3ba movb 0x1(%rax,%rbx), %dl incq %rbx cmpb $-0x1, %dl jne 0x2d32f jmp 0x2d3ba testl %ebp, %ebp je 0x2d4e2 leaq 0x20(%rsp), %rdi movl $0x10, %esi movq %rdi, %rdx callq 0x2d520 cmpl $0x1, %eax jne 0x2d4e2 movups 0x20(%rsp), %xmm0 movq 0x18(%rsp), %rax movups %xmm0, (%rax) cmpl $0x1, 0x20(%rsp) movl $0x3, %r13d sbbl $0x0, %r13d jmp 0x2d4e2 movl $0x2, %r13d cmpl $0x20, 0x8(%rsp) jne 0x2d4e2 movq 0x10(%rsp), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups %xmm1, 0x10(%r14) movups %xmm0, (%r14) incq (%r15) jmp 0x2d4ba xorl %ebx, %ebx movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000 xorl %r14d, %r14d movabsq $0x100000000, %rcx # imm = 0x100000000 addq %rcx, %r13 cmpb $-0x1, (%rax,%r14) leaq 0x1(%r14), %r14 jne 0x2d3d1 decl %r14d movq 0x10(%rsp), %rcx movb (%rcx), %cl movb %cl, 0x7(%rsp) movq %rax, %rdi callq 0x50f4c cmpl %r14d, %ebx jge 0x2d40b xorl %r13d, %r13d testl %ebp, %ebp setne %r13b addl %r13d, %r13d jmp 0x2d4e2 sarq $0x20, %r13 addq %r13, (%r15) leaq 0x20(%rsp), %rdi leaq 0x8(%rsp), %rdx movl $0x1, %esi callq 0x2d520 cmpl $0x2, %eax jne 0x2d47c xorl %ebp, %ebp leaq 0x20(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0x2d520 movl (%rbx), %eax addq 0x8(%rbx), %rax movq %rax, 0x8(%rbx) movl 0x10(%rsp), %ecx addl 0x8(%rsp), %ecx subl %eax, %ecx movl %ecx, (%rbx) cmpq $0x0, (%r15) movq 0x30(%rsp), %r8 je 0x2d46b xorl %ebp, %ebp cmpq $0x0, 0x8(%r15) sete %bpl leaq 0x20(%rsp), %rdi movq %r15, %rsi movl %ebp, %edx movq 0x18(%rsp), %rcx jmp 0x2d4d7 movq (%r15), %rax cmpb $-0x1, (%rax) movq 0x30(%rsp), %rdi je 0x2d4f4 testb $0x20, 0x7(%rsp) movq 0x18(%rsp), %rax jne 0x2d3fa movups 0x8(%rsp), %xmm0 movups %xmm0, (%rax) movq 0x10(%rsp), %rsi movl 0x8(%rsp), %eax cmpl $0x20, %eax movl $0x20, %edx cmovbl %eax, %edx callq 0x211a0 movl $0x1, %r13d jmp 0x2d4e2 movl $0x1, %edx movq 0x18(%rsp), %rcx leaq 0x20(%rsp), %rdi movq %r15, %rsi movq %r14, %r8 movq %r12, %r9 callq 0x2d205 movl %eax, %r13d movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x20, 0x7(%rsp) movq 0x18(%rsp), %rax jne 0x2d50a testl %ebp, %ebp jne 0x2d222 jmp 0x2d499 movups 0x8(%rsp), %xmm0 movups %xmm0, (%rax) xorl %eax, %eax testl %ebp, %ebp setne %al leal (%rax,%rax,2), %r13d jmp 0x2d4e2 nop
handle_node: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rax, [r9] inc rax mov [r9], rax cmp rax, 40h ; '@' jbe short loc_2D22A loc_2D222: xor r13d, r13d jmp loc_2D4E2 loc_2D22A: mov r12, r9 mov r14, r8 mov ebp, edx mov r15, rsi mov [rsp+68h+var_50], rcx xor r13d, r13d lea rbx, [rsp+68h+var_48] xor esi, esi mov rdx, rbx call rlp_decode mov rdi, rbx mov esi, 0FFFFFFFFh xor edx, edx call rlp_decode cmp eax, 2 jz loc_2D2EA cmp eax, 11h jnz loc_2D4E2 mov rax, [r15] movzx esi, byte ptr [rax] cmp esi, 0FFh jz loc_2D346 lea rdi, [rsp+68h+var_48] lea rdx, [rsp+68h+var_60] call rlp_decode cmp eax, 2 jnz loc_2D38A mov rax, [r15] movzx esi, byte ptr [rax] dec esi lea rbx, [rsp+68h+var_48] mov rdi, rbx mov rdx, rbx call rlp_decode mov rax, [r15] lea rcx, [rax+1] mov [r15], rcx mov ecx, dword ptr [rsp+68h+var_60+8] add ecx, dword ptr [rsp+68h+var_60] mov rdx, [rbx+8] sub ecx, edx mov esi, [rbx] add rsi, rdx mov [rbx], ecx mov [rbx+8], rsi cmp byte ptr [rax+1], 0FFh jz loc_2D4C2 xor edx, edx cmp byte ptr [rax+2], 0FFh setz dl jmp loc_2D4C7 loc_2D2EA: lea rdi, [rsp+68h+var_48] xor r13d, r13d lea rdx, [rsp+68h+var_60] xor esi, esi call rlp_decode cmp eax, 1 jnz loc_2D4E2 mov edi, dword ptr [rsp+68h+var_60] mov rsi, qword ptr [rsp+68h+var_60+8] mov edx, 1 call patricia_to_nibbles mov dl, [rax] cmp dl, 0FFh mov [rsp+68h+var_38], r14 jz loc_2D3B8 mov rcx, [r15] xor ebx, ebx loc_2D32F: cmp dl, [rcx+rbx] jnz loc_2D3BA mov dl, [rax+rbx+1] inc rbx cmp dl, 0FFh jnz short loc_2D32F jmp short loc_2D3BA loc_2D346: test ebp, ebp jz loc_2D4E2 lea rdi, [rsp+68h+var_48] mov esi, 10h mov rdx, rdi call rlp_decode cmp eax, 1 jnz loc_2D4E2 movups xmm0, [rsp+68h+var_48] mov rax, [rsp+68h+var_50] movups xmmword ptr [rax], xmm0 cmp dword ptr [rsp+68h+var_48], 1 mov r13d, 3 sbb r13d, 0 jmp loc_2D4E2 loc_2D38A: mov r13d, 2 cmp dword ptr [rsp+68h+var_60], 20h ; ' ' jnz loc_2D4E2 mov rax, qword ptr [rsp+68h+var_60+8] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups xmmword ptr [r14+10h], xmm1 movups xmmword ptr [r14], xmm0 inc qword ptr [r15] jmp loc_2D4BA loc_2D3B8: xor ebx, ebx loc_2D3BA: mov r13, 0FFFFFFFF00000000h xor r14d, r14d mov rcx, 100000000h loc_2D3D1: add r13, rcx cmp byte ptr [rax+r14], 0FFh lea r14, [r14+1] jnz short loc_2D3D1 dec r14d mov rcx, qword ptr [rsp+68h+var_60+8] mov cl, [rcx] mov [rsp+68h+var_61], cl mov rdi, rax call safe_free cmp ebx, r14d jge short loc_2D40B loc_2D3FA: xor r13d, r13d test ebp, ebp setnz r13b add r13d, r13d jmp loc_2D4E2 loc_2D40B: sar r13, 20h add [r15], r13 lea rdi, [rsp+68h+var_48] lea rdx, [rsp+68h+var_60] mov esi, 1 call rlp_decode cmp eax, 2 jnz short loc_2D47C xor ebp, ebp lea rbx, [rsp+68h+var_48] mov rdi, rbx xor esi, esi mov rdx, rbx call rlp_decode mov eax, [rbx] add rax, [rbx+8] mov [rbx+8], rax mov ecx, dword ptr [rsp+68h+var_60+8] add ecx, dword ptr [rsp+68h+var_60] sub ecx, eax mov [rbx], ecx cmp qword ptr [r15], 0 mov r8, [rsp+68h+var_38] jz short loc_2D46B xor ebp, ebp cmp qword ptr [r15+8], 0 setz bpl loc_2D46B: lea rdi, [rsp+68h+var_48] mov rsi, r15 mov edx, ebp mov rcx, [rsp+68h+var_50] jmp short loc_2D4D7 loc_2D47C: mov rax, [r15] cmp byte ptr [rax], 0FFh mov rdi, [rsp+68h+var_38] jz short loc_2D4F4 test [rsp+68h+var_61], 20h mov rax, [rsp+68h+var_50] jnz loc_2D3FA loc_2D499: movups xmm0, [rsp+68h+var_60] movups xmmword ptr [rax], xmm0 mov rsi, qword ptr [rsp+68h+var_60+8] mov eax, dword ptr [rsp+68h+var_60] cmp eax, 20h ; ' ' mov edx, 20h ; ' ' cmovb edx, eax call _memcpy loc_2D4BA: mov r13d, 1 jmp short loc_2D4E2 loc_2D4C2: mov edx, 1 loc_2D4C7: mov rcx, [rsp+68h+var_50] lea rdi, [rsp+68h+var_48] mov rsi, r15 mov r8, r14 loc_2D4D7: mov r9, r12 call handle_node mov r13d, eax loc_2D4E2: mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2D4F4: test [rsp+68h+var_61], 20h mov rax, [rsp+68h+var_50] jnz short loc_2D50A test ebp, ebp jnz loc_2D222 jmp short loc_2D499 loc_2D50A: movups xmm0, [rsp+68h+var_60] movups xmmword ptr [rax], xmm0 xor eax, eax test ebp, ebp setnz al lea r13d, [rax+rax*2] jmp short loc_2D4E2
unsigned long long handle_node( long long a1, unsigned __int8 **a2, int a3, _OWORD *a4, _OWORD *a5, unsigned long long *a6) { unsigned long long v6; // rax unsigned int v7; // r13d unsigned __int8 **v11; // r15 int v12; // eax long long v13; // rsi unsigned __int8 *v14; // rax long long v15; // rsi _BOOL8 v16; // rdx char *v17; // rax char v18; // dl bool v19; // zf long long v20; // rbx __int128 v21; // xmm0 long long v22; // r13 long long v23; // r14 BOOL v24; // ebp _OWORD *v25; // r8 _OWORD *v26; // rcx _OWORD *v27; // rdi _OWORD *v28; // rax char v30; // [rsp+7h] [rbp-61h] __int128 v31; // [rsp+8h] [rbp-60h] BYREF _OWORD *v32; // [rsp+18h] [rbp-50h] __int128 v33; // [rsp+20h] [rbp-48h] BYREF _OWORD *v34; // [rsp+30h] [rbp-38h] v6 = *a6 + 1; *a6 = v6; if ( v6 > 0x40 ) return 0; v11 = a2; v32 = a4; v7 = 0; rlp_decode(a1, 0LL, &v33); v12 = rlp_decode(&v33, 0xFFFFFFFFLL, 0LL); if ( v12 == 2 ) { v7 = 0; if ( (unsigned int)rlp_decode(&v33, 0LL, &v31) != 1 ) return v7; v17 = patricia_to_nibbles(v31, *((long long *)&v31 + 1), 1); v18 = *v17; v19 = *v17 == -1; v34 = a5; if ( v19 ) { LODWORD(v20) = 0; } else { v20 = 0LL; do { if ( v18 != (*a2)[v20] ) break; v18 = v17[++v20]; } while ( v18 != -1 ); } v22 = 0xFFFFFFFF00000000LL; v23 = 0LL; do { v22 += 0x100000000LL; v19 = v17[v23++] == -1; } while ( !v19 ); v30 = **((_BYTE **)&v31 + 1); safe_free(v17); if ( (int)v20 < (int)v23 - 1 ) return 2 * (unsigned int)(a3 != 0); *a2 += v22 >> 32; if ( (unsigned int)rlp_decode(&v33, 1LL, &v31) == 2 ) { v24 = 0; rlp_decode(&v33, 0LL, &v33); *((_QWORD *)&v33 + 1) += (unsigned int)v33; LODWORD(v33) = v31 + DWORD2(v31) - DWORD2(v33); v25 = v34; if ( *a2 ) v24 = a2[1] == 0LL; v16 = v24; v26 = v32; return (unsigned int)handle_node(&v33, a2, v16, v26, v25, a6); } v27 = v34; if ( **a2 == 0xFF ) { v28 = v32; if ( (v30 & 0x20) != 0 ) { *v32 = v31; return 3 * (unsigned int)(a3 != 0); } if ( a3 ) return 0; } else { v28 = v32; if ( (v30 & 0x20) != 0 ) return 2 * (unsigned int)(a3 != 0); } *v28 = v31; memcpy(v27); return 1; } if ( v12 != 17 ) return v7; v13 = **a2; if ( (_DWORD)v13 != 255 ) { if ( (unsigned int)rlp_decode(&v33, v13, &v31) == 2 ) { rlp_decode(&v33, (unsigned int)**v11 - 1, &v33); v14 = (*v11)++; v15 = *((_QWORD *)&v33 + 1) + (unsigned int)v33; LODWORD(v33) = v31 + DWORD2(v31) - DWORD2(v33); *((_QWORD *)&v33 + 1) = v15; v16 = v14[1] == 0xFF || v14[2] == 0xFF; v26 = v32; a2 = v11; v25 = a5; return (unsigned int)handle_node(&v33, a2, v16, v26, v25, a6); } v7 = 2; if ( (_DWORD)v31 != 32 ) return v7; v21 = **((_OWORD **)&v31 + 1); a5[1] = *(_OWORD *)(*((_QWORD *)&v31 + 1) + 16LL); *a5 = v21; ++*v11; return 1; } if ( a3 && (unsigned int)rlp_decode(&v33, 16LL, &v33) == 1 ) { *v32 = v33; return (((unsigned int)v33 | 0x300000000uLL) - 1) >> 32; } return v7; }
handle_node: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RAX,qword ptr [R9] INC RAX MOV qword ptr [R9],RAX CMP RAX,0x40 JBE 0x0012d22a LAB_0012d222: XOR R13D,R13D JMP 0x0012d4e2 LAB_0012d22a: MOV R12,R9 MOV R14,R8 MOV EBP,EDX MOV R15,RSI MOV qword ptr [RSP + 0x18],RCX XOR R13D,R13D LEA RBX,[RSP + 0x20] XOR ESI,ESI MOV RDX,RBX CALL 0x0012d520 MOV RDI,RBX MOV ESI,0xffffffff XOR EDX,EDX CALL 0x0012d520 CMP EAX,0x2 JZ 0x0012d2ea CMP EAX,0x11 JNZ 0x0012d4e2 MOV RAX,qword ptr [R15] MOVZX ESI,byte ptr [RAX] CMP ESI,0xff JZ 0x0012d346 LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0x8] CALL 0x0012d520 CMP EAX,0x2 JNZ 0x0012d38a MOV RAX,qword ptr [R15] MOVZX ESI,byte ptr [RAX] DEC ESI LEA RBX,[RSP + 0x20] MOV RDI,RBX MOV RDX,RBX CALL 0x0012d520 MOV RAX,qword ptr [R15] LEA RCX,[RAX + 0x1] MOV qword ptr [R15],RCX MOV ECX,dword ptr [RSP + 0x10] ADD ECX,dword ptr [RSP + 0x8] MOV RDX,qword ptr [RBX + 0x8] SUB ECX,EDX MOV ESI,dword ptr [RBX] ADD RSI,RDX MOV dword ptr [RBX],ECX MOV qword ptr [RBX + 0x8],RSI CMP byte ptr [RAX + 0x1],0xff JZ 0x0012d4c2 XOR EDX,EDX CMP byte ptr [RAX + 0x2],0xff SETZ DL JMP 0x0012d4c7 LAB_0012d2ea: LEA RDI,[RSP + 0x20] XOR R13D,R13D LEA RDX,[RSP + 0x8] XOR ESI,ESI CALL 0x0012d520 CMP EAX,0x1 JNZ 0x0012d4e2 MOV EDI,dword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV EDX,0x1 CALL 0x0012d189 MOV DL,byte ptr [RAX] CMP DL,0xff MOV qword ptr [RSP + 0x30],R14 JZ 0x0012d3b8 MOV RCX,qword ptr [R15] XOR EBX,EBX LAB_0012d32f: CMP DL,byte ptr [RCX + RBX*0x1] JNZ 0x0012d3ba MOV DL,byte ptr [RAX + RBX*0x1 + 0x1] INC RBX CMP DL,0xff JNZ 0x0012d32f JMP 0x0012d3ba LAB_0012d346: TEST EBP,EBP JZ 0x0012d4e2 LEA RDI,[RSP + 0x20] MOV ESI,0x10 MOV RDX,RDI CALL 0x0012d520 CMP EAX,0x1 JNZ 0x0012d4e2 MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x18] MOVUPS xmmword ptr [RAX],XMM0 CMP dword ptr [RSP + 0x20],0x1 MOV R13D,0x3 SBB R13D,0x0 JMP 0x0012d4e2 LAB_0012d38a: MOV R13D,0x2 CMP dword ptr [RSP + 0x8],0x20 JNZ 0x0012d4e2 MOV RAX,qword ptr [RSP + 0x10] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [R14 + 0x10],XMM1 MOVUPS xmmword ptr [R14],XMM0 INC qword ptr [R15] JMP 0x0012d4ba LAB_0012d3b8: XOR EBX,EBX LAB_0012d3ba: MOV R13,-0x100000000 XOR R14D,R14D MOV RCX,0x100000000 LAB_0012d3d1: ADD R13,RCX CMP byte ptr [RAX + R14*0x1],0xff LEA R14,[R14 + 0x1] JNZ 0x0012d3d1 DEC R14D MOV RCX,qword ptr [RSP + 0x10] MOV CL,byte ptr [RCX] MOV byte ptr [RSP + 0x7],CL MOV RDI,RAX CALL 0x00150f4c CMP EBX,R14D JGE 0x0012d40b LAB_0012d3fa: XOR R13D,R13D TEST EBP,EBP SETNZ R13B ADD R13D,R13D JMP 0x0012d4e2 LAB_0012d40b: SAR R13,0x20 ADD qword ptr [R15],R13 LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0x8] MOV ESI,0x1 CALL 0x0012d520 CMP EAX,0x2 JNZ 0x0012d47c XOR EBP,EBP LEA RBX,[RSP + 0x20] MOV RDI,RBX XOR ESI,ESI MOV RDX,RBX CALL 0x0012d520 MOV EAX,dword ptr [RBX] ADD RAX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RAX MOV ECX,dword ptr [RSP + 0x10] ADD ECX,dword ptr [RSP + 0x8] SUB ECX,EAX MOV dword ptr [RBX],ECX CMP qword ptr [R15],0x0 MOV R8,qword ptr [RSP + 0x30] JZ 0x0012d46b XOR EBP,EBP CMP qword ptr [R15 + 0x8],0x0 SETZ BPL LAB_0012d46b: LEA RDI,[RSP + 0x20] MOV RSI,R15 MOV EDX,EBP MOV RCX,qword ptr [RSP + 0x18] JMP 0x0012d4d7 LAB_0012d47c: MOV RAX,qword ptr [R15] CMP byte ptr [RAX],0xff MOV RDI,qword ptr [RSP + 0x30] JZ 0x0012d4f4 TEST byte ptr [RSP + 0x7],0x20 MOV RAX,qword ptr [RSP + 0x18] JNZ 0x0012d3fa LAB_0012d499: MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS xmmword ptr [RAX],XMM0 MOV RSI,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x8] CMP EAX,0x20 MOV EDX,0x20 CMOVC EDX,EAX CALL 0x001211a0 LAB_0012d4ba: MOV R13D,0x1 JMP 0x0012d4e2 LAB_0012d4c2: MOV EDX,0x1 LAB_0012d4c7: MOV RCX,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x20] MOV RSI,R15 MOV R8,R14 LAB_0012d4d7: MOV R9,R12 CALL 0x0012d205 MOV R13D,EAX LAB_0012d4e2: MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012d4f4: TEST byte ptr [RSP + 0x7],0x20 MOV RAX,qword ptr [RSP + 0x18] JNZ 0x0012d50a TEST EBP,EBP JNZ 0x0012d222 JMP 0x0012d499 LAB_0012d50a: MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS xmmword ptr [RAX],XMM0 XOR EAX,EAX TEST EBP,EBP SETNZ AL LEA R13D,[RAX + RAX*0x2] JMP 0x0012d4e2
int handle_node(int8 param_1,long *param_2,int param_3,int8 *param_4,int8 *param_5 ,ulong *param_6) { char *pcVar1; byte bVar2; ulong uVar3; int8 uVar4; int8 uVar5; int8 uVar6; int8 *puVar7; int iVar8; char *pcVar9; uint uVar10; char cVar11; size_t __n; long lVar12; long lVar13; long lVar14; bool bVar15; uint local_60; int4 uStack_5c; int iStack_58; int4 uStack_54; int8 *local_50; uint local_48; int4 uStack_44; long lStack_40; int8 *local_38; uVar3 = *param_6; *param_6 = uVar3 + 1; if (0x40 < uVar3 + 1) { return 0; } local_50 = param_4; rlp_decode(param_1,0,&local_48); iVar8 = rlp_decode(&local_48,0xffffffff,0); if (iVar8 == 2) { iVar8 = rlp_decode(&local_48,0,&local_60); if (iVar8 != 1) { return 0; } pcVar9 = (char *)patricia_to_nibbles(local_60,CONCAT44(uStack_54,iStack_58),1); cVar11 = *pcVar9; if (cVar11 == -1) { lVar12 = 0; } else { lVar12 = 0; do { if (cVar11 != *(char *)(*param_2 + lVar12)) break; cVar11 = pcVar9[lVar12 + 1]; lVar12 = lVar12 + 1; } while (cVar11 != -1); } lVar13 = -0x100000000; lVar14 = 0; do { lVar13 = lVar13 + 0x100000000; pcVar1 = pcVar9 + lVar14; lVar14 = lVar14 + 1; } while (*pcVar1 != -1); bVar2 = *(byte *)CONCAT44(uStack_54,iStack_58); local_38 = param_5; safe_free(pcVar9); if ((int)lVar12 < (int)lVar14 + -1) { LAB_0012d3fa: return (uint)(param_3 != 0) * 2; } *param_2 = *param_2 + (lVar13 >> 0x20); iVar8 = rlp_decode(&local_48,1,&local_60); if (iVar8 == 2) { bVar15 = false; rlp_decode(&local_48,0,&local_48); lStack_40 = (ulong)local_48 + lStack_40; local_48 = (iStack_58 + local_60) - (int)lStack_40; param_5 = local_38; if (*param_2 != 0) { bVar15 = param_2[1] == 0; } goto LAB_0012d4d7; } if (*(char *)*param_2 == -1) { if ((bVar2 & 0x20) != 0) { *local_50 = CONCAT44(uStack_5c,local_60); local_50[1] = CONCAT44(uStack_54,iStack_58); return (uint)(param_3 != 0) * 3; } if (param_3 != 0) { return 0; } } else if ((bVar2 & 0x20) != 0) goto LAB_0012d3fa; *local_50 = CONCAT44(uStack_5c,local_60); local_50[1] = CONCAT44(uStack_54,iStack_58); __n = 0x20; if (local_60 < 0x20) { __n = (size_t)local_60; } memcpy(local_38,(void *)CONCAT44(uStack_54,iStack_58),__n); } else { if (iVar8 != 0x11) { return 0; } if (*(char *)*param_2 == -1) { if (param_3 == 0) { return 0; } iVar8 = rlp_decode(&local_48,0x10,&local_48); if (iVar8 == 1) { *local_50 = CONCAT44(uStack_44,local_48); local_50[1] = lStack_40; return 3 - (uint)(local_48 == 0); } return 0; } iVar8 = rlp_decode(&local_48,*(char *)*param_2,&local_60); if (iVar8 == 2) { rlp_decode(&local_48,*(byte *)*param_2 - 1,&local_48); lVar12 = *param_2; *param_2 = lVar12 + 1; uVar10 = (iStack_58 + local_60) - (int)lStack_40; lStack_40 = (ulong)local_48 + lStack_40; local_48 = uVar10; if (*(char *)(lVar12 + 1) == -1) { bVar15 = true; } else { bVar15 = *(char *)(lVar12 + 2) == -1; } LAB_0012d4d7: iVar8 = handle_node(&local_48,param_2,bVar15,local_50,param_5,param_6); return iVar8; } if (local_60 != 0x20) { return 2; } puVar7 = (int8 *)CONCAT44(uStack_54,iStack_58); uVar4 = *puVar7; uVar5 = puVar7[1]; uVar6 = puVar7[3]; param_5[2] = puVar7[2]; param_5[3] = uVar6; *param_5 = uVar4; param_5[1] = uVar5; *param_2 = *param_2 + 1; } return 1; }
25,363
aimrt::runtime::core::logger::LoggerManager::GetUsedLoggerBackend() const
aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc
const std::vector<std::unique_ptr<LoggerBackendBase>>& LoggerManager::GetUsedLoggerBackend() const { AIMRT_CHECK_ERROR_THROW( state_.load() == State::kInit, "Method can only be called when state is 'Init'."); return logger_backend_vec_; }
O3
cpp
aimrt::runtime::core::logger::LoggerManager::GetUsedLoggerBackend() const: pushq %rbx subq $0x40, %rsp movq %rdi, %rbx movl 0x20(%rdi), %eax cmpl $0x1, %eax jne 0x5726c addq $0x90, %rbx movq %rbx, %rax addq $0x40, %rsp popq %rbx retq leaq 0x2e7c5(%rip), %rsi # 0x85a38 leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %r8 movl $0x2f, %edx xorl %ecx, %ecx callq 0x25059 movq 0x28(%rbx), %rbx cmpq $0x0, 0x10(%rbx) jne 0x57299 callq 0x1e580 movq %rbx, %rdi callq *0x18(%rbx) cmpl $0x4, %eax ja 0x572d6 movq 0x10(%rsp), %r9 movq 0x18(%rsp), %rax addq $0x20, %rbx movq %rax, (%rsp) leaq 0x2fe64(%rip), %rcx # 0x87121 leaq 0x3006c(%rip), %r8 # 0x87330 movq %rbx, %rdi movl $0x4, %esi movl $0x112, %edx # imm = 0x112 callq 0x1ff80 movl $0x28, %edi callq 0x1e7e0 leaq 0x57169(%rip), %rcx # 0xae450 movq %rcx, (%rax) leaq 0x18(%rax), %rdx movq %rdx, 0x8(%rax) leaq 0x20(%rsp), %rcx movq -0x10(%rcx), %rsi cmpq %rcx, %rsi jne 0x57308 movups (%rcx), %xmm0 movups %xmm0, (%rdx) jmp 0x57315 movq %rsi, 0x8(%rax) movq 0x20(%rsp), %rdx movq %rdx, 0x18(%rax) movq 0x18(%rsp), %rdx movq %rdx, 0x10(%rax) movq %rcx, 0x10(%rsp) movq $0x0, 0x18(%rsp) movb $0x0, 0x20(%rsp) leaq 0x57048(%rip), %rsi # 0xae380 leaq -0x3360b(%rip), %rdx # 0x23d34 movq %rax, %rdi callq 0x1fec0 jmp 0x57349 movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x57367 movq 0x20(%rsp), %rsi incq %rsi callq 0x1f250 movq %rbx, %rdi callq 0x1ffd0 nop
_ZNK5aimrt7runtime4core6logger13LoggerManager20GetUsedLoggerBackendEv: push rbx sub rsp, 40h mov rbx, rdi mov eax, [rdi+20h] cmp eax, 1 jnz short loc_5726C add rbx, 90h mov rax, rbx add rsp, 40h pop rbx retn loc_5726C: lea rsi, aMethodCanOnlyB; "Method can only be called when state is"... lea rdi, [rsp+48h+var_38]; int lea r8, [rsp+48h+var_18]; int mov edx, 2Fh ; '/'; int xor ecx, ecx; int call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) mov rbx, [rbx+28h] cmp qword ptr [rbx+10h], 0 jnz short loc_57299 call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_57299: mov rdi, rbx call qword ptr [rbx+18h] cmp eax, 4 ja short loc_572D6 mov r9, qword ptr [rsp+48h+var_38] mov rax, [rsp+48h+var_30] add rbx, 20h ; ' ' mov [rsp+48h+var_48], rax lea rcx, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/aimrt_"... lea r8, aGetusedloggerb; "GetUsedLoggerBackend" mov rdi, rbx mov esi, 4 mov edx, 112h call __ZNKSt8functionIFvjjPKcS1_S1_mEEclEjjS1_S1_S1_m; std::function<void ()(uint,uint,char const*,char const*,char const*,ulong)>::operator()(uint,uint,char const*,char const*,char const*,ulong) loc_572D6: mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception lea rcx, off_AE450 mov [rax], rcx lea rdx, [rax+18h] mov [rax+8], rdx lea rcx, [rsp+48h+var_28] mov rsi, [rcx-10h] cmp rsi, rcx jnz short loc_57308 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 jmp short loc_57315 loc_57308: mov [rax+8], rsi mov rdx, [rsp+48h+var_28] mov [rax+18h], rdx loc_57315: mov rdx, [rsp+48h+var_30] mov [rax+10h], rdx mov qword ptr [rsp+48h+var_38], rcx mov [rsp+48h+var_30], 0 mov byte ptr [rsp+48h+var_28], 0 lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *) mov rdi, rax; void * call ___cxa_throw jmp short $+2 loc_57349: mov rbx, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_57367 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_57367: mov rdi, rbx call __Unwind_Resume
long long aimrt::runtime::core::logger::LoggerManager::GetUsedLoggerBackend( aimrt::runtime::core::logger::LoggerManager *this) { long long v2; // rbx char *exception; // rax int v4[2]; // [rsp+10h] [rbp-38h] BYREF long long v5; // [rsp+18h] [rbp-30h] __int128 v6; // [rsp+20h] [rbp-28h] BYREF if ( *((_DWORD *)this + 8) != 1 ) { fmt::v10::vformat[abi:cxx11](v4); v2 = *((_QWORD *)this + 5); if ( !*(_QWORD *)(v2 + 16) ) std::__throw_bad_function_call(); if ( (*(unsigned int ( **)(long long, const char *))(v2 + 24))( v2, "Method can only be called when state is 'Init'.") <= 4 ) std::function<void ()(unsigned int,unsigned int,char const*,char const*,char const*,unsigned long)>::operator()( v2 + 32, 4, 274, (unsigned int)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc", (unsigned int)"GetUsedLoggerBackend", v4[0], v5); exception = (char *)__cxa_allocate_exception(0x28uLL); *(_QWORD *)exception = off_AE450; *((_QWORD *)exception + 1) = exception + 24; if ( *(__int128 **)v4 == &v6 ) { *(_OWORD *)(exception + 24) = v6; } else { *((_QWORD *)exception + 1) = *(_QWORD *)v4; *((_QWORD *)exception + 3) = v6; } *((_QWORD *)exception + 2) = v5; *(_QWORD *)v4 = &v6; v5 = 0LL; LOBYTE(v6) = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException, (void (*)(void *))aimrt::common::util::AimRTException::~AimRTException); } return (long long)this + 144; }
GetUsedLoggerBackend: PUSH RBX SUB RSP,0x40 MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x20] CMP EAX,0x1 JNZ 0x0015726c ADD RBX,0x90 MOV RAX,RBX ADD RSP,0x40 POP RBX RET LAB_0015726c: LEA RSI,[0x185a38] LEA RDI,[RSP + 0x10] LEA R8,[RSP + 0x30] MOV EDX,0x2f XOR ECX,ECX CALL 0x00125059 MOV RBX,qword ptr [RBX + 0x28] CMP qword ptr [RBX + 0x10],0x0 JNZ 0x00157299 LAB_00157294: CALL 0x0011e580 LAB_00157299: MOV RDI,RBX CALL qword ptr [RBX + 0x18] CMP EAX,0x4 JA 0x001572d6 MOV R9,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] ADD RBX,0x20 LAB_001572b2: MOV qword ptr [RSP],RAX LEA RCX,[0x187121] LEA R8,[0x187330] MOV RDI,RBX MOV ESI,0x4 MOV EDX,0x112 CALL 0x0011ff80 LAB_001572d6: MOV EDI,0x28 CALL 0x0011e7e0 LEA RCX,[0x1ae450] MOV qword ptr [RAX],RCX LEA RDX,[RAX + 0x18] MOV qword ptr [RAX + 0x8],RDX LEA RCX,[RSP + 0x20] MOV RSI,qword ptr [RCX + -0x10] CMP RSI,RCX JNZ 0x00157308 MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 JMP 0x00157315 LAB_00157308: MOV qword ptr [RAX + 0x8],RSI MOV RDX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x18],RDX LAB_00157315: MOV RDX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x10],RDX MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],0x0 MOV byte ptr [RSP + 0x20],0x0 LAB_00157331: LEA RSI,[0x1ae380] LEA RDX,[0x123d34] MOV RDI,RAX CALL 0x0011fec0
/* aimrt::runtime::core::logger::LoggerManager::GetUsedLoggerBackend() const */ LoggerManager * __thiscall aimrt::runtime::core::logger::LoggerManager::GetUsedLoggerBackend(LoggerManager *this) { long lVar1; uint uVar2; int8 *puVar3; uint *local_38; int8 local_30; uint local_28; int4 uStack_24; int4 uStack_20; int4 uStack_1c; int1 local_18 [16]; if (*(int *)(this + 0x20) == 1) { return this + 0x90; } fmt::v10::vformat_abi_cxx11_ (&local_38,"Method can only be called when state is \'Init\'.",0x2f,0,local_18); lVar1 = *(long *)(this + 0x28); if (*(long *)(lVar1 + 0x10) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 00157294 to 0015729e has its CatchHandler @ 00157349 */ std::__throw_bad_function_call(); } uVar2 = (**(code **)(lVar1 + 0x18))(lVar1); if (uVar2 < 5) { /* try { // try from 001572b2 to 001572d5 has its CatchHandler @ 00157347 */ std::function<void(unsigned_int,unsigned_int,char_const*,char_const*,char_const*,unsigned_long)> ::operator()((int)lVar1 + 0x20,4,(char *)0x112, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc" ,"GetUsedLoggerBackend",(ulong)local_38); } puVar3 = (int8 *)__cxa_allocate_exception(0x28); *puVar3 = &PTR__AimRTException_001ae450; puVar3[1] = puVar3 + 3; if (local_38 == &local_28) { *(uint *)(puVar3 + 3) = local_28; *(int4 *)((long)puVar3 + 0x1c) = uStack_24; *(int4 *)(puVar3 + 4) = uStack_20; *(int4 *)((long)puVar3 + 0x24) = uStack_1c; } else { puVar3[1] = local_38; puVar3[3] = CONCAT44(uStack_24,local_28); } puVar3[2] = local_30; local_30 = 0; local_28 = local_28 & 0xffffff00; local_38 = &local_28; /* try { // try from 00157331 to 00157346 has its CatchHandler @ 00157349 */ /* WARNING: Subroutine does not return */ __cxa_throw(puVar3,&common::util::AimRTException::typeinfo, common::util::AimRTException::~AimRTException); }
25,364
ma_duplicate_resultset_metadata
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MYSQL_FIELD *ma_duplicate_resultset_metadata(MYSQL_FIELD *fields, size_t count, MA_MEM_ROOT *memroot) { size_t i; MYSQL_FIELD *result= (MYSQL_FIELD *) ma_alloc_root(memroot, sizeof(MYSQL_FIELD) * count); if (!result) return NULL; for (i= 0; i < count; i++) { if (ma_deep_copy_field(&fields[i], &result[i], memroot)) return NULL; } return result; }
O0
c
ma_duplicate_resultset_metadata: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi shlq $0x7, %rsi callq 0x26d50 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x213aa movq $0x0, -0x8(%rbp) jmp 0x2140a movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x21402 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rax shlq $0x7, %rax addq %rax, %rdi movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rax shlq $0x7, %rax addq %rax, %rsi movq -0x20(%rbp), %rdx callq 0x21420 cmpl $0x0, %eax je 0x213f2 movq $0x0, -0x8(%rbp) jmp 0x2140a jmp 0x213f4 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x213b2 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_duplicate_resultset_metadata: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] shl rsi, 7 call ma_alloc_root mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_213AA mov [rbp+var_8], 0 jmp short loc_2140A loc_213AA: mov [rbp+var_28], 0 loc_213B2: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_21402 mov rdi, [rbp+var_10] mov rax, [rbp+var_28] shl rax, 7 add rdi, rax mov rsi, [rbp+var_30] mov rax, [rbp+var_28] shl rax, 7 add rsi, rax mov rdx, [rbp+var_20] call ma_deep_copy_field cmp eax, 0 jz short loc_213F2 mov [rbp+var_8], 0 jmp short loc_2140A loc_213F2: jmp short $+2 loc_213F4: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_213B2 loc_21402: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_2140A: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long ma_duplicate_resultset_metadata(long long a1, unsigned long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-30h] unsigned long long i; // [rsp+8h] [rbp-28h] v4 = ma_alloc_root(a3, a2 << 7); if ( !v4 ) return 0LL; for ( i = 0LL; i < a2; ++i ) { if ( (unsigned int)ma_deep_copy_field((i << 7) + a1, (i << 7) + v4, a3) ) return 0LL; } return v4; }
ma_duplicate_resultset_metadata: 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 RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] SHL RSI,0x7 CALL 0x00126d50 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x001213aa MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012140a LAB_001213aa: MOV qword ptr [RBP + -0x28],0x0 LAB_001213b2: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x00121402 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x7 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x7 ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] CALL 0x00121420 CMP EAX,0x0 JZ 0x001213f2 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012140a LAB_001213f2: JMP 0x001213f4 LAB_001213f4: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x001213b2 LAB_00121402: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0012140a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long ma_duplicate_resultset_metadata(long param_1,ulong param_2,int8 param_3) { int iVar1; ulong local_30; long local_10; local_10 = ma_alloc_root(param_3,param_2 << 7); if (local_10 == 0) { local_10 = 0; } else { for (local_30 = 0; local_30 < param_2; local_30 = local_30 + 1) { iVar1 = ma_deep_copy_field(param_1 + local_30 * 0x80,local_10 + local_30 * 0x80,param_3); if (iVar1 != 0) { return 0; } } } return local_10; }
25,365
mi_decrement_open_count
eloqsql/storage/myisam/mi_locking.c
int _mi_decrement_open_count(MI_INFO *info) { uchar buff[2]; register MYISAM_SHARE *share=info->s; int lock_error=0,write_error=0; if (share->global_changed) { uint old_lock=info->lock_type; share->global_changed=0; lock_error= my_disable_locking ? 0 : mi_lock_database(info,F_WRLCK); /* Its not fatal even if we couldn't get the lock ! */ if (share->state.open_count > 0) { share->state.open_count--; mi_int2store(buff,share->state.open_count); write_error= (mysql_file_pwrite(share->kfile, buff, sizeof(buff), sizeof(share->state.header), MYF(MY_NABP)) != 0); } if (!lock_error && !my_disable_locking) lock_error=mi_lock_database(info,old_lock); } return MY_TEST(lock_error || write_error); }
O0
c
mi_decrement_open_count: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movq -0x18(%rbp), %rax cmpb $0x0, 0x380(%rax) je 0x397cc movq -0x8(%rbp), %rax movl 0x1f4(%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movb $0x0, 0x380(%rax) leaq 0x3bf923(%rip), %rax # 0x3f9028 movsbl (%rax), %eax cmpl $0x0, %eax je 0x39714 xorl %eax, %eax movl %eax, -0x2c(%rbp) jmp 0x39725 movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x38040 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0xec(%rax) jbe 0x397a9 movq -0x18(%rbp), %rax movl 0xec(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0xec(%rax) movq -0x18(%rbp), %rax movl 0xec(%rax), %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %eax movb %al, -0x9(%rbp) movl -0x28(%rbp), %eax shrl $0x8, %eax movb %al, -0xa(%rbp) movq -0x18(%rbp), %rax movl 0x350(%rax), %edx leaq -0xa(%rbp), %rcx leaq 0x9ed5d(%rip), %rdi # 0xd84d9 movl $0x28c, %esi # imm = 0x28C movl $0x2, %r8d movl $0x18, %r9d movq $0x4, (%rsp) callq 0x39540 cmpq $0x0, %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x20(%rbp) cmpl $0x0, -0x1c(%rbp) jne 0x397ca leaq 0x3bf872(%rip), %rax # 0x3f9028 cmpb $0x0, (%rax) jne 0x397ca movq -0x8(%rbp), %rdi movl -0x24(%rbp), %esi callq 0x38040 movl %eax, -0x1c(%rbp) jmp 0x397cc movb $0x1, %al cmpl $0x0, -0x1c(%rbp) movb %al, -0x2d(%rbp) jne 0x397e1 cmpl $0x0, -0x20(%rbp) setne %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %dl xorl %eax, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_mi_decrement_open_count: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov [rbp+var_1C], 0 mov [rbp+var_20], 0 mov rax, [rbp+var_18] cmp byte ptr [rax+380h], 0 jz loc_397CC mov rax, [rbp+var_8] mov eax, [rax+1F4h] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov byte ptr [rax+380h], 0 lea rax, my_disable_locking movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_39714 xor eax, eax mov [rbp+var_2C], eax jmp short loc_39725 loc_39714: mov rdi, [rbp+var_8] mov esi, 1 call mi_lock_database mov [rbp+var_2C], eax loc_39725: mov eax, [rbp+var_2C] mov [rbp+var_1C], eax mov rax, [rbp+var_18] cmp dword ptr [rax+0ECh], 0 jbe short loc_397A9 mov rax, [rbp+var_18] mov ecx, [rax+0ECh] add ecx, 0FFFFFFFFh mov [rax+0ECh], ecx mov rax, [rbp+var_18] mov eax, [rax+0ECh] mov [rbp+var_28], eax mov eax, [rbp+var_28] mov [rbp+var_9], al mov eax, [rbp+var_28] shr eax, 8 mov [rbp+var_A], al mov rax, [rbp+var_18] mov edx, [rax+350h] lea rcx, [rbp+var_A] lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 28Ch mov r8d, 2 mov r9d, 18h mov [rsp+40h+var_40], 4 call inline_mysql_file_pwrite_0 cmp rax, 0 setnz al and al, 1 movzx eax, al mov [rbp+var_20], eax loc_397A9: cmp [rbp+var_1C], 0 jnz short loc_397CA lea rax, my_disable_locking cmp byte ptr [rax], 0 jnz short loc_397CA mov rdi, [rbp+var_8] mov esi, [rbp+var_24] call mi_lock_database mov [rbp+var_1C], eax loc_397CA: jmp short $+2 loc_397CC: mov al, 1 cmp [rbp+var_1C], 0 mov [rbp+var_2D], al jnz short loc_397E1 cmp [rbp+var_20], 0 setnz al mov [rbp+var_2D], al loc_397E1: mov dl, [rbp+var_2D] xor eax, eax mov ecx, 1 test dl, 1 cmovnz eax, ecx add rsp, 40h pop rbp retn
_BOOL8 mi_decrement_open_count(_DWORD *a1) { __int16 v1; // kr00_2 bool v3; // [rsp+13h] [rbp-2Dh] int v4; // [rsp+14h] [rbp-2Ch] unsigned int v5; // [rsp+1Ch] [rbp-24h] BOOL v6; // [rsp+20h] [rbp-20h] int v7; // [rsp+24h] [rbp-1Ch] long long v8; // [rsp+28h] [rbp-18h] _BYTE v9[2]; // [rsp+36h] [rbp-Ah] BYREF _DWORD *v10; // [rsp+38h] [rbp-8h] v10 = a1; v8 = *(_QWORD *)a1; v7 = 0; v6 = 0; if ( *(_BYTE *)(*(_QWORD *)a1 + 896LL) ) { v5 = v10[125]; *(_BYTE *)(v8 + 896) = 0; if ( my_disable_locking ) v4 = 0; else v4 = mi_lock_database(v10, (_BYTE *)&dword_0 + 1); v7 = v4; if ( *(_DWORD *)(v8 + 236) ) { v1 = --*(_DWORD *)(v8 + 236); v9[0] = HIBYTE(v1); v9[1] = v1; v6 = inline_mysql_file_pwrite_0( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 0x28Cu, *(_DWORD *)(v8 + 848), (long long)v9, 2LL, 24LL, 4LL) != 0; } if ( !v4 && !my_disable_locking ) v7 = mi_lock_database(v10, (const char *)v5); } v3 = 1; if ( !v7 ) return v6; return v3; }
_mi_decrement_open_count: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x380],0x0 JZ 0x001397cc MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1f4] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x380],0x0 LEA RAX,[0x4f9028] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00139714 XOR EAX,EAX MOV dword ptr [RBP + -0x2c],EAX JMP 0x00139725 LAB_00139714: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x00138040 MOV dword ptr [RBP + -0x2c],EAX LAB_00139725: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0xec],0x0 JBE 0x001397a9 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0xec] ADD ECX,-0x1 MOV dword ptr [RAX + 0xec],ECX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xec] MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x9],AL MOV EAX,dword ptr [RBP + -0x28] SHR EAX,0x8 MOV byte ptr [RBP + -0xa],AL MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RAX + 0x350] LEA RCX,[RBP + -0xa] LEA RDI,[0x1d84d9] MOV ESI,0x28c MOV R8D,0x2 MOV R9D,0x18 MOV qword ptr [RSP],0x4 CALL 0x00139540 CMP RAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x20],EAX LAB_001397a9: CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x001397ca LEA RAX,[0x4f9028] CMP byte ptr [RAX],0x0 JNZ 0x001397ca MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x24] CALL 0x00138040 MOV dword ptr [RBP + -0x1c],EAX LAB_001397ca: JMP 0x001397cc LAB_001397cc: MOV AL,0x1 CMP dword ptr [RBP + -0x1c],0x0 MOV byte ptr [RBP + -0x2d],AL JNZ 0x001397e1 CMP dword ptr [RBP + -0x20],0x0 SETNZ AL MOV byte ptr [RBP + -0x2d],AL LAB_001397e1: MOV DL,byte ptr [RBP + -0x2d] XOR EAX,EAX MOV ECX,0x1 TEST DL,0x1 CMOVNZ EAX,ECX ADD RSP,0x40 POP RBP RET
bool _mi_decrement_open_count(long *param_1) { int4 uVar1; long lVar2; bool bVar3; int local_34; int local_24; int1 local_12; int1 local_11; long *local_10; lVar2 = *param_1; local_24 = 0; bVar3 = false; if (*(char *)(lVar2 + 0x380) != '\0') { uVar1 = *(int4 *)((long)param_1 + 500); *(int1 *)(lVar2 + 0x380) = 0; local_10 = param_1; if (my_disable_locking == '\0') { local_34 = mi_lock_database(param_1,1); } else { local_34 = 0; } local_24 = local_34; if (*(int *)(lVar2 + 0xec) != 0) { *(int *)(lVar2 + 0xec) = *(int *)(lVar2 + 0xec) + -1; local_11 = (int1)*(int4 *)(lVar2 + 0xec); local_12 = (int1)((uint)*(int4 *)(lVar2 + 0xec) >> 8); lVar2 = inline_mysql_file_pwrite ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 0x28c,*(int4 *)(lVar2 + 0x350),&local_12,2,0x18,4); bVar3 = lVar2 != 0; } if ((local_34 == 0) && (my_disable_locking == '\0')) { local_24 = mi_lock_database(local_10,uVar1); } } return local_24 != 0 || bVar3; }
25,366
maria_scan_init
eloqsql/storage/maria/ma_scan.c
int maria_scan_init(register MARIA_HA *info) { DBUG_ENTER("maria_scan_init"); info->cur_row.nextpos= info->s->pack.header_length; /* Read first record */ info->lastinx= -1; /* Can't forward or backward */ if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache)) DBUG_RETURN(my_errno); if ((*info->s->scan_init)(info)) DBUG_RETURN(my_errno); DBUG_RETURN(0); }
O0
c
maria_scan_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x590(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x10(%rbp), %rax movl $0xffffffff, 0x62c(%rax) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x73ebd movq -0x10(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe1f60 cmpl $0x0, %eax je 0x73ebd jmp 0x73eb1 callq 0xf7440 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x73eec movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x650(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax cmpb $0x0, %al je 0x73ee3 jmp 0x73ed7 callq 0xf7440 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x73eec jmp 0x73ee5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
maria_scan_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rax+590h] mov rax, [rbp+var_10] mov [rax+0A0h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+62Ch], 0FFFFFFFFh mov rax, [rbp+var_10] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_73EBD mov rdi, [rbp+var_10] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_73EBD jmp short $+2 loc_73EB1: call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax jmp short loc_73EEC loc_73EBD: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+650h] mov rdi, [rbp+var_10] call rax cmp al, 0 jz short loc_73EE3 jmp short $+2 loc_73ED7: call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax jmp short loc_73EEC loc_73EE3: jmp short $+2 loc_73EE5: mov [rbp+var_4], 0 loc_73EEC: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long maria_scan_init(long long a1, const char *a2) { long long v2; // rdi *(_QWORD *)(a1 + 160) = *(_QWORD *)(*(_QWORD *)a1 + 1424LL); *(_DWORD *)(a1 + 1580) = -1; if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 ) { v2 = a1 + 1208; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(a1 + 1208, 1LL) ) return *(unsigned int *)my_thread_var(v2, a2); } v2 = a1; if ( (*(unsigned __int8 ( **)(long long))(*(_QWORD *)a1 + 1616LL))(a1) ) return *(unsigned int *)my_thread_var(v2, a2); else return 0; }
maria_scan_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x590] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x62c],0xffffffff MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00173ebd MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e1f60 CMP EAX,0x0 JZ 0x00173ebd JMP 0x00173eb1 LAB_00173eb1: CALL 0x001f7440 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00173eec LAB_00173ebd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x650] MOV RDI,qword ptr [RBP + -0x10] CALL RAX CMP AL,0x0 JZ 0x00173ee3 JMP 0x00173ed7 LAB_00173ed7: CALL 0x001f7440 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00173eec LAB_00173ee3: JMP 0x00173ee5 LAB_00173ee5: MOV dword ptr [RBP + -0x4],0x0 LAB_00173eec: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 maria_scan_init(long *param_1) { char cVar1; int iVar2; int4 *puVar3; int4 local_c; param_1[0x14] = *(long *)(*param_1 + 0x590); *(int4 *)((long)param_1 + 0x62c) = 0xffffffff; if (((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && (iVar2 = my_b_flush_io_cache(param_1 + 0x97,1), iVar2 != 0)) { puVar3 = (int4 *)_my_thread_var(); return *puVar3; } cVar1 = (**(code **)(*param_1 + 0x650))(param_1); if (cVar1 == '\0') { local_c = 0; } else { puVar3 = (int4 *)_my_thread_var(); local_c = *puVar3; } return local_c; }
25,367
my_hash_sort_utf16_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_bin(CHARSET_INFO *cs, const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { size_t lengthsp= my_ci_lengthsp(cs, (const char *) pos, len); my_hash_sort_utf16_nopad_bin(cs, pos, lengthsp, nr1, nr2); }
O3
c
my_hash_sort_utf16_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r14 movq %rsi, %r15 movq 0xb8(%rdi), %rax callq *0x18(%rax) movq (%r14), %rcx movq (%rbx), %rdx testq %rax, %rax jle 0xc608d addq %r15, %rax movl %ecx, %esi andl $0x3f, %esi addq %rdx, %rsi movzbl (%r15), %edi imulq %rsi, %rdi movq %rcx, %rsi shlq $0x8, %rsi addq %rdi, %rsi xorq %rsi, %rcx addq $0x3, %rdx incq %r15 cmpq %rax, %r15 jb 0xc6064 movq %rcx, (%r14) movq %rdx, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_sort_utf16_bin: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, r8 mov r14, rcx mov r15, rsi mov rax, [rdi+0B8h] call qword ptr [rax+18h] mov rcx, [r14] mov rdx, [rbx] test rax, rax jle short loc_C608D add rax, r15 loc_C6064: mov esi, ecx and esi, 3Fh add rsi, rdx movzx edi, byte ptr [r15] imul rdi, rsi mov rsi, rcx shl rsi, 8 add rsi, rdi xor rcx, rsi add rdx, 3 inc r15 cmp r15, rax jb short loc_C6064 loc_C608D: mov [r14], rcx mov [rbx], rdx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_sort_utf16_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { unsigned __int8 *v7; // r15 long long result; // rax long long v9; // rcx long long v10; // rdx v7 = a2; result = (*(long long ( **)(long long))(*(_QWORD *)(a1 + 184) + 24LL))(a1); v9 = *a4; v10 = *a5; if ( result > 0 ) { result += (long long)a2; do { v9 ^= (v10 + (v9 & 0x3F)) * *v7 + (v9 << 8); v10 += 3LL; ++v7; } while ( (unsigned long long)v7 < result ); } *a4 = v9; *a5 = v10; return result; }
my_hash_sort_utf16_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RCX MOV R15,RSI MOV RAX,qword ptr [RDI + 0xb8] CALL qword ptr [RAX + 0x18] MOV RCX,qword ptr [R14] MOV RDX,qword ptr [RBX] TEST RAX,RAX JLE 0x001c608d ADD RAX,R15 LAB_001c6064: MOV ESI,ECX AND ESI,0x3f ADD RSI,RDX MOVZX EDI,byte ptr [R15] IMUL RDI,RSI MOV RSI,RCX SHL RSI,0x8 ADD RSI,RDI XOR RCX,RSI ADD RDX,0x3 INC R15 CMP R15,RAX JC 0x001c6064 LAB_001c608d: MOV qword ptr [R14],RCX MOV qword ptr [RBX],RDX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_sort_utf16_bin (long param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5) { long lVar1; byte *pbVar2; ulong uVar3; long lVar4; lVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x18))(); uVar3 = *param_4; lVar4 = *param_5; if (0 < lVar1) { pbVar2 = param_2 + lVar1; do { uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4); lVar4 = lVar4 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar3; *param_5 = lVar4; return; }
25,368
TIME_to_ulonglong_datetime
eloqsql/client/../sql-common/my_time.c
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *my_time) { return ((ulonglong) (my_time->year * 10000UL + my_time->month * 100UL + my_time->day) * 1000000ULL + (ulonglong) (my_time->hour * 10000UL + my_time->minute * 100UL + my_time->second)); }
O0
c
TIME_to_ulonglong_datetime: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl (%rax), %eax imulq $0x2710, %rax, %rax # imm = 0x2710 movq -0x8(%rbp), %rcx movl 0x4(%rcx), %ecx imulq $0x64, %rcx, %rcx addq %rcx, %rax movq -0x8(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax imulq $0xf4240, %rax, %rax # imm = 0xF4240 movq -0x8(%rbp), %rcx movl 0xc(%rcx), %ecx imulq $0x2710, %rcx, %rcx # imm = 0x2710 movq -0x8(%rbp), %rdx movl 0x10(%rdx), %edx imulq $0x64, %rdx, %rdx addq %rdx, %rcx movq -0x8(%rbp), %rdx movl 0x14(%rdx), %edx addq %rdx, %rcx addq %rcx, %rax popq %rbp retq nop
TIME_to_ulonglong_datetime: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax] imul rax, 2710h mov rcx, [rbp+var_8] mov ecx, [rcx+4] imul rcx, 64h ; 'd' add rax, rcx mov rcx, [rbp+var_8] mov ecx, [rcx+8] add rax, rcx imul rax, 0F4240h mov rcx, [rbp+var_8] mov ecx, [rcx+0Ch] imul rcx, 2710h mov rdx, [rbp+var_8] mov edx, [rdx+10h] imul rdx, 64h ; 'd' add rcx, rdx mov rdx, [rbp+var_8] mov edx, [rdx+14h] add rcx, rdx add rax, rcx pop rbp retn
long long TIME_to_ulonglong_datetime(unsigned int *a1) { return a1[5] + 100LL * a1[4] + 10000LL * a1[3] + 1000000 * (a1[2] + 100LL * a1[1] + 10000LL * *a1); }
TIME_to_ulonglong_datetime: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] IMUL RAX,RAX,0x2710 MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x4] IMUL RCX,RCX,0x64 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX IMUL RAX,RAX,0xf4240 MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0xc] IMUL RCX,RCX,0x2710 MOV RDX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RDX + 0x10] IMUL RDX,RDX,0x64 ADD RCX,RDX MOV RDX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RDX + 0x14] ADD RCX,RDX ADD RAX,RCX POP RBP RET
long TIME_to_ulonglong_datetime(uint *param_1) { return ((ulong)*param_1 * 10000 + (ulong)param_1[1] * 100 + (ulong)param_1[2]) * 1000000 + (ulong)param_1[3] * 10000 + (ulong)param_1[4] * 100 + (ulong)param_1[5]; }
25,369
stbi_load_16_from_memory
llama.cpp/examples/llava/../../common/stb_image.h
STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); }
O3
c
stbi_load_16_from_memory: subq $0xe8, %rsp leaq 0x8(%rsp), %rax movq $0x0, 0x10(%rax) xorl %r10d, %r10d movl %r10d, 0x30(%rax) movl %r10d, 0xb8(%rax) movq %rdi, 0xd0(%rax) movq %rdi, 0xc0(%rax) movslq %esi, %rsi addq %rdi, %rsi movq %rsi, 0xd8(%rax) movq %rsi, 0xc8(%rax) movq %rax, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx movl %r9d, %r8d callq 0x220ee addq $0xe8, %rsp retq
stbi_load_16_from_memory: sub rsp, 0E8h lea rax, [rsp+0E8h+var_E0] mov qword ptr [rax+10h], 0 xor r10d, r10d mov [rax+30h], r10d mov [rax+0B8h], r10d mov [rax+0D0h], rdi mov [rax+0C0h], rdi movsxd rsi, esi add rsi, rdi mov [rax+0D8h], rsi mov [rax+0C8h], rsi mov rdi, rax mov rsi, rdx mov rdx, rcx mov rcx, r8 mov r8d, r9d call _ZL32stbi__load_and_postprocess_16bitP13stbi__contextPiS1_S1_i; stbi__load_and_postprocess_16bit(stbi__context *,int *,int *,int *,int) add rsp, 0E8h retn
_WORD * stbi_load_16_from_memory(long long a1, int a2, int *a3, int *a4, int *a5, unsigned int a6) { _BYTE v7[16]; // [rsp+8h] [rbp-E0h] BYREF long long v8; // [rsp+18h] [rbp-D0h] int v9; // [rsp+38h] [rbp-B0h] int v10; // [rsp+C0h] [rbp-28h] long long v11; // [rsp+C8h] [rbp-20h] long long v12; // [rsp+D0h] [rbp-18h] long long v13; // [rsp+D8h] [rbp-10h] long long v14; // [rsp+E0h] [rbp-8h] v8 = 0LL; v9 = 0; v10 = 0; v13 = a1; v11 = a1; v14 = a1 + a2; v12 = v14; return stbi__load_and_postprocess_16bit((long long)v7, a3, a4, a5, a6); }
stbi_load_16_from_memory: SUB RSP,0xe8 LEA RAX,[RSP + 0x8] MOV qword ptr [RAX + 0x10],0x0 XOR R10D,R10D MOV dword ptr [RAX + 0x30],R10D MOV dword ptr [RAX + 0xb8],R10D MOV qword ptr [RAX + 0xd0],RDI MOV qword ptr [RAX + 0xc0],RDI MOVSXD RSI,ESI ADD RSI,RDI MOV qword ptr [RAX + 0xd8],RSI MOV qword ptr [RAX + 0xc8],RSI MOV RDI,RAX MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 MOV R8D,R9D CALL 0x001220ee ADD RSP,0xe8 RET
void stbi_load_16_from_memory (long param_1,int param_2,int *param_3,int *param_4,int *param_5,int param_6) { stbi__context local_e0 [16]; int8 local_d0; int4 local_b0; int4 local_28; long local_20; long local_18; long local_10; long local_8; local_d0 = 0; local_b0 = 0; local_28 = 0; local_18 = param_2 + param_1; local_20 = param_1; local_10 = param_1; local_8 = local_18; stbi__load_and_postprocess_16bit(local_e0,param_3,param_4,param_5,param_6); return; }
25,370
ma_tls_read
eloqsql/libmariadb/libmariadb/secure/openssl.c
ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length) { int rc; MARIADB_PVIO *pvio= ctls->pvio; while ((rc= SSL_read((SSL *)ctls->ssl, (void *)buffer, (int)length)) <= 0) { int error= SSL_get_error((SSL *)ctls->ssl, rc); if (error != SSL_ERROR_WANT_READ) break; if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.read_timeout) < 1) break; } if (rc <= 0) { MYSQL *mysql= SSL_get_app_data(ctls->ssl); ma_tls_set_error(mysql); } return rc; }
O3
c
ma_tls_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r15 movq 0x8(%rdi), %r13 movq 0x10(%r15), %rdi movq %r12, %rsi movl %ebx, %edx callq 0x35ad0 movl %eax, %r14d testl %eax, %eax jg 0x49508 movq 0x10(%r15), %rdi movl %r14d, %esi callq 0x35b00 cmpl $0x2, %eax jne 0x494f5 movq 0x40(%r13), %rax movq 0x48(%r13), %rcx movl 0x394(%rax), %edx movq %r13, %rdi movl $0x1, %esi callq *0x30(%rcx) testl %eax, %eax jg 0x494b2 movq 0x10(%r15), %rdi xorl %esi, %esi callq 0x352d0 movq %rax, %rdi callq 0x49288 movslq %r14d, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_tls_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r12, rsi mov r15, rdi mov r13, [rdi+8] loc_494B2: mov rdi, [r15+10h] mov rsi, r12 mov edx, ebx call _SSL_read mov r14d, eax test eax, eax jg short loc_49508 mov rdi, [r15+10h] mov esi, r14d call _SSL_get_error cmp eax, 2 jnz short loc_494F5 mov rax, [r13+40h] mov rcx, [r13+48h] mov edx, [rax+394h] mov rdi, r13 mov esi, 1 call qword ptr [rcx+30h] test eax, eax jg short loc_494B2 loc_494F5: mov rdi, [r15+10h] xor esi, esi call _SSL_get_ex_data mov rdi, rax call ma_tls_set_error loc_49508: movsxd rax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_tls_read(long long a1, long long a2, unsigned int a3) { long long v4; // r13 int v5; // eax int v6; // r14d long long *v7; // rax v4 = *(_QWORD *)(a1 + 8); while ( 1 ) { v5 = SSL_read(*(_QWORD *)(a1 + 16), a2, a3); v6 = v5; if ( v5 > 0 ) break; if ( (unsigned int)SSL_get_error(*(_QWORD *)(a1 + 16), (unsigned int)v5) != 2 || (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v4 + 72) + 48LL))( v4, 1LL, *(unsigned int *)(*(_QWORD *)(v4 + 64) + 916LL)) <= 0 ) { v7 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL); ma_tls_set_error(v7); return v6; } } return v6; }
ma_tls_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R12,RSI MOV R15,RDI MOV R13,qword ptr [RDI + 0x8] LAB_001494b2: MOV RDI,qword ptr [R15 + 0x10] MOV RSI,R12 MOV EDX,EBX CALL 0x00135ad0 MOV R14D,EAX TEST EAX,EAX JG 0x00149508 MOV RDI,qword ptr [R15 + 0x10] MOV ESI,R14D CALL 0x00135b00 CMP EAX,0x2 JNZ 0x001494f5 MOV RAX,qword ptr [R13 + 0x40] MOV RCX,qword ptr [R13 + 0x48] MOV EDX,dword ptr [RAX + 0x394] MOV RDI,R13 MOV ESI,0x1 CALL qword ptr [RCX + 0x30] TEST EAX,EAX JG 0x001494b2 LAB_001494f5: MOV RDI,qword ptr [R15 + 0x10] XOR ESI,ESI CALL 0x001352d0 MOV RDI,RAX CALL 0x00149288 LAB_00149508: MOVSXD RAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_tls_read(long param_1,void *param_2,int param_3) { long lVar1; int ret_code; int iVar2; void *pvVar3; lVar1 = *(long *)(param_1 + 8); do { ret_code = SSL_read(*(SSL **)(param_1 + 0x10),param_2,param_3); if (0 < ret_code) goto LAB_00149508; iVar2 = SSL_get_error(*(SSL **)(param_1 + 0x10),ret_code); if (iVar2 != 2) break; iVar2 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30)) (lVar1,1,*(int4 *)(*(long *)(lVar1 + 0x40) + 0x394)); } while (0 < iVar2); pvVar3 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0); ma_tls_set_error(pvVar3); LAB_00149508: return (long)ret_code; }
25,371
set_process_priority(ggml_sched_priority)
monkey531[P]llama/common/common.cpp
bool set_process_priority(enum ggml_sched_priority prio) { if (prio == GGML_SCHED_PRIO_NORMAL) { return true; } int p = 0; switch (prio) { case GGML_SCHED_PRIO_NORMAL: p = 0; break; case GGML_SCHED_PRIO_MEDIUM: p = -5; break; case GGML_SCHED_PRIO_HIGH: p = -10; break; case GGML_SCHED_PRIO_REALTIME: p = -20; break; } if (!setpriority(PRIO_PROCESS, 0, p)) { LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno); return false; } return true; }
O3
cpp
set_process_priority(ggml_sched_priority): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx cmpl $0x3, %edi ja 0x1ed51 movl %ebx, %eax leaq 0x8960a(%rip), %rcx # 0xa8338 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, %bpl jmp 0x1eda7 movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x1ed53 movl $0xffffffec, %edx # imm = 0xFFFFFFEC jmp 0x1ed53 movl $0xfffffffb, %edx # imm = 0xFFFFFFFB jmp 0x1ed53 xorl %edx, %edx xorl %edi, %edi xorl %esi, %esi callq 0x18170 testl %eax, %eax setne %bpl jne 0x1eda7 leaq 0xc0295(%rip), %rax # 0xdf000 cmpl $0x0, (%rax) js 0x1eda7 callq 0x80403 movq %rax, %r14 callq 0x18060 movq %rax, %r15 movl (%rax), %edi callq 0x18210 movl (%r15), %r9d leaq 0x8a029(%rip), %rdx # 0xa8dba xorl %ebp, %ebp movq %r14, %rdi movl $0x3, %esi movl %ebx, %ecx movq %rax, %r8 xorl %eax, %eax callq 0x804a0 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_Z20set_process_priority19ggml_sched_priority: push rbp push r15 push r14 push rbx push rax mov ebx, edi cmp edi, 3; switch 4 cases ja short def_1ED35; jumptable 000000000001ED35 default case mov eax, ebx lea rcx, jpt_1ED35 movsxd rax, ds:(jpt_1ED35 - 0A8338h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1ED37: mov bpl, 1; jumptable 000000000001ED35 case 0 jmp short loc_1EDA7 loc_1ED3C: mov edx, 0FFFFFFF6h; jumptable 000000000001ED35 case 2 jmp short loc_1ED53 loc_1ED43: mov edx, 0FFFFFFECh; jumptable 000000000001ED35 case 3 jmp short loc_1ED53 loc_1ED4A: mov edx, 0FFFFFFFBh; jumptable 000000000001ED35 case 1 jmp short loc_1ED53 def_1ED35: xor edx, edx; jumptable 000000000001ED35 default case loc_1ED53: xor edi, edi xor esi, esi call _setpriority test eax, eax setnz bpl jnz short loc_1EDA7 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_1EDA7 call _Z15common_log_mainv; common_log_main(void) mov r14, rax call ___errno_location mov r15, rax mov edi, [rax] call _strerror mov r9d, [r15] lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "... xor ebp, ebp mov rdi, r14 mov esi, 3 mov ecx, ebx mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_1EDA7: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long set_process_priority(int a1) { char v1; // al unsigned int v2; // ebp long long v3; // rdx int v4; // eax int v5; // r14d unsigned int *v6; // r15 int v7; // eax char v9; // [rsp-8h] [rbp-28h] v9 = v1; switch ( a1 ) { case 0: LOBYTE(v2) = 1; return v2; case 1: v3 = 4294967291LL; goto LABEL_7; case 2: v3 = 4294967286LL; goto LABEL_7; case 3: v3 = 4294967276LL; goto LABEL_7; default: v3 = 0LL; LABEL_7: v4 = setpriority(0LL, 0LL, v3); LOBYTE(v2) = v4 != 0; if ( !v4 && common_log_verbosity_thold >= 0 ) { v5 = common_log_main(); v6 = (unsigned int *)__errno_location(); v7 = strerror(*v6); v2 = 0; common_log_add(v5, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v7, *v6, v9); } return v2; } }
set_process_priority: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI CMP EDI,0x3 JA 0x0011ed51 MOV EAX,EBX LEA RCX,[0x1a8338] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BPL,0x1 JMP 0x0011eda7 caseD_2: MOV EDX,0xfffffff6 JMP 0x0011ed53 caseD_3: MOV EDX,0xffffffec JMP 0x0011ed53 caseD_1: MOV EDX,0xfffffffb JMP 0x0011ed53 default: XOR EDX,EDX LAB_0011ed53: XOR EDI,EDI XOR ESI,ESI CALL 0x00118170 TEST EAX,EAX SETNZ BPL JNZ 0x0011eda7 LEA RAX,[0x1df000] CMP dword ptr [RAX],0x0 JS 0x0011eda7 CALL 0x00180403 MOV R14,RAX CALL 0x00118060 MOV R15,RAX MOV EDI,dword ptr [RAX] CALL 0x00118210 MOV R9D,dword ptr [R15] LEA RDX,[0x1a8dba] XOR EBP,EBP MOV RDI,R14 MOV ESI,0x3 MOV ECX,EBX MOV R8,RAX XOR EAX,EAX CALL 0x001804a0 LAB_0011eda7: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* set_process_priority(ggml_sched_priority) */ ulong set_process_priority(int4 param_1) { int iVar1; int8 uVar2; int *piVar3; char *pcVar4; int8 unaff_RBP; int7 uVar6; ulong uVar5; uVar6 = (int7)((ulong)unaff_RBP >> 8); switch(param_1) { case 0: uVar5 = CONCAT71(uVar6,1); goto LAB_0011eda7; case 1: iVar1 = -5; break; case 2: iVar1 = -10; break; case 3: iVar1 = -0x14; break; default: iVar1 = 0; } iVar1 = setpriority(PRIO_PROCESS,0,iVar1); uVar5 = CONCAT71(uVar6,iVar1 != 0); if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); uVar5 = 0; common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3); } LAB_0011eda7: return uVar5 & 0xffffffff; }
25,372
Tools::atomic_wait_for(std::atomic<bool> const&, bool, unsigned long)
cosmotop/src/cosmotop_tools_shared.cpp
void atomic_wait_for(const atomic<bool>& atom, bool old, const uint64_t wait_ms) noexcept { const uint64_t start_time = time_ms(); while (atom.load(std::memory_order_relaxed) == old and (time_ms() - start_time < wait_ms)) sleep_ms(1); }
O0
cpp
Tools::atomic_wait_for(std::atomic<bool> const&, bool, unsigned long): subq $0x48, %rsp movb %sil, %al movq %rdi, 0x40(%rsp) andb $0x1, %al movb %al, 0x3f(%rsp) movq %rdx, 0x30(%rsp) callq 0xf7500 movq %rax, 0x18(%rsp) jmp 0xf2dd3 movq 0x18(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x40(%rsp), %rdi xorl %esi, %esi callq 0xf7470 andb $0x1, %al movzbl %al, %ecx movb 0x3f(%rsp), %al andb $0x1, %al movzbl %al, %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, 0x17(%rsp) jne 0xf2e23 callq 0xf7500 movq %rax, 0x8(%rsp) jmp 0xf2e0d movq 0x8(%rsp), %rax subq 0x28(%rsp), %rax cmpq 0x30(%rsp), %rax setb %al movb %al, 0x17(%rsp) movb 0x17(%rsp), %al testb $0x1, %al jne 0xf2e2d jmp 0xf2e44 movq $0x1, 0x20(%rsp) leaq 0x20(%rsp), %rdi callq 0xf7540 jmp 0xf2e42 jmp 0xf2ddd addq $0x48, %rsp retq movq %rax, %rdi callq 0x37ff0 nopw %cs:(%rax,%rax)
_ZN5Tools15atomic_wait_forERKSt6atomicIbEbm: sub rsp, 48h mov al, sil mov [rsp+48h+var_8], rdi and al, 1 mov [rsp+48h+var_9], al mov [rsp+48h+var_18], rdx call _ZN5Tools7time_msEv; Tools::time_ms(void) mov [rsp+48h+var_30], rax jmp short $+2 loc_F2DD3: mov rax, [rsp+48h+var_30] mov [rsp+48h+var_20], rax loc_F2DDD: mov rdi, [rsp+48h+var_8]; this xor esi, esi; unsigned __int64 * call _ZNKSt6atomicIbE4loadESt12memory_order; std::atomic<bool>::load(std::memory_order) and al, 1 movzx ecx, al mov al, [rsp+48h+var_9] and al, 1 movzx edx, al xor eax, eax cmp ecx, edx mov [rsp+48h+var_31], al jnz short loc_F2E23 call _ZN5Tools7time_msEv; Tools::time_ms(void) mov [rsp+48h+var_40], rax jmp short $+2 loc_F2E0D: mov rax, [rsp+48h+var_40] sub rax, [rsp+48h+var_20] cmp rax, [rsp+48h+var_18] setb al mov [rsp+48h+var_31], al loc_F2E23: mov al, [rsp+48h+var_31] test al, 1 jnz short loc_F2E2D jmp short loc_F2E44 loc_F2E2D: mov [rsp+48h+var_28], 1 lea rdi, [rsp+48h+var_28]; this call _ZN5Tools8sleep_msERKm; Tools::sleep_ms(ulong const&) jmp short $+2 loc_F2E42: jmp short loc_F2DDD loc_F2E44: add rsp, 48h retn mov rdi, rax call __clang_call_terminate
bool Tools::atomic_wait_for(Tools *a1, char a2, unsigned long long a3) { Tools *v3; // rdi int v4; // ecx bool result; // al long long v6; // [rsp+8h] [rbp-40h] bool v7; // [rsp+17h] [rbp-31h] long long v8; // [rsp+20h] [rbp-28h] BYREF long long v9; // [rsp+28h] [rbp-20h] unsigned long long v10; // [rsp+30h] [rbp-18h] char v11; // [rsp+3Fh] [rbp-9h] Tools *v12; // [rsp+40h] [rbp-8h] v12 = a1; v11 = a2 & 1; v10 = a3; v9 = Tools::time_ms(a1); while ( 1 ) { v3 = v12; v4 = std::atomic<bool>::load(v12, 0LL) & 1; v7 = 0; if ( v4 == (v11 & 1) ) { v6 = Tools::time_ms(v3); v7 = v6 - v9 < v10; } result = v7; if ( !v7 ) break; v8 = 1LL; Tools::sleep_ms((Tools *)&v8, 0LL); } return result; }
atomic_wait_for: SUB RSP,0x48 MOV AL,SIL MOV qword ptr [RSP + 0x40],RDI AND AL,0x1 MOV byte ptr [RSP + 0x3f],AL MOV qword ptr [RSP + 0x30],RDX LAB_001f2dc7: CALL 0x001f7500 MOV qword ptr [RSP + 0x18],RAX JMP 0x001f2dd3 LAB_001f2dd3: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x28],RAX LAB_001f2ddd: MOV RDI,qword ptr [RSP + 0x40] XOR ESI,ESI CALL 0x001f7470 AND AL,0x1 MOVZX ECX,AL MOV AL,byte ptr [RSP + 0x3f] AND AL,0x1 MOVZX EDX,AL XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RSP + 0x17],AL JNZ 0x001f2e23 CALL 0x001f7500 MOV qword ptr [RSP + 0x8],RAX JMP 0x001f2e0d LAB_001f2e0d: MOV RAX,qword ptr [RSP + 0x8] SUB RAX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RSP + 0x30] SETC AL MOV byte ptr [RSP + 0x17],AL LAB_001f2e23: MOV AL,byte ptr [RSP + 0x17] TEST AL,0x1 JNZ 0x001f2e2d JMP 0x001f2e44 LAB_001f2e2d: MOV qword ptr [RSP + 0x20],0x1 LEA RDI,[RSP + 0x20] CALL 0x001f7540 JMP 0x001f2e42 LAB_001f2e42: JMP 0x001f2ddd LAB_001f2e44: ADD RSP,0x48 RET
/* Tools::atomic_wait_for(std::atomic<bool> const&, bool, unsigned long) */ void Tools::atomic_wait_for(atomic *param_1,bool param_2,ulong param_3) { byte bVar1; long lVar2; bool bVar3; ulong local_28; long local_20; ulong local_18; byte local_9; atomic *local_8; local_18 = param_3; local_9 = param_2; local_8 = param_1; /* try { // try from 001f2dc7 to 001f2e3f has its CatchHandler @ 001f2e49 */ local_20 = time_ms(); while( true ) { bVar1 = std::atomic<bool>::load((atomic<bool> *)local_8,0); bVar3 = false; if ((bVar1 & 1) == (local_9 & 1)) { lVar2 = time_ms(); bVar3 = (ulong)(lVar2 - local_20) < local_18; } if (!bVar3) break; local_28 = 1; sleep_ms(&local_28); } return; }
25,373
ggml_argmax
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_argmax( struct ggml_context * ctx, struct ggml_tensor * a) { GGML_ASSERT(ggml_is_matrix(a)); bool is_node = false; if (a->grad) { GGML_ASSERT(false); is_node = true; } struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_I32, a->ne[1]); result->op = GGML_OP_ARGMAX; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; return result; }
O1
c
ggml_argmax: pushq %rbx subq $0x10, %rsp cmpq $0x1, 0x20(%rsi) jne 0x9196e movq %rsi, %rbx cmpq $0x1, 0x28(%rsi) jne 0x9196e cmpq $0x0, 0x98(%rbx) jne 0x91973 movq 0x18(%rbx), %rax leaq 0x8(%rsp), %rcx movq %rax, (%rcx) movl $0x12, %esi movl $0x1, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x8e8b7 movl $0xe, 0x50(%rax) movq $0x0, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x10, %rsp popq %rbx retq callq 0xcfe3 callq 0xd028
ggml_argmax: push rbx sub rsp, 10h cmp qword ptr [rsi+20h], 1 jnz short loc_9196E mov rbx, rsi cmp qword ptr [rsi+28h], 1 jnz short loc_9196E cmp qword ptr [rbx+98h], 0 jnz short loc_91973 mov rax, [rbx+18h] lea rcx, [rsp+18h+var_10] mov [rcx], rax mov esi, 12h mov edx, 1 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov dword ptr [rax+50h], 0Eh mov qword ptr [rax+98h], 0 mov [rax+0A0h], rbx add rsp, 10h pop rbx retn loc_9196E: call ggml_argmax_cold_1 loc_91973: call ggml_argmax_cold_2
long long ggml_argmax(long long a1, _QWORD *a2, __m128 a3, __m128 a4) { long long result; // rax long long v5; // [rsp+8h] [rbp-10h] BYREF if ( a2[4] != 1LL || a2[5] != 1LL ) ggml_argmax_cold_1(); if ( a2[19] ) ggml_argmax_cold_2(); v5 = a2[3]; result = ggml_new_tensor_impl(a1, 0x12u, 1, &v5, 0LL, 0LL, a3, a4); *(_DWORD *)(result + 80) = 14; *(_QWORD *)(result + 152) = 0LL; *(_QWORD *)(result + 160) = a2; return result; }
25,374
ggml_argmax
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_argmax( struct ggml_context * ctx, struct ggml_tensor * a) { GGML_ASSERT(ggml_is_matrix(a)); bool is_node = false; if (a->grad) { GGML_ASSERT(false); is_node = true; } struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_I32, a->ne[1]); result->op = GGML_OP_ARGMAX; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; return result; }
O2
c
ggml_argmax: pushq %rbx cmpq $0x1, 0x20(%rsi) jne 0x6a70a movq %rsi, %rbx cmpq $0x1, 0x28(%rsi) jne 0x6a70a cmpq $0x0, 0x98(%rbx) jne 0x6a73f movq 0x18(%rbx), %rdx pushq $0x12 popq %rsi callq 0x68616 movl $0xe, 0x50(%rax) andq $0x0, 0x98(%rax) movq %rbx, 0xa0(%rax) popq %rbx retq movq 0x6b837(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6b888(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2faf4(%rip), %rsi # 0x9a21e leaq 0x3714d(%rip), %rdx # 0xa187e leaq 0x37419(%rip), %r8 # 0xa1b51 movl $0xe3d, %ecx # imm = 0xE3D jmp 0x6a772 movq 0x6b802(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6b853(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2fabf(%rip), %rsi # 0x9a21e leaq 0x37118(%rip), %rdx # 0xa187e leaq 0x2d8d2(%rip), %r8 # 0x9803f movl $0xe41, %ecx # imm = 0xE41 xorl %eax, %eax callq 0xa8b0 callq 0x67550 callq 0xa300
ggml_argmax: push rbx cmp qword ptr [rsi+20h], 1 jnz short loc_6A70A mov rbx, rsi cmp qword ptr [rsi+28h], 1 jnz short loc_6A70A cmp qword ptr [rbx+98h], 0 jnz short loc_6A73F mov rdx, [rbx+18h] push 12h pop rsi call ggml_new_tensor_1d mov dword ptr [rax+50h], 0Eh and qword ptr [rax+98h], 0 mov [rax+0A0h], rbx pop rbx retn loc_6A70A: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aGgmlIsMatrixA; "ggml_is_matrix(a)" mov ecx, 0E3Dh jmp short loc_6A772 loc_6A73F: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aFalse; "false" mov ecx, 0E41h loc_6A772: xor eax, eax call _fprintf call ggml_print_backtrace call _abort
long long ggml_argmax(long long a1, long long *a2) { long long result; // rax long long v3; // rdi if ( a2[4] != 1 || a2[5] != 1 ) { fflush(stdout); v3 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 3645LL, "ggml_is_matrix(a)"); goto LABEL_7; } if ( a2[19] ) { fflush(stdout); v3 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 3649LL, "false"); LABEL_7: ggml_print_backtrace(); abort(v3); } result = ggml_new_tensor_1d(a1, 18LL, a2[3]); *(_DWORD *)(result + 80) = 14; *(_QWORD *)(result + 152) = 0LL; *(_QWORD *)(result + 160) = a2; return result; }
ggml_argmax: PUSH RBX CMP qword ptr [RSI + 0x20],0x1 JNZ 0x0016a70a MOV RBX,RSI CMP qword ptr [RSI + 0x28],0x1 JNZ 0x0016a70a CMP qword ptr [RBX + 0x98],0x0 JNZ 0x0016a73f MOV RDX,qword ptr [RBX + 0x18] PUSH 0x12 POP RSI CALL 0x00168616 MOV dword ptr [RAX + 0x50],0xe AND qword ptr [RAX + 0x98],0x0 MOV qword ptr [RAX + 0xa0],RBX POP RBX RET LAB_0016a70a: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1b51] MOV ECX,0xe3d JMP 0x0016a772 LAB_0016a73f: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x19803f] MOV ECX,0xe41 LAB_0016a772: XOR EAX,EAX CALL 0x0010a8b0 CALL 0x00167550 CALL 0x0010a300
void ggml_argmax(int8 param_1,long param_2) { long lVar1; int8 uVar2; FILE *__stream; char *pcVar3; if ((*(long *)(param_2 + 0x20) == 1) && (*(long *)(param_2 + 0x28) == 1)) { if (*(long *)(param_2 + 0x98) == 0) { lVar1 = ggml_new_tensor_1d(param_1,0x12,*(int8 *)(param_2 + 0x18)); *(int4 *)(lVar1 + 0x50) = 0xe; *(int8 *)(lVar1 + 0x98) = 0; *(long *)(lVar1 + 0xa0) = param_2; return; } fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar3 = "false"; uVar2 = 0xe41; } else { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar3 = "ggml_is_matrix(a)"; uVar2 = 0xe3d; } fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", uVar2,pcVar3); ggml_print_backtrace(); /* WARNING: Subroutine does not return */ abort(); }
25,375
sql_digest_storage::copy(sql_digest_storage const*)
eloqsql/sql/sql_digest.h
inline void copy(const sql_digest_storage *from) { /* Keep in mind this is a dirty copy of something that may change, as the thread producing the digest is executing concurrently, without any lock enforced. */ uint byte_count_copy= m_token_array_length < from->m_byte_count ? m_token_array_length : from->m_byte_count; if (byte_count_copy > 0) { m_full= from->m_full; m_byte_count= byte_count_copy; m_charset_number= from->m_charset_number; memcpy(m_token_array, from->m_token_array, m_byte_count); memcpy(m_md5, from->m_md5, MD5_HASH_SIZE); } else { m_full= false; m_byte_count= 0; m_charset_number= 0; } }
O0
c
sql_digest_storage::copy(sql_digest_storage const*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movl 0x28(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x4(%rcx), %eax jae 0x33d90 movq -0x20(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x24(%rbp) jmp 0x33d9a movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) jbe 0x33df5 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movb (%rcx), %cl andb $0x1, %cl movb %cl, (%rax) movl -0x14(%rbp), %ecx movl %ecx, 0x4(%rax) movq -0x10(%rbp), %rcx movl 0x18(%rcx), %ecx movl %ecx, 0x18(%rax) movq 0x20(%rax), %rdi movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rsi movl 0x4(%rax), %eax movl %eax, %edx callq 0x26280 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rdx movq %rdx, 0x8(%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x10(%rax) jmp 0x33e0a movq -0x20(%rbp), %rax movb $0x0, (%rax) movl $0x0, 0x4(%rax) movl $0x0, 0x18(%rax) addq $0x30, %rsp popq %rbp retq
_ZN18sql_digest_storage4copyEPKS_: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_20], rax mov eax, [rax+28h] mov rcx, [rbp+var_10] cmp eax, [rcx+4] jnb short loc_33D90 mov rax, [rbp+var_20] mov eax, [rax+28h] mov [rbp+var_24], eax jmp short loc_33D9A loc_33D90: mov rax, [rbp+var_10] mov eax, [rax+4] mov [rbp+var_24], eax loc_33D9A: mov eax, [rbp+var_24] mov [rbp+var_14], eax cmp [rbp+var_14], 0 jbe short loc_33DF5 mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov cl, [rcx] and cl, 1 mov [rax], cl mov ecx, [rbp+var_14] mov [rax+4], ecx mov rcx, [rbp+var_10] mov ecx, [rcx+18h] mov [rax+18h], ecx mov rdi, [rax+20h] mov rcx, [rbp+var_10] mov rsi, [rcx+20h] mov eax, [rax+4] mov edx, eax call _memcpy mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov rdx, [rcx+8] mov [rax+8], rdx mov rcx, [rcx+10h] mov [rax+10h], rcx jmp short loc_33E0A loc_33DF5: mov rax, [rbp+var_20] mov byte ptr [rax], 0 mov dword ptr [rax+4], 0 mov dword ptr [rax+18h], 0 loc_33E0A: add rsp, 30h pop rbp retn
sql_digest_storage * sql_digest_storage::copy(sql_digest_storage *this, const sql_digest_storage *a2) { sql_digest_storage *result; // rax int v3; // [rsp+Ch] [rbp-24h] if ( *((_DWORD *)this + 10) >= *((_DWORD *)a2 + 1) ) v3 = *((_DWORD *)a2 + 1); else v3 = *((_DWORD *)this + 10); if ( v3 ) { *(_BYTE *)this = *(_BYTE *)a2 & 1; *((_DWORD *)this + 1) = v3; *((_DWORD *)this + 6) = *((_DWORD *)a2 + 6); memcpy(*((_QWORD *)this + 4), *((_QWORD *)a2 + 4), *((unsigned int *)this + 1)); result = this; *((_QWORD *)this + 1) = *((_QWORD *)a2 + 1); *((_QWORD *)this + 2) = *((_QWORD *)a2 + 2); } else { result = this; *(_BYTE *)this = 0; *((_DWORD *)this + 1) = 0; *((_DWORD *)this + 6) = 0; } return result; }
copy: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV EAX,dword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x4] JNC 0x00133d90 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x24],EAX JMP 0x00133d9a LAB_00133d90: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x24],EAX LAB_00133d9a: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JBE 0x00133df5 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RCX] AND CL,0x1 MOV byte ptr [RAX],CL MOV ECX,dword ptr [RBP + -0x14] MOV dword ptr [RAX + 0x4],ECX MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x18] MOV dword ptr [RAX + 0x18],ECX MOV RDI,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x20] MOV EAX,dword ptr [RAX + 0x4] MOV EDX,EAX CALL 0x00126280 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x00133e0a LAB_00133df5: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x0 MOV dword ptr [RAX + 0x4],0x0 MOV dword ptr [RAX + 0x18],0x0 LAB_00133e0a: ADD RSP,0x30 POP RBP RET
/* sql_digest_storage::copy(sql_digest_storage const*) */ void __thiscall sql_digest_storage::copy(sql_digest_storage *this,sql_digest_storage *param_1) { int local_2c; if (*(uint *)(this + 0x28) < *(uint *)(param_1 + 4)) { local_2c = *(int *)(this + 0x28); } else { local_2c = *(int *)(param_1 + 4); } if (local_2c == 0) { *this = (sql_digest_storage)0x0; *(int4 *)(this + 4) = 0; *(int4 *)(this + 0x18) = 0; } else { *this = (sql_digest_storage)((byte)*param_1 & 1); *(int *)(this + 4) = local_2c; *(int4 *)(this + 0x18) = *(int4 *)(param_1 + 0x18); memcpy(*(void **)(this + 0x20),*(void **)(param_1 + 0x20),(ulong)*(uint *)(this + 4)); *(int8 *)(this + 8) = *(int8 *)(param_1 + 8); *(int8 *)(this + 0x10) = *(int8 *)(param_1 + 0x10); } return; }
25,376
minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
ArgumentsValue evaluate(const std::shared_ptr<Context> & context) const { ArgumentsValue vargs; for (const auto& arg : this->args) { if (auto un_expr = std::dynamic_pointer_cast<UnaryOpExpr>(arg)) { if (un_expr->op == UnaryOpExpr::Op::Expansion) { auto array = un_expr->expr->evaluate(context); if (!array.is_array()) { throw std::runtime_error("Expansion operator only supported on arrays"); } array.for_each([&](Value & value) { vargs.args.push_back(value); }); continue; } else if (un_expr->op == UnaryOpExpr::Op::ExpansionDict) { auto dict = un_expr->expr->evaluate(context); if (!dict.is_object()) { throw std::runtime_error("ExpansionDict operator only supported on objects"); } dict.for_each([&](const Value & key) { vargs.kwargs.push_back({key.get<std::string>(), dict.at(key)}); }); continue; } } vargs.args.push_back(arg->evaluate(context)); } for (const auto& [name, value] : this->kwargs) { vargs.kwargs.push_back({name, value->evaluate(context)}); } return vargs; }
O3
cpp
minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %rdx, %r14 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movq %rdi, (%rsp) movups %xmm0, (%rdi) movq (%rsi), %rbx movq %rsi, 0x58(%rsp) movq 0x8(%rsi), %r12 cmpq %r12, %rbx je 0x92ebe leaq 0xa8(%rsp), %r13 leaq 0x68(%rsp), %rbp movq (%rbx), %rdi testq %rdi, %rdi je 0x92df5 leaq 0x9972b(%rip), %rsi # 0x12c370 leaq 0x99734(%rip), %rdx # 0x12c380 xorl %ecx, %ecx callq 0x1b9c0 testq %rax, %rax je 0x92df5 movq 0x8(%rbx), %r15 testq %r15, %r15 je 0x92c7c movq 0x9b314(%rip), %rcx # 0x12df80 cmpb $0x0, (%rcx) je 0x92c77 incl 0x8(%r15) jmp 0x92c7c lock incl 0x8(%r15) movl 0x30(%rax), %ecx cmpl $0x4, %ecx je 0x92cfa cmpl $0x3, %ecx jne 0x92de8 movq 0x20(%rax), %rsi movq %rbp, %rdi movq %r14, %rdx callq 0x86670 cmpq $0x0, 0x78(%rsp) je 0x92fee movq $0x0, 0x10(%rsp) movq (%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x18fb(%rip), %rax # 0x945bc movq %rax, 0x20(%rsp) leaq 0x18f7(%rip), %rax # 0x945c4 movq %rax, 0x18(%rsp) movq %rbp, %rdi leaq 0x8(%rsp), %rsi callq 0x9406a movq 0x18(%rsp), %rax testq %rax, %rax je 0x92d64 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x92d64 movq 0x20(%rax), %rsi movq %rbp, %rdi movq %r14, %rdx callq 0x86670 cmpq $0x0, 0x88(%rsp) je 0x92fba movq (%rsp), %rax movq %rax, 0x8(%rsp) movq %rbp, 0x10(%rsp) leaq 0x18bd(%rip), %rax # 0x945ea movq %rax, 0x20(%rsp) leaq 0x18b7(%rip), %rax # 0x945f0 movq %rax, 0x18(%rsp) movq %rbp, %rdi leaq 0x8(%rsp), %rsi callq 0x9406a movq 0x18(%rsp), %rax testq %rax, %rax je 0x92d64 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0xa8(%rsp), %r13 movq %r13, %rdi xorl %esi, %esi callq 0x590b4 movq %r13, %rdi callq 0x5e5a2 movq 0xa0(%rsp), %rdi testq %rdi, %rdi je 0x92d90 callq 0x6dfc6 movq 0x90(%rsp), %rdi testq %rdi, %rdi leaq 0xa8(%rsp), %r13 je 0x92daa callq 0x6dfc6 movq 0x80(%rsp), %rdi testq %rdi, %rdi je 0x92dbc callq 0x6dfc6 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x92ea4 movq 0x9b1af(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0x92e8f movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x92e99 testq %r15, %r15 je 0x92df5 movq %r15, %rdi callq 0x6dfc6 movq (%rbx), %rsi movq %rbp, %rdi movq %r14, %rdx callq 0x86670 movq (%rsp), %rdi movq %rbp, %rsi callq 0x8e214 movq %r13, %rdi xorl %esi, %esi callq 0x590b4 movq %r13, %rdi callq 0x5e5a2 movq 0xa0(%rsp), %rdi testq %rdi, %rdi je 0x92e33 callq 0x6dfc6 movq 0x90(%rsp), %rdi testq %rdi, %rdi je 0x92e45 callq 0x6dfc6 movq 0x80(%rsp), %rdi testq %rdi, %rdi je 0x92e57 callq 0x6dfc6 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x92eb1 movq 0x9b118(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0x92e78 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x92e82 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x92eb1 movq (%rdi), %rax callq *0x18(%rax) jmp 0x92eb1 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x92ea4 movq (%rdi), %rax callq *0x18(%rax) testq %r15, %r15 je 0x92eb1 movq %r15, %rdi callq 0x6dfc6 addq $0x10, %rbx cmpq %r12, %rbx jne 0x92c32 movq %r14, 0x60(%rsp) movq 0x58(%rsp), %rax movq 0x18(%rax), %r15 movq 0x20(%rax), %r14 cmpq %r14, %r15 je 0x92fa4 movq (%rsp), %rax leaq 0x18(%rax), %r12 leaq 0x48(%rsp), %r13 leaq 0x8(%rsp), %rbp leaq 0x68(%rsp), %rbx movq 0x20(%r15), %rsi movq %rbp, %rdi movq 0x60(%rsp), %rdx callq 0x86670 movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx callq 0x9447a movq %r12, %rdi movq %rbx, %rsi callq 0x94740 movq %rbx, %rdi callq 0x9451a movq %r13, %rdi xorl %esi, %esi callq 0x590b4 movq %r13, %rdi callq 0x5e5a2 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x92f43 callq 0x6dfc6 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x92f52 callq 0x6dfc6 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x92f61 callq 0x6dfc6 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x92f97 movq 0x9b00e(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0x92f82 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x92f8c movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x92f97 movq (%rdi), %rax callq *0x18(%rax) addq $0x30, %r15 cmpq %r14, %r15 jne 0x92ef0 movq (%rsp), %rax addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b440 movq %rax, %rbx leaq 0x5f56b(%rip), %rsi # 0xf2539 movq %rax, %rdi callq 0x1b320 movq 0x9b00b(%rip), %rsi # 0x12dfe8 movq 0x9af6c(%rip), %rdx # 0x12df50 movq %rbx, %rdi callq 0x1bf00 jmp 0x93020 movl $0x10, %edi callq 0x1b440 movq %rax, %rbx leaq 0x5f50b(%rip), %rsi # 0xf250d movq %rax, %rdi callq 0x1b320 movq 0x9afd7(%rip), %rsi # 0x12dfe8 movq 0x9af38(%rip), %rdx # 0x12df50 movq %rbx, %rdi callq 0x1bf00 jmp 0x93024 jmp 0x93029 movq %rax, %r14 jmp 0x93078 movq %rax, %r14 movq %rbx, %rdi callq 0x1b660 jmp 0x93078 jmp 0x93084 jmp 0x93084 movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0x93078 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x93078 jmp 0x93084 jmp 0x9308c movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0x93078 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x68(%rsp), %rdi callq 0x86962 jmp 0x9308f movq %rax, %rdi callq 0x21535 movq %rax, %r14 testq %r15, %r15 je 0x930cb movq %r15, %rdi callq 0x6dfc6 jmp 0x930cb movq %rax, %r14 leaq 0x68(%rsp), %rdi jmp 0x930c6 jmp 0x930aa movq %rax, %r14 jmp 0x930cb movq %rax, %r14 jmp 0x930c1 movq %rax, %r14 leaq 0x68(%rsp), %rdi callq 0x9451a leaq 0x8(%rsp), %rdi callq 0x86962 movq (%rsp), %rbx leaq 0x18(%rbx), %rdi callq 0x952b2 movq %rbx, %rdi callq 0x8e144 movq %r14, %rdi callq 0x1bf90
_ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov r14, rdx xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 mov [rsp+108h+var_108], rdi movups xmmword ptr [rdi], xmm0 mov rbx, [rsi] mov [rsp+108h+var_B0], rsi mov r12, [rsi+8] cmp rbx, r12 jz loc_92EBE lea r13, [rsp+108h+var_60] lea rbp, [rsp+108h+var_A0] loc_92C32: mov rdi, [rbx]; lpsrc test rdi, rdi jz loc_92DF5 lea rsi, _ZTIN5minja10ExpressionE; lpstype lea rdx, _ZTIN5minja11UnaryOpExprE; lpdtype xor ecx, ecx; s2d call ___dynamic_cast test rax, rax jz loc_92DF5 mov r15, [rbx+8] test r15, r15 jz short loc_92C7C mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_92C77 inc dword ptr [r15+8] jmp short loc_92C7C loc_92C77: lock inc dword ptr [r15+8] loc_92C7C: mov ecx, [rax+30h] cmp ecx, 4 jz short loc_92CFA cmp ecx, 3 jnz loc_92DE8 mov rsi, [rax+20h] mov rdi, rbp mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp [rsp+108h+var_90], 0 jz loc_92FEE mov [rsp+108h+var_F8], 0 mov rax, [rsp+108h+var_108] mov [rsp+108h+var_100], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &) mov [rsp+108h+var_E8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+108h+var_F0], rax mov rdi, rbp lea rsi, [rsp+108h+var_100] call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&) mov rax, [rsp+108h+var_F0] test rax, rax jz short loc_92D64 lea rdi, [rsp+108h+var_100] mov rsi, rdi mov edx, 3 call rax jmp short loc_92D64 loc_92CFA: mov rsi, [rax+20h] mov rdi, rbp mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp [rsp+108h+var_80], 0 jz loc_92FBA mov rax, [rsp+108h+var_108] mov [rsp+108h+var_100], rax mov [rsp+108h+var_F8], rbp lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_invoke(std::_Any_data const&,minja::Value &) mov [rsp+108h+var_E8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+108h+var_F0], rax mov rdi, rbp lea rsi, [rsp+108h+var_100] call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&) mov rax, [rsp+108h+var_F0] test rax, rax jz short loc_92D64 lea rdi, [rsp+108h+var_100] mov rsi, rdi mov edx, 3 call rax loc_92D64: lea r13, [rsp+108h+var_60] mov rdi, r13 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, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+108h+var_68] test rdi, rdi jz short loc_92D90 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92D90: mov rdi, [rsp+108h+var_78] test rdi, rdi lea r13, [rsp+108h+var_60] jz short loc_92DAA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92DAA: mov rdi, [rsp+108h+var_88] test rdi, rdi jz short loc_92DBC call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92DBC: mov rdi, [rsp+108h+var_98] test rdi, rdi jz loc_92EA4 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz loc_92E8F mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp loc_92E99 loc_92DE8: test r15, r15 jz short loc_92DF5 mov rdi, r15 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92DF5: mov rsi, [rbx] mov rdi, rbp mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, [rsp+108h+var_108] mov rsi, rbp call _ZNSt6vectorIN5minja5ValueESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<minja::Value>::emplace_back<minja::Value>(minja::Value &&) mov rdi, r13 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, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+108h+var_68] test rdi, rdi jz short loc_92E33 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92E33: mov rdi, [rsp+108h+var_78] test rdi, rdi jz short loc_92E45 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92E45: mov rdi, [rsp+108h+var_88] test rdi, rdi jz short loc_92E57 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92E57: mov rdi, [rsp+108h+var_98] test rdi, rdi jz short loc_92EB1 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_92E78 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_92E82 loc_92E78: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_92E82: cmp eax, 1 jnz short loc_92EB1 mov rax, [rdi] call qword ptr [rax+18h] jmp short loc_92EB1 loc_92E8F: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_92E99: cmp eax, 1 jnz short loc_92EA4 mov rax, [rdi] call qword ptr [rax+18h] loc_92EA4: test r15, r15 jz short loc_92EB1 mov rdi, r15 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92EB1: add rbx, 10h cmp rbx, r12 jnz loc_92C32 loc_92EBE: mov [rsp+108h+var_A8], r14 mov rax, [rsp+108h+var_B0] mov r15, [rax+18h] mov r14, [rax+20h] cmp r15, r14 jz loc_92FA4 mov rax, [rsp+108h+var_108] lea r12, [rax+18h] lea r13, [rsp+108h+var_C0] lea rbp, [rsp+108h+var_100] lea rbx, [rsp+108h+var_A0] loc_92EF0: mov rsi, [r15+20h] mov rdi, rbp mov rdx, [rsp+108h+var_A8] call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx mov rsi, r15 mov rdx, rbp call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_ mov rdi, r12 mov rsi, rbx call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EE12emplace_backIJS9_EEERS9_DpOT_; std::vector<std::pair<std::string,minja::Value>>::emplace_back<std::pair<std::string,minja::Value>>(std::pair<std::string,minja::Value> &&) mov rdi, rbx call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair() mov rdi, r13 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, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+108h+var_C8] test rdi, rdi jz short loc_92F43 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92F43: mov rdi, [rsp+108h+var_D8] test rdi, rdi jz short loc_92F52 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92F52: mov rdi, [rsp+108h+var_E8] test rdi, rdi jz short loc_92F61 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_92F61: mov rdi, [rsp+108h+var_F8] test rdi, rdi jz short loc_92F97 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_92F82 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_92F8C loc_92F82: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_92F8C: cmp eax, 1 jnz short loc_92F97 mov rax, [rdi] call qword ptr [rax+18h] loc_92F97: add r15, 30h ; '0' cmp r15, r14 jnz loc_92EF0 loc_92FA4: mov rax, [rsp+108h+var_108] add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_92FBA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpansiondictO; "ExpansionDict operator only supported o"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_93020 loc_92FEE: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpansionOpera_0; "Expansion operator only supported on ar"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_93020: jmp short loc_93024 jmp short loc_93029 loc_93024: mov r14, rax jmp short loc_93078 loc_93029: mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_93078 jmp short loc_93084 jmp short loc_93084 mov r14, rax mov rax, [rsp+108h+var_F0] test rax, rax jz short loc_93078 lea rdi, [rsp+108h+var_100] mov rsi, rdi mov edx, 3 call rax jmp short loc_93078 jmp short loc_93084 jmp short loc_9308C mov r14, rax mov rax, [rsp+108h+var_F0] test rax, rax jz short loc_93078 lea rdi, [rsp+108h+var_100] mov rsi, rdi mov edx, 3 call rax loc_93078: lea rdi, [rsp+108h+var_A0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_9308F loc_93084: mov rdi, rax call __clang_call_terminate loc_9308C: mov r14, rax loc_9308F: test r15, r15 jz short loc_930CB mov rdi, r15 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_930CB mov r14, rax lea rdi, [rsp+108h+var_A0] jmp short loc_930C6 jmp short $+2 loc_930AA: mov r14, rax jmp short loc_930CB mov r14, rax jmp short loc_930C1 mov r14, rax lea rdi, [rsp+108h+var_A0] call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair() loc_930C1: lea rdi, [rsp+108h+var_100]; this loc_930C6: call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_930CB: mov rbx, [rsp+108h+var_108] lea rdi, [rbx+18h] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rbx call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov rdi, r14 call __Unwind_Resume
_OWORD * minja::ArgumentsExpression::evaluate(_OWORD *a1, _QWORD *a2, long long a3) { long long v4; // rbx long long v5; // r12 void *v6; // rax volatile signed __int32 *v7; // r15 int v8; // ecx long long v9; // rdi signed __int32 v10; // eax long long v11; // rdi signed __int32 v12; // eax long long v13; // r15 long long i; // r14 _BYTE *v15; // rdi signed __int32 v16; // eax std::runtime_error *v18; // rbx std::runtime_error *exception; // rbx _OWORD *v21; // [rsp+8h] [rbp-100h] BYREF _BYTE *v22; // [rsp+10h] [rbp-F8h] long long ( *v23)(); // [rsp+18h] [rbp-F0h] volatile signed __int32 *v24; // [rsp+20h] [rbp-E8h] volatile signed __int32 *v25; // [rsp+30h] [rbp-D8h] volatile signed __int32 *v26; // [rsp+40h] [rbp-C8h] char v27[16]; // [rsp+48h] [rbp-C0h] BYREF _QWORD *v28; // [rsp+58h] [rbp-B0h] long long v29; // [rsp+60h] [rbp-A8h] _BYTE v30[8]; // [rsp+68h] [rbp-A0h] BYREF long long v31; // [rsp+70h] [rbp-98h] long long v32; // [rsp+78h] [rbp-90h] volatile signed __int32 *v33; // [rsp+80h] [rbp-88h] long long v34; // [rsp+88h] [rbp-80h] volatile signed __int32 *v35; // [rsp+90h] [rbp-78h] volatile signed __int32 *v36; // [rsp+A0h] [rbp-68h] char v37[96]; // [rsp+A8h] [rbp-60h] BYREF a1[2] = 0LL; a1[1] = 0LL; *a1 = 0LL; v4 = *a2; v28 = a2; v5 = a2[1]; if ( v4 != v5 ) { while ( 1 ) { if ( !*(_QWORD *)v4 ) goto LABEL_27; v6 = __dynamic_cast( *(const void **)v4, (const struct __class_type_info *)&`typeinfo for'minja::Expression, (const struct __class_type_info *)&`typeinfo for'minja::UnaryOpExpr, 0LL); if ( !v6 ) goto LABEL_27; v7 = *(volatile signed __int32 **)(v4 + 8); if ( v7 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v7 + 2); else _InterlockedIncrement(v7 + 2); } v8 = *((_DWORD *)v6 + 12); if ( v8 == 4 ) break; if ( v8 != 3 ) { if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); LABEL_27: minja::Expression::evaluate((long long)v30, *(void (****)(void))v4); std::vector<minja::Value>::emplace_back<minja::Value>((long long)a1, (long long)v30); 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(v37); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v37); if ( v36 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v36); if ( v35 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v35); if ( v33 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v33); v11 = v31; if ( v31 ) { if ( _libc_single_threaded ) { v12 = *(_DWORD *)(v31 + 12); *(_DWORD *)(v31 + 12) = v12 - 1; } else { v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v31 + 12), 0xFFFFFFFF); } if ( v12 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL); } goto LABEL_44; } minja::Expression::evaluate((long long)v30, *((void (****)(void))v6 + 4)); if ( !v32 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expansion operator only supported on arrays"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v22 = 0LL; v21 = a1; v24 = (volatile signed __int32 *)std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke; v23 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager; minja::Value::for_each(v30, &v21); if ( v23 ) goto LABEL_15; LABEL_16: nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v37); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v37); if ( v36 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v36); if ( v35 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v35); if ( v33 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v33); v9 = v31; if ( v31 ) { if ( _libc_single_threaded ) { v10 = *(_DWORD *)(v31 + 12); *(_DWORD *)(v31 + 12) = v10 - 1; } else { v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(v31 + 12), 0xFFFFFFFF); } if ( v10 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL); } if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); LABEL_44: v4 += 16LL; if ( v4 == v5 ) goto LABEL_45; } minja::Expression::evaluate((long long)v30, *((void (****)(void))v6 + 4)); if ( !v34 ) { v18 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v18, "ExpansionDict operator only supported on objects"); __cxa_throw( v18, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v21 = a1; v22 = v30; v24 = (volatile signed __int32 *)std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_invoke; v23 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_manager; minja::Value::for_each(v30, &v21); if ( !v23 ) goto LABEL_16; LABEL_15: ((void ( *)(_OWORD **, _OWORD **, long long))v23)(&v21, &v21, 3LL); goto LABEL_16; } LABEL_45: v29 = a3; v13 = v28[3]; for ( i = v28[4]; v13 != i; v13 += 48LL ) { minja::Expression::evaluate((long long)&v21, *(void (****)(void))(v13 + 32)); ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_( v30, v13, &v21); std::vector<std::pair<std::string,minja::Value>>::emplace_back<std::pair<std::string,minja::Value>>( (char *)a1 + 24, v30); std::pair<std::string,minja::Value>::~pair(v30); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v27); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v27); if ( v26 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v26); if ( v25 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25); if ( v24 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v24); v15 = v22; if ( v22 ) { if ( _libc_single_threaded ) { v16 = *((_DWORD *)v22 + 3); *((_DWORD *)v22 + 3) = v16 - 1; } else { v16 = _InterlockedExchangeAdd((volatile signed __int32 *)v22 + 3, 0xFFFFFFFF); } if ( v16 == 1 ) (*(void ( **)(_BYTE *, _QWORD))(*(_QWORD *)v15 + 24LL))(v15, 0LL); } } return a1; }
evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV R14,RDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV qword ptr [RSP],RDI MOVUPS xmmword ptr [RDI],XMM0 MOV RBX,qword ptr [RSI] MOV qword ptr [RSP + 0x58],RSI MOV R12,qword ptr [RSI + 0x8] CMP RBX,R12 JZ 0x00192ebe LEA R13,[RSP + 0xa8] LEA RBP,[RSP + 0x68] LAB_00192c32: MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x00192df5 LEA RSI,[0x22c370] LEA RDX,[0x22c380] XOR ECX,ECX CALL 0x0011b9c0 TEST RAX,RAX JZ 0x00192df5 MOV R15,qword ptr [RBX + 0x8] TEST R15,R15 JZ 0x00192c7c MOV RCX,qword ptr [0x0022df80] CMP byte ptr [RCX],0x0 JZ 0x00192c77 INC dword ptr [R15 + 0x8] JMP 0x00192c7c LAB_00192c77: INC.LOCK dword ptr [R15 + 0x8] LAB_00192c7c: MOV ECX,dword ptr [RAX + 0x30] CMP ECX,0x4 JZ 0x00192cfa CMP ECX,0x3 JNZ 0x00192de8 MOV RSI,qword ptr [RAX + 0x20] LAB_00192c91: MOV RDI,RBP MOV RDX,R14 CALL 0x00186670 CMP qword ptr [RSP + 0x78],0x0 JZ 0x00192fee MOV qword ptr [RSP + 0x10],0x0 MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX LEA RAX,[0x1945bc] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[0x1945c4] MOV qword ptr [RSP + 0x18],RAX LAB_00192cd2: MOV RDI,RBP LEA RSI,[RSP + 0x8] CALL 0x0019406a MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x00192d64 LAB_00192ce9: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX JMP 0x00192d64 LAB_00192cfa: MOV RSI,qword ptr [RAX + 0x20] LAB_00192cfe: MOV RDI,RBP MOV RDX,R14 CALL 0x00186670 CMP qword ptr [RSP + 0x88],0x0 JZ 0x00192fba MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RBP LEA RAX,[0x1945ea] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[0x1945f0] MOV qword ptr [RSP + 0x18],RAX LAB_00192d3e: MOV RDI,RBP LEA RSI,[RSP + 0x8] CALL 0x0019406a MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x00192d64 LAB_00192d55: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00192d64: LEA R13,[RSP + 0xa8] MOV RDI,R13 XOR ESI,ESI CALL 0x001590b4 MOV RDI,R13 CALL 0x0015e5a2 MOV RDI,qword ptr [RSP + 0xa0] TEST RDI,RDI JZ 0x00192d90 CALL 0x0016dfc6 LAB_00192d90: MOV RDI,qword ptr [RSP + 0x90] TEST RDI,RDI LEA R13,[RSP + 0xa8] JZ 0x00192daa CALL 0x0016dfc6 LAB_00192daa: MOV RDI,qword ptr [RSP + 0x80] TEST RDI,RDI JZ 0x00192dbc CALL 0x0016dfc6 LAB_00192dbc: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x00192ea4 MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x00192e8f MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00192e99 LAB_00192de8: TEST R15,R15 JZ 0x00192df5 MOV RDI,R15 CALL 0x0016dfc6 LAB_00192df5: MOV RSI,qword ptr [RBX] LAB_00192df8: MOV RDI,RBP MOV RDX,R14 CALL 0x00186670 LAB_00192e03: MOV RDI,qword ptr [RSP] MOV RSI,RBP CALL 0x0018e214 LAB_00192e0f: MOV RDI,R13 XOR ESI,ESI CALL 0x001590b4 MOV RDI,R13 CALL 0x0015e5a2 MOV RDI,qword ptr [RSP + 0xa0] TEST RDI,RDI JZ 0x00192e33 CALL 0x0016dfc6 LAB_00192e33: MOV RDI,qword ptr [RSP + 0x90] TEST RDI,RDI JZ 0x00192e45 CALL 0x0016dfc6 LAB_00192e45: MOV RDI,qword ptr [RSP + 0x80] TEST RDI,RDI JZ 0x00192e57 CALL 0x0016dfc6 LAB_00192e57: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x00192eb1 MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x00192e78 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00192e82 LAB_00192e78: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00192e82: CMP EAX,0x1 JNZ 0x00192eb1 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] JMP 0x00192eb1 LAB_00192e8f: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00192e99: CMP EAX,0x1 JNZ 0x00192ea4 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00192ea4: TEST R15,R15 JZ 0x00192eb1 MOV RDI,R15 CALL 0x0016dfc6 LAB_00192eb1: ADD RBX,0x10 CMP RBX,R12 JNZ 0x00192c32 LAB_00192ebe: MOV qword ptr [RSP + 0x60],R14 MOV RAX,qword ptr [RSP + 0x58] MOV R15,qword ptr [RAX + 0x18] MOV R14,qword ptr [RAX + 0x20] CMP R15,R14 JZ 0x00192fa4 MOV RAX,qword ptr [RSP] LEA R12,[RAX + 0x18] LEA R13,[RSP + 0x48] LEA RBP,[RSP + 0x8] LEA RBX,[RSP + 0x68] LAB_00192ef0: MOV RSI,qword ptr [R15 + 0x20] LAB_00192ef4: MOV RDI,RBP MOV RDX,qword ptr [RSP + 0x60] CALL 0x00186670 LAB_00192f01: MOV RDI,RBX MOV RSI,R15 MOV RDX,RBP CALL 0x0019447a LAB_00192f0f: MOV RDI,R12 MOV RSI,RBX CALL 0x00194740 LAB_00192f1a: MOV RDI,RBX CALL 0x0019451a MOV RDI,R13 XOR ESI,ESI CALL 0x001590b4 MOV RDI,R13 CALL 0x0015e5a2 MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x00192f43 CALL 0x0016dfc6 LAB_00192f43: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00192f52 CALL 0x0016dfc6 LAB_00192f52: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x00192f61 CALL 0x0016dfc6 LAB_00192f61: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00192f97 MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x00192f82 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00192f8c LAB_00192f82: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00192f8c: CMP EAX,0x1 JNZ 0x00192f97 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00192f97: ADD R15,0x30 CMP R15,R14 JNZ 0x00192ef0 LAB_00192fa4: MOV RAX,qword ptr [RSP] ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00192fba: MOV EDI,0x10 CALL 0x0011b440 MOV RBX,RAX LAB_00192fc7: LEA RSI,[0x1f2539] MOV RDI,RAX CALL 0x0011b320 LAB_00192fd6: MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,RBX CALL 0x0011bf00 LAB_00192fee: MOV EDI,0x10 CALL 0x0011b440 MOV RBX,RAX LAB_00192ffb: LEA RSI,[0x1f250d] MOV RDI,RAX CALL 0x0011b320 LAB_0019300a: MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,RBX CALL 0x0011bf00
/* minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::ArgumentsExpression::evaluate(shared_ptr *param_1) { int *piVar1; Expression *pEVar2; long *plVar3; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; long lVar4; int iVar5; long lVar6; runtime_error *prVar7; long *plVar8; long *in_RSI; shared_ptr *local_100; Expression *local_f8; code *local_f0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_e8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_d8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_c8; data local_c0 [16]; long *local_b0; Expression local_a0 [8]; long *local_98; long local_90; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_88; long local_80; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; data local_60 [48]; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; plVar8 = (long *)*in_RSI; plVar3 = (long *)in_RSI[1]; local_b0 = in_RSI; if (plVar8 != plVar3) { do { if (*plVar8 == 0) { LAB_00192df5: /* try { // try from 00192df8 to 00192e02 has its CatchHandler @ 001930a8 */ Expression::evaluate(local_a0,(shared_ptr *)*plVar8); /* try { // try from 00192e03 to 00192e0e has its CatchHandler @ 0019309e */ std::vector<minja::Value,std::allocator<minja::Value>>::emplace_back<minja::Value> ((vector<minja::Value,std::allocator<minja::Value>> *)param_1,(Value *)local_a0); 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_60,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_60); 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 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_78); } if (local_88 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_88); } if (local_98 != (long *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)local_98 + 0xc); iVar5 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar5 = *(int *)((long)local_98 + 0xc); *(int *)((long)local_98 + 0xc) = iVar5 + -1; } if (iVar5 == 1) { (**(code **)(*local_98 + 0x18))(); } } } else { lVar6 = __dynamic_cast(*plVar8,&Expression::typeinfo,&UnaryOpExpr::typeinfo,0); if (lVar6 == 0) goto LAB_00192df5; this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)plVar8[1]; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); *(int *)(this + 8) = *(int *)(this + 8) + 1; UNLOCK(); } else { *(int *)(this + 8) = *(int *)(this + 8) + 1; } } if (*(int *)(lVar6 + 0x30) == 4) { /* try { // try from 00192cfe to 00192d08 has its CatchHandler @ 0019308c */ Expression::evaluate(local_a0,*(shared_ptr **)(lVar6 + 0x20)); if (local_80 == 0) { prVar7 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00192fc7 to 00192fd5 has its CatchHandler @ 00193029 */ std::runtime_error::runtime_error (prVar7,"ExpansionDict operator only supported on objects"); /* try { // try from 00192fd6 to 00192feb has its CatchHandler @ 00193024 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar7,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); } local_e8 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *) std:: _Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value_const&)#1}> ::_M_invoke; local_f0 = std:: _Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value_const&)#1}> ::_M_manager; /* try { // try from 00192d3e to 00192d4a has its CatchHandler @ 0019305c */ local_100 = param_1; local_f8 = local_a0; Value::for_each((Value *)local_a0,(function *)&local_100); if (local_f0 != (code *)0x0) { /* try { // try from 00192d55 to 00192d63 has its CatchHandler @ 00193036 */ (*local_f0)(&local_100,&local_100,3); } } else { if (*(int *)(lVar6 + 0x30) != 3) { if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); } goto LAB_00192df5; } /* try { // try from 00192c91 to 00192c9b has its CatchHandler @ 0019305a */ Expression::evaluate(local_a0,*(shared_ptr **)(lVar6 + 0x20)); if (local_90 == 0) { prVar7 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00192ffb to 00193009 has its CatchHandler @ 00193022 */ std::runtime_error::runtime_error(prVar7,"Expansion operator only supported on arrays"); /* try { // try from 0019300a to 0019301f has its CatchHandler @ 00193020 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar7,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); } local_f8 = (Expression *)0x0; local_e8 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *) std:: _Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_invoke; local_f0 = std:: _Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_manager; /* try { // try from 00192cd2 to 00192cde has its CatchHandler @ 0019303a */ local_100 = param_1; Value::for_each((Value *)local_a0,(function *)&local_100); if (local_f0 != (code *)0x0) { /* try { // try from 00192ce9 to 00192cf7 has its CatchHandler @ 00193038 */ (*local_f0)(&local_100,&local_100,3); } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_60,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_60); 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 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_78); } if (local_88 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_88); } if (local_98 != (long *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)local_98 + 0xc); iVar5 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar5 = *(int *)((long)local_98 + 0xc); *(int *)((long)local_98 + 0xc) = iVar5 + -1; } if (iVar5 == 1) { (**(code **)(*local_98 + 0x18))(); } } if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); } } plVar8 = plVar8 + 2; } while (plVar8 != plVar3); } lVar6 = local_b0[3]; lVar4 = local_b0[4]; if (lVar6 != lVar4) { do { /* try { // try from 00192ef4 to 00192f00 has its CatchHandler @ 001930aa */ Expression::evaluate((Expression *)&local_100,*(shared_ptr **)(lVar6 + 0x20)); /* try { // try from 00192f01 to 00192f0e has its CatchHandler @ 001930af */ _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_ ((pair<std::__cxx11::string,minja::Value> *)local_a0,lVar6,(Expression *)&local_100) ; /* try { // try from 00192f0f to 00192f19 has its CatchHandler @ 001930b4 */ std:: vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> ::emplace_back<std::pair<std::__cxx11::string,minja::Value>> ((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> *)(param_1 + 0x18),(pair<std::__cxx11::string,minja::Value> *)local_a0); std::pair<std::__cxx11::string,minja::Value>::~pair ((pair<std::__cxx11::string,minja::Value> *)local_a0); 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_c0,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_c0); if (local_c8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c8); } if (local_d8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d8); } if (local_e8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_e8); } if (local_f8 != (Expression *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); pEVar2 = local_f8 + 0xc; iVar5 = *(int *)pEVar2; *(int *)pEVar2 = *(int *)pEVar2 + -1; UNLOCK(); } else { iVar5 = *(int *)(local_f8 + 0xc); *(int *)(local_f8 + 0xc) = iVar5 + -1; } if (iVar5 == 1) { (**(code **)(*(long *)local_f8 + 0x18))(); } } lVar6 = lVar6 + 0x30; } while (lVar6 != lVar4); } return param_1; }
25,377
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 0x45546 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 0x45522 testb %dil, %dil jne 0x45553 movb $0x2d, -0x1(%r13) decq %r13 movq %rbx, %r12 testq %r14, %r14 jle 0x4558f addq %rbx, %r14 movq %rbx, %r12 movsbq (%r13), %rsi testq %rsi, %rsi je 0x4558f movq 0xb8(%r15), %rax movq %r15, %rdi movq %r12, %rdx movq %r14, %rcx callq *0x30(%rax) testl %eax, %eax jle 0x4558f movl %eax, %eax addq %rax, %r12 incq %r13 cmpq %r14, %r12 jb 0x45561 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x455b3 subl %ebx, %r12d movslq %r12d, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x242e0
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_45546 loc_45522: 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_45522 loc_45546: test dil, dil jnz short loc_45553 mov byte ptr [r13-1], 2Dh ; '-' dec r13 loc_45553: mov r12, rbx test r14, r14 jle short loc_4558F add r14, rbx mov r12, rbx loc_45561: movsx rsi, byte ptr [r13+0] test rsi, rsi jz short loc_4558F mov rax, [r15+0B8h] mov rdi, r15 mov rdx, r12 mov rcx, r14 call qword ptr [rax+30h] test eax, eax jle short loc_4558F mov eax, eax add r12, rax inc r13 cmp r12, r14 jb short loc_45561 loc_4558F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_455B3 sub r12d, ebx movsxd rax, r12d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_455B3: 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 0x00145546 LAB_00145522: 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 0x00145522 LAB_00145546: TEST DIL,DIL JNZ 0x00145553 MOV byte ptr [R13 + -0x1],0x2d DEC R13 LAB_00145553: MOV R12,RBX TEST R14,R14 JLE 0x0014558f ADD R14,RBX MOV R12,RBX LAB_00145561: MOVSX RSI,byte ptr [R13] TEST RSI,RSI JZ 0x0014558f MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RAX + 0x30] TEST EAX,EAX JLE 0x0014558f MOV EAX,EAX ADD R12,RAX INC R13 CMP R12,R14 JC 0x00145561 LAB_0014558f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001455b3 SUB R12D,EBX MOVSXD RAX,R12D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001455b3: CALL 0x001242e0
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); }
25,378
google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber(int) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
const EnumDescriptor::ReservedRange* EnumDescriptor::FindReservedRangeContainingNumber(int number) const { // TODO(chrisn): Consider a non-linear search. for (int i = 0; i < reserved_range_count(); i++) { if (number >= reserved_range(i)->start && number <= reserved_range(i)->end) { return reserved_range(i); } } return nullptr; }
O0
cpp
google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber(int) const: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movl %esi, 0x24(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x18(%rsp) movl $0x0, 0x20(%rsp) movq 0x18(%rsp), %rdi movl 0x20(%rsp), %eax movl %eax, 0x14(%rsp) callq 0x283470 movl %eax, %ecx movl 0x14(%rsp), %eax cmpl %ecx, %eax jge 0x2450b5 movq 0x18(%rsp), %rdi movl 0x24(%rsp), %eax movl %eax, 0x10(%rsp) movl 0x20(%rsp), %esi callq 0x283480 movq %rax, %rcx movl 0x10(%rsp), %eax cmpl (%rcx), %eax jl 0x2450a3 movq 0x18(%rsp), %rdi movl 0x24(%rsp), %eax movl %eax, 0xc(%rsp) movl 0x20(%rsp), %esi callq 0x283480 movq %rax, %rcx movl 0xc(%rsp), %eax cmpl 0x4(%rcx), %eax jg 0x2450a3 movq 0x18(%rsp), %rdi movl 0x20(%rsp), %esi callq 0x283480 movq %rax, 0x30(%rsp) jmp 0x2450be jmp 0x2450a5 movl 0x20(%rsp), %eax addl $0x1, %eax movl %eax, 0x20(%rsp) jmp 0x24502f movq $0x0, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nopl (%rax,%rax)
_ZNK6google8protobuf14EnumDescriptor33FindReservedRangeContainingNumberEi: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_14], esi mov rax, [rsp+38h+var_10] mov [rsp+38h+var_20], rax mov [rsp+38h+var_18], 0 loc_24502F: mov rdi, [rsp+38h+var_20]; this mov eax, [rsp+38h+var_18] mov [rsp+38h+var_24], eax call _ZNK6google8protobuf14EnumDescriptor20reserved_range_countEv; google::protobuf::EnumDescriptor::reserved_range_count(void) mov ecx, eax mov eax, [rsp+38h+var_24] cmp eax, ecx jge short loc_2450B5 mov rdi, [rsp+38h+var_20]; this mov eax, [rsp+38h+var_14] mov [rsp+38h+var_28], eax mov esi, [rsp+38h+var_18]; int call _ZNK6google8protobuf14EnumDescriptor14reserved_rangeEi; google::protobuf::EnumDescriptor::reserved_range(int) mov rcx, rax mov eax, [rsp+38h+var_28] cmp eax, [rcx] jl short loc_2450A3 mov rdi, [rsp+38h+var_20]; this mov eax, [rsp+38h+var_14] mov [rsp+38h+var_2C], eax mov esi, [rsp+38h+var_18]; int call _ZNK6google8protobuf14EnumDescriptor14reserved_rangeEi; google::protobuf::EnumDescriptor::reserved_range(int) mov rcx, rax mov eax, [rsp+38h+var_2C] cmp eax, [rcx+4] jg short loc_2450A3 mov rdi, [rsp+38h+var_20]; this mov esi, [rsp+38h+var_18]; int call _ZNK6google8protobuf14EnumDescriptor14reserved_rangeEi; google::protobuf::EnumDescriptor::reserved_range(int) mov [rsp+38h+var_8], rax jmp short loc_2450BE loc_2450A3: jmp short $+2 loc_2450A5: mov eax, [rsp+38h+var_18] add eax, 1 mov [rsp+38h+var_18], eax jmp loc_24502F loc_2450B5: mov [rsp+38h+var_8], 0 loc_2450BE: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber( google::protobuf::EnumDescriptor *this, int a2) { int i; // [rsp+20h] [rbp-18h] for ( i = 0; i < (int)google::protobuf::EnumDescriptor::reserved_range_count(this); ++i ) { if ( a2 >= *(_DWORD *)google::protobuf::EnumDescriptor::reserved_range(this, i) && a2 <= *(_DWORD *)(google::protobuf::EnumDescriptor::reserved_range(this, i) + 4) ) { return google::protobuf::EnumDescriptor::reserved_range(this, i); } } return 0LL; }
25,379
google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber(int) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
const EnumDescriptor::ReservedRange* EnumDescriptor::FindReservedRangeContainingNumber(int number) const { // TODO(chrisn): Consider a non-linear search. for (int i = 0; i < reserved_range_count(); i++) { if (number >= reserved_range(i)->start && number <= reserved_range(i)->end) { return reserved_range(i); } } return nullptr; }
O3
cpp
google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber(int) const: movslq 0x30(%rdi), %rcx testq %rcx, %rcx jle 0xc1a09 movq 0x38(%rdi), %rax cmpl %esi, (%rax) jg 0xc1a00 cmpl %esi, 0x4(%rax) jge 0xc1a0b addq $0x8, %rax decq %rcx jne 0xc19f7 xorl %eax, %eax retq
_ZNK6google8protobuf14EnumDescriptor33FindReservedRangeContainingNumberEi: movsxd rcx, dword ptr [rdi+30h] test rcx, rcx jle short loc_C1A09 mov rax, [rdi+38h] loc_C19F7: cmp [rax], esi jg short loc_C1A00 cmp [rax+4], esi jge short locret_C1A0B loc_C1A00: add rax, 8 dec rcx jnz short loc_C19F7 loc_C1A09: xor eax, eax locret_C1A0B: retn
_DWORD * google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber( google::protobuf::EnumDescriptor *this, int a2) { long long v2; // rcx _DWORD *result; // rax v2 = *((int *)this + 12); if ( v2 <= 0 ) return 0LL; for ( result = (_DWORD *)*((_QWORD *)this + 7); *result > a2 || result[1] < a2; result += 2 ) { if ( !--v2 ) return 0LL; } return result; }
FindReservedRangeContainingNumber: MOVSXD RCX,dword ptr [RDI + 0x30] TEST RCX,RCX JLE 0x001c1a09 MOV RAX,qword ptr [RDI + 0x38] LAB_001c19f7: CMP dword ptr [RAX],ESI JG 0x001c1a00 CMP dword ptr [RAX + 0x4],ESI JGE 0x001c1a0b LAB_001c1a00: ADD RAX,0x8 DEC RCX JNZ 0x001c19f7 LAB_001c1a09: XOR EAX,EAX LAB_001c1a0b: RET
/* google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber(int) const */ int * __thiscall google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber (EnumDescriptor *this,int param_1) { int *piVar1; long lVar2; lVar2 = (long)*(int *)(this + 0x30); if (0 < lVar2) { piVar1 = *(int **)(this + 0x38); do { if ((*piVar1 <= param_1) && (param_1 <= piVar1[1])) { return piVar1; } piVar1 = piVar1 + 2; lVar2 = lVar2 + -1; } while (lVar2 != 0); } return (int *)0x0; }
25,380
bc_atom_to_idx
bluesky950520[P]quickjs/quickjs.c
static int bc_atom_to_idx(BCWriterState *s, uint32_t *pres, JSAtom atom) { uint32_t v; if (atom < s->first_atom || __JS_AtomIsTaggedInt(atom)) { *pres = atom; return 0; } atom -= s->first_atom; if (atom < s->atom_to_idx_size && s->atom_to_idx[atom] != 0) { *pres = s->atom_to_idx[atom]; return 0; } if (atom >= s->atom_to_idx_size) { int old_size, i; old_size = s->atom_to_idx_size; if (js_resize_array(s->ctx, (void **)&s->atom_to_idx, sizeof(s->atom_to_idx[0]), &s->atom_to_idx_size, atom + 1)) return -1; /* XXX: could add a specific js_resize_array() function to do it */ for(i = old_size; i < s->atom_to_idx_size; i++) s->atom_to_idx[i] = 0; } if (js_resize_array(s->ctx, (void **)&s->idx_to_atom, sizeof(s->idx_to_atom[0]), &s->idx_to_atom_size, s->idx_to_atom_count + 1)) goto fail; v = s->idx_to_atom_count++; s->idx_to_atom[v] = atom + s->first_atom; v += s->first_atom; s->atom_to_idx[atom] = v; *pres = v; return 0; fail: *pres = 0; return -1; }
O1
c
bc_atom_to_idx: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movl %edx, %r13d subl 0x3c(%rdi), %r13d setb %al testl %edx, %edx sets %cl xorl %ebp, %ebp orb %al, %cl jne 0x44d39 movq %rdi, %r14 movslq 0x48(%rdi), %r12 cmpl %r12d, %r13d jae 0x44ccd movq 0x40(%r14), %rax movl %r13d, %ecx movl (%rax,%rcx,4), %edx testl %edx, %edx jne 0x44d39 cmpl %r12d, %r13d jb 0x44d08 leaq 0x48(%r14), %r15 leaq 0x40(%r14), %rdx leal 0x1(%r13), %r8d movb $0x1, %cl cmpl %r8d, %r12d jl 0x44d4c movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl je 0x44d3d cmpl (%r15), %r12d jge 0x44d04 movq (%rdx), %rdx movl $0x0, (%rdx,%r12,4) incq %r12 movslq (%r15), %rsi cmpq %rsi, %r12 jl 0x44cf1 testb %cl, %cl je 0x44d3d movl 0x58(%r14), %r8d cmpl %r8d, 0x5c(%r14) jle 0x44d72 movl 0x58(%r14), %eax leal 0x1(%rax), %ecx movl %ecx, 0x58(%r14) movl %r13d, %ecx addl 0x3c(%r14), %r13d movq 0x50(%r14), %rdx movl %r13d, (%rdx,%rax,4) movl 0x3c(%r14), %edx addl %eax, %edx movq 0x40(%r14), %rax movl %edx, (%rax,%rcx,4) movl %edx, (%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r14), %rdi movq %rdx, (%rsp) movq (%rsp), %rsi movl $0x4, %edx movq %r15, %rcx callq 0x428db movq (%rsp), %rdx testl %eax, %eax sete %cl jmp 0x44ce0 leaq 0x50(%r14), %rsi leaq 0x5c(%r14), %rcx incl %r8d movq (%r14), %rdi movl $0x4, %edx callq 0x428db testl %eax, %eax je 0x44d12 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF xorl %edx, %edx jmp 0x44d39
bc_atom_to_idx: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r13d, edx sub r13d, [rdi+3Ch] setb al test edx, edx sets cl xor ebp, ebp or cl, al jnz loc_44D39 mov r14, rdi movsxd r12, dword ptr [rdi+48h] cmp r13d, r12d jnb short loc_44CCD mov rax, [r14+40h] mov ecx, r13d mov edx, [rax+rcx*4] test edx, edx jnz short loc_44D39 cmp r13d, r12d jb short loc_44D08 loc_44CCD: lea r15, [r14+48h] lea rdx, [r14+40h] lea r8d, [r13+1] mov cl, 1 cmp r12d, r8d jl short loc_44D4C loc_44CE0: mov eax, 0FFFFFFFFh test cl, cl jz short loc_44D3D cmp r12d, [r15] jge short loc_44D04 mov rdx, [rdx] loc_44CF1: mov dword ptr [rdx+r12*4], 0 inc r12 movsxd rsi, dword ptr [r15] cmp r12, rsi jl short loc_44CF1 loc_44D04: test cl, cl jz short loc_44D3D loc_44D08: mov r8d, [r14+58h] cmp [r14+5Ch], r8d jle short loc_44D72 loc_44D12: mov eax, [r14+58h] lea ecx, [rax+1] mov [r14+58h], ecx mov ecx, r13d add r13d, [r14+3Ch] mov rdx, [r14+50h] mov [rdx+rax*4], r13d mov edx, [r14+3Ch] add edx, eax mov rax, [r14+40h] mov [rax+rcx*4], edx loc_44D39: mov [rbx], edx mov eax, ebp loc_44D3D: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44D4C: mov rdi, [r14] mov [rsp+38h+var_38], rdx mov rsi, [rsp+38h+var_38] mov edx, 4 mov rcx, r15 call js_realloc_array mov rdx, [rsp+38h+var_38] test eax, eax setz cl jmp loc_44CE0 loc_44D72: lea rsi, [r14+50h] lea rcx, [r14+5Ch] inc r8d mov rdi, [r14] mov edx, 4 call js_realloc_array test eax, eax jz short loc_44D12 mov ebp, 0FFFFFFFFh xor edx, edx jmp short loc_44D39
long long bc_atom_to_idx(long long a1, int *a2, int a3) { unsigned int v3; // r13d unsigned int v4; // ebp long long v5; // r12 int *v6; // r15 long long *v7; // rdx bool v8; // cl long long result; // rax long long v10; // rdx int v11; // r8d long long v12; // rax int v13; // eax v3 = a3 - *(_DWORD *)(a1 + 60); v4 = 0; if ( (unsigned int)a3 < *(_DWORD *)(a1 + 60) || a3 < 0 ) goto LABEL_13; v5 = *(int *)(a1 + 72); if ( v3 >= (unsigned int)v5 ) goto LABEL_5; a3 = *(_DWORD *)(*(_QWORD *)(a1 + 64) + 4LL * v3); if ( a3 ) { LABEL_13: *a2 = a3; return v4; } if ( v3 < (unsigned int)v5 ) { LABEL_11: v11 = *(_DWORD *)(a1 + 88); if ( *(_DWORD *)(a1 + 92) <= v11 && (unsigned int)js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 80), 4u, (_DWORD *)(a1 + 92), v11 + 1) ) { v4 = -1; a3 = 0; } else { v12 = *(unsigned int *)(a1 + 88); *(_DWORD *)(a1 + 88) = v12 + 1; *(_DWORD *)(*(_QWORD *)(a1 + 80) + 4 * v12) = *(_DWORD *)(a1 + 60) + v3; a3 = v12 + *(_DWORD *)(a1 + 60); *(_DWORD *)(*(_QWORD *)(a1 + 64) + 4LL * v3) = a3; } goto LABEL_13; } LABEL_5: v6 = (int *)(a1 + 72); v7 = (long long *)(a1 + 64); v8 = 1; if ( (int)v5 < (int)(v3 + 1) ) { v13 = js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 64), 4u, (_DWORD *)(a1 + 72), v3 + 1); v7 = (long long *)(a1 + 64); v8 = v13 == 0; } result = 0xFFFFFFFFLL; if ( v8 ) { if ( (int)v5 < *v6 ) { v10 = *v7; do *(_DWORD *)(v10 + 4 * v5++) = 0; while ( v5 < *v6 ); } goto LABEL_11; } return result; }
bc_atom_to_idx: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R13D,EDX SUB R13D,dword ptr [RDI + 0x3c] SETC AL TEST EDX,EDX SETS CL XOR EBP,EBP OR CL,AL JNZ 0x00144d39 MOV R14,RDI MOVSXD R12,dword ptr [RDI + 0x48] CMP R13D,R12D JNC 0x00144ccd MOV RAX,qword ptr [R14 + 0x40] MOV ECX,R13D MOV EDX,dword ptr [RAX + RCX*0x4] TEST EDX,EDX JNZ 0x00144d39 CMP R13D,R12D JC 0x00144d08 LAB_00144ccd: LEA R15,[R14 + 0x48] LEA RDX,[R14 + 0x40] LEA R8D,[R13 + 0x1] MOV CL,0x1 CMP R12D,R8D JL 0x00144d4c LAB_00144ce0: MOV EAX,0xffffffff TEST CL,CL JZ 0x00144d3d CMP R12D,dword ptr [R15] JGE 0x00144d04 MOV RDX,qword ptr [RDX] LAB_00144cf1: MOV dword ptr [RDX + R12*0x4],0x0 INC R12 MOVSXD RSI,dword ptr [R15] CMP R12,RSI JL 0x00144cf1 LAB_00144d04: TEST CL,CL JZ 0x00144d3d LAB_00144d08: MOV R8D,dword ptr [R14 + 0x58] CMP dword ptr [R14 + 0x5c],R8D JLE 0x00144d72 LAB_00144d12: MOV EAX,dword ptr [R14 + 0x58] LEA ECX,[RAX + 0x1] MOV dword ptr [R14 + 0x58],ECX MOV ECX,R13D ADD R13D,dword ptr [R14 + 0x3c] MOV RDX,qword ptr [R14 + 0x50] MOV dword ptr [RDX + RAX*0x4],R13D MOV EDX,dword ptr [R14 + 0x3c] ADD EDX,EAX MOV RAX,qword ptr [R14 + 0x40] MOV dword ptr [RAX + RCX*0x4],EDX LAB_00144d39: MOV dword ptr [RBX],EDX MOV EAX,EBP LAB_00144d3d: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144d4c: MOV RDI,qword ptr [R14] MOV qword ptr [RSP],RDX MOV RSI,qword ptr [RSP] MOV EDX,0x4 MOV RCX,R15 CALL 0x001428db MOV RDX,qword ptr [RSP] TEST EAX,EAX SETZ CL JMP 0x00144ce0 LAB_00144d72: LEA RSI,[R14 + 0x50] LEA RCX,[R14 + 0x5c] INC R8D MOV RDI,qword ptr [R14] MOV EDX,0x4 CALL 0x001428db TEST EAX,EAX JZ 0x00144d12 MOV EBP,0xffffffff XOR EDX,EDX JMP 0x00144d39
int8 bc_atom_to_idx(int8 *param_1,uint *param_2,uint param_3) { int *piVar1; uint uVar2; long lVar3; int iVar4; int8 uVar5; long lVar6; uint uVar7; bool bVar8; uVar7 = param_3 - *(uint *)((long)param_1 + 0x3c); uVar5 = 0; if ((int)param_3 < 0 || param_3 < *(uint *)((long)param_1 + 0x3c)) goto LAB_00144d39; uVar2 = *(uint *)(param_1 + 9); lVar6 = (long)(int)uVar2; if (uVar7 < uVar2) { param_3 = *(uint *)(param_1[8] + (ulong)uVar7 * 4); if (param_3 != 0) goto LAB_00144d39; if (uVar2 <= uVar7) goto LAB_00144ccd; } else { LAB_00144ccd: piVar1 = (int *)(param_1 + 9); bVar8 = true; if ((int)uVar2 < (int)(uVar7 + 1)) { iVar4 = js_realloc_array(*param_1,param_1 + 8,4,piVar1); bVar8 = iVar4 == 0; } if (!bVar8) { return 0xffffffff; } if ((int)uVar2 < *piVar1) { lVar3 = param_1[8]; do { *(int4 *)(lVar3 + lVar6 * 4) = 0; lVar6 = lVar6 + 1; } while (lVar6 < *piVar1); } if (!bVar8) { return 0xffffffff; } } if ((*(int *)(param_1 + 0xb) < *(int *)((long)param_1 + 0x5c)) || (iVar4 = js_realloc_array(*param_1,param_1 + 10,4,(long)param_1 + 0x5c, *(int *)(param_1 + 0xb) + 1), iVar4 == 0)) { param_3 = *(uint *)(param_1 + 0xb); *(uint *)(param_1 + 0xb) = param_3 + 1; *(uint *)(param_1[10] + (ulong)param_3 * 4) = uVar7 + *(int *)((long)param_1 + 0x3c); param_3 = *(int *)((long)param_1 + 0x3c) + param_3; *(uint *)(param_1[8] + (ulong)uVar7 * 4) = param_3; } else { uVar5 = 0xffffffff; param_3 = 0; } LAB_00144d39: *param_2 = param_3; return uVar5; }
25,381
bc_atom_to_idx
bluesky950520[P]quickjs/quickjs.c
static int bc_atom_to_idx(BCWriterState *s, uint32_t *pres, JSAtom atom) { uint32_t v; if (atom < s->first_atom || __JS_AtomIsTaggedInt(atom)) { *pres = atom; return 0; } atom -= s->first_atom; if (atom < s->atom_to_idx_size && s->atom_to_idx[atom] != 0) { *pres = s->atom_to_idx[atom]; return 0; } if (atom >= s->atom_to_idx_size) { int old_size, i; old_size = s->atom_to_idx_size; if (js_resize_array(s->ctx, (void **)&s->atom_to_idx, sizeof(s->atom_to_idx[0]), &s->atom_to_idx_size, atom + 1)) return -1; /* XXX: could add a specific js_resize_array() function to do it */ for(i = old_size; i < s->atom_to_idx_size; i++) s->atom_to_idx[i] = 0; } if (js_resize_array(s->ctx, (void **)&s->idx_to_atom, sizeof(s->idx_to_atom[0]), &s->idx_to_atom_size, s->idx_to_atom_count + 1)) goto fail; v = s->idx_to_atom_count++; s->idx_to_atom[v] = atom + s->first_atom; v += s->first_atom; s->atom_to_idx[atom] = v; *pres = v; return 0; fail: *pres = 0; return -1; }
O3
c
bc_atom_to_idx: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edx, %r13d subl 0x3c(%rdi), %r13d setb %al testl %edx, %edx sets %cl xorl %ebp, %ebp orb %al, %cl jne 0x4681f movq %rdi, %r14 movslq 0x48(%rdi), %rbx leaq 0x40(%rdi), %r12 movl %r13d, %edx cmpl %ebx, %r13d jae 0x46824 movq (%r12), %rax movl (%rax,%rdx,4), %r8d testl %r8d, %r8d jne 0x4687d jmp 0x46850 movl %edx, %r8d jmp 0x4687d leaq 0x48(%r14), %r15 leal 0x1(%r13), %r8d cmpl %r8d, %ebx jl 0x468c0 cmpl (%r15), %ebx jge 0x46850 movq (%r12), %rax movl $0x0, (%rax,%rbx,4) incq %rbx movslq (%r15), %rcx cmpq %rcx, %rbx jl 0x4683e movl 0x58(%r14), %r8d cmpl %r8d, 0x5c(%r14) jle 0x46891 leal 0x1(%r8), %eax movl %eax, 0x58(%r14) addl 0x3c(%r14), %r13d movq 0x50(%r14), %rax movl %r8d, %ecx movl %r13d, (%rax,%rcx,4) addl 0x3c(%r14), %r8d movq 0x40(%r14), %rax movl %r8d, (%rax,%rdx,4) movl %r8d, (%rsi) movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdx, %r15 movq %rsi, %rbx leaq 0x50(%r14), %rsi leaq 0x5c(%r14), %rcx incl %r8d movq (%r14), %rdi movl $0x4, %edx callq 0x444ee testl %eax, %eax je 0x468f7 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF xorl %r8d, %r8d movq %rbx, %rsi jmp 0x4687d movq (%r14), %rdi movq %rsi, 0x10(%rsp) movq %r12, %rsi movq %rdx, 0x8(%rsp) movl $0x4, %edx movq %r15, %rcx callq 0x444ee movq 0x8(%rsp), %rdx movq 0x10(%rsp), %rsi movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x46882 jmp 0x46835 movl 0x58(%r14), %r8d movq %rbx, %rsi movq %r15, %rdx jmp 0x4685a
bc_atom_to_idx: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13d, edx sub r13d, [rdi+3Ch] setb al test edx, edx sets cl xor ebp, ebp or cl, al jnz short loc_4681F mov r14, rdi movsxd rbx, dword ptr [rdi+48h] lea r12, [rdi+40h] mov edx, r13d cmp r13d, ebx jnb short loc_46824 mov rax, [r12] mov r8d, [rax+rdx*4] test r8d, r8d jnz short loc_4687D jmp short loc_46850 loc_4681F: mov r8d, edx jmp short loc_4687D loc_46824: lea r15, [r14+48h] lea r8d, [r13+1] cmp ebx, r8d jl loc_468C0 loc_46835: cmp ebx, [r15] jge short loc_46850 mov rax, [r12] loc_4683E: mov dword ptr [rax+rbx*4], 0 inc rbx movsxd rcx, dword ptr [r15] cmp rbx, rcx jl short loc_4683E loc_46850: mov r8d, [r14+58h] cmp [r14+5Ch], r8d jle short loc_46891 loc_4685A: lea eax, [r8+1] mov [r14+58h], eax add r13d, [r14+3Ch] mov rax, [r14+50h] mov ecx, r8d mov [rax+rcx*4], r13d add r8d, [r14+3Ch] mov rax, [r14+40h] mov [rax+rdx*4], r8d loc_4687D: mov [rsi], r8d mov eax, ebp loc_46882: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_46891: mov r15, rdx mov rbx, rsi lea rsi, [r14+50h] lea rcx, [r14+5Ch] inc r8d mov rdi, [r14] mov edx, 4 call js_realloc_array test eax, eax jz short loc_468F7 mov ebp, 0FFFFFFFFh xor r8d, r8d mov rsi, rbx jmp short loc_4687D loc_468C0: mov rdi, [r14] mov [rsp+48h+var_38], rsi mov rsi, r12 mov [rsp+48h+var_40], rdx mov edx, 4 mov rcx, r15 call js_realloc_array mov rdx, [rsp+48h+var_40] mov rsi, [rsp+48h+var_38] mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_46882 jmp loc_46835 loc_468F7: mov r8d, [r14+58h] mov rsi, rbx mov rdx, r15 jmp loc_4685A
long long bc_atom_to_idx(long long a1, int *a2, int a3) { unsigned int v3; // r13d unsigned int v4; // ebp long long v5; // rbx long long *v6; // r12 long long v7; // rdx int v8; // r8d int *v9; // r15 long long v10; // rax unsigned int v11; // r8d long long result; // rax long long v13; // r15 int v14; // eax int v15; // ecx v3 = a3 - *(_DWORD *)(a1 + 60); v4 = 0; if ( (unsigned int)a3 < *(_DWORD *)(a1 + 60) || a3 < 0 ) { v8 = a3; goto LABEL_12; } v5 = *(int *)(a1 + 72); v6 = (long long *)(a1 + 64); v7 = v3; if ( v3 < (unsigned int)v5 ) { v8 = *(_DWORD *)(*v6 + 4LL * v3); if ( v8 ) goto LABEL_12; goto LABEL_10; } v9 = (int *)(a1 + 72); if ( (int)v5 >= (int)(v3 + 1) || (v14 = js_realloc_array(*(_QWORD *)a1, v6, 4u, (_DWORD *)(a1 + 72), v3 + 1), v7 = v3, v15 = v14, result = 0xFFFFFFFFLL, !v15) ) { if ( (int)v5 < *v9 ) { v10 = *v6; do *(_DWORD *)(v10 + 4 * v5++) = 0; while ( v5 < *v9 ); } LABEL_10: v11 = *(_DWORD *)(a1 + 88); if ( *(_DWORD *)(a1 + 92) <= (signed int)v11 ) { v13 = v7; if ( (unsigned int)js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 80), 4u, (_DWORD *)(a1 + 92), v11 + 1) ) { v4 = -1; v8 = 0; goto LABEL_12; } v11 = *(_DWORD *)(a1 + 88); v7 = v13; } *(_DWORD *)(a1 + 88) = v11 + 1; *(_DWORD *)(*(_QWORD *)(a1 + 80) + 4LL * v11) = *(_DWORD *)(a1 + 60) + v3; v8 = *(_DWORD *)(a1 + 60) + v11; *(_DWORD *)(*(_QWORD *)(a1 + 64) + 4 * v7) = v8; LABEL_12: *a2 = v8; return v4; } return result; }
bc_atom_to_idx: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13D,EDX SUB R13D,dword ptr [RDI + 0x3c] SETC AL TEST EDX,EDX SETS CL XOR EBP,EBP OR CL,AL JNZ 0x0014681f MOV R14,RDI MOVSXD RBX,dword ptr [RDI + 0x48] LEA R12,[RDI + 0x40] MOV EDX,R13D CMP R13D,EBX JNC 0x00146824 MOV RAX,qword ptr [R12] MOV R8D,dword ptr [RAX + RDX*0x4] TEST R8D,R8D JNZ 0x0014687d JMP 0x00146850 LAB_0014681f: MOV R8D,EDX JMP 0x0014687d LAB_00146824: LEA R15,[R14 + 0x48] LEA R8D,[R13 + 0x1] CMP EBX,R8D JL 0x001468c0 LAB_00146835: CMP EBX,dword ptr [R15] JGE 0x00146850 MOV RAX,qword ptr [R12] LAB_0014683e: MOV dword ptr [RAX + RBX*0x4],0x0 INC RBX MOVSXD RCX,dword ptr [R15] CMP RBX,RCX JL 0x0014683e LAB_00146850: MOV R8D,dword ptr [R14 + 0x58] CMP dword ptr [R14 + 0x5c],R8D JLE 0x00146891 LAB_0014685a: LEA EAX,[R8 + 0x1] MOV dword ptr [R14 + 0x58],EAX ADD R13D,dword ptr [R14 + 0x3c] MOV RAX,qword ptr [R14 + 0x50] MOV ECX,R8D MOV dword ptr [RAX + RCX*0x4],R13D ADD R8D,dword ptr [R14 + 0x3c] MOV RAX,qword ptr [R14 + 0x40] MOV dword ptr [RAX + RDX*0x4],R8D LAB_0014687d: MOV dword ptr [RSI],R8D MOV EAX,EBP LAB_00146882: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00146891: MOV R15,RDX MOV RBX,RSI LEA RSI,[R14 + 0x50] LEA RCX,[R14 + 0x5c] INC R8D MOV RDI,qword ptr [R14] MOV EDX,0x4 CALL 0x001444ee TEST EAX,EAX JZ 0x001468f7 MOV EBP,0xffffffff XOR R8D,R8D MOV RSI,RBX JMP 0x0014687d LAB_001468c0: MOV RDI,qword ptr [R14] MOV qword ptr [RSP + 0x10],RSI MOV RSI,R12 MOV qword ptr [RSP + 0x8],RDX MOV EDX,0x4 MOV RCX,R15 CALL 0x001444ee MOV RDX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x00146882 JMP 0x00146835 LAB_001468f7: MOV R8D,dword ptr [R14 + 0x58] MOV RSI,RBX MOV RDX,R15 JMP 0x0014685a
int8 bc_atom_to_idx(int8 *param_1,uint *param_2,uint param_3) { long *plVar1; int *piVar2; uint uVar3; long lVar4; int iVar5; long lVar6; int8 uVar7; uint uVar8; uVar8 = param_3 - *(uint *)((long)param_1 + 0x3c); uVar7 = 0; if (-1 < (int)param_3 && *(uint *)((long)param_1 + 0x3c) <= param_3) { uVar3 = *(uint *)(param_1 + 9); lVar6 = (long)(int)uVar3; plVar1 = param_1 + 8; if (uVar8 < uVar3) { param_3 = *(uint *)(*plVar1 + (ulong)uVar8 * 4); if (param_3 != 0) goto LAB_0014687d; } else { piVar2 = (int *)(param_1 + 9); if (((int)uVar3 < (int)(uVar8 + 1)) && (iVar5 = js_realloc_array(*param_1,plVar1,4,piVar2), iVar5 != 0)) { return 0xffffffff; } if ((int)uVar3 < *piVar2) { lVar4 = *plVar1; do { *(int4 *)(lVar4 + lVar6 * 4) = 0; lVar6 = lVar6 + 1; } while (lVar6 < *piVar2); } } param_3 = *(uint *)(param_1 + 0xb); if (*(int *)((long)param_1 + 0x5c) <= (int)param_3) { iVar5 = js_realloc_array(*param_1,param_1 + 10,4,(long)param_1 + 0x5c); if (iVar5 != 0) { uVar7 = 0xffffffff; param_3 = 0; goto LAB_0014687d; } param_3 = *(uint *)(param_1 + 0xb); } *(uint *)(param_1 + 0xb) = param_3 + 1; *(uint *)(param_1[10] + (ulong)param_3 * 4) = uVar8 + *(int *)((long)param_1 + 0x3c); param_3 = param_3 + *(int *)((long)param_1 + 0x3c); *(uint *)(param_1[8] + (ulong)uVar8 * 4) = param_3; } LAB_0014687d: *param_2 = param_3; return uVar7; }
25,382
mi_read_cache
eloqsql/storage/myisam/mi_cache.c
int _mi_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos, size_t length, int flag) { size_t read_length,in_buff_length; my_off_t offset; uchar *in_buff_pos; DBUG_ENTER("_mi_read_cache"); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); if (pos < info->pos_in_file) { read_length=length; if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos)) read_length=(size_t)(info->pos_in_file-pos); info->seek_not_done=1; if (mysql_file_pread(info->file, buff, read_length, pos, MYF(MY_NABP))) DBUG_RETURN(1); if (!(length-=read_length)) DBUG_RETURN(0); pos+=read_length; buff+=read_length; } if (pos >= info->pos_in_file && (offset= (my_off_t) (pos - info->pos_in_file)) < (my_off_t) (info->read_end - info->request_pos)) { in_buff_pos=info->request_pos+ (uint)offset; in_buff_length= MY_MIN(length, (size_t)(info->read_end-in_buff_pos)); memcpy(buff,info->request_pos+(uint) offset, in_buff_length); if (!(length-=in_buff_length)) DBUG_RETURN(0); pos+=in_buff_length; buff+=in_buff_length; } else in_buff_length=0; if (flag & READING_NEXT) { if (pos != (info->pos_in_file + (uint) (info->read_end - info->request_pos))) { info->pos_in_file=pos; /* Force start here */ info->read_pos=info->read_end=info->request_pos; /* Everything used */ info->seek_not_done=1; } else info->read_pos=info->read_end; /* All block used */ if (!_my_b_read(info,buff,length)) DBUG_RETURN(0); read_length=info->error; } else { info->seek_not_done=1; if ((read_length= mysql_file_pread(info->file, buff, length, pos, MYF(0))) == length) DBUG_RETURN(0); } if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) { DBUG_PRINT("error", ("Error %d reading next-multi-part block (Got %d bytes)", my_errno, (int) read_length)); if (!my_errno || my_errno == -1 || my_errno == HA_ERR_FILE_TOO_SHORT) my_errno= HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); } bzero(buff+read_length,MI_BLOCK_INFO_HEADER_LENGTH - in_buff_length - read_length); DBUG_RETURN(0); }
O3
c
mi_read_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %r8d, -0x34(%rbp) movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %r13 movq (%rdi), %rax movq %rax, %r14 subq %rdx, %r14 jbe 0x4a097 cmpq %rcx, %r14 movq %rcx, -0x40(%rbp) cmovaeq %rcx, %r14 movl $0x1, 0xe0(%r13) movl 0xd4(%r13), %ebx leaq 0x2e631f(%rip), %rax # 0x330350 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax movq %r15, -0x30(%rbp) jne 0x4a21f movl $0x4, %r8d movl %ebx, %edi movq %r15, %rsi movq %r14, %rdx movq %r12, %rcx callq 0x5ac08 movq %rax, %r15 movl $0x1, %ebx testq %r15, %r15 movq -0x40(%rbp), %rcx jne 0x4a20e subq %r14, %rcx je 0x4a1d4 addq %r14, %r12 movq -0x30(%rbp), %r15 addq %r14, %r15 movq (%r13), %rax movq %r12, %rdx subq %rax, %rdx jb 0x4a0ed movq 0x18(%r13), %r14 movq 0x28(%r13), %rsi movq %r14, %rax subq %rsi, %rax xorl %ebx, %ebx cmpq %rax, %rdx jae 0x4a0ed movl %edx, %eax addq %rax, %rsi subq %rsi, %r14 cmpq %r14, %rcx cmovbq %rcx, %r14 movq %r15, -0x30(%rbp) movq %r15, %rdi movq %r14, %rdx movq %rcx, %r15 callq 0x282a0 movq %r15, %rcx subq %r14, %rcx je 0x4a20e addq %r14, %r12 movq -0x30(%rbp), %r15 addq %r14, %r15 jmp 0x4a0f0 xorl %r14d, %r14d testb $0x1, -0x34(%rbp) jne 0x4a15d movq %rcx, -0x40(%rbp) movq %r15, -0x30(%rbp) movl $0x1, 0xe0(%r13) movl 0xd4(%r13), %ebx leaq 0x2e6239(%rip), %r13 # 0x330350 movq (%r13), %rax leaq -0x90(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x4a283 movl %ebx, %edi movq -0x30(%rbp), %r15 movq %r15, %rsi movq -0x40(%rbp), %r13 movq %r13, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x5ac08 movq %rax, %rbx cmpq %r13, %rbx jne 0x4a1a5 jmp 0x4a1d4 movq 0x18(%r13), %rsi movq 0x28(%r13), %rax movl %esi, %edx subl %eax, %edx addq (%r13), %rdx cmpq %rdx, %r12 je 0x4a188 movq %r12, (%r13) movq %rax, 0x18(%r13) movl $0x1, 0xe0(%r13) movq %rax, %rsi movq %rsi, 0x10(%r13) movq %r13, %rdi movq %r15, %rsi movq %rcx, %rdx callq 0x50b36 testl %eax, %eax je 0x4a1d4 movslq 0xe4(%r13), %rbx testb $0x2, -0x34(%rbp) je 0x4a1d8 movl %ebx, %eax cmpl $-0x1, %eax je 0x4a1d8 addq %rbx, %r14 cmpq $0x2, %r14 jbe 0x4a1d8 addq %rbx, %r15 movl $0x14, %edx subq %r14, %rdx xorl %ebx, %ebx movq %r15, %rdi xorl %esi, %esi callq 0x281b0 jmp 0x4a20e xorl %ebx, %ebx jmp 0x4a20e callq 0x5c086 cmpl $0x0, (%rax) je 0x4a1fe callq 0x5c086 cmpl $-0x1, (%rax) je 0x4a1fe callq 0x5c086 movl $0x1, %ebx cmpl $0xaf, (%rax) jne 0x4a20e callq 0x5c086 movl $0x7f, (%rax) movl $0x1, %ebx movl %ebx, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rcx leaq 0x2e6127(%rip), %rax # 0x330350 movq (%rax), %rax leaq 0x48381(%rip), %rdx # 0x925b4 movq %rcx, -0x48(%rbp) movq %rcx, %rdi movq %r14, %rsi movl $0x35, %ecx callq *0x210(%rax) movl $0x4, %r8d movl %ebx, %edi movq %r15, %rsi movq %r14, %rdx movq %r12, %rcx callq 0x5ac08 movq %rax, %r15 xorl %esi, %esi testq %rax, %rax cmoveq %r14, %rsi leaq 0x2e60df(%rip), %rax # 0x330350 movq (%rax), %rax movq -0x48(%rbp), %rdi callq *0x218(%rax) jmp 0x4a06e movq %rax, %r15 movq (%r13), %rax leaq 0x48323(%rip), %rdx # 0x925b4 movq %r15, %rdi movq -0x40(%rbp), %r13 movq %r13, %rsi movl $0x5d, %ecx callq *0x210(%rax) movl %ebx, %edi movq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x5ac08 movq %rax, %rbx cmpq $-0x1, %rax movl $0x0, %esi cmovneq %rax, %rsi leaq 0x2e607f(%rip), %rax # 0x330350 movq (%rax), %rax movq %r15, %rdi movq -0x30(%rbp), %r15 callq *0x218(%rax) jmp 0x4a156 nop
_mi_read_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rbp+var_34], r8d mov r12, rdx mov r15, rsi mov r13, rdi mov rax, [rdi] mov r14, rax sub r14, rdx jbe loc_4A097 cmp r14, rcx mov [rbp+var_40], rcx cmovnb r14, rcx mov dword ptr [r13+0E0h], 1 mov ebx, [r13+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax mov [rbp+var_30], r15 jnz loc_4A21F mov r8d, 4 mov edi, ebx mov rsi, r15 mov rdx, r14 mov rcx, r12 call my_pread mov r15, rax loc_4A06E: mov ebx, 1 test r15, r15 mov rcx, [rbp+var_40] jnz loc_4A20E sub rcx, r14 jz loc_4A1D4 add r12, r14 mov r15, [rbp+var_30] add r15, r14 mov rax, [r13+0] loc_4A097: mov rdx, r12 sub rdx, rax jb short loc_4A0ED mov r14, [r13+18h] mov rsi, [r13+28h] mov rax, r14 sub rax, rsi xor ebx, ebx cmp rdx, rax jnb short loc_4A0ED mov eax, edx add rsi, rax sub r14, rsi cmp rcx, r14 cmovb r14, rcx mov [rbp+var_30], r15 mov rdi, r15 mov rdx, r14 mov r15, rcx call _memcpy mov rcx, r15 sub rcx, r14 jz loc_4A20E add r12, r14 mov r15, [rbp+var_30] add r15, r14 jmp short loc_4A0F0 loc_4A0ED: xor r14d, r14d loc_4A0F0: test byte ptr [rbp+var_34], 1 jnz short loc_4A15D mov [rbp+var_40], rcx mov [rbp+var_30], r15 mov dword ptr [r13+0E0h], 1 mov ebx, [r13+0D4h] lea r13, PSI_server mov rax, [r13+0] lea rdi, [rbp+var_90] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_4A283 mov edi, ebx mov r15, [rbp+var_30] mov rsi, r15 mov r13, [rbp+var_40] mov rdx, r13 mov rcx, r12 xor r8d, r8d call my_pread mov rbx, rax loc_4A156: cmp rbx, r13 jnz short loc_4A1A5 jmp short loc_4A1D4 loc_4A15D: mov rsi, [r13+18h] mov rax, [r13+28h] mov edx, esi sub edx, eax add rdx, [r13+0] cmp r12, rdx jz short loc_4A188 mov [r13+0], r12 mov [r13+18h], rax mov dword ptr [r13+0E0h], 1 mov rsi, rax loc_4A188: mov [r13+10h], rsi mov rdi, r13 mov rsi, r15 mov rdx, rcx call _my_b_read test eax, eax jz short loc_4A1D4 movsxd rbx, dword ptr [r13+0E4h] loc_4A1A5: test byte ptr [rbp+var_34], 2 jz short loc_4A1D8 mov eax, ebx cmp eax, 0FFFFFFFFh jz short loc_4A1D8 add r14, rbx cmp r14, 2 jbe short loc_4A1D8 add r15, rbx mov edx, 14h sub rdx, r14 xor ebx, ebx mov rdi, r15 xor esi, esi call _memset jmp short loc_4A20E loc_4A1D4: xor ebx, ebx jmp short loc_4A20E loc_4A1D8: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_4A1FE call _my_thread_var cmp dword ptr [rax], 0FFFFFFFFh jz short loc_4A1FE call _my_thread_var mov ebx, 1 cmp dword ptr [rax], 0AFh jnz short loc_4A20E loc_4A1FE: call _my_thread_var mov dword ptr [rax], 7Fh mov ebx, 1 loc_4A20E: mov eax, ebx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4A21F: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_19; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_48], rcx mov rdi, rcx mov rsi, r14 mov ecx, 35h ; '5' call qword ptr [rax+210h] mov r8d, 4 mov edi, ebx mov rsi, r15 mov rdx, r14 mov rcx, r12 call my_pread mov r15, rax xor esi, esi test rax, rax cmovz rsi, r14 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_48] call qword ptr [rax+218h] jmp loc_4A06E loc_4A283: mov r15, rax mov rax, [r13+0] lea rdx, aWorkspaceLlm4b_19; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov r13, [rbp+var_40] mov rsi, r13 mov ecx, 5Dh ; ']' call qword ptr [rax+210h] mov edi, ebx mov rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 xor r8d, r8d call my_pread mov rbx, rax cmp rax, 0FFFFFFFFFFFFFFFFh mov esi, 0 cmovnz rsi, rax lea rax, PSI_server mov rax, [rax] mov rdi, r15 mov r15, [rbp+var_30] call qword ptr [rax+218h] jmp loc_4A156
long long mi_read_cache(long long *a1, const char *a2, unsigned long long a3, unsigned long long a4, int a5) { unsigned long long v5; // r12 const char *v6; // r15 unsigned long long v8; // rax unsigned long long v9; // r14 unsigned int v10; // ebx long long v11; // rax long long v12; // r15 unsigned int v13; // ebx unsigned long long v14; // rdx long long v15; // rsi long long v16; // rsi unsigned long long v17; // r14 const char *v18; // rdi unsigned long long v19; // r15 unsigned int v20; // ebx long long v21; // rax long long v22; // rdi const char *v23; // rsi unsigned long long v24; // r13 long long v25; // rbx long long v26; // rsi long long v27; // rax unsigned long long v28; // r14 const char *v29; // r15 unsigned long long v31; // rsi long long v32; // r15 long long v33; // rax _BYTE v34[72]; // [rsp+0h] [rbp-90h] BYREF long long v35; // [rsp+48h] [rbp-48h] unsigned long long v36; // [rsp+50h] [rbp-40h] int v37; // [rsp+5Ch] [rbp-34h] const char *v38; // [rsp+60h] [rbp-30h] v37 = a5; v5 = a3; v6 = a2; v8 = *a1; v9 = *a1 - a3; if ( *a1 > a3 ) { v36 = a4; if ( v9 >= a4 ) v9 = a4; *((_DWORD *)a1 + 56) = 1; v10 = *((_DWORD *)a1 + 53); v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v10, 6LL); v38 = a2; if ( v11 ) { v35 = v11; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v11, v9, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c", 53LL); v12 = my_pread(v10, a2, v9, v5, 4LL); v31 = 0LL; if ( !v12 ) v31 = v9; ((void ( *)(long long, unsigned long long))PSI_server[67])(v35, v31); } else { v12 = my_pread(v10, a2, v9, v5, 4LL); } v13 = 1; if ( v12 ) return v13; a4 = v36 - v9; if ( v36 == v9 ) return 0; v5 += v9; v6 = &v38[v9]; v8 = *a1; } v14 = v5 - v8; if ( v5 < v8 || (v15 = a1[5], v13 = 0, v14 >= a1[3] - v15) ) { v17 = 0LL; } else { v16 = (unsigned int)v14 + v15; v17 = a1[3] - v16; if ( a4 < v17 ) v17 = a4; v38 = v6; v18 = v6; v19 = a4; memcpy(v18, v16, v17); a4 = v19 - v17; if ( v19 == v17 ) return v13; v5 += v17; v6 = &v38[v17]; } if ( (v37 & 1) != 0 ) { v26 = a1[3]; v27 = a1[5]; if ( v5 != *a1 + (unsigned int)(v26 - v27) ) { *a1 = v5; a1[3] = v27; *((_DWORD *)a1 + 56) = 1; v26 = v27; } a1[2] = v26; v22 = (long long)a1; v23 = v6; if ( !(unsigned int)my_b_read(a1, v6, a4) ) return 0; v25 = *((int *)a1 + 57); } else { v36 = a4; v38 = v6; *((_DWORD *)a1 + 56) = 1; v20 = *((_DWORD *)a1 + 53); v21 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v20, 6LL); if ( v21 ) { v32 = v21; v24 = v36; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v21, v36, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c", 93LL); v33 = my_pread(v20, v38, v24, v5, 0LL); v25 = v33; v23 = 0LL; if ( v33 != -1 ) v23 = (const char *)v33; v22 = v32; v6 = v38; ((void ( *)(long long, const char *))PSI_server[67])(v22, v23); } else { v22 = v20; v6 = v38; v23 = v38; v24 = v36; v25 = my_pread(v20, v38, v36, v5, 0LL); } if ( v25 == v24 ) return 0; } if ( (v37 & 2) == 0 || (_DWORD)v25 == -1 || (v28 = v25 + v17, v28 <= 2) ) { if ( !*(_DWORD *)my_thread_var(v22, v23) || *(_DWORD *)my_thread_var(v22, v23) == -1 || (v13 = 1, *(_DWORD *)my_thread_var(v22, v23) == 175) ) { *(_DWORD *)my_thread_var(v22, v23) = 127; return 1; } } else { v29 = &v6[v25]; v13 = 0; memset(v29, 0LL, 20 - v28); } return v13; }
_mi_read_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV dword ptr [RBP + -0x34],R8D MOV R12,RDX MOV R15,RSI MOV R13,RDI MOV RAX,qword ptr [RDI] MOV R14,RAX SUB R14,RDX JBE 0x0014a097 CMP R14,RCX MOV qword ptr [RBP + -0x40],RCX CMOVNC R14,RCX MOV dword ptr [R13 + 0xe0],0x1 MOV EBX,dword ptr [R13 + 0xd4] LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX MOV qword ptr [RBP + -0x30],R15 JNZ 0x0014a21f MOV R8D,0x4 MOV EDI,EBX MOV RSI,R15 MOV RDX,R14 MOV RCX,R12 CALL 0x0015ac08 MOV R15,RAX LAB_0014a06e: MOV EBX,0x1 TEST R15,R15 MOV RCX,qword ptr [RBP + -0x40] JNZ 0x0014a20e SUB RCX,R14 JZ 0x0014a1d4 ADD R12,R14 MOV R15,qword ptr [RBP + -0x30] ADD R15,R14 MOV RAX,qword ptr [R13] LAB_0014a097: MOV RDX,R12 SUB RDX,RAX JC 0x0014a0ed MOV R14,qword ptr [R13 + 0x18] MOV RSI,qword ptr [R13 + 0x28] MOV RAX,R14 SUB RAX,RSI XOR EBX,EBX CMP RDX,RAX JNC 0x0014a0ed MOV EAX,EDX ADD RSI,RAX SUB R14,RSI CMP RCX,R14 CMOVC R14,RCX MOV qword ptr [RBP + -0x30],R15 MOV RDI,R15 MOV RDX,R14 MOV R15,RCX CALL 0x001282a0 MOV RCX,R15 SUB RCX,R14 JZ 0x0014a20e ADD R12,R14 MOV R15,qword ptr [RBP + -0x30] ADD R15,R14 JMP 0x0014a0f0 LAB_0014a0ed: XOR R14D,R14D LAB_0014a0f0: TEST byte ptr [RBP + -0x34],0x1 JNZ 0x0014a15d MOV qword ptr [RBP + -0x40],RCX MOV qword ptr [RBP + -0x30],R15 MOV dword ptr [R13 + 0xe0],0x1 MOV EBX,dword ptr [R13 + 0xd4] LEA R13,[0x430350] MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x90] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0014a283 MOV EDI,EBX MOV R15,qword ptr [RBP + -0x30] MOV RSI,R15 MOV R13,qword ptr [RBP + -0x40] MOV RDX,R13 MOV RCX,R12 XOR R8D,R8D CALL 0x0015ac08 MOV RBX,RAX LAB_0014a156: CMP RBX,R13 JNZ 0x0014a1a5 JMP 0x0014a1d4 LAB_0014a15d: MOV RSI,qword ptr [R13 + 0x18] MOV RAX,qword ptr [R13 + 0x28] MOV EDX,ESI SUB EDX,EAX ADD RDX,qword ptr [R13] CMP R12,RDX JZ 0x0014a188 MOV qword ptr [R13],R12 MOV qword ptr [R13 + 0x18],RAX MOV dword ptr [R13 + 0xe0],0x1 MOV RSI,RAX LAB_0014a188: MOV qword ptr [R13 + 0x10],RSI MOV RDI,R13 MOV RSI,R15 MOV RDX,RCX CALL 0x00150b36 TEST EAX,EAX JZ 0x0014a1d4 MOVSXD RBX,dword ptr [R13 + 0xe4] LAB_0014a1a5: TEST byte ptr [RBP + -0x34],0x2 JZ 0x0014a1d8 MOV EAX,EBX CMP EAX,-0x1 JZ 0x0014a1d8 ADD R14,RBX CMP R14,0x2 JBE 0x0014a1d8 ADD R15,RBX MOV EDX,0x14 SUB RDX,R14 XOR EBX,EBX MOV RDI,R15 XOR ESI,ESI CALL 0x001281b0 JMP 0x0014a20e LAB_0014a1d4: XOR EBX,EBX JMP 0x0014a20e LAB_0014a1d8: CALL 0x0015c086 CMP dword ptr [RAX],0x0 JZ 0x0014a1fe CALL 0x0015c086 CMP dword ptr [RAX],-0x1 JZ 0x0014a1fe CALL 0x0015c086 MOV EBX,0x1 CMP dword ptr [RAX],0xaf JNZ 0x0014a20e LAB_0014a1fe: CALL 0x0015c086 MOV dword ptr [RAX],0x7f MOV EBX,0x1 LAB_0014a20e: MOV EAX,EBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014a21f: MOV RCX,RAX LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] LEA RDX,[0x1925b4] MOV qword ptr [RBP + -0x48],RCX MOV RDI,RCX MOV RSI,R14 MOV ECX,0x35 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,EBX MOV RSI,R15 MOV RDX,R14 MOV RCX,R12 CALL 0x0015ac08 MOV R15,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R14 LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x48] CALL qword ptr [RAX + 0x218] JMP 0x0014a06e LAB_0014a283: MOV R15,RAX MOV RAX,qword ptr [R13] LEA RDX,[0x1925b4] MOV RDI,R15 MOV R13,qword ptr [RBP + -0x40] MOV RSI,R13 MOV ECX,0x5d CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,qword ptr [RBP + -0x30] MOV RDX,R13 MOV RCX,R12 XOR R8D,R8D CALL 0x0015ac08 MOV RBX,RAX CMP RAX,-0x1 MOV ESI,0x0 CMOVNZ RSI,RAX LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] MOV RDI,R15 MOV R15,qword ptr [RBP + -0x30] CALL qword ptr [RAX + 0x218] JMP 0x0014a156
int8 _mi_read_cache(ulong *param_1,void *param_2,ulong param_3,ulong param_4,uint param_5) { int4 uVar1; int iVar2; long lVar3; int *piVar4; int4 *puVar5; void *__src; ulong uVar6; ulong uVar7; ulong uVar8; int1 local_98 [72]; long local_50; ulong local_48; uint local_3c; void *local_38; uVar8 = *param_1; uVar7 = uVar8 - param_3; local_3c = param_5; if (param_3 <= uVar8 && uVar7 != 0) { if (param_4 <= uVar7) { uVar7 = param_4; } *(int4 *)(param_1 + 0x1c) = 1; uVar1 = *(int4 *)((long)param_1 + 0xd4); local_48 = param_4; lVar3 = (**(code **)(PSI_server + 0x158))(local_98,uVar1,6); local_38 = param_2; if (lVar3 == 0) { lVar3 = my_pread(uVar1,param_2,uVar7,param_3,4); } else { local_50 = lVar3; (**(code **)(PSI_server + 0x210)) (lVar3,uVar7,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c", 0x35); lVar3 = my_pread(uVar1,param_2,uVar7,param_3,4); uVar8 = 0; if (lVar3 == 0) { uVar8 = uVar7; } (**(code **)(PSI_server + 0x218))(local_50,uVar8); } if (lVar3 != 0) { return 1; } param_4 = local_48 - uVar7; if (param_4 == 0) { return 0; } param_3 = param_3 + uVar7; param_2 = (void *)((long)local_38 + uVar7); uVar8 = *param_1; } if (param_3 < uVar8) { LAB_0014a0ed: uVar8 = 0; } else { if (param_1[3] - param_1[5] <= param_3 - uVar8) goto LAB_0014a0ed; __src = (void *)(param_1[5] + (param_3 - uVar8 & 0xffffffff)); uVar8 = param_1[3] - (long)__src; if (param_4 < uVar8) { uVar8 = param_4; } local_38 = param_2; memcpy(param_2,__src,uVar8); param_4 = param_4 - uVar8; if (param_4 == 0) { return 0; } param_3 = param_3 + uVar8; param_2 = (void *)((long)local_38 + uVar8); } if ((local_3c & 1) == 0) { *(int4 *)(param_1 + 0x1c) = 1; uVar1 = *(int4 *)((long)param_1 + 0xd4); local_48 = param_4; local_38 = param_2; lVar3 = (**(code **)(PSI_server + 0x158))(local_98,uVar1,6); param_2 = local_38; uVar6 = local_48; if (lVar3 == 0) { uVar7 = my_pread(uVar1,local_38,local_48,param_3,0); } else { (**(code **)(PSI_server + 0x210)) (lVar3,local_48,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c" ,0x5d); uVar7 = my_pread(uVar1,local_38,uVar6,param_3,0); param_2 = local_38; (**(code **)(PSI_server + 0x218))(lVar3); } if (uVar7 != uVar6) { LAB_0014a1a5: if ((((local_3c & 2) != 0) && ((int)uVar7 != -1)) && (2 < uVar8 + uVar7)) { memset((void *)((long)param_2 + uVar7),0,0x14 - (uVar8 + uVar7)); return 0; } piVar4 = (int *)_my_thread_var(); if (((*piVar4 != 0) && (piVar4 = (int *)_my_thread_var(), *piVar4 != -1)) && (piVar4 = (int *)_my_thread_var(), *piVar4 != 0xaf)) { return 1; } puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x7f; return 1; } } else { uVar7 = param_1[5]; uVar6 = param_1[3]; if (param_3 != (ulong)(uint)((int)param_1[3] - (int)uVar7) + *param_1) { *param_1 = param_3; param_1[3] = uVar7; *(int4 *)(param_1 + 0x1c) = 1; uVar6 = uVar7; } param_1[2] = uVar6; iVar2 = _my_b_read(param_1,param_2,param_4); if (iVar2 != 0) { uVar7 = (ulong)*(int *)((long)param_1 + 0xe4); goto LAB_0014a1a5; } } return 0; }
25,383
ankerl::nanobench::BigO::BigO(char const*, std::vector<std::pair<double, double>, std::allocator<std::pair<double, double>>> const&)
BadAccessGuards/build_O3/_deps/nanobench-src/src/include/nanobench.h
BigO::BigO(const char* bigOName, RangeMeasure const& rangeMeasure) : BigO(std::string(bigOName), rangeMeasure) {}
O3
c
ankerl::nanobench::BigO::BigO(char const*, std::vector<std::pair<double, double>, std::allocator<std::pair<double, double>>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdx, %rbx movq %rdi, %r14 leaq 0x10(%rsp), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi callq 0xd55e movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0xc9a4 movq (%r15), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0xcb29 movq 0x20(%rsp), %rsi incq %rsi callq 0x3300 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZN6ankerl9nanobench4BigOC2EPKcRKSt6vectorISt4pairIddESaIS6_EE: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdx mov r14, rdi lea r15, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r14 mov rsi, r15 mov rdx, rbx call _ZN6ankerl9nanobench4BigOC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISt4pairIddESaISA_EE; ankerl::nanobench::BigO::BigO(std::string,std::vector<std::pair<double,double>> const&) mov rdi, [r15]; void * lea rax, [rsp+48h+var_28] cmp rdi, rax jz short loc_CB29 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CB29: add rsp, 30h pop rbx pop r14 pop r15 retn
void ankerl::nanobench::BigO::BigO(long long a1, long long a2, __m128d **a3) { char v4; // [rsp+Fh] [rbp-39h] BYREF void *v5[2]; // [rsp+10h] [rbp-38h] BYREF long long v6; // [rsp+20h] [rbp-28h] BYREF std::string::basic_string<std::allocator<char>>(v5, a2, &v4); ankerl::nanobench::BigO::BigO(a1, (long long)v5, a3); if ( v5[0] != &v6 ) operator delete(v5[0], v6 + 1); }
BigO: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDX MOV R14,RDI LEA R15,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RDI,R15 CALL 0x0010d55e MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0010c9a4 MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0x20] CMP RDI,RAX JZ 0x0010cb29 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00103300 LAB_0010cb29: ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* ankerl::nanobench::BigO::BigO(char const*, std::vector<std::pair<double, double>, std::allocator<std::pair<double, double> > > const&) */ void __thiscall ankerl::nanobench::BigO::BigO(BigO *this,char *param_1,vector *param_2) { allocator local_39; long *local_38 [2]; long local_28 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_38,param_1,&local_39); BigO(this,(string *)local_38,param_2); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return; }
25,384
blst_sk_mul_n_check
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/exports.c
int blst_sk_mul_n_check(pow256 ret, const pow256 a, const pow256 b) { vec256 t[2]; const union { long one; char little; } is_endian = { 1 }; bool_t is_zero; if (((size_t)a|(size_t)b)%sizeof(limb_t) != 0 || !is_endian.little) { limbs_from_le_bytes(t[0], a, sizeof(pow256)); limbs_from_le_bytes(t[1], b, sizeof(pow256)); a = (const byte *)t[0]; b = (const byte *)t[1]; } mul_mont_sparse_256(t[0], BLS12_381_rRR, (const limb_t *)a, BLS12_381_r, r0); mul_mont_sparse_256(t[0], t[0], (const limb_t *)b, BLS12_381_r, r0); le_bytes_from_limbs(ret, t[0], sizeof(pow256)); is_zero = vec_is_zero(t[0], sizeof(vec256)); vec_zero(t, sizeof(t)); return (int)(is_zero^1); }
O0
c
blst_sk_mul_n_check: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq 0x32ac5(%rip), %rax # 0xe8740 movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx orq %rcx, %rax andq $0x7, %rax cmpq $0x0, %rax jne 0xb5c9a cmpb $0x0, -0x68(%rbp) jne 0xb5cd6 leaq -0x60(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x20, %edx callq 0xb58e0 leaq -0x60(%rbp), %rdi addq $0x20, %rdi movq -0x18(%rbp), %rsi movl $0x20, %edx callq 0xb58e0 leaq -0x60(%rbp), %rax movq %rax, -0x10(%rbp) leaq -0x60(%rbp), %rax addq $0x20, %rax movq %rax, -0x18(%rbp) leaq -0x60(%rbp), %rdi movq -0x10(%rbp), %rdx leaq 0x32a3b(%rip), %rsi # 0xe8720 leaq 0x32524(%rip), %rcx # 0xe8210 movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF callq 0xcc6c0 leaq -0x60(%rbp), %rdi leaq -0x60(%rbp), %rsi movq -0x18(%rbp), %rdx leaq 0x32502(%rip), %rcx # 0xe8210 movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF callq 0xcc6c0 movq -0x8(%rbp), %rdi leaq -0x60(%rbp), %rsi movl $0x20, %edx callq 0xb59f0 leaq -0x60(%rbp), %rdi movl $0x20, %esi callq 0xa8cd0 movq %rax, -0x70(%rbp) leaq -0x60(%rbp), %rdi movl $0x40, %esi callq 0xa87c0 movq -0x70(%rbp), %rax xorq $0x1, %rax addq $0x70, %rsp popq %rbp retq nopl (%rax)
blst_sk_mul_n_check: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, cs:qword_E8740 mov [rbp+var_68], rax mov rax, [rbp+var_10] mov rcx, [rbp+var_18] or rax, rcx and rax, 7 cmp rax, 0 jnz short loc_B5C9A cmp byte ptr [rbp+var_68], 0 jnz short loc_B5CD6 loc_B5C9A: lea rdi, [rbp+var_60] mov rsi, [rbp+var_10] mov edx, 20h ; ' ' call limbs_from_le_bytes lea rdi, [rbp+var_60] add rdi, 20h ; ' ' mov rsi, [rbp+var_18] mov edx, 20h ; ' ' call limbs_from_le_bytes lea rax, [rbp+var_60] mov [rbp+var_10], rax lea rax, [rbp+var_60] add rax, 20h ; ' ' mov [rbp+var_18], rax loc_B5CD6: lea rdi, [rbp+var_60] mov rdx, [rbp+var_10] lea rsi, BLS12_381_rRR lea rcx, BLS12_381_r mov r8, 0FFFFFFFEFFFFFFFFh call mul_mont_sparse_256 lea rdi, [rbp+var_60] lea rsi, [rbp+var_60] mov rdx, [rbp+var_18] lea rcx, BLS12_381_r mov r8, 0FFFFFFFEFFFFFFFFh call mul_mont_sparse_256 mov rdi, [rbp+var_8] lea rsi, [rbp+var_60] mov edx, 20h ; ' ' call le_bytes_from_limbs lea rdi, [rbp+var_60] mov esi, 20h ; ' ' call vec_is_zero mov [rbp+var_70], rax lea rdi, [rbp+var_60] mov esi, 40h ; '@' call vec_zero mov rax, [rbp+var_70] xor rax, 1 add rsp, 70h pop rbp retn
long long blst_sk_mul_n_check(_BYTE *a1, long long a2, long long a3) { unsigned long long is_zero; // [rsp+0h] [rbp-70h] _BYTE v5[32]; // [rsp+10h] [rbp-60h] BYREF _BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF _BYTE *v7; // [rsp+58h] [rbp-18h] _BYTE *v8; // [rsp+60h] [rbp-10h] _BYTE *v9; // [rsp+68h] [rbp-8h] v9 = a1; v8 = (_BYTE *)a2; v7 = (_BYTE *)a3; if ( (((unsigned __int8)a3 | (unsigned __int8)a2) & 7) != 0 ) { limbs_from_le_bytes((long long)v5, (long long)v8, 0x20uLL); limbs_from_le_bytes((long long)v6, (long long)v7, 0x20uLL); v8 = v5; v7 = v6; } mul_mont_sparse_256(v5, &BLS12_381_rRR, v8, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); mul_mont_sparse_256(v5, v5, v7, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); le_bytes_from_limbs(v9, v5, 0x20uLL); is_zero = vec_is_zero((long long)v5, 0x20uLL); vec_zero((long long)v5, 0x40uLL); return is_zero ^ 1; }
blst_sk_mul_n_check: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [0x001e8740] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] OR RAX,RCX AND RAX,0x7 CMP RAX,0x0 JNZ 0x001b5c9a CMP byte ptr [RBP + -0x68],0x0 JNZ 0x001b5cd6 LAB_001b5c9a: LEA RDI,[RBP + -0x60] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x20 CALL 0x001b58e0 LEA RDI,[RBP + -0x60] ADD RDI,0x20 MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x20 CALL 0x001b58e0 LEA RAX,[RBP + -0x60] MOV qword ptr [RBP + -0x10],RAX LEA RAX,[RBP + -0x60] ADD RAX,0x20 MOV qword ptr [RBP + -0x18],RAX LAB_001b5cd6: LEA RDI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x1e8720] LEA RCX,[0x1e8210] MOV R8,-0x100000001 CALL 0x001cc6c0 LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0x18] LEA RCX,[0x1e8210] MOV R8,-0x100000001 CALL 0x001cc6c0 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x60] MOV EDX,0x20 CALL 0x001b59f0 LEA RDI,[RBP + -0x60] MOV ESI,0x20 CALL 0x001a8cd0 MOV qword ptr [RBP + -0x70],RAX LEA RDI,[RBP + -0x60] MOV ESI,0x40 CALL 0x001a87c0 MOV RAX,qword ptr [RBP + -0x70] XOR RAX,0x1 ADD RSP,0x70 POP RBP RET
ulong blst_sk_mul_n_check(int8 param_1,int1 *param_2,int1 *param_3) { ulong uVar1; char local_70; int1 local_68 [32]; int1 auStack_48 [40]; int1 *local_20; int1 *local_18; int8 local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; if (((((ulong)param_2 | (ulong)param_3) & 7) != 0) || (local_70 = (char)DAT_001e8740, local_70 == '\0')) { limbs_from_le_bytes(local_68,param_2,0x20); limbs_from_le_bytes(auStack_48,local_20,0x20); local_18 = local_68; local_20 = auStack_48; } mul_mont_sparse_256(local_68,BLS12_381_rRR,local_18,BLS12_381_r,0xfffffffeffffffff); mul_mont_sparse_256(local_68,local_68,local_20,BLS12_381_r,0xfffffffeffffffff); le_bytes_from_limbs(local_10,local_68,0x20); uVar1 = vec_is_zero(local_68,0x20); vec_zero(local_68,0x40); return uVar1 ^ 1; }
25,385
ma_open_keyfile
eloqsql/storage/maria/ma_open.c
int _ma_open_keyfile(MARIA_SHARE *share) { /* Modifications to share->kfile should be under intern_lock to protect against a concurrent checkpoint. */ mysql_mutex_lock(&share->intern_lock); share->kfile.file= mysql_file_open(key_file_kfile, share->unique_file_name.str, share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_WME | MY_NOSYMLINKS)); mysql_mutex_unlock(&share->intern_lock); return (share->kfile.file < 0); }
O0
c
ma_open_keyfile: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0xe9b6c(%rip), %rsi # 0x1528fa movl $0x811, %edx # imm = 0x811 callq 0x626e0 leaq 0x40ef79(%rip), %rax # 0x477d18 movl (%rax), %edi movq -0x8(%rbp), %rax movq 0x5b0(%rax), %rcx movq -0x8(%rbp), %rax movl 0x7a4(%rax), %r8d orl $0x0, %r8d orl $0x20000, %r8d # imm = 0x20000 orl $0x80000, %r8d # imm = 0x80000 leaq 0xe9b2a(%rip), %rsi # 0x1528fa movl $0x815, %edx # imm = 0x815 movl $0x210, %r9d # imm = 0x210 callq 0x62750 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x760(%rax) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x65390 movq -0x8(%rbp), %rax cmpl $0x0, 0x760(%rax) setl %al andb $0x1, %al movzbl %al, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_open_keyfile: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 811h call inline_mysql_mutex_lock_11 lea rax, key_file_kfile mov edi, [rax] mov rax, [rbp+var_8] mov rcx, [rax+5B0h] mov rax, [rbp+var_8] mov r8d, [rax+7A4h] or r8d, 0 or r8d, 20000h or r8d, 80000h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 815h mov r9d, 210h call inline_mysql_file_open_1 mov ecx, eax mov rax, [rbp+var_8] mov [rax+760h], ecx mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_11 mov rax, [rbp+var_8] cmp dword ptr [rax+760h], 0 setl al and al, 1 movzx eax, al add rsp, 10h pop rbp retn
_BOOL8 ma_open_keyfile(long long a1) { inline_mysql_mutex_lock_11( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x811u); *(_DWORD *)(a1 + 1888) = inline_mysql_file_open_1( key_file_kfile, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x815u, *(_QWORD *)(a1 + 1456), *(_DWORD *)(a1 + 1956) | 0xA0000u, 528LL); inline_mysql_mutex_unlock_11(a1 + 2288); return *(int *)(a1 + 1888) < 0; }
_ma_open_keyfile: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 LEA RSI,[0x2528fa] MOV EDX,0x811 CALL 0x001626e0 LEA RAX,[0x577d18] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x5b0] MOV RAX,qword ptr [RBP + -0x8] MOV R8D,dword ptr [RAX + 0x7a4] OR R8D,0x0 OR R8D,0x20000 OR R8D,0x80000 LEA RSI,[0x2528fa] MOV EDX,0x815 MOV R9D,0x210 CALL 0x00162750 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x760],ECX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00165390 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x760],0x0 SETL AL AND AL,0x1 MOVZX EAX,AL ADD RSP,0x10 POP RBP RET
bool _ma_open_keyfile(long param_1) { int4 uVar1; inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x811); uVar1 = inline_mysql_file_open (key_file_kfile, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x815, *(int8 *)(param_1 + 0x5b0),*(uint *)(param_1 + 0x7a4) | 0xa0000,0x210); *(int4 *)(param_1 + 0x760) = uVar1; inline_mysql_mutex_unlock(param_1 + 0x8f0); return *(int *)(param_1 + 0x760) < 0; }
25,386
ma_open_keyfile
eloqsql/storage/maria/ma_open.c
int _ma_open_keyfile(MARIA_SHARE *share) { /* Modifications to share->kfile should be under intern_lock to protect against a concurrent checkpoint. */ mysql_mutex_lock(&share->intern_lock); share->kfile.file= mysql_file_open(key_file_kfile, share->unique_file_name.str, share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_WME | MY_NOSYMLINKS)); mysql_mutex_unlock(&share->intern_lock); return (share->kfile.file < 0); }
O3
c
ma_open_keyfile: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx leaq 0x8f0(%rdi), %r14 cmpq $0x0, 0x930(%rdi) jne 0x55cf2 movq %r14, %rdi callq 0x29220 leaq 0x3a74b2(%rip), %rax # 0x3fd118 movl (%rax), %esi movq 0x5b0(%rbx), %r12 movl $0xa0000, %r15d # imm = 0xA0000 orl 0x7a4(%rbx), %r15d leaq 0x33038d(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x78(%rbp), %rdi leaq -0x30(%rbp), %r13 movl $0x2, %edx movq %r12, %rcx movq %r13, %r8 callq *0x148(%rax) movq %rax, (%r13) testq %rax, %rax jne 0x55d0b movl $0x210, %edx # imm = 0x210 movq %r12, %rdi movl %r15d, %esi callq 0xa03e0 movl %eax, %r15d movl %r15d, 0x760(%rbx) movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x55d54 movq %r14, %rdi callq 0x291e0 movl 0x760(%rbx), %eax shrl $0x1f, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x84d89(%rip), %rsi # 0xdaa82 movq %r14, %rdi movl $0x811, %edx # imm = 0x811 callq 0x2eb8f jmp 0x55c5f leaq 0x3302fe(%rip), %r13 # 0x386010 movq (%r13), %rcx leaq 0x84d65(%rip), %rsi # 0xdaa82 movq %rax, %rdi movl $0x815, %edx # imm = 0x815 callq *0x1f0(%rcx) movl $0x210, %edx # imm = 0x210 movq %r12, %rdi movl %r15d, %esi callq 0xa03e0 movl %eax, %r15d movq (%r13), %rax movq -0x30(%rbp), %rdi movl %r15d, %esi callq *0x200(%rax) jmp 0x55cbb leaq 0x3302b5(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x55cd2
_ma_open_keyfile: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi lea r14, [rdi+8F0h] cmp qword ptr [rdi+930h], 0 jnz loc_55CF2 mov rdi, r14 call _pthread_mutex_lock loc_55C5F: lea rax, key_file_kfile mov esi, [rax] mov r12, [rbx+5B0h] mov r15d, offset loc_A0000 or r15d, [rbx+7A4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] lea r13, [rbp+var_30] mov edx, 2 mov rcx, r12 mov r8, r13 call qword ptr [rax+148h] mov [r13+0], rax test rax, rax jnz short loc_55D0B mov edx, 210h mov rdi, r12 mov esi, r15d call my_open mov r15d, eax loc_55CBB: mov [rbx+760h], r15d mov rdi, [rbx+930h] test rdi, rdi jnz loc_55D54 loc_55CD2: mov rdi, r14 call _pthread_mutex_unlock mov eax, [rbx+760h] shr eax, 1Fh add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_55CF2: lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov edx, 811h call psi_mutex_lock jmp loc_55C5F loc_55D0B: lea r13, PSI_server mov rcx, [r13+0] lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov edx, 815h call qword ptr [rcx+1F0h] mov edx, 210h mov rdi, r12 mov esi, r15d call my_open mov r15d, eax mov rax, [r13+0] mov rdi, [rbp+var_30] mov esi, r15d call qword ptr [rax+200h] jmp loc_55CBB loc_55D54: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_55CD2
long long ma_open_keyfile(long long a1) { long long v1; // r12 unsigned int v2; // r15d long long v3; // rax long long v4; // r15 _BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF long long v7[6]; // [rsp+50h] [rbp-30h] BYREF if ( *(_QWORD *)(a1 + 2352) ) psi_mutex_lock(a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x811u); else pthread_mutex_lock(a1 + 2288); v1 = *(_QWORD *)(a1 + 1456); v2 = *(_DWORD *)(a1 + 1956) | (unsigned int)&loc_A0000; v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])( v6, key_file_kfile, 2LL, v1, v7); v7[0] = v3; if ( v3 ) { ((void ( *)(long long, const char *, long long))PSI_server[62])( v3, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 2069LL); v4 = (unsigned int)my_open(v1, v2, 528LL); ((void ( *)(long long, long long))PSI_server[64])(v7[0], v4); } else { LODWORD(v4) = my_open(v1, v2, 528LL); } *(_DWORD *)(a1 + 1888) = v4; if ( *(_QWORD *)(a1 + 2352) ) PSI_server[44](); pthread_mutex_unlock(a1 + 2288); return *(_DWORD *)(a1 + 1888) >> 31; }
_ma_open_keyfile: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI LEA R14,[RDI + 0x8f0] CMP qword ptr [RDI + 0x930],0x0 JNZ 0x00155cf2 MOV RDI,R14 CALL 0x00129220 LAB_00155c5f: LEA RAX,[0x4fd118] MOV ESI,dword ptr [RAX] MOV R12,qword ptr [RBX + 0x5b0] MOV R15D,0xa0000 OR R15D,dword ptr [RBX + 0x7a4] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] LEA R13,[RBP + -0x30] MOV EDX,0x2 MOV RCX,R12 MOV R8,R13 CALL qword ptr [RAX + 0x148] MOV qword ptr [R13],RAX TEST RAX,RAX JNZ 0x00155d0b MOV EDX,0x210 MOV RDI,R12 MOV ESI,R15D CALL 0x001a03e0 MOV R15D,EAX LAB_00155cbb: MOV dword ptr [RBX + 0x760],R15D MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x00155d54 LAB_00155cd2: MOV RDI,R14 CALL 0x001291e0 MOV EAX,dword ptr [RBX + 0x760] SHR EAX,0x1f ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00155cf2: LEA RSI,[0x1daa82] MOV RDI,R14 MOV EDX,0x811 CALL 0x0012eb8f JMP 0x00155c5f LAB_00155d0b: LEA R13,[0x486010] MOV RCX,qword ptr [R13] LEA RSI,[0x1daa82] MOV RDI,RAX MOV EDX,0x815 CALL qword ptr [RCX + 0x1f0] MOV EDX,0x210 MOV RDI,R12 MOV ESI,R15D CALL 0x001a03e0 MOV R15D,EAX MOV RAX,qword ptr [R13] MOV RDI,qword ptr [RBP + -0x30] MOV ESI,R15D CALL qword ptr [RAX + 0x200] JMP 0x00155cbb LAB_00155d54: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00155cd2
uint _ma_open_keyfile(long param_1) { pthread_mutex_t *__mutex; int8 uVar1; int4 uVar2; uint uVar3; int1 local_80 [72]; long local_38; __mutex = (pthread_mutex_t *)(param_1 + 0x8f0); if (*(long *)(param_1 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x811) ; } uVar1 = *(int8 *)(param_1 + 0x5b0); uVar3 = *(uint *)(param_1 + 0x7a4) | 0xa0000; local_38 = (**(code **)(PSI_server + 0x148))(local_80,key_file_kfile,2,uVar1,&local_38); if (local_38 == 0) { uVar2 = my_open(uVar1,uVar3,0x210); } else { (**(code **)(PSI_server + 0x1f0)) (local_38,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x815); uVar2 = my_open(uVar1,uVar3,0x210); (**(code **)(PSI_server + 0x200))(local_38,uVar2); } *(int4 *)(param_1 + 0x760) = uVar2; if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return *(uint *)(param_1 + 0x760) >> 0x1f; }
25,387
write_tail
eloqsql/storage/maria/ma_blockrec.c
static my_bool write_tail(MARIA_HA *info, MARIA_BITMAP_BLOCK *block, uchar *row_part, uint org_length) { MARIA_SHARE *share= info->s; MARIA_PINNED_PAGE page_link; uint block_size= share->block_size, empty_space, length= org_length; struct st_row_pos_info row_pos; my_off_t position; my_bool res, block_is_read; DBUG_ENTER("write_tail"); DBUG_PRINT("enter", ("page: %lu length: %u", (ulong) block->page, length)); info->keyread_buff_used= 1; /* Don't allocate smaller block than MIN_TAIL_SIZE (we want to give rows some place to grow in the future) */ if (length < MIN_TAIL_SIZE) length= MIN_TAIL_SIZE; if (block->page_count == TAIL_PAGE_COUNT_MARKER) { /* Create new tail page will be pinned & locked by get_head_or_tail_page */ if (get_head_or_tail_page(info, block, info->keyread_buff, length, TAIL_PAGE, PAGECACHE_LOCK_WRITE, &row_pos)) DBUG_RETURN(1); } else { /* Write tail on predefined row position */ if (get_rowpos_in_head_or_tail_page(info, block, info->keyread_buff, length, TAIL_PAGE, PAGECACHE_LOCK_WRITE, block->page_count & ~TAIL_BIT, &row_pos)) DBUG_RETURN(1); } DBUG_PRINT("info", ("tailid: %lu (%lu:%u)", (ulong) ma_recordpos(block->page, row_pos.rownr), (ulong) block->page, row_pos.rownr)); block_is_read= block->org_bitmap_value != 0; memcpy(row_pos.data, row_part, org_length); if (share->now_transactional) { /* Log changes in tail block */ uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + DIRPOS_STORE_SIZE]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; LSN lsn; /* Log REDO changes of tail page Note that we have to log length, not org_length, to be sure that REDO, which doesn't use write_tail, also creates a block of at least MIN_TAIL_SIZE */ page_store(log_data + FILEID_STORE_SIZE, block->page); dirpos_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, row_pos.rownr); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); log_array[TRANSLOG_INTERNAL_PARTS + 1].str= row_pos.data; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length; if (translog_write_record(&lsn, (block_is_read ? LOGREC_REDO_INSERT_ROW_TAIL : LOGREC_REDO_NEW_ROW_TAIL), info->trn, info, (translog_size_t) (sizeof(log_data) + length), TRANSLOG_INTERNAL_PARTS + 2, log_array, log_data, NULL)) DBUG_RETURN(1); } int2store(row_pos.dir + 2, length); empty_space= row_pos.empty_space - length; int2store(row_pos.buff + EMPTY_SPACE_OFFSET, empty_space); block->page_count= row_pos.rownr + TAIL_BIT; /* If there is less directory entries free than number of possible tails we can write for a row, we mark the page full to ensure that we don't during _ma_bitmap_find_place() allocate more entries on the tail page than it can hold */ block->empty_space= (enough_free_entries(row_pos.buff, share->block_size, 1 + share->base.blobs) ? empty_space : 0); /* Keep BLOCKUSED_USE_ORG_BITMAP */ block->used|= BLOCKUSED_USED | BLOCKUSED_TAIL; if (block_is_read) { /* Current page link is last element in pinned_pages */ MARIA_PINNED_PAGE *page_link; page_link= dynamic_element(&info->pinned_pages, info->pinned_pages.elements-1, MARIA_PINNED_PAGE*); pagecache_unlock_by_link(share->pagecache, page_link->link, PAGECACHE_LOCK_WRITE_TO_READ, PAGECACHE_PIN_LEFT_PINNED, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 1, FALSE); DBUG_ASSERT(page_link->changed); page_link->unlock= PAGECACHE_LOCK_READ_UNLOCK; res= 0; } else { if (!(res= pagecache_write(share->pagecache, &info->dfile, block->page, 0, row_pos.buff,share->page_type, PAGECACHE_LOCK_READ, PAGECACHE_PIN, PAGECACHE_WRITE_DELAY, &page_link.link, LSN_IMPOSSIBLE))) { DBUG_ASSERT(page_link.link); page_link.unlock= PAGECACHE_LOCK_READ_UNLOCK; page_link.changed= 1; push_dynamic(&info->pinned_pages, (void*) &page_link); } /* Increase data file size, if extended */ position= (my_off_t) block->page * block_size; if (share->state.state.data_file_length <= position) { /* We are modifying a state member before writing the UNDO; this is a WAL violation. But for data_file_length this is ok, as long as we change data_file_length after writing any log record (FILE_ID/REDO/UNDO) (see collect_tables()). */ _ma_set_share_data_file_length(share, position + block_size); } } DBUG_RETURN(res); }
O3
c
write_tail: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %ecx, %ebx movq %rdx, -0x60(%rbp) movq %rsi, %r14 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq %rax, -0x50(%rbp) movl 0x7bc(%rax), %eax movq %rax, -0x58(%rbp) cmpl $0x21, %ecx movl $0x20, %r12d cmovael %ecx, %r12d movb $0x1, 0x685(%rdi) movl 0x8(%rsi), %r9d movq 0x380(%rdi), %rdx cmpl $0xffff, %r9d # imm = 0xFFFF jne 0x631f2 leaq -0x88(%rbp), %r9 movq %r15, %rdi movq %r14, %rsi movl %r12d, %ecx movl $0x2, %r8d callq 0x62d78 jmp 0x6321d andl $0xffff7fff, %r9d # imm = 0xFFFF7FFF subq $0x8, %rsp leaq -0x88(%rbp), %rax movq %r15, %rdi movq %r14, %rsi movl %r12d, %ecx movl $0x2, %r8d pushq %rax callq 0x60fd1 addq $0x10, %rsp movb $0x1, %r13b testb %al, %al je 0x6324c movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x63472 movl %r13d, %eax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, -0x48(%rbp) movb 0x15(%r14), %r14b movq -0x80(%rbp), %r13 movl %ebx, %edx movq %r13, %rdi movq -0x60(%rbp), %rsi callq 0x29080 movq -0x50(%rbp), %rax cmpb $0x0, 0x7e7(%rax) movb %r14b, -0x39(%rbp) je 0x632fb xorl %ecx, %ecx testb %r14b, %r14b sete %cl movq -0x48(%rbp), %r14 movq (%r14), %rdx leaq -0x38(%rbp), %rax movl %edx, 0x2(%rax) shrq $0x20, %rdx movb %dl, 0x6(%rax) movl -0x6c(%rbp), %ebx movb %bl, 0x7(%rax) leaq -0xd0(%rbp), %r10 movq %rax, 0x20(%r10) movq $0x8, 0x28(%r10) movq %r13, 0x30(%r10) movl %r12d, %edx movq %rdx, 0x38(%r10) leal 0x2(,%rcx,2), %esi movq 0x8(%r15), %rdx leal 0x8(%r12), %r8d subq $0x8, %rsp leaq -0x90(%rbp), %rdi movq %r15, %rcx movl $0x4, %r9d pushq $0x0 pushq %rax pushq %r10 callq 0x2a8ac addq $0x20, %rsp movb $0x1, %r13b testb %al, %al jne 0x63224 jmp 0x63302 movl -0x6c(%rbp), %ebx movq -0x48(%rbp), %r14 movq -0x78(%rbp), %rax movw %r12w, 0x2(%rax) movl -0x68(%rbp), %eax subl %r12d, %eax movq -0x88(%rbp), %r8 movw %ax, 0xa(%r8) addl $0x8000, %ebx # imm = 0x8000 movl %ebx, 0x8(%r14) movq -0x50(%rbp), %r12 movl 0x3f0(%r12), %ecx movzbl 0x8(%r8), %edx addl %edx, %ecx incl %ecx cmpl $0x100, %ecx # imm = 0x100 jae 0x6334a movb -0x39(%rbp), %r9b jmp 0x63385 movb 0x9(%r8), %dl cmpb $-0x1, %dl movb -0x39(%rbp), %r9b je 0x63383 movl 0x7bc(%r12), %esi addl $0xffffff01, %ecx # imm = 0xFFFFFF01 addq %r8, %rsi addq $-0x5, %rsi decl %ecx je 0x63385 movzbl %dl, %edx shll $0x2, %edx movq %rsi, %rdi subq %rdx, %rdi movb (%rdi), %dl cmpb $-0x1, %dl jne 0x6336c xorl %eax, %eax orb $0x5, 0x14(%r14) movl %eax, 0xc(%r14) testb %r9b, %r9b je 0x633de movq 0x2e8(%r15), %rbx movl 0x2f0(%r15), %eax decl %eax leaq (%rax,%rax,2), %r14 movq 0x600(%r12), %rdi movq (%rbx,%r14,8), %rsi xorl %r13d, %r13d movl $0x7, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq $0x0 pushq $0x1 callq 0x32239 addq $0x10, %rsp movl $0x5, 0x8(%rbx,%r14,8) jmp 0x63224 movq 0x600(%r12), %rdi leaq 0x470(%r15), %rsi movq (%r14), %rdx movl 0x7d4(%r12), %r9d movl 0x80(%rdi), %eax subq $0x8, %rsp xorl %r10d, %r10d leaq -0xd0(%rbp), %r11 xorl %ecx, %ecx pushq %rax pushq %r10 pushq $0x0 pushq %r11 pushq %r10 pushq $0x2 pushq $0x3 callq 0x33982 addq $0x40, %rsp movl %eax, %r13d testb %al, %al jne 0x6344c leaq -0xd0(%rbp), %rsi movl $0x5, 0x8(%rsi) movb $0x1, 0x10(%rsi) addq $0x2e8, %r15 # imm = 0x2E8 movq %r15, %rdi callq 0x91aaa movq (%r14), %rsi movq -0x58(%rbp), %rax imulq %rax, %rsi cmpq %rsi, 0x40(%r12) ja 0x63224 addq %rax, %rsi movq %r12, %rdi callq 0x38c08 jmp 0x63224 callq 0x29270
write_tail: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov ebx, ecx mov [rbp+var_60], rdx mov r14, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov [rbp+var_50], rax mov eax, [rax+7BCh] mov [rbp+var_58], rax cmp ecx, 21h ; '!' mov r12d, 20h ; ' ' cmovnb r12d, ecx mov byte ptr [rdi+685h], 1 mov r9d, [rsi+8] mov rdx, [rdi+380h] cmp r9d, 0FFFFh jnz short loc_631F2 lea r9, [rbp+var_88] mov rdi, r15 mov rsi, r14 mov ecx, r12d mov r8d, 2 call get_head_or_tail_page jmp short loc_6321D loc_631F2: and r9d, 0FFFF7FFFh sub rsp, 8 lea rax, [rbp+var_88] mov rdi, r15 mov rsi, r14 mov ecx, r12d mov r8d, 2 push rax call get_rowpos_in_head_or_tail_page add rsp, 10h loc_6321D: mov r13b, 1 test al, al jz short loc_6324C loc_63224: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_63472 mov eax, r13d add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6324C: mov [rbp+var_48], r14 mov r14b, [r14+15h] mov r13, [rbp+var_80] mov edx, ebx mov rdi, r13 mov rsi, [rbp+var_60] call _memcpy mov rax, [rbp+var_50] cmp byte ptr [rax+7E7h], 0 mov [rbp+var_39], r14b jz loc_632FB xor ecx, ecx test r14b, r14b setz cl mov r14, [rbp+var_48] mov rdx, [r14] lea rax, [rbp+var_38] mov [rax+2], edx shr rdx, 20h mov [rax+6], dl mov ebx, [rbp+var_6C] mov [rax+7], bl lea r10, [rbp+var_D0] mov [r10+20h], rax mov qword ptr [r10+28h], 8 mov [r10+30h], r13 mov edx, r12d mov [r10+38h], rdx lea esi, ds:2[rcx*2] mov rdx, [r15+8] lea r8d, [r12+8] sub rsp, 8 lea rdi, [rbp+var_90] mov rcx, r15 mov r9d, 4 push 0 push rax push r10 call translog_write_record add rsp, 20h mov r13b, 1 test al, al jnz loc_63224 jmp short loc_63302 loc_632FB: mov ebx, [rbp+var_6C] mov r14, [rbp+var_48] loc_63302: mov rax, [rbp+var_78] mov [rax+2], r12w mov eax, [rbp+var_68] sub eax, r12d mov r8, [rbp+var_88] mov [r8+0Ah], ax add ebx, 8000h mov [r14+8], ebx mov r12, [rbp+var_50] mov ecx, [r12+3F0h] movzx edx, byte ptr [r8+8] add ecx, edx inc ecx cmp ecx, 100h jnb short loc_6334A mov r9b, [rbp+var_39] jmp short loc_63385 loc_6334A: mov dl, [r8+9] cmp dl, 0FFh mov r9b, [rbp+var_39] jz short loc_63383 mov esi, [r12+7BCh] add ecx, 0FFFFFF01h add rsi, r8 add rsi, 0FFFFFFFFFFFFFFFBh loc_6336C: dec ecx jz short loc_63385 movzx edx, dl shl edx, 2 mov rdi, rsi sub rdi, rdx mov dl, [rdi] cmp dl, 0FFh jnz short loc_6336C loc_63383: xor eax, eax loc_63385: or byte ptr [r14+14h], 5 mov [r14+0Ch], eax test r9b, r9b jz short loc_633DE mov rbx, [r15+2E8h] mov eax, [r15+2F0h] dec eax lea r14, [rax+rax*2] mov rdi, [r12+600h] mov rsi, [rbx+r14*8] xor r13d, r13d mov edx, 7 xor ecx, ecx xor r8d, r8d xor r9d, r9d push 0 push 1 call pagecache_unlock_by_link add rsp, 10h mov dword ptr [rbx+r14*8+8], 5 jmp loc_63224 loc_633DE: mov rdi, [r12+600h] lea rsi, [r15+470h] mov rdx, [r14] mov r9d, [r12+7D4h] mov eax, [rdi+80h] sub rsp, 8 xor r10d, r10d lea r11, [rbp+var_D0] xor ecx, ecx push rax push r10 push 0 push r11 push r10 push 2 push 3 call pagecache_write_part add rsp, 40h mov r13d, eax test al, al jnz short loc_6344C lea rsi, [rbp+var_D0] mov dword ptr [rsi+8], 5 mov byte ptr [rsi+10h], 1 add r15, 2E8h mov rdi, r15 call insert_dynamic loc_6344C: mov rsi, [r14] mov rax, [rbp+var_58] imul rsi, rax cmp [r12+40h], rsi ja loc_63224 add rsi, rax mov rdi, r12 call _ma_set_share_data_file_length jmp loc_63224 loc_63472: call ___stack_chk_fail
long long write_tail(long long a1, long long a2, long long a3, unsigned int a4) { long long v4; // r13 unsigned int v6; // r12d int v7; // r9d _BYTE *v8; // rdx char head_or_tail_page; // al char v11; // r14 bool v12; // zf BOOL v13; // ecx _QWORD *v14; // r14 long long v15; // rdx int v16; // ebx int v17; // eax char *v18; // r8 long long v19; // r12 char v20; // r9 unsigned __int8 v21; // dl int v22; // ecx long long v23; // rbx long long v24; // rax long long v25; // r14 unsigned long long v26; // rsi __int128 v27; // [rsp+0h] [rbp-D0h] BYREF char v28; // [rsp+10h] [rbp-C0h] __int16 *v29; // [rsp+20h] [rbp-B0h] long long v30; // [rsp+28h] [rbp-A8h] long long v31; // [rsp+30h] [rbp-A0h] long long v32; // [rsp+38h] [rbp-98h] char v33[8]; // [rsp+40h] [rbp-90h] BYREF long long v34; // [rsp+48h] [rbp-88h] BYREF long long v35; // [rsp+50h] [rbp-80h] long long v36; // [rsp+58h] [rbp-78h] int v37; // [rsp+64h] [rbp-6Ch] int v38; // [rsp+68h] [rbp-68h] long long v39; // [rsp+70h] [rbp-60h] long long v40; // [rsp+78h] [rbp-58h] long long v41; // [rsp+80h] [rbp-50h] _QWORD *v42; // [rsp+88h] [rbp-48h] char v43; // [rsp+97h] [rbp-39h] __int16 v44; // [rsp+98h] [rbp-38h] BYREF int v45; // [rsp+9Ah] [rbp-36h] char v46; // [rsp+9Eh] [rbp-32h] char v47; // [rsp+9Fh] [rbp-31h] unsigned long long v48; // [rsp+A0h] [rbp-30h] v39 = a3; v48 = __readfsqword(0x28u); v41 = *(_QWORD *)a1; v40 = *(unsigned int *)(v41 + 1980); v6 = 32; if ( a4 >= 0x21 ) v6 = a4; *(_BYTE *)(a1 + 1669) = 1; v7 = *(_DWORD *)(a2 + 8); v8 = *(_BYTE **)(a1 + 896); if ( v7 == 0xFFFF ) head_or_tail_page = get_head_or_tail_page((long long *)a1, a2, v8, v6, 2, (long long)&v34); else head_or_tail_page = get_rowpos_in_head_or_tail_page((long long *)a1, a2, v8, v6, 2, v7 & 0xFFFF7FFF, (long long)&v34); LOBYTE(v4) = 1; if ( !head_or_tail_page ) { v42 = (_QWORD *)a2; v11 = *(_BYTE *)(a2 + 21); v4 = v35; memcpy(v35, v39, a4); v12 = *(_BYTE *)(v41 + 2023) == 0; v43 = v11; if ( v12 ) { v16 = v37; v14 = v42; } else { v13 = v11 == 0; v14 = v42; v15 = *v42; v45 = *v42; v46 = BYTE4(v15); v16 = v37; v47 = v37; v29 = &v44; v30 = 8LL; v31 = v4; v32 = v6; LOBYTE(v4) = 1; if ( (unsigned __int8)translog_write_record( (unsigned long long)v33, (_WORD *)(unsigned int)(2 * v13 + 2), *(_QWORD *)(a1 + 8), (_QWORD *)a1, v6 + 8, 4, &v27, &v44, 0LL) ) return (unsigned int)v4; } *(_WORD *)(v36 + 2) = v6; v17 = v38 - v6; v18 = (char *)v34; *(_WORD *)(v34 + 10) = v38 - v6; *((_DWORD *)v14 + 2) = v16 + 0x8000; v19 = v41; if ( (unsigned int)(unsigned __int8)v18[8] + *(_DWORD *)(v41 + 1008) + 1 >= 0x100 ) { v21 = v18[9]; v20 = v43; if ( v21 == 0xFF ) { LABEL_18: v17 = 0; } else { v22 = (unsigned __int8)v18[8] + *(_DWORD *)(v41 + 1008) - 254; while ( --v22 ) { v21 = v18[*(unsigned int *)(v41 + 1980) - 5 + -4 * v21]; if ( v21 == 0xFF ) goto LABEL_18; } } } else { v20 = v43; } *((_BYTE *)v14 + 20) |= 5u; *((_DWORD *)v14 + 3) = v17; if ( v20 ) { v23 = *(_QWORD *)(a1 + 744); v24 = (unsigned int)(*(_DWORD *)(a1 + 752) - 1); v25 = 3 * v24; LODWORD(v4) = 0; pagecache_unlock_by_link(*(_QWORD *)(v19 + 1536), *(_QWORD *)(v23 + 24 * v24), 7, 0, 0LL, 0LL, 1); *(_DWORD *)(v23 + 8 * v25 + 8) = 5; } else { LODWORD(v4) = pagecache_write_part( *(__m128i **)(v19 + 1536), (char *)(a1 + 1136), *v14, 0, v18, *(_DWORD *)(v19 + 2004), 3u, 2u, 0, &v27, 0LL, 0, *(_DWORD *)(*(_QWORD *)(v19 + 1536) + 128LL)); if ( !(_BYTE)v4 ) { DWORD2(v27) = 5; v28 = 1; insert_dynamic(a1 + 744, &v27); } v26 = v40 * *v14; if ( *(_QWORD *)(v19 + 64) <= v26 ) ma_set_share_data_file_length(v19, v40 + v26); } } return (unsigned int)v4; }
write_tail: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV EBX,ECX MOV qword ptr [RBP + -0x60],RDX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RAX + 0x7bc] MOV qword ptr [RBP + -0x58],RAX CMP ECX,0x21 MOV R12D,0x20 CMOVNC R12D,ECX MOV byte ptr [RDI + 0x685],0x1 MOV R9D,dword ptr [RSI + 0x8] MOV RDX,qword ptr [RDI + 0x380] CMP R9D,0xffff JNZ 0x001631f2 LEA R9,[RBP + -0x88] MOV RDI,R15 MOV RSI,R14 MOV ECX,R12D MOV R8D,0x2 CALL 0x00162d78 JMP 0x0016321d LAB_001631f2: AND R9D,0xffff7fff SUB RSP,0x8 LEA RAX,[RBP + -0x88] MOV RDI,R15 MOV RSI,R14 MOV ECX,R12D MOV R8D,0x2 PUSH RAX CALL 0x00160fd1 ADD RSP,0x10 LAB_0016321d: MOV R13B,0x1 TEST AL,AL JZ 0x0016324c LAB_00163224: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00163472 MOV EAX,R13D ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016324c: MOV qword ptr [RBP + -0x48],R14 MOV R14B,byte ptr [R14 + 0x15] MOV R13,qword ptr [RBP + -0x80] MOV EDX,EBX MOV RDI,R13 MOV RSI,qword ptr [RBP + -0x60] CALL 0x00129080 MOV RAX,qword ptr [RBP + -0x50] CMP byte ptr [RAX + 0x7e7],0x0 MOV byte ptr [RBP + -0x39],R14B JZ 0x001632fb XOR ECX,ECX TEST R14B,R14B SETZ CL MOV R14,qword ptr [RBP + -0x48] MOV RDX,qword ptr [R14] LEA RAX,[RBP + -0x38] MOV dword ptr [RAX + 0x2],EDX SHR RDX,0x20 MOV byte ptr [RAX + 0x6],DL MOV EBX,dword ptr [RBP + -0x6c] MOV byte ptr [RAX + 0x7],BL LEA R10,[RBP + -0xd0] MOV qword ptr [R10 + 0x20],RAX MOV qword ptr [R10 + 0x28],0x8 MOV qword ptr [R10 + 0x30],R13 MOV EDX,R12D MOV qword ptr [R10 + 0x38],RDX LEA ESI,[0x2 + RCX*0x2] MOV RDX,qword ptr [R15 + 0x8] LEA R8D,[R12 + 0x8] SUB RSP,0x8 LEA RDI,[RBP + -0x90] MOV RCX,R15 MOV R9D,0x4 PUSH 0x0 PUSH RAX PUSH R10 CALL 0x0012a8ac ADD RSP,0x20 MOV R13B,0x1 TEST AL,AL JNZ 0x00163224 JMP 0x00163302 LAB_001632fb: MOV EBX,dword ptr [RBP + -0x6c] MOV R14,qword ptr [RBP + -0x48] LAB_00163302: MOV RAX,qword ptr [RBP + -0x78] MOV word ptr [RAX + 0x2],R12W MOV EAX,dword ptr [RBP + -0x68] SUB EAX,R12D MOV R8,qword ptr [RBP + -0x88] MOV word ptr [R8 + 0xa],AX ADD EBX,0x8000 MOV dword ptr [R14 + 0x8],EBX MOV R12,qword ptr [RBP + -0x50] MOV ECX,dword ptr [R12 + 0x3f0] MOVZX EDX,byte ptr [R8 + 0x8] ADD ECX,EDX INC ECX CMP ECX,0x100 JNC 0x0016334a MOV R9B,byte ptr [RBP + -0x39] JMP 0x00163385 LAB_0016334a: MOV DL,byte ptr [R8 + 0x9] CMP DL,0xff MOV R9B,byte ptr [RBP + -0x39] JZ 0x00163383 MOV ESI,dword ptr [R12 + 0x7bc] ADD ECX,0xffffff01 ADD RSI,R8 ADD RSI,-0x5 LAB_0016336c: DEC ECX JZ 0x00163385 MOVZX EDX,DL SHL EDX,0x2 MOV RDI,RSI SUB RDI,RDX MOV DL,byte ptr [RDI] CMP DL,0xff JNZ 0x0016336c LAB_00163383: XOR EAX,EAX LAB_00163385: OR byte ptr [R14 + 0x14],0x5 MOV dword ptr [R14 + 0xc],EAX TEST R9B,R9B JZ 0x001633de MOV RBX,qword ptr [R15 + 0x2e8] MOV EAX,dword ptr [R15 + 0x2f0] DEC EAX LEA R14,[RAX + RAX*0x2] MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBX + R14*0x8] XOR R13D,R13D MOV EDX,0x7 XOR ECX,ECX XOR R8D,R8D XOR R9D,R9D PUSH 0x0 PUSH 0x1 CALL 0x00132239 ADD RSP,0x10 MOV dword ptr [RBX + R14*0x8 + 0x8],0x5 JMP 0x00163224 LAB_001633de: MOV RDI,qword ptr [R12 + 0x600] LEA RSI,[R15 + 0x470] MOV RDX,qword ptr [R14] MOV R9D,dword ptr [R12 + 0x7d4] MOV EAX,dword ptr [RDI + 0x80] SUB RSP,0x8 XOR R10D,R10D LEA R11,[RBP + -0xd0] XOR ECX,ECX PUSH RAX PUSH R10 PUSH 0x0 PUSH R11 PUSH R10 PUSH 0x2 PUSH 0x3 CALL 0x00133982 ADD RSP,0x40 MOV R13D,EAX TEST AL,AL JNZ 0x0016344c LEA RSI,[RBP + -0xd0] MOV dword ptr [RSI + 0x8],0x5 MOV byte ptr [RSI + 0x10],0x1 ADD R15,0x2e8 MOV RDI,R15 CALL 0x00191aaa LAB_0016344c: MOV RSI,qword ptr [R14] MOV RAX,qword ptr [RBP + -0x58] IMUL RSI,RAX CMP qword ptr [R12 + 0x40],RSI JA 0x00163224 ADD RSI,RAX MOV RDI,R12 CALL 0x00138c08 JMP 0x00163224 LAB_00163472: CALL 0x00129270
ulong write_tail(long *param_1,long *param_2,void *param_3,uint param_4) { long lVar1; long *plVar2; char cVar3; uint uVar4; int iVar5; byte bVar6; ulong uVar7; int8 unaff_R13; ulong uVar8; long in_FS_OFFSET; int1 local_d8 [8]; int4 local_d0; int1 local_c8; int1 *local_b8; int8 local_b0; void *local_a8; ulong local_a0; int1 local_98 [8]; long local_90; void *local_88; long local_80; int local_74; int local_70; void *local_68; ulong local_60; long local_58; long *local_50; char local_41; int1 local_40 [2]; int4 local_3e; int1 local_3a; int1 local_39; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_58 = *param_1; local_60 = (ulong)*(uint *)(local_58 + 0x7bc); uVar7 = 0x20; if (0x20 < param_4) { uVar7 = (ulong)param_4; } *(int1 *)((long)param_1 + 0x685) = 1; local_68 = param_3; if (*(uint *)(param_2 + 1) == 0xffff) { cVar3 = get_head_or_tail_page(param_1,param_2,param_1[0x70],uVar7,2,&local_90); } else { cVar3 = get_rowpos_in_head_or_tail_page (param_1,param_2,param_1[0x70],uVar7,2,*(uint *)(param_2 + 1) & 0xffff7fff, &local_90); } uVar8 = CONCAT71((int7)((ulong)unaff_R13 >> 8),1); if (cVar3 == '\0') { cVar3 = *(char *)((long)param_2 + 0x15); local_50 = param_2; memcpy(local_88,local_68,(ulong)param_4); plVar2 = local_50; local_41 = cVar3; if (*(char *)(local_58 + 0x7e7) != '\0') { local_b8 = local_40; local_3e = (int4)*local_50; local_3a = (int1)((ulong)*local_50 >> 0x20); local_39 = (int1)local_74; local_b0 = 8; local_a8 = local_88; local_a0 = uVar7; cVar3 = translog_write_record (local_98,(cVar3 == '\0') * '\x02' + '\x02',param_1[1],param_1, (int)uVar7 + 8,4,local_d8,local_b8,0); uVar8 = CONCAT71((int7)((ulong)local_88 >> 8),1); if (cVar3 != '\0') goto LAB_00163224; } lVar1 = local_58; *(short *)(local_80 + 2) = (short)uVar7; local_70 = local_70 - (int)uVar7; *(short *)(local_90 + 10) = (short)local_70; *(int *)(plVar2 + 1) = local_74 + 0x8000; iVar5 = *(int *)(local_58 + 0x3f0) + (uint)*(byte *)(local_90 + 8); if (0xff < iVar5 + 1U) { bVar6 = *(byte *)(local_90 + 9); if (bVar6 != 0xff) { iVar5 = iVar5 + -0xfe; do { iVar5 = iVar5 + -1; if (iVar5 == 0) goto LAB_00163385; bVar6 = *(byte *)((ulong)*(uint *)(local_58 + 0x7bc) + local_90 + -5 + (ulong)bVar6 * -4); } while (bVar6 != 0xff); } local_70 = 0; } LAB_00163385: *(byte *)((long)plVar2 + 0x14) = *(byte *)((long)plVar2 + 0x14) | 5; *(int *)((long)plVar2 + 0xc) = local_70; if (local_41 == '\0') { uVar4 = pagecache_write_part (*(long *)(local_58 + 0x600),param_1 + 0x8e,*plVar2,0,local_90, *(int4 *)(local_58 + 0x7d4),3,2,0,local_d8,0,0, *(int4 *)(*(long *)(local_58 + 0x600) + 0x80)); uVar8 = (ulong)uVar4; if ((char)uVar4 == '\0') { local_d0 = 5; local_c8 = 1; insert_dynamic(param_1 + 0x5d); } if (*(ulong *)(lVar1 + 0x40) <= *plVar2 * local_60) { _ma_set_share_data_file_length(lVar1,*plVar2 * local_60 + local_60); } } else { lVar1 = param_1[0x5d]; uVar7 = (ulong)((int)param_1[0x5e] - 1); uVar8 = 0; pagecache_unlock_by_link (*(int8 *)(local_58 + 0x600),*(int8 *)(lVar1 + uVar7 * 0x18),7,0,0,0,1,0 ); *(int4 *)(lVar1 + 8 + uVar7 * 0x18) = 5; } } LAB_00163224: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar8 & 0xffffffff; }
25,388
my_fdopen
eloqsql/mysys/my_fopen.c
FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags) { FILE *fd; char type[5]; DBUG_ENTER("my_fdopen"); DBUG_PRINT("my",("fd: %d Flags: %d MyFlags: %lu", Filedes, Flags, MyFlags)); make_ftype(type,Flags); #ifdef _WIN32 fd= my_win_fdopen(Filedes, type); #else fd= fdopen(Filedes, type); #endif if (!fd) { my_errno=errno; if (MyFlags & (MY_FAE | MY_WME)) my_error(EE_CANT_OPEN_STREAM, MYF(ME_BELL), errno); } else { statistic_increment(my_stream_opened, &THR_LOCK_open); if ((uint) Filedes < (uint) my_file_limit) { if (my_file_info[Filedes].type != UNOPEN) { /* File is opened with my_open ! */ my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED); } else { my_file_info[Filedes].name= my_strdup(key_memory_my_file_info, name, MyFlags); } my_file_info[Filedes].type= STREAM_BY_FDOPEN; } } DBUG_PRINT("exit",("stream: %p", fd)); DBUG_RETURN(fd); }
O3
c
my_fdopen: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq %rsi, %r15 movl %edi, %r12d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testb $0x1, %dl jne 0x331f2 testb $0x2, %dl jne 0x3320c leaq -0x34(%rbp), %rax movb $0x72, -0x1(%rax) jmp 0x33236 btl $0xa, %edx movl $0x77, %eax movl $0x61, %ecx cmovael %eax, %ecx leaq -0x34(%rbp), %rax movb %cl, -0x1(%rax) jmp 0x33236 btl $0xa, %edx movl $0x72, %eax movl $0x61, %ecx cmovael %eax, %ecx testl $0x240, %edx # imm = 0x240 movl $0x77, %edx cmovel %ecx, %edx leaq -0x33(%rbp), %rax movb %dl, -0x2(%rax) movb $0x2b, -0x1(%rax) movw $0x65, (%rax) leaq -0x35(%rbp), %rsi movl %r12d, %edi callq 0x243b0 movq %rax, %r14 testq %rax, %rax je 0x3328b leaq 0x33e33a(%rip), %rax # 0x371590 incq (%rax) leaq 0x2c74f0(%rip), %rax # 0x2fa750 cmpl %r12d, (%rax) jbe 0x332e2 leaq 0x2c74ec(%rip), %r13 # 0x2fa758 movq (%r13), %rax movslq %r12d, %r12 shlq $0x4, %r12 cmpl $0x0, 0x8(%rax,%r12) je 0x332b9 leaq 0x33e32e(%rip), %rcx # 0x3715b4 lock decl (%rcx) jmp 0x332d9 callq 0x24050 movq %rax, %r15 movl (%rax), %r12d callq 0x2df82 movl %r12d, (%rax) testb $0x18, %bl je 0x332e2 movl (%r15), %edx movl $0x4, %esi movl $0xf, %edi xorl %eax, %eax callq 0x295ff jmp 0x332e2 leaq 0x33e824(%rip), %rax # 0x371ae4 movl (%rax), %edi movq %r15, %rsi movq %rbx, %rdx callq 0x2ccb4 movq (%r13), %rcx movq %rax, (%rcx,%r12) movq (%r13), %rax movl $0x4, 0x8(%rax,%r12) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x33303 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24400
my_fdopen: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rcx mov r15, rsi mov r12d, edi mov rax, fs:28h mov [rbp+var_30], rax test dl, 1 jnz short loc_331F2 test dl, 2 jnz short loc_3320C lea rax, [rbp+var_34] mov byte ptr [rax-1], 72h ; 'r' jmp short loc_33236 loc_331F2: bt edx, 0Ah mov eax, 77h ; 'w' mov ecx, 61h ; 'a' cmovnb ecx, eax lea rax, [rbp+var_34] mov [rax-1], cl jmp short loc_33236 loc_3320C: bt edx, 0Ah mov eax, 72h ; 'r' mov ecx, 61h ; 'a' cmovnb ecx, eax test edx, 240h mov edx, 77h ; 'w' cmovz edx, ecx lea rax, [rbp+var_33] mov [rax-2], dl mov byte ptr [rax-1], 2Bh ; '+' loc_33236: mov word ptr [rax], 65h ; 'e' lea rsi, [rbp+var_35] mov edi, r12d call _fdopen mov r14, rax test rax, rax jz short loc_3328B lea rax, my_stream_opened inc qword ptr [rax] lea rax, my_file_limit cmp [rax], r12d jbe short loc_332E2 lea r13, my_file_info mov rax, [r13+0] movsxd r12, r12d shl r12, 4 cmp dword ptr [rax+r12+8], 0 jz short loc_332B9 lea rcx, my_file_opened lock dec dword ptr [rcx] jmp short loc_332D9 loc_3328B: call ___errno_location mov r15, rax mov r12d, [rax] call _my_thread_var mov [rax], r12d test bl, 18h jz short loc_332E2 mov edx, [r15] mov esi, 4 mov edi, 0Fh xor eax, eax call my_error jmp short loc_332E2 loc_332B9: lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, r15 mov rdx, rbx call my_strdup mov rcx, [r13+0] mov [rcx+r12], rax mov rax, [r13+0] loc_332D9: mov dword ptr [rax+r12+8], 4 loc_332E2: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_33303 mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_33303: call ___stack_chk_fail
long long my_fdopen(unsigned int a1, long long a2, __int16 a3, int a4) { char *v5; // rax char v6; // cl char v7; // cl bool v8; // zf char v9; // dl long long v10; // r14 char *v11; // rax long long v12; // r12 unsigned int *v13; // r15 unsigned int v14; // r12d char v16; // [rsp+Bh] [rbp-35h] BYREF char v17; // [rsp+Ch] [rbp-34h] BYREF char v18; // [rsp+Dh] [rbp-33h] BYREF unsigned long long v19; // [rsp+10h] [rbp-30h] v19 = __readfsqword(0x28u); if ( (a3 & 1) != 0 ) { v6 = 97; if ( (a3 & 0x400) == 0 ) v6 = 119; v5 = &v17; v16 = v6; } else if ( (a3 & 2) != 0 ) { v7 = 97; if ( (a3 & 0x400) == 0 ) v7 = 114; v8 = (a3 & 0x240) == 0; v9 = 119; if ( v8 ) v9 = v7; v5 = &v18; v16 = v9; v17 = 43; } else { v5 = &v17; v16 = 114; } *(_WORD *)v5 = 101; v10 = fdopen(a1, &v16); if ( v10 ) { ++my_stream_opened; if ( my_file_limit > a1 ) { v11 = (char *)my_file_info; v12 = 16LL * (int)a1; if ( *(_DWORD *)((char *)my_file_info + v12 + 8) ) { _InterlockedDecrement(my_file_opened); } else { *((_QWORD *)my_file_info + 2 * (int)a1) = my_strdup(key_memory_my_file_info, a2, a4); v11 = (char *)my_file_info; } *(_DWORD *)&v11[v12 + 8] = 4; } } else { v13 = (unsigned int *)__errno_location(a1); v14 = *v13; *(_DWORD *)my_thread_var() = v14; if ( (a4 & 0x18) != 0 ) my_error(0xFu, 4LL, *v13); } return v10; }
my_fdopen: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV R15,RSI MOV R12D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST DL,0x1 JNZ 0x001331f2 TEST DL,0x2 JNZ 0x0013320c LEA RAX,[RBP + -0x34] MOV byte ptr [RAX + -0x1],0x72 JMP 0x00133236 LAB_001331f2: BT EDX,0xa MOV EAX,0x77 MOV ECX,0x61 CMOVNC ECX,EAX LEA RAX,[RBP + -0x34] MOV byte ptr [RAX + -0x1],CL JMP 0x00133236 LAB_0013320c: BT EDX,0xa MOV EAX,0x72 MOV ECX,0x61 CMOVNC ECX,EAX TEST EDX,0x240 MOV EDX,0x77 CMOVZ EDX,ECX LEA RAX,[RBP + -0x33] MOV byte ptr [RAX + -0x2],DL MOV byte ptr [RAX + -0x1],0x2b LAB_00133236: MOV word ptr [RAX],0x65 LEA RSI,[RBP + -0x35] MOV EDI,R12D CALL 0x001243b0 MOV R14,RAX TEST RAX,RAX JZ 0x0013328b LEA RAX,[0x471590] INC qword ptr [RAX] LEA RAX,[0x3fa750] CMP dword ptr [RAX],R12D JBE 0x001332e2 LEA R13,[0x3fa758] MOV RAX,qword ptr [R13] MOVSXD R12,R12D SHL R12,0x4 CMP dword ptr [RAX + R12*0x1 + 0x8],0x0 JZ 0x001332b9 LEA RCX,[0x4715b4] DEC.LOCK dword ptr [RCX] JMP 0x001332d9 LAB_0013328b: CALL 0x00124050 MOV R15,RAX MOV R12D,dword ptr [RAX] CALL 0x0012df82 MOV dword ptr [RAX],R12D TEST BL,0x18 JZ 0x001332e2 MOV EDX,dword ptr [R15] MOV ESI,0x4 MOV EDI,0xf XOR EAX,EAX CALL 0x001295ff JMP 0x001332e2 LAB_001332b9: LEA RAX,[0x471ae4] MOV EDI,dword ptr [RAX] MOV RSI,R15 MOV RDX,RBX CALL 0x0012ccb4 MOV RCX,qword ptr [R13] MOV qword ptr [RCX + R12*0x1],RAX MOV RAX,qword ptr [R13] LAB_001332d9: MOV dword ptr [RAX + R12*0x1 + 0x8],0x4 LAB_001332e2: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00133303 MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00133303: CALL 0x00124400
FILE * my_fdopen(uint param_1,int8 param_2,uint param_3,ulong param_4) { int iVar1; int2 *puVar2; FILE *pFVar3; int *piVar4; int *piVar5; int8 uVar6; char cVar7; long lVar8; long in_FS_OFFSET; char local_3d; int1 local_3c [4]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if ((param_3 & 1) == 0) { if ((param_3 & 2) == 0) { puVar2 = (int2 *)local_3c; local_3d = 'r'; } else { cVar7 = 'a'; if ((param_3 >> 10 & 1) == 0) { cVar7 = 'r'; } local_3d = 'w'; if ((param_3 & 0x240) == 0) { local_3d = cVar7; } puVar2 = (int2 *)(local_3c + 1); local_3c[0] = 0x2b; } } else { local_3d = 'a'; if ((param_3 >> 10 & 1) == 0) { local_3d = 'w'; } puVar2 = (int2 *)local_3c; } *puVar2 = 0x65; pFVar3 = fdopen(param_1,&local_3d); if (pFVar3 == (FILE *)0x0) { piVar4 = __errno_location(); iVar1 = *piVar4; piVar5 = (int *)_my_thread_var(); *piVar5 = iVar1; if ((param_4 & 0x18) != 0) { my_error(0xf,4,*piVar4); } } else { my_stream_opened = my_stream_opened + 1; if (param_1 < my_file_limit) { lVar8 = (long)(int)param_1 * 0x10; if (*(int *)(my_file_info + lVar8 + 8) == 0) { uVar6 = my_strdup(key_memory_my_file_info,param_2,param_4); *(int8 *)(my_file_info + lVar8) = uVar6; } else { LOCK(); my_file_opened = my_file_opened + -1; UNLOCK(); } *(int4 *)(my_file_info + lVar8 + 8) = 4; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return pFVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,389
CLI::detail::get_default_flag_values(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Split_inl.hpp
CLI11_INLINE std::vector<std::pair<std::string, std::string>> get_default_flag_values(const std::string &str) { std::vector<std::string> flags = split_names(str); flags.erase(std::remove_if(flags.begin(), flags.end(), [](const std::string &name) { return ((name.empty()) || (!(((name.find_first_of('{') != std::string::npos) && (name.back() == '}')) || (name[0] == '!')))); }), flags.end()); std::vector<std::pair<std::string, std::string>> output; output.reserve(flags.size()); for(auto &flag : flags) { auto def_start = flag.find_first_of('{'); std::string defval = "false"; if((def_start != std::string::npos) && (flag.back() == '}')) { defval = flag.substr(def_start + 1); defval.pop_back(); flag.erase(def_start, std::string::npos); // NOLINT(readability-suspicious-call-argument) } flag.erase(0, flag.find_first_not_of("-!")); output.emplace_back(flag, defval); } return output; }
O0
cpp
CLI::detail::get_default_flag_values(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 movq %rdi, -0x128(%rbp) movq %rdi, %rax movq %rax, -0x120(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rsi leaq -0x48(%rbp), %rdi movq %rdi, -0x118(%rbp) callq 0x9250 movq -0x118(%rbp), %rsi leaq -0x28(%rbp), %rdi callq 0x2b280 jmp 0x2a2da leaq -0x48(%rbp), %rdi callq 0x9b90 leaq -0x28(%rbp), %rdi movq %rdi, -0x138(%rbp) callq 0xd5a0 movq -0x138(%rbp), %rdi movq %rax, -0x70(%rbp) callq 0xd890 movq %rax, -0x78(%rbp) movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x2b4d0 movq %rax, -0x130(%rbp) jmp 0x2a31d movq -0x130(%rbp), %rax movq %rax, -0x68(%rbp) leaq -0x60(%rbp), %rdi leaq -0x68(%rbp), %rsi callq 0xd5d0 leaq -0x28(%rbp), %rdi movq %rdi, -0x148(%rbp) callq 0xd890 movq %rax, -0x90(%rbp) leaq -0x88(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0xd5d0 movq -0x148(%rbp), %rdi movq -0x60(%rbp), %rsi movq -0x88(%rbp), %rdx callq 0x2b440 movq %rax, -0x140(%rbp) jmp 0x2a37f movq -0x128(%rbp), %rdi movq -0x140(%rbp), %rax movq %rax, -0x98(%rbp) movb $0x0, -0x99(%rbp) callq 0x2b510 leaq -0x28(%rbp), %rdi callq 0x18430 movq -0x128(%rbp), %rdi movq %rax, %rsi callq 0x2b530 jmp 0x2a3ba leaq -0x28(%rbp), %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rdi callq 0xd5a0 movq %rax, -0xb0(%rbp) movq -0xa8(%rbp), %rdi callq 0xd890 movq %rax, -0xb8(%rbp) leaq -0xb0(%rbp), %rdi leaq -0xb8(%rbp), %rsi callq 0xd8c0 testb $0x1, %al jne 0x2a407 jmp 0x2a600 leaq -0xb0(%rbp), %rdi callq 0xd900 movq %rax, -0xc0(%rbp) movq -0xc0(%rbp), %rdi xorl %eax, %eax movl %eax, %edx movl $0x7b, %esi callq 0x93b0 movq %rax, -0xc8(%rbp) leaq -0xe9(%rbp), %rdi movq %rdi, -0x150(%rbp) callq 0x9a80 movq -0x150(%rbp), %rdx leaq 0x44f2b(%rip), %rsi # 0x6f382 leaq -0xe8(%rbp), %rdi callq 0xbb20 jmp 0x2a465 leaq -0xe9(%rbp), %rdi callq 0x9690 cmpq $-0x1, -0xc8(%rbp) je 0x2a58a movq -0xc0(%rbp), %rdi callq 0x9450 movsbl (%rax), %eax cmpl $0x7d, %eax jne 0x2a58a movq -0xc0(%rbp), %rsi movq -0xc8(%rbp), %rdx incq %rdx leaq -0x110(%rbp), %rdi movq $-0x1, %rcx callq 0x9640 jmp 0x2a4bd leaq -0xe8(%rbp), %rdi movq %rdi, -0x158(%rbp) leaq -0x110(%rbp), %rsi movq %rsi, -0x160(%rbp) callq 0x9790 movq -0x160(%rbp), %rdi callq 0x9b90 movq -0x158(%rbp), %rdi callq 0x9780 movq -0xc0(%rbp), %rdi movq -0xc8(%rbp), %rsi movq $-0x1, %rdx callq 0x9120 jmp 0x2a512 jmp 0x2a58a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x48(%rbp), %rdi callq 0x9b90 jmp 0x2a64a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x2a641 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x2a635 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0xe9(%rbp), %rdi callq 0x9690 jmp 0x2a635 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0xe8(%rbp), %rdi callq 0x9b90 jmp 0x2a635 movq -0xc0(%rbp), %rdi movq %rdi, -0x170(%rbp) leaq 0x452b9(%rip), %rsi # 0x6f858 xorl %eax, %eax movl %eax, %edx movq %rdx, -0x168(%rbp) callq 0x9350 movq -0x170(%rbp), %rdi movq -0x168(%rbp), %rsi movq %rax, %rdx callq 0x9120 jmp 0x2a5c7 movq -0x128(%rbp), %rdi movq -0xc0(%rbp), %rsi leaq -0xe8(%rbp), %rdx callq 0x2b630 jmp 0x2a5e3 leaq -0xe8(%rbp), %rdi callq 0x9b90 leaq -0xb0(%rbp), %rdi callq 0xf1b0 jmp 0x2a3eb movb $0x1, -0x99(%rbp) testb $0x1, -0x99(%rbp) jne 0x2a61c movq -0x128(%rbp), %rdi callq 0x297a0 leaq -0x28(%rbp), %rdi callq 0xe270 movq -0x120(%rbp), %rax addq $0x170, %rsp # imm = 0x170 popq %rbp retq movq -0x128(%rbp), %rdi callq 0x297a0 leaq -0x28(%rbp), %rdi callq 0xe270 movq -0x50(%rbp), %rdi callq 0x9a70 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3CLI6detail23get_default_flag_valuesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 170h mov [rbp+var_128], rdi mov rax, rdi mov [rbp+var_120], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rsi, [rbp+var_10] lea rdi, [rbp+var_48] mov [rbp+var_118], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rsi, [rbp+var_118] lea rdi, [rbp+var_28] call _ZN3CLI6detail11split_namesENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::detail::split_names(std::string) jmp short $+2 loc_2A2DA: lea rdi, [rbp+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_28] mov [rbp+var_138], rdi call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov rdi, [rbp+var_138] mov [rbp+var_70], rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_78], rax mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] call _ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEZN3CLI6detail23get_default_flag_valuesERKS7_EUlSG_E_ET_SI_SI_T0_; std::remove_if<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,CLI::detail::get_default_flag_values(std::string const&)::{lambda(std::string const&)#1}>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,CLI::detail::get_default_flag_values(std::string const&)::{lambda(std::string const&)#1}) mov [rbp+var_130], rax jmp short $+2 loc_2A31D: mov rax, [rbp+var_130] mov [rbp+var_68], rax lea rdi, [rbp+var_60] lea rsi, [rbp+var_68] call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEC2IPS6_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISF_SE_EE7__valueESB_E6__typeEEE lea rdi, [rbp+var_28] mov [rbp+var_148], rdi call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_90], rax lea rdi, [rbp+var_88] lea rsi, [rbp+var_90] call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEC2IPS6_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISF_SE_EE7__valueESB_E6__typeEEE mov rdi, [rbp+var_148] mov rsi, [rbp+var_60] mov rdx, [rbp+var_88] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS5_S7_EESC_; std::vector<std::string>::erase(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>) mov [rbp+var_140], rax jmp short $+2 loc_2A37F: mov rdi, [rbp+var_128] mov rax, [rbp+var_140] mov [rbp+var_98], rax mov [rbp+var_99], 0 call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EEC2Ev; std::vector<std::pair<std::string,std::string>>::vector(void) lea rdi, [rbp+var_28] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov rdi, [rbp+var_128] mov rsi, rax call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EE7reserveEm; std::vector<std::pair<std::string,std::string>>::reserve(ulong) jmp short $+2 loc_2A3BA: lea rax, [rbp+var_28] mov [rbp+var_A8], rax mov rdi, [rbp+var_A8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_B0], rax mov rdi, [rbp+var_A8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_B8], rax loc_2A3EB: lea rdi, [rbp+var_B0] lea rsi, [rbp+var_B8] 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_2A407 jmp loc_2A600 loc_2A407: lea rdi, [rbp+var_B0] 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_C0], rax mov rdi, [rbp+var_C0] xor eax, eax mov edx, eax mov esi, 7Bh ; '{' call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13find_first_ofEcm; std::string::find_first_of(char,ulong) mov [rbp+var_C8], rax lea rdi, [rbp+var_E9] mov [rbp+var_150], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_150] lea rsi, aFalse; "false" lea rdi, [rbp+var_E8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_2A465: lea rdi, [rbp+var_E9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() cmp [rbp+var_C8], 0FFFFFFFFFFFFFFFFh jz loc_2A58A mov rdi, [rbp+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void) movsx eax, byte ptr [rax] cmp eax, 7Dh ; '}' jnz loc_2A58A mov rsi, [rbp+var_C0] mov rdx, [rbp+var_C8] inc rdx lea rdi, [rbp+var_110] mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_2A4BD: lea rdi, [rbp+var_E8] mov [rbp+var_158], rdi lea rsi, [rbp+var_110] mov [rbp+var_160], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbp+var_160]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_158] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void) mov rdi, [rbp+var_C0] mov rsi, [rbp+var_C8] mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEmm; std::string::erase(ulong,ulong) jmp short $+2 loc_2A512: jmp short loc_2A58A mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_2A64A mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp loc_2A641 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp loc_2A635 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_E9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_2A635 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_2A635 loc_2A58A: mov rdi, [rbp+var_C0] mov [rbp+var_170], rdi lea rsi, asc_6F858; "-!" xor eax, eax mov edx, eax mov [rbp+var_168], rdx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcm; std::string::find_first_not_of(char const*,ulong) mov rdi, [rbp+var_170] mov rsi, [rbp+var_168] mov rdx, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEmm; std::string::erase(ulong,ulong) jmp short $+2 loc_2A5C7: mov rdi, [rbp+var_128] mov rsi, [rbp+var_C0] lea rdx, [rbp+var_E8] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EE12emplace_backIJRS6_SB_EEERS7_DpOT_; std::vector<std::pair<std::string,std::string>>::emplace_back<std::string&,std::string&>(std::string&,std::string&) jmp short $+2 loc_2A5E3: lea rdi, [rbp+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_B0] 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_2A3EB loc_2A600: mov [rbp+var_99], 1 test [rbp+var_99], 1 jnz short loc_2A61C mov rdi, [rbp+var_128] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EED2Ev; std::vector<std::pair<std::string,std::string>>::~vector() loc_2A61C: lea rdi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, [rbp+var_120] add rsp, 170h pop rbp retn loc_2A635: mov rdi, [rbp+var_128] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EED2Ev; std::vector<std::pair<std::string,std::string>>::~vector() loc_2A641: lea rdi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_2A64A: mov rdi, [rbp+var_50] call __Unwind_Resume
long long CLI::detail::get_default_flag_values(long long a1, long long a2) { long long v2; // rax long long v3; // rdx long long first_not_of; // rax long long v6; // [rsp+0h] [rbp-170h] _BYTE v7[39]; // [rsp+60h] [rbp-110h] BYREF char v8; // [rsp+87h] [rbp-E9h] BYREF _BYTE v9[32]; // [rsp+88h] [rbp-E8h] BYREF long long first_of; // [rsp+A8h] [rbp-C8h] long long v11; // [rsp+B0h] [rbp-C0h] long long v12; // [rsp+B8h] [rbp-B8h] BYREF _QWORD v13[2]; // [rsp+C0h] [rbp-B0h] BYREF char v14; // [rsp+D7h] [rbp-99h] long long v15; // [rsp+D8h] [rbp-98h] long long v16; // [rsp+E0h] [rbp-90h] BYREF long long v17; // [rsp+E8h] [rbp-88h] BYREF long long v18; // [rsp+F8h] [rbp-78h] long long v19; // [rsp+100h] [rbp-70h] long long v20; // [rsp+108h] [rbp-68h] BYREF long long v21; // [rsp+110h] [rbp-60h] BYREF _BYTE v22[32]; // [rsp+128h] [rbp-48h] BYREF long long v23[5]; // [rsp+148h] [rbp-28h] BYREF v23[4] = a1; v23[3] = a2; std::string::basic_string(v22, a2); CLI::detail::split_names(v23, v22); std::string::~string(v22); v19 = std::vector<std::string>::begin((long long)v23); v18 = std::vector<std::string>::end((long long)v23); v20 = std::remove_if<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,CLI::detail::get_default_flag_values(std::string const&)::{lambda(std::string const&)#1}>( v19, v18); __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::__normal_iterator<std::string*>( &v21, (long long)&v20); v16 = std::vector<std::string>::end((long long)v23); __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::__normal_iterator<std::string*>( &v17, (long long)&v16); v15 = std::vector<std::string>::erase(v23, v21, v17); v14 = 0; std::vector<std::pair<std::string,std::string>>::vector(a1); v2 = std::vector<std::string>::size(v23); std::vector<std::pair<std::string,std::string>>::reserve(a1, v2); v13[1] = v23; v13[0] = std::vector<std::string>::begin((long long)v23); v12 = std::vector<std::string>::end((long long)v23); while ( __gnu_cxx::operator!=<std::string *,std::vector<std::string>>((long long)v13, (long long)&v12) ) { v11 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*((long long)v13); first_of = std::string::find_first_of(v11, 123LL, 0LL); std::allocator<char>::allocator(&v8, 123LL, v3); std::string::basic_string<std::allocator<char>>((long long)v9, (long long)"false", (long long)&v8); std::allocator<char>::~allocator(&v8); if ( first_of != -1 && *(_BYTE *)std::string::back(v11) == 125 ) { std::string::substr(v7, v11, first_of + 1, -1LL); std::string::operator=(v9); std::string::~string(v7); std::string::pop_back(v9); std::string::erase(v11, first_of, -1LL); } v6 = v11; first_not_of = std::string::find_first_not_of(v11, "-!"); std::string::erase(v6, 0LL, first_not_of); std::vector<std::pair<std::string,std::string>>::emplace_back<std::string&,std::string&>(a1, v11, v9); std::string::~string(v9); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v13); } v14 = 1; std::vector<std::string>::~vector(v23); return a1; }
get_default_flag_values: PUSH RBP MOV RBP,RSP SUB RSP,0x170 MOV qword ptr [RBP + -0x128],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x120],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x48] MOV qword ptr [RBP + -0x118],RDI CALL 0x00109250 MOV RSI,qword ptr [RBP + -0x118] LAB_0012a2cf: LEA RDI,[RBP + -0x28] CALL 0x0012b280 JMP 0x0012a2da LAB_0012a2da: LEA RDI,[RBP + -0x48] CALL 0x00109b90 LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0x138],RDI CALL 0x0010d5a0 MOV RDI,qword ptr [RBP + -0x138] MOV qword ptr [RBP + -0x70],RAX CALL 0x0010d890 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] LAB_0012a30f: CALL 0x0012b4d0 MOV qword ptr [RBP + -0x130],RAX JMP 0x0012a31d LAB_0012a31d: MOV RAX,qword ptr [RBP + -0x130] MOV qword ptr [RBP + -0x68],RAX LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0x68] CALL 0x0010d5d0 LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0x148],RDI CALL 0x0010d890 MOV qword ptr [RBP + -0x90],RAX LEA RDI,[RBP + -0x88] LEA RSI,[RBP + -0x90] CALL 0x0010d5d0 MOV RDI,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x88] CALL 0x0012b440 MOV qword ptr [RBP + -0x140],RAX JMP 0x0012a37f LAB_0012a37f: MOV RDI,qword ptr [RBP + -0x128] MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RBP + -0x98],RAX MOV byte ptr [RBP + -0x99],0x0 CALL 0x0012b510 LEA RDI,[RBP + -0x28] CALL 0x00118430 MOV RDI,qword ptr [RBP + -0x128] MOV RSI,RAX LAB_0012a3b3: CALL 0x0012b530 JMP 0x0012a3ba LAB_0012a3ba: LEA RAX,[RBP + -0x28] MOV qword ptr [RBP + -0xa8],RAX MOV RDI,qword ptr [RBP + -0xa8] CALL 0x0010d5a0 MOV qword ptr [RBP + -0xb0],RAX MOV RDI,qword ptr [RBP + -0xa8] CALL 0x0010d890 MOV qword ptr [RBP + -0xb8],RAX LAB_0012a3eb: LEA RDI,[RBP + -0xb0] LEA RSI,[RBP + -0xb8] CALL 0x0010d8c0 TEST AL,0x1 JNZ 0x0012a407 JMP 0x0012a600 LAB_0012a407: LEA RDI,[RBP + -0xb0] CALL 0x0010d900 MOV qword ptr [RBP + -0xc0],RAX MOV RDI,qword ptr [RBP + -0xc0] XOR EAX,EAX MOV EDX,EAX MOV ESI,0x7b CALL 0x001093b0 MOV qword ptr [RBP + -0xc8],RAX LEA RDI,[RBP + -0xe9] MOV qword ptr [RBP + -0x150],RDI CALL 0x00109a80 MOV RDX,qword ptr [RBP + -0x150] LAB_0012a450: LEA RSI,[0x16f382] LEA RDI,[RBP + -0xe8] CALL 0x0010bb20 JMP 0x0012a465 LAB_0012a465: LEA RDI,[RBP + -0xe9] CALL 0x00109690 CMP qword ptr [RBP + -0xc8],-0x1 JZ 0x0012a58a MOV RDI,qword ptr [RBP + -0xc0] CALL 0x00109450 MOVSX EAX,byte ptr [RAX] CMP EAX,0x7d JNZ 0x0012a58a MOV RSI,qword ptr [RBP + -0xc0] MOV RDX,qword ptr [RBP + -0xc8] INC RDX LAB_0012a4a8: LEA RDI,[RBP + -0x110] MOV RCX,-0x1 CALL 0x00109640 JMP 0x0012a4bd LAB_0012a4bd: LEA RDI,[RBP + -0xe8] MOV qword ptr [RBP + -0x158],RDI LEA RSI,[RBP + -0x110] MOV qword ptr [RBP + -0x160],RSI CALL 0x00109790 MOV RDI,qword ptr [RBP + -0x160] CALL 0x00109b90 MOV RDI,qword ptr [RBP + -0x158] CALL 0x00109780 MOV RDI,qword ptr [RBP + -0xc0] MOV RSI,qword ptr [RBP + -0xc8] MOV RDX,-0x1 CALL 0x00109120 JMP 0x0012a512 LAB_0012a512: JMP 0x0012a58a LAB_0012a58a: MOV RDI,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0x170],RDI LEA RSI,[0x16f858] XOR EAX,EAX MOV EDX,EAX MOV qword ptr [RBP + -0x168],RDX CALL 0x00109350 MOV RDI,qword ptr [RBP + -0x170] MOV RSI,qword ptr [RBP + -0x168] MOV RDX,RAX CALL 0x00109120 JMP 0x0012a5c7 LAB_0012a5c7: MOV RDI,qword ptr [RBP + -0x128] MOV RSI,qword ptr [RBP + -0xc0] LEA RDX,[RBP + -0xe8] CALL 0x0012b630 LAB_0012a5e1: JMP 0x0012a5e3 LAB_0012a5e3: LEA RDI,[RBP + -0xe8] CALL 0x00109b90 LEA RDI,[RBP + -0xb0] CALL 0x0010f1b0 JMP 0x0012a3eb LAB_0012a600: MOV byte ptr [RBP + -0x99],0x1 TEST byte ptr [RBP + -0x99],0x1 JNZ 0x0012a61c MOV RDI,qword ptr [RBP + -0x128] CALL 0x001297a0 LAB_0012a61c: LEA RDI,[RBP + -0x28] CALL 0x0010e270 MOV RAX,qword ptr [RBP + -0x120] ADD RSP,0x170 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0012a610) */ /* CLI::detail::get_default_flag_values(std::__cxx11::string const&) */ detail * __thiscall CLI::detail::get_default_flag_values(detail *this,string *param_1) { string *psVar1; bool bVar2; ulong uVar3; char *pcVar4; string local_118 [39]; allocator local_f1; string local_f0 [32]; ulong local_d0; string *local_c8; int8 local_c0; int8 local_b8; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_b0; int1 local_a1; int8 local_a0; int8 local_98; int8 local_90 [2]; int8 local_80; int8 local_78; int8 local_70; int8 local_68 [3]; string local_50 [32]; detail local_30 [24]; string *local_18; detail *local_10; local_18 = param_1; local_10 = this; std::__cxx11::string::string(local_50,param_1); /* try { // try from 0012a2cf to 0012a2d7 has its CatchHandler @ 0012a514 */ split_names(local_30,local_50); std::__cxx11::string::~string(local_50); local_78 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) local_30); local_80 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) local_30); /* try { // try from 0012a30f to 0012a375 has its CatchHandler @ 0012a52e */ local_70 = std:: remove_if<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,CLI::detail::get_default_flag_values(std::__cxx11::string_const&)::_lambda(std::__cxx11::string_const&)_1_> (local_78,local_80); __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::__normal_iterator<std::__cxx11::string*> ((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)local_68,(__normal_iterator *)&local_70); local_98 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) local_30); __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::__normal_iterator<std::__cxx11::string*> ((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)local_90,(__normal_iterator *)&local_98); local_a0 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::erase ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) local_30,local_68[0],local_90[0]); local_a1 = 0; std:: vector<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>> ::vector((vector<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>> *)this); uVar3 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_30); /* try { // try from 0012a3b3 to 0012a3b7 has its CatchHandler @ 0012a53f */ std:: vector<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>> ::reserve((vector<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>> *)this,uVar3); local_b0 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_30; local_b8 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_b0) ; local_c0 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_b0); while (bVar2 = __gnu_cxx::operator!= ((__normal_iterator *)&local_b8,(__normal_iterator *)&local_c0), bVar2) { local_c8 = (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_b8); local_d0 = std::__cxx11::string::find_first_of((char)local_c8,0x7b); std::allocator<char>::allocator(); /* try { // try from 0012a450 to 0012a462 has its CatchHandler @ 0012a550 */ std::__cxx11::string::string<std::allocator<char>>(local_f0,"false",&local_f1); std::allocator<char>::~allocator((allocator<char> *)&local_f1); if ((local_d0 != 0xffffffffffffffff) && (pcVar4 = (char *)std::__cxx11::string::back(), *pcVar4 == '}')) { /* try { // try from 0012a4a8 to 0012a5e0 has its CatchHandler @ 0012a56d */ std::__cxx11::string::substr((ulong)local_118,(ulong)local_c8); std::__cxx11::string::operator=(local_f0,local_118); std::__cxx11::string::~string(local_118); std::__cxx11::string::pop_back(); std::__cxx11::string::erase((ulong)local_c8,local_d0); } psVar1 = local_c8; std::__cxx11::string::find_first_not_of((char *)local_c8,0x16f858); std::__cxx11::string::erase((ulong)psVar1,0); std:: vector<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>> ::emplace_back<std::__cxx11::string&,std::__cxx11::string&> ((vector<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>> *)this,local_c8,local_f0); std::__cxx11::string::~string(local_f0); __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_b8); } local_a1 = 1; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_30); return this; }
25,390
my_mb_wc_gbk
eloqsql/strings/ctype-gbk.c
static int my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; hi=s[0]; if (hi<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_gbk_uni_onechar( (hi<<8) + s[1]))) return -2; return 2; }
O3
c
my_mb_wc_gbk: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x54769 movsbq (%rdx), %rdi testq %rdi, %rdi js 0x546ed movq %rdi, (%rsi) movl $0x1, %eax jmp 0x54769 leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x54769 movzbl %dil, %ecx xorl %eax, %eax cmpl $0x80, %ecx je 0x54769 cmpl $0xff, %ecx je 0x54769 movzbl 0x1(%rdx), %edx leal -0x7f(%rdx), %edi cmpb $-0x3f, %dil setb %dil cmpb $-0x1, %dl setge %r8b testb %dil, %r8b jne 0x54769 shll $0x8, %ecx leal (%rcx,%rdx), %eax addl $0xffff7ec0, %eax # imm = 0xFFFF7EC0 cmpl $0x7d10, %eax # imm = 0x7D10 jae 0x5475d movl %eax, %eax leaq 0x145ee9(%rip), %rcx # 0x19a630 movzwl (%rcx,%rax,2), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0x54769 jmp 0x54764 movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_gbk: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_54769 movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_546ED mov [rsi], rdi mov eax, 1 jmp short loc_54769 loc_546ED: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_54769 movzx ecx, dil xor eax, eax cmp ecx, 80h jz short loc_54769 cmp ecx, 0FFh jz short loc_54769 movzx edx, byte ptr [rdx+1] lea edi, [rdx-7Fh] cmp dil, 0C1h setb dil cmp dl, 0FFh setnl r8b test r8b, dil jnz short loc_54769 shl ecx, 8 lea eax, [rcx+rdx] add eax, 0FFFF7EC0h cmp eax, 7D10h jnb short loc_5475D mov eax, eax lea rcx, tab_gbk_uni0 movzx eax, word ptr [rcx+rax*2] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_54769 jmp short loc_54764 loc_5475D: mov qword ptr [rsi], 0 loc_54764: mov eax, 0FFFFFFFEh loc_54769: pop rbp retn
long long my_mb_wc_gbk(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // edx unsigned int v7; // eax long long v8; // 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 != 128 && (unsigned __int8)v5 != 255 ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 - 127) >= 0xC1u || (char)v6 < -1 ) { v7 = ((unsigned __int8)v5 << 8) + v6 - 33088; if ( v7 >= 0x7D10 ) { *a2 = 0LL; } else { v8 = tab_gbk_uni0[v7]; *a2 = v8; result = 2LL; if ( (_WORD)v8 ) return result; } return 4294967294LL; } } } } return result; }
my_mb_wc_gbk: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00154769 MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x001546ed MOV qword ptr [RSI],RDI MOV EAX,0x1 JMP 0x00154769 LAB_001546ed: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x00154769 MOVZX ECX,DIL XOR EAX,EAX CMP ECX,0x80 JZ 0x00154769 CMP ECX,0xff JZ 0x00154769 MOVZX EDX,byte ptr [RDX + 0x1] LEA EDI,[RDX + -0x7f] CMP DIL,0xc1 SETC DIL CMP DL,0xff SETGE R8B TEST R8B,DIL JNZ 0x00154769 SHL ECX,0x8 LEA EAX,[RCX + RDX*0x1] ADD EAX,0xffff7ec0 CMP EAX,0x7d10 JNC 0x0015475d MOV EAX,EAX LEA RCX,[0x29a630] MOVZX EAX,word ptr [RCX + RAX*0x2] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x00154769 JMP 0x00154764 LAB_0015475d: MOV qword ptr [RSI],0x0 LAB_00154764: MOV EAX,0xfffffffe LAB_00154769: POP RBP RET
int8 my_mb_wc_gbk(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; uint uVar4; int8 uVar5; uVar5 = 0xffffff9b; if (param_3 < param_4) { bVar1 = *param_3; if ((long)(char)bVar1 < 0) { uVar5 = 0xffffff9a; if ((((param_3 + 2 <= param_4) && (uVar5 = 0, bVar1 != 0x80)) && (bVar1 != 0xff)) && (bVar2 = param_3[1], (char)bVar2 < -1 || 0xc0 < (byte)(bVar2 + 0x81))) { uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8140; if (uVar4 < 0x7d10) { uVar3 = *(ushort *)(&tab_gbk_uni0 + (ulong)uVar4 * 2); *param_2 = (ulong)uVar3; if (uVar3 != 0) { return 2; } } else { *param_2 = 0; } uVar5 = 0xfffffffe; } } else { *param_2 = (long)(char)bVar1; uVar5 = 1; } } return uVar5; }
25,391
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 0xaa5a2 movsbq (%rdx), %rdi testq %rdi, %rdi js 0xaa56c movq %rdi, (%rsi) movl $0x1, %eax retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xaa5a2 leal 0x5f(%rdi), %ecx xorl %eax, %eax cmpb $0x58, %cl ja 0xaa5a2 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 0xaa5a3 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 0xaa5ca movl %edx, %eax leaq 0x385c8(%rip), %rcx # 0xe2b90 jmp 0xaa5e1 orl %ecx, %eax addl $0xffff36c0, %eax # imm = 0xFFFF36C0 cmpl $0x309d, %eax # imm = 0x309D jae 0xaa5fa movl %eax, %eax leaq 0x3d32f(%rip), %rcx # 0xe7910 leaq (%rcx,%rax,2), %rax movzwl (%rax), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0xaa606 jmp 0xaa601 movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_big5: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_AA5A2 movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_AA56C mov [rsi], rdi mov eax, 1 retn loc_AA56C: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short locret_AA5A2 lea ecx, [rdi+5Fh] xor eax, eax cmp cl, 58h ; 'X' ja short locret_AA5A2 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_AA5A3 locret_AA5A2: retn loc_AA5A3: push rbp mov rbp, rsp movzx eax, dil shl eax, 8 lea edx, [rax+rcx] add edx, 0FFFF5EC0h cmp edx, 26BCh ja short loc_AA5CA mov eax, edx lea rcx, tab_big5_uni0 jmp short loc_AA5E1 loc_AA5CA: or eax, ecx add eax, 0FFFF36C0h cmp eax, 309Dh jnb short loc_AA5FA mov eax, eax lea rcx, tab_big5_uni1 loc_AA5E1: 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_AA606 jmp short loc_AA601 loc_AA5FA: mov qword ptr [rsi], 0 loc_AA601: mov eax, 0FFFFFFFEh loc_AA606: 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 0x001aa5a2 MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x001aa56c MOV qword ptr [RSI],RDI MOV EAX,0x1 RET LAB_001aa56c: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001aa5a2 LEA ECX,[RDI + 0x5f] XOR EAX,EAX CMP CL,0x58 JA 0x001aa5a2 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 0x001aa5a3 LAB_001aa5a2: RET LAB_001aa5a3: PUSH RBP MOV RBP,RSP MOVZX EAX,DIL SHL EAX,0x8 LEA EDX,[RAX + RCX*0x1] ADD EDX,0xffff5ec0 CMP EDX,0x26bc JA 0x001aa5ca MOV EAX,EDX LEA RCX,[0x1e2b90] JMP 0x001aa5e1 LAB_001aa5ca: OR EAX,ECX ADD EAX,0xffff36c0 CMP EAX,0x309d JNC 0x001aa5fa MOV EAX,EAX LEA RCX,[0x1e7910] LAB_001aa5e1: 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 0x001aa606 JMP 0x001aa601 LAB_001aa5fa: MOV qword ptr [RSI],0x0 LAB_001aa601: MOV EAX,0xfffffffe LAB_001aa606: 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; }
25,392
ggml_are_same_layout(ggml_tensor const*, ggml_tensor const*)
monkey531[P]llama/ggml/src/ggml-backend.cpp
static bool ggml_are_same_layout(const struct ggml_tensor * a, const struct ggml_tensor * b) { if (a->type != b->type) { return false; } for (int i = 0; i < GGML_MAX_DIMS; i++) { if (a->ne[i] != b->ne[i]) { return false; } if (a->nb[i] != b->nb[i]) { return false; } } return true; }
O0
cpp
ggml_are_same_layout(ggml_tensor const*, ggml_tensor const*): movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movq -0x10(%rsp), %rax movl (%rax), %eax movq -0x18(%rsp), %rcx cmpl (%rcx), %eax je 0x5e6e1 movb $0x0, -0x1(%rsp) jmp 0x5e752 movl $0x0, -0x1c(%rsp) cmpl $0x4, -0x1c(%rsp) jge 0x5e74d movq -0x10(%rsp), %rax movslq -0x1c(%rsp), %rcx movq 0x10(%rax,%rcx,8), %rax movq -0x18(%rsp), %rcx movslq -0x1c(%rsp), %rdx cmpq 0x10(%rcx,%rdx,8), %rax je 0x5e717 movb $0x0, -0x1(%rsp) jmp 0x5e752 movq -0x10(%rsp), %rax movslq -0x1c(%rsp), %rcx movq 0x30(%rax,%rcx,8), %rax movq -0x18(%rsp), %rcx movslq -0x1c(%rsp), %rdx cmpq 0x30(%rcx,%rdx,8), %rax je 0x5e73e movb $0x0, -0x1(%rsp) jmp 0x5e752 jmp 0x5e740 movl -0x1c(%rsp), %eax addl $0x1, %eax movl %eax, -0x1c(%rsp) jmp 0x5e6e9 movb $0x1, -0x1(%rsp) movb -0x1(%rsp), %al andb $0x1, %al retq nopl (%rax)
_ZL20ggml_are_same_layoutPK11ggml_tensorS1_: mov [rsp+var_10], rdi mov [rsp+var_18], rsi mov rax, [rsp+var_10] mov eax, [rax] mov rcx, [rsp+var_18] cmp eax, [rcx] jz short loc_5E6E1 mov [rsp+var_1], 0 jmp short loc_5E752 loc_5E6E1: mov [rsp+var_1C], 0 loc_5E6E9: cmp [rsp+var_1C], 4 jge short loc_5E74D mov rax, [rsp+var_10] movsxd rcx, [rsp+var_1C] mov rax, [rax+rcx*8+10h] mov rcx, [rsp+var_18] movsxd rdx, [rsp+var_1C] cmp rax, [rcx+rdx*8+10h] jz short loc_5E717 mov [rsp+var_1], 0 jmp short loc_5E752 loc_5E717: mov rax, [rsp+var_10] movsxd rcx, [rsp+var_1C] mov rax, [rax+rcx*8+30h] mov rcx, [rsp+var_18] movsxd rdx, [rsp+var_1C] cmp rax, [rcx+rdx*8+30h] jz short loc_5E73E mov [rsp+var_1], 0 jmp short loc_5E752 loc_5E73E: jmp short $+2 loc_5E740: mov eax, [rsp+var_1C] add eax, 1 mov [rsp+var_1C], eax jmp short loc_5E6E9 loc_5E74D: mov [rsp+var_1], 1 loc_5E752: mov al, [rsp+var_1] and al, 1 retn
char ggml_are_same_layout(_DWORD *a1, _DWORD *a2) { int i; // [rsp+0h] [rbp-1Ch] if ( *a1 != *a2 ) return 0; for ( i = 0; i < 4; ++i ) { if ( *(_QWORD *)&a1[2 * i + 4] != *(_QWORD *)&a2[2 * i + 4] ) return 0; if ( *(_QWORD *)&a1[2 * i + 12] != *(_QWORD *)&a2[2 * i + 12] ) return 0; } return 1; }
ggml_are_same_layout: MOV qword ptr [RSP + -0x10],RDI MOV qword ptr [RSP + -0x18],RSI MOV RAX,qword ptr [RSP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RSP + -0x18] CMP EAX,dword ptr [RCX] JZ 0x0015e6e1 MOV byte ptr [RSP + -0x1],0x0 JMP 0x0015e752 LAB_0015e6e1: MOV dword ptr [RSP + -0x1c],0x0 LAB_0015e6e9: CMP dword ptr [RSP + -0x1c],0x4 JGE 0x0015e74d MOV RAX,qword ptr [RSP + -0x10] MOVSXD RCX,dword ptr [RSP + -0x1c] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x10] MOV RCX,qword ptr [RSP + -0x18] MOVSXD RDX,dword ptr [RSP + -0x1c] CMP RAX,qword ptr [RCX + RDX*0x8 + 0x10] JZ 0x0015e717 MOV byte ptr [RSP + -0x1],0x0 JMP 0x0015e752 LAB_0015e717: MOV RAX,qword ptr [RSP + -0x10] MOVSXD RCX,dword ptr [RSP + -0x1c] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x30] MOV RCX,qword ptr [RSP + -0x18] MOVSXD RDX,dword ptr [RSP + -0x1c] CMP RAX,qword ptr [RCX + RDX*0x8 + 0x30] JZ 0x0015e73e MOV byte ptr [RSP + -0x1],0x0 JMP 0x0015e752 LAB_0015e73e: JMP 0x0015e740 LAB_0015e740: MOV EAX,dword ptr [RSP + -0x1c] ADD EAX,0x1 MOV dword ptr [RSP + -0x1c],EAX JMP 0x0015e6e9 LAB_0015e74d: MOV byte ptr [RSP + -0x1],0x1 LAB_0015e752: MOV AL,byte ptr [RSP + -0x1] AND AL,0x1 RET
/* ggml_are_same_layout(ggml_tensor const*, ggml_tensor const*) */ int8 ggml_are_same_layout(ggml_tensor *param_1,ggml_tensor *param_2) { ulong uVar1; uint local_1c; int1 local_1; uVar1 = (ulong)*(uint *)param_1; if (*(uint *)param_1 == *(uint *)param_2) { local_1c = 0; while ((int)local_1c < 4) { uVar1 = *(ulong *)(param_1 + (long)(int)local_1c * 8 + 0x10); if (uVar1 != *(ulong *)(param_2 + (long)(int)local_1c * 8 + 0x10)) { local_1 = 0; goto LAB_0015e752; } uVar1 = *(ulong *)(param_1 + (long)(int)local_1c * 8 + 0x30); if (uVar1 != *(ulong *)(param_2 + (long)(int)local_1c * 8 + 0x30)) { local_1 = 0; goto LAB_0015e752; } local_1c = local_1c + 1; uVar1 = (ulong)local_1c; } local_1 = 1; } else { local_1 = 0; } LAB_0015e752: return CONCAT71((int7)(uVar1 >> 8),local_1); }
25,393
string_format[abi:cxx11](char const*, ...)
monkey531[P]llama/common/common.cpp
std::string string_format(const char * fmt, ...) { va_list ap; va_list ap2; va_start(ap, fmt); va_copy(ap2, ap); int size = vsnprintf(NULL, 0, fmt, ap); GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT std::vector<char> buf(size + 1); int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2); GGML_ASSERT(size2 == size); va_end(ap2); va_end(ap); return std::string(buf.data(), size); }
O1
cpp
string_format[abi:cxx11](char const*, ...): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x766b4 movaps %xmm0, 0x90(%rsp) movaps %xmm1, 0xa0(%rsp) movaps %xmm2, 0xb0(%rsp) movaps %xmm3, 0xc0(%rsp) movaps %xmm4, 0xd0(%rsp) movaps %xmm5, 0xe0(%rsp) movaps %xmm6, 0xf0(%rsp) movaps %xmm7, 0x100(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 leaq 0x40(%rsp), %rcx movq %rax, (%rcx) leaq 0x140(%rsp), %rax movq %rax, 0x8(%rcx) movq %rsi, 0x10(%rcx) movq %rsi, 0x30(%rsp) movq (%rcx), %rax movq %rax, 0x20(%rsp) movq 0x8(%rcx), %rax movq %rax, 0x28(%rsp) xorl %edi, %edi xorl %esi, %esi movq %r14, %rdx callq 0x1c228 cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF jae 0x76779 movl %eax, %r15d leal 0x1(%r15), %r12d leaq 0x8(%rsp), %r13 leaq 0x7(%rsp), %rdx movq %r13, %rdi movq %r12, %rsi callq 0x7d878 movq (%r13), %rdi leaq 0x20(%rsp), %rcx movq %r12, %rsi movq %r14, %rdx callq 0x1c228 cmpl %r15d, %eax jne 0x7679a movq 0x8(%rsp), %rsi movl %r15d, %edx leaq 0x10(%rbx), %rax movq %rax, (%rbx) addq %rsi, %rdx movq %rbx, %rdi callq 0x25e9c movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x76765 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x1b940 movq %rbx, %rax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x7f935(%rip), %rdi # 0xf60b5 leaq 0x76e04(%rip), %rdx # 0xed58b leaq 0x7f973(%rip), %rcx # 0xf6101 movl $0x1b2, %esi # imm = 0x1B2 xorl %eax, %eax callq 0x1bf20 leaq 0x7f914(%rip), %rdi # 0xf60b5 leaq 0x76de3(%rip), %rdx # 0xed58b leaq 0x7f96e(%rip), %rcx # 0xf611d movl $0x1b5, %esi # imm = 0x1B5 xorl %eax, %eax callq 0x1bf20 jmp 0x767bd movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x767d7 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x1b940 movq %rbx, %rdi callq 0x1c040
_Z13string_formatB5cxx11PKcz: push r15 push r14 push r13 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi lea rsi, [rsp+138h+var_D8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_766B4 movaps [rsp+138h+var_A8], xmm0 movaps [rsp+138h+var_98], xmm1 movaps [rsp+138h+var_88], xmm2 movaps [rsp+138h+var_78], xmm3 movaps [rsp+138h+var_68], xmm4 movaps [rsp+138h+var_58], xmm5 movaps [rsp+138h+var_48], xmm6 movaps [rsp+138h+var_38], xmm7 loc_766B4: mov rax, 3000000010h lea rcx, [rsp+138h+var_F8] mov [rcx], rax lea rax, [rsp+138h+arg_0] mov [rcx+8], rax mov [rcx+10h], rsi mov [rsp+138h+var_108], rsi mov rax, [rcx] mov [rsp+138h+var_118], rax mov rax, [rcx+8] mov [rsp+138h+var_110], rax xor edi, edi xor esi, esi mov rdx, r14 call vsnprintf cmp eax, 7FFFFFFFh jnb short loc_76779 mov r15d, eax lea r12d, [r15+1] lea r13, [rsp+138h+var_130] lea rdx, [rsp+138h+var_131] mov rdi, r13 mov rsi, r12 call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&) mov rdi, [r13+0] lea rcx, [rsp+138h+var_118] mov rsi, r12 mov rdx, r14 call vsnprintf cmp eax, r15d jnz short loc_7679A mov rsi, [rsp+138h+var_130] mov edx, r15d lea rax, [rbx+10h] mov [rbx], rax add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, [rsp+138h+var_130]; void * test rdi, rdi jz short loc_76765 mov rsi, [rsp+138h+var_120] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76765: mov rax, rbx add rsp, 110h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_76779: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize0SizeIntMa; "size >= 0 && size < INT_MAX" mov esi, 1B2h xor eax, eax call _ggml_abort loc_7679A: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize2Size; "size2 == size" mov esi, 1B5h xor eax, eax call _ggml_abort jmp short $+2 loc_767BD: mov rbx, rax mov rdi, [rsp+138h+var_130]; void * test rdi, rdi jz short loc_767D7 mov rsi, [rsp+138h+var_120] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_767D7: mov rdi, rbx call __Unwind_Resume
_QWORD * string_format[abi:cxx11]( _QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { unsigned int v15; // eax unsigned int v16; // r15d long long v17; // r12 _BYTE *v18; // rsi long long v20; // rbx char v21; // [rsp+7h] [rbp-131h] BYREF void *v22; // [rsp+8h] [rbp-130h] BYREF long long v23; // [rsp+18h] [rbp-120h] _QWORD v24[4]; // [rsp+20h] [rbp-118h] BYREF _QWORD v25[4]; // [rsp+40h] [rbp-F8h] BYREF _BYTE v26[16]; // [rsp+60h] [rbp-D8h] BYREF long long v27; // [rsp+70h] [rbp-C8h] long long v28; // [rsp+78h] [rbp-C0h] long long v29; // [rsp+80h] [rbp-B8h] long long v30; // [rsp+88h] [rbp-B0h] __m128 v31; // [rsp+90h] [rbp-A8h] __m128 v32; // [rsp+A0h] [rbp-98h] __m128 v33; // [rsp+B0h] [rbp-88h] __m128 v34; // [rsp+C0h] [rbp-78h] __m128 v35; // [rsp+D0h] [rbp-68h] __m128 v36; // [rsp+E0h] [rbp-58h] __m128 v37; // [rsp+F0h] [rbp-48h] __m128 v38; // [rsp+100h] [rbp-38h] v31 = a7; v32 = a8; v33 = a9; v34 = a10; v35 = a11; v36 = a12; v37 = a13; v38 = a14; v27 = a3; v28 = a4; v29 = a5; v30 = a6; v25[0] = 0x3000000010LL; v25[1] = &a15; v25[2] = v26; v24[2] = v26; v24[0] = 0x3000000010LL; v24[1] = &a15; v15 = vsnprintf(0LL, 0LL, a2, v25); if ( v15 >= 0x7FFFFFFF ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 434LL, "GGML_ASSERT(%s) failed", "size >= 0 && size < INT_MAX"); LABEL_7: v20 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 437LL, "GGML_ASSERT(%s) failed", "size2 == size"); if ( v22 ) operator delete(v22, v23 - (_QWORD)v22); _Unwind_Resume(v20); } v16 = v15; v17 = v15 + 1; std::vector<char>::vector(&v22, v17, &v21); if ( (unsigned int)vsnprintf(v22, v17, a2, v24) != v16 ) goto LABEL_7; v18 = v22; *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, v18, (long long)&v18[v16]); if ( v22 ) operator delete(v22, v23 - (_QWORD)v22); return a1; }
string_format[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI LEA RSI,[RSP + 0x60] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x001766b4 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM1 MOVAPS xmmword ptr [RSP + 0xb0],XMM2 MOVAPS xmmword ptr [RSP + 0xc0],XMM3 MOVAPS xmmword ptr [RSP + 0xd0],XMM4 MOVAPS xmmword ptr [RSP + 0xe0],XMM5 MOVAPS xmmword ptr [RSP + 0xf0],XMM6 MOVAPS xmmword ptr [RSP + 0x100],XMM7 LAB_001766b4: MOV RAX,0x3000000010 LEA RCX,[RSP + 0x40] MOV qword ptr [RCX],RAX LEA RAX,[RSP + 0x140] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RCX + 0x10],RSI MOV qword ptr [RSP + 0x30],RSI MOV RAX,qword ptr [RCX] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0x28],RAX XOR EDI,EDI XOR ESI,ESI MOV RDX,R14 CALL 0x0011c228 CMP EAX,0x7fffffff JNC 0x00176779 MOV R15D,EAX LEA R12D,[R15 + 0x1] LEA R13,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R13 MOV RSI,R12 CALL 0x0017d878 MOV RDI,qword ptr [R13] LEA RCX,[RSP + 0x20] MOV RSI,R12 MOV RDX,R14 CALL 0x0011c228 CMP EAX,R15D JNZ 0x0017679a MOV RSI,qword ptr [RSP + 0x8] MOV EDX,R15D LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX ADD RDX,RSI LAB_00176746: MOV RDI,RBX CALL 0x00125e9c LAB_0017674e: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00176765 MOV RSI,qword ptr [RSP + 0x18] SUB RSI,RDI CALL 0x0011b940 LAB_00176765: MOV RAX,RBX ADD RSP,0x110 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00176779: LEA RDI,[0x1f60b5] LEA RDX,[0x1ed58b] LEA RCX,[0x1f6101] MOV ESI,0x1b2 XOR EAX,EAX CALL 0x0011bf20 LAB_0017679a: LEA RDI,[0x1f60b5] LEA RDX,[0x1ed58b] LEA RCX,[0x1f611d] MOV ESI,0x1b5 XOR EAX,EAX CALL 0x0011bf20
/* string_format[abi:cxx11](char const*, ...) */ char * string_format_abi_cxx11_(char *param_1,...) { char in_AL; uint uVar1; uint uVar2; int8 in_RCX; int8 in_RDX; char *in_RSI; int8 in_R8; int8 in_R9; int8 in_XMM0_Qa; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; char *local_130 [2]; long local_120; int8 local_118; int1 *local_110; int1 *local_108; int8 local_f8; int1 *local_f0; int1 *local_e8; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; local_108 = local_d8; if (in_AL != '\0') { local_a8 = in_XMM0_Qa; local_98 = in_XMM1_Qa; local_88 = in_XMM2_Qa; local_78 = in_XMM3_Qa; local_68 = in_XMM4_Qa; local_58 = in_XMM5_Qa; local_48 = in_XMM6_Qa; local_38 = in_XMM7_Qa; } local_f8 = 0x3000000010; local_110 = &stack0x00000008; local_118 = 0x3000000010; local_f0 = local_110; local_e8 = local_108; local_c8 = in_RDX; local_c0 = in_RCX; local_b8 = in_R8; local_b0 = in_R9; uVar1 = vsnprintf((char *)0x0,0,in_RSI,&local_f8); if (uVar1 < 0x7fffffff) { std::vector<char,std::allocator<char>>::vector((ulong)local_130,(allocator *)(ulong)(uVar1 + 1)) ; uVar2 = vsnprintf(local_130[0],(size_t)(ulong)(uVar1 + 1),in_RSI,&local_118); if (uVar2 == uVar1) { *(char **)param_1 = param_1 + 0x10; /* try { // try from 00176746 to 0017674d has its CatchHandler @ 001767bb */ std::__cxx11::string::_M_construct<char_const*>(param_1,local_130[0],local_130[0] + uVar1); if (local_130[0] != (char *)0x0) { operator_delete(local_130[0],local_120 - (long)local_130[0]); } return param_1; } /* try { // try from 0017679a to 001767ba has its CatchHandler @ 001767bd */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x1b5, "GGML_ASSERT(%s) failed","size2 == size"); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x1b2, "GGML_ASSERT(%s) failed","size >= 0 && size < INT_MAX"); }
25,394
ma_crypt_read
eloqsql/storage/maria/ma_crypt.c
uchar* ma_crypt_read(MARIA_SHARE* share, uchar *buff) { uchar type= buff[0]; uchar iv_length= buff[1]; /* currently only supported type */ if (type != CRYPT_SCHEME_1 || iv_length != sizeof(((MARIA_CRYPT_DATA*)1)->scheme.iv) + 4) { my_printf_error(HA_ERR_UNSUPPORTED, "Unsupported crypt scheme! type: %d iv_length: %d\n", MYF(ME_FATAL|ME_ERROR_LOG), type, iv_length); return 0; } if (share->crypt_data == NULL) { /* opening a table */ MARIA_CRYPT_DATA *crypt_data= (MARIA_CRYPT_DATA*)my_malloc(PSI_INSTRUMENT_ME, sizeof(MARIA_CRYPT_DATA), MYF(MY_ZEROFILL)); crypt_data->scheme.type= type; mysql_mutex_init(key_CRYPT_DATA_lock, &crypt_data->lock, MY_MUTEX_INIT_FAST); crypt_data->scheme.locker= crypt_data_scheme_locker; crypt_data->scheme.key_id= get_encryption_key_id(share); crypt_data->space= uint4korr(buff + 2); memcpy(crypt_data->scheme.iv, buff + 6, sizeof(crypt_data->scheme.iv)); share->crypt_data= crypt_data; } share->crypt_page_header_space= CRYPT_SCHEME_1_KEY_VERSION_SIZE; return buff + 2 + iv_length; }
O3
c
ma_crypt_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movzbl (%rsi), %ecx movb 0x1(%rsi), %al movl %ecx, %edx xorb $0x1, %dl movl %eax, %esi xorb $0x14, %sil orb %dl, %sil je 0x67080 movzbl %al, %r8d leaq 0x7371a(%rip), %rsi # 0xda782 xorl %ebx, %ebx movl $0x1040, %edx # imm = 0x1040 movl $0x8a, %edi xorl %eax, %eax callq 0x9e0dd jmp 0x6714b movq %rdi, %r14 cmpq $0x0, 0xc20(%rdi) jne 0x6713c movl $0xb0, %esi movl $0x20, %edx xorl %edi, %edi callq 0x9fd41 movq %rax, %r15 movl $0x1, 0x54(%rax) movl 0xb982a6(%rip), %edi # 0xbff358 leaq 0x68(%rax), %r12 leaq 0x31ef53(%rip), %rax # 0x386010 movq (%rax), %rax movq %r12, %rsi callq *0x40(%rax) movq %rax, 0xa8(%r15) movq %r12, 0xa0(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x90(%r15) leaq 0xba148a(%rip), %rsi # 0xc08570 movq %r12, %rdi callq 0x29320 leaq -0x244(%rip), %rax # 0x66eb1 movq %rax, 0x58(%r15) testb $0x10, 0x720(%r14) je 0x6711c leaq 0x31cf06(%rip), %rax # 0x384010 movl $0x2, %r12d movl $0x2, %edi callq *(%rax) cmpl $-0x1, %eax jne 0x67122 movl $0x1, %r12d movl %r12d, 0x50(%r15) movl 0x2(%rbx), %eax movl %eax, 0x60(%r15) movups 0x6(%rbx), %xmm0 movups %xmm0, (%r15) movq %r15, 0xc20(%r14) movl $0x4, 0xc18(%r14) addq $0x16, %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
ma_crypt_read: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi movzx ecx, byte ptr [rsi] mov al, [rsi+1] mov edx, ecx xor dl, 1 mov esi, eax xor sil, 14h or sil, dl jz short loc_67080 movzx r8d, al lea rsi, aUnsupportedCry; "Unsupported crypt scheme! type: %d iv_l"... xor ebx, ebx mov edx, 1040h mov edi, 8Ah xor eax, eax call my_printf_error jmp loc_6714B loc_67080: mov r14, rdi cmp qword ptr [rdi+0C20h], 0 jnz loc_6713C mov esi, 0B0h mov edx, 20h ; ' ' xor edi, edi call my_malloc mov r15, rax mov dword ptr [rax+54h], 1 mov edi, cs:key_CRYPT_DATA_lock lea r12, [rax+68h] lea rax, PSI_server mov rax, [rax] mov rsi, r12 call qword ptr [rax+40h] mov [r15+0A8h], rax mov [r15+0A0h], r12 xorps xmm0, xmm0 movups xmmword ptr [r15+90h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r12 call _pthread_mutex_init lea rax, crypt_data_scheme_locker mov [r15+58h], rax test byte ptr [r14+720h], 10h jz short loc_6711C lea rax, encryption_handler mov r12d, 2 mov edi, 2 call qword ptr [rax] cmp eax, 0FFFFFFFFh jnz short loc_67122 loc_6711C: mov r12d, 1 loc_67122: mov [r15+50h], r12d mov eax, [rbx+2] mov [r15+60h], eax movups xmm0, xmmword ptr [rbx+6] movups xmmword ptr [r15], xmm0 mov [r14+0C20h], r15 loc_6713C: mov dword ptr [r14+0C18h], 4 add rbx, 16h loc_6714B: mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
unsigned __int8 * ma_crypt_read(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5, int a6) { unsigned __int8 v6; // al long long v7; // rbx long long v8; // r15 int v9; // r12d v6 = a2[1]; if ( *a2 ^ 1 | v6 ^ 0x14 ) { v7 = 0LL; my_printf_error(138, (unsigned int)"Unsupported crypt scheme! type: %d iv_length: %d\n", 4160, *a2, v6, a6); } else { if ( !*(_QWORD *)(a1 + 3104) ) { v8 = my_malloc(0LL, 176LL, 32LL); *(_DWORD *)(v8 + 84) = 1; *(_QWORD *)(v8 + 168) = ((long long ( *)(_QWORD, long long))PSI_server[8])( (unsigned int)key_CRYPT_DATA_lock, v8 + 104); *(_QWORD *)(v8 + 160) = v8 + 104; *(_OWORD *)(v8 + 144) = 0LL; pthread_mutex_init(v8 + 104, &my_fast_mutexattr); *(_QWORD *)(v8 + 88) = crypt_data_scheme_locker; if ( (*(_BYTE *)(a1 + 1824) & 0x10) == 0 || (v9 = 2, (unsigned int)encryption_handler() == -1) ) v9 = 1; *(_DWORD *)(v8 + 80) = v9; *(_DWORD *)(v8 + 96) = *(_DWORD *)(a2 + 2); *(_OWORD *)v8 = *(_OWORD *)(a2 + 6); *(_QWORD *)(a1 + 3104) = v8; } *(_DWORD *)(a1 + 3096) = 4; return a2 + 22; } return (unsigned __int8 *)v7; }
ma_crypt_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOVZX ECX,byte ptr [RSI] MOV AL,byte ptr [RSI + 0x1] MOV EDX,ECX XOR DL,0x1 MOV ESI,EAX XOR SIL,0x14 OR SIL,DL JZ 0x00167080 MOVZX R8D,AL LEA RSI,[0x1da782] XOR EBX,EBX MOV EDX,0x1040 MOV EDI,0x8a XOR EAX,EAX CALL 0x0019e0dd JMP 0x0016714b LAB_00167080: MOV R14,RDI CMP qword ptr [RDI + 0xc20],0x0 JNZ 0x0016713c MOV ESI,0xb0 MOV EDX,0x20 XOR EDI,EDI CALL 0x0019fd41 MOV R15,RAX MOV dword ptr [RAX + 0x54],0x1 MOV EDI,dword ptr [0x00cff358] LEA R12,[RAX + 0x68] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RSI,R12 CALL qword ptr [RAX + 0x40] MOV qword ptr [R15 + 0xa8],RAX MOV qword ptr [R15 + 0xa0],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x90],XMM0 LEA RSI,[0xd08570] MOV RDI,R12 CALL 0x00129320 LEA RAX,[0x166eb1] MOV qword ptr [R15 + 0x58],RAX TEST byte ptr [R14 + 0x720],0x10 JZ 0x0016711c LEA RAX,[0x484010] MOV R12D,0x2 MOV EDI,0x2 CALL qword ptr [RAX] CMP EAX,-0x1 JNZ 0x00167122 LAB_0016711c: MOV R12D,0x1 LAB_00167122: MOV dword ptr [R15 + 0x50],R12D MOV EAX,dword ptr [RBX + 0x2] MOV dword ptr [R15 + 0x60],EAX MOVUPS XMM0,xmmword ptr [RBX + 0x6] MOVUPS xmmword ptr [R15],XMM0 MOV qword ptr [R14 + 0xc20],R15 LAB_0016713c: MOV dword ptr [R14 + 0xc18],0x4 ADD RBX,0x16 LAB_0016714b: MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
char * ma_crypt_read(long param_1,char *param_2) { pthread_mutex_t *__mutex; int iVar1; int8 *puVar2; int8 uVar3; int4 uVar4; if (param_2[1] != '\x14' || *param_2 != '\x01') { my_printf_error(0x8a,"Unsupported crypt scheme! type: %d iv_length: %d\n",0x1040,*param_2, param_2[1]); return (char *)0x0; } if (*(long *)(param_1 + 0xc20) != 0) goto LAB_0016713c; puVar2 = (int8 *)my_malloc(0,0xb0,0x20); *(int4 *)((long)puVar2 + 0x54) = 1; __mutex = (pthread_mutex_t *)(puVar2 + 0xd); uVar3 = (**(code **)(PSI_server + 0x40))(key_CRYPT_DATA_lock,__mutex); puVar2[0x15] = uVar3; puVar2[0x14] = __mutex; puVar2[0x12] = 0; puVar2[0x13] = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); puVar2[0xb] = crypt_data_scheme_locker; if ((*(byte *)(param_1 + 0x720) & 0x10) == 0) { LAB_0016711c: uVar4 = 1; } else { uVar4 = 2; iVar1 = (*(code *)encryption_handler)(2); if (iVar1 == -1) goto LAB_0016711c; } *(int4 *)(puVar2 + 10) = uVar4; *(int4 *)(puVar2 + 0xc) = *(int4 *)(param_2 + 2); uVar3 = *(int8 *)(param_2 + 0xe); *puVar2 = *(int8 *)(param_2 + 6); puVar2[1] = uVar3; *(int8 **)(param_1 + 0xc20) = puVar2; LAB_0016713c: *(int4 *)(param_1 + 0xc18) = 4; return param_2 + 0x16; }
25,395
js_free_port
bluesky950520[P]quickjs/quickjs-libc.c
static void js_free_port(JSRuntime *rt, JSWorkerMessageHandler *port) { if (port) { js_free_message_pipe(port->recv_pipe); JS_FreeValueRT(rt, port->on_message_func); list_del(&port->link); js_free_rt(rt, port); } }
O1
c
js_free_port: testq %rsi, %rsi je 0x1823a pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x10(%rsi), %rdi callq 0x153d7 movq 0x18(%rbx), %rsi movq 0x20(%rbx), %rdx movq %r14, %rdi callq 0x1d8c6 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1ca84 retq
js_free_port: test rsi, rsi jz short locret_1823A push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, [rsi+10h] call js_free_message_pipe mov rsi, [rbx+18h] mov rdx, [rbx+20h] mov rdi, r14 call JS_FreeValueRT mov rax, [rbx] mov rcx, [rbx+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt locret_1823A: retn
long long js_free_port(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx long long result; // rax if ( a2 ) { js_free_message_pipe(a2[2]); JS_FreeValueRT(a1, a2[3]); v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; return js_free_rt(a1, a2); } return result; }
25,396
js_free_port
bluesky950520[P]quickjs/quickjs-libc.c
static void js_free_port(JSRuntime *rt, JSWorkerMessageHandler *port) { if (port) { js_free_message_pipe(port->recv_pipe); JS_FreeValueRT(rt, port->on_message_func); list_del(&port->link); js_free_rt(rt, port); } }
O2
c
js_free_port: testq %rsi, %rsi je 0x12f2d pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x10(%rsi), %rdi callq 0x10360 movq 0x18(%rbx), %rsi movq 0x20(%rbx), %rdx movq %r14, %rdi callq 0x18031 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x170cb retq
js_free_port: test rsi, rsi jz short locret_12F2D push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, [rsi+10h] call js_free_message_pipe mov rsi, [rbx+18h] mov rdx, [rbx+20h] mov rdi, r14 call JS_FreeValueRT mov rax, [rbx] mov rcx, [rbx+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt locret_12F2D: retn
long long js_free_port(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx long long result; // rax if ( a2 ) { js_free_message_pipe(a2[2]); JS_FreeValueRT(a1, a2[3], a2[4]); v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; return js_free_rt(a1, a2); } return result; }
js_free_port: TEST RSI,RSI JZ 0x00112f2d PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RSI + 0x10] CALL 0x00110360 MOV RSI,qword ptr [RBX + 0x18] MOV RDX,qword ptr [RBX + 0x20] MOV RDI,R14 CALL 0x00118031 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001170cb LAB_00112f2d: RET
void js_free_port(int8 param_1,long *param_2) { long lVar1; long *plVar2; if (param_2 != (long *)0x0) { js_free_message_pipe(param_2[2]); JS_FreeValueRT(param_1,param_2[3],param_2[4]); lVar1 = *param_2; plVar2 = (long *)param_2[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_2 = 0; param_2[1] = 0; js_free_rt(param_1,param_2); return; } return; }
25,397
my_casedn_str_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->casedn_multiply == 1); while (*src && (srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0) { my_tolower_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } /* In rare cases lower string can be shorter than the original string, for example: "U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE" (which is 0xC4B0 in utf8mb3, i.e. two bytes) is converted into "U+0069 LATIN SMALL LETTER I" (which is 0x69 in utf8mb3, i.e. one byte) So, we need to put '\0' terminator after converting. */ *dst= '\0'; return (size_t) (dst - dst0); }
O0
c
my_casedn_str_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x38(%rbp) jmp 0xc3fbe jmp 0xc3fc0 movq -0x10(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x39(%rbp) je 0xc3fee movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq -0x18(%rbp), %rsi callq 0xc4d50 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0xc3ff7 jmp 0xc4046 movq -0x38(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0xc5010 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0xc4f10 movl %eax, -0x20(%rbp) cmpl $0x0, %eax jg 0xc401f jmp 0xc4046 movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0xc3fc0 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nop
my_casedn_str_utf8mb3: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_38], rax jmp short $+2 loc_C3FBE: jmp short $+2 loc_C3FC0: mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_39], al jz short loc_C3FEE mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, [rbp+var_18] call my_utf8mb3_uni_no_range mov [rbp+var_1C], eax cmp eax, 0 setnle al mov [rbp+var_39], al loc_C3FEE: mov al, [rbp+var_39] test al, 1 jnz short loc_C3FF7 jmp short loc_C4046 loc_C3FF7: mov rdi, [rbp+var_38] lea rsi, [rbp+var_18] call my_tolower_utf8mb3 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call my_uni_utf8mb3_no_range mov [rbp+var_20], eax cmp eax, 0 jg short loc_C401F jmp short loc_C4046 loc_C401F: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_20] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_C3FC0 loc_C4046: mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_30] sub rax, rcx add rsp, 40h pop rbp retn
_BYTE * my_casedn_str_utf8mb3(long long a1, _BYTE *a2) { bool v3; // [rsp+7h] [rbp-39h] long long v4; // [rsp+8h] [rbp-38h] _BYTE *v5; // [rsp+18h] [rbp-28h] int v6; // [rsp+20h] [rbp-20h] int v7; // [rsp+24h] [rbp-1Ch] long long v8; // [rsp+28h] [rbp-18h] BYREF _BYTE *v9; // [rsp+30h] [rbp-10h] long long v10; // [rsp+38h] [rbp-8h] v10 = a1; v9 = a2; v5 = a2; v4 = *(_QWORD *)(a1 + 120); while ( 1 ) { v3 = 0; if ( *v9 ) { v7 = my_utf8mb3_uni_no_range(v10, &v8, v9); v3 = v7 > 0; } if ( !v3 ) break; my_tolower_utf8mb3(v4, &v8); v6 = my_uni_utf8mb3_no_range(v10, v8, v5); if ( v6 <= 0 ) break; v9 += v7; v5 += v6; } *v5 = 0; return (_BYTE *)(v5 - a2); }
my_casedn_str_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x38],RAX JMP 0x001c3fbe LAB_001c3fbe: JMP 0x001c3fc0 LAB_001c3fc0: MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x39],AL JZ 0x001c3fee MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x18] CALL 0x001c4d50 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x39],AL LAB_001c3fee: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x001c3ff7 JMP 0x001c4046 LAB_001c3ff7: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x18] CALL 0x001c5010 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001c4f10 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JG 0x001c401f JMP 0x001c4046 LAB_001c401f: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x001c3fc0 LAB_001c4046: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
long my_casedn_str_utf8mb3(long param_1,char *param_2) { int8 uVar1; bool bVar2; int iVar3; char *local_30; int local_24; int8 local_20; char *local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_2; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (*local_18 != '\0') { local_24 = my_utf8mb3_uni_no_range(local_10,&local_20,local_18); bVar2 = 0 < local_24; } if (!bVar2) break; my_tolower_utf8mb3(uVar1,&local_20); iVar3 = my_uni_utf8mb3_no_range(local_10,local_20,local_30); if (iVar3 < 1) break; local_18 = local_18 + local_24; local_30 = local_30 + iVar3; } *local_30 = '\0'; return (long)local_30 - (long)param_2; }
25,398
my_casedn_str_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->casedn_multiply == 1); while (*src && (srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0) { my_tolower_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } /* In rare cases lower string can be shorter than the original string, for example: "U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE" (which is 0xC4B0 in utf8mb3, i.e. two bytes) is converted into "U+0069 LATIN SMALL LETTER I" (which is 0x69 in utf8mb3, i.e. one byte) So, we need to put '\0' terminator after converting. */ *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_casedn_str_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0x842b6 movq 0x78(%rdi), %r13 leaq -0x30(%rbp), %r15 movq %rbx, %r12 movq %rbx, %r14 movq %r15, %rdi movq %r12, %rsi callq 0x84aa4 testl %eax, %eax je 0x842b6 movq 0x8(%r13), %rdx movq -0x30(%rbp), %rcx movzbl %ch, %esi movq (%rdx,%rsi,8), %rdx testq %rdx, %rdx je 0x84245 movzbl %cl, %ecx leaq (%rcx,%rcx,2), %rcx movl 0x4(%rdx,%rcx,4), %ecx movq %rcx, -0x30(%rbp) movl $0x1, %edx cmpq $0x80, %rcx jb 0x8429f movl $0x2, %edx cmpq $0x800, %rcx # imm = 0x800 jb 0x84286 cmpq $0xffff, %rcx # imm = 0xFFFF ja 0x842b6 movl %ecx, %edx andb $0x3f, %dl orb $-0x80, %dl movb %dl, 0x2(%r14) shrq $0x6, %rcx orq $0x800, %rcx # imm = 0x800 movl $0x3, %edx movl %ecx, %esi andb $0x3f, %sil orb $-0x80, %sil movb %sil, 0x1(%r14) shrq $0x6, %rcx orq $0xc0, %rcx movb %cl, (%r14) movl %eax, %eax addq %rdx, %r14 cmpb $0x0, (%r12,%rax) leaq (%r12,%rax), %r12 jne 0x8420f movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casedn_str_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz loc_842B6 mov r13, [rdi+78h] lea r15, [rbp+var_30] mov r12, rbx mov r14, rbx loc_8420F: mov rdi, r15 mov rsi, r12 call my_utf8mb3_uni_no_range test eax, eax jz loc_842B6 mov rdx, [r13+8] mov rcx, [rbp+var_30] movzx esi, ch mov rdx, [rdx+rsi*8] test rdx, rdx jz short loc_84245 movzx ecx, cl lea rcx, [rcx+rcx*2] mov ecx, [rdx+rcx*4+4] mov [rbp+var_30], rcx loc_84245: mov edx, 1 cmp rcx, 80h jb short loc_8429F mov edx, 2 cmp rcx, 800h jb short loc_84286 cmp rcx, 0FFFFh ja short loc_842B6 mov edx, ecx and dl, 3Fh or dl, 80h mov [r14+2], dl shr rcx, 6 or rcx, 800h mov edx, 3 loc_84286: mov esi, ecx and sil, 3Fh or sil, 80h mov [r14+1], sil shr rcx, 6 or rcx, 0C0h loc_8429F: mov [r14], cl mov eax, eax add r14, rdx cmp byte ptr [r12+rax], 0 lea r12, [r12+rax] jnz loc_8420F loc_842B6: mov byte ptr [r14], 0 sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_casedn_str_utf8mb3(long long a1, _BYTE *a2) { unsigned long long v2; // rax _BYTE *v3; // r14 long long v4; // r13 _BYTE *v5; // r12 unsigned int v6; // eax unsigned long long v7; // rcx long long v8; // rdx long long v9; // rdx bool v10; // zf unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF v12 = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD *)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_utf8mb3_uni_no_range(&v12, v5); if ( !v6 ) break; v7 = v12; v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12)); if ( v8 ) { v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12 + 4); v12 = v7; } v9 = 1LL; if ( v7 >= 0x80 ) { v9 = 2LL; if ( v7 >= 0x800 ) { if ( v7 > 0xFFFF ) break; v3[2] = v7 & 0x3F | 0x80; v7 = (v7 >> 6) | 0x800; v9 = 3LL; } v3[1] = v7 & 0x3F | 0x80; v7 = (v7 >> 6) | 0xC0; } *v3 = v7; v3 += v9; v10 = v5[v6] == 0; v5 += v6; } while ( !v10 ); } *v3 = 0; return v3 - a2; }
my_casedn_str_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x001842b6 MOV R13,qword ptr [RDI + 0x78] LEA R15,[RBP + -0x30] MOV R12,RBX MOV R14,RBX LAB_0018420f: MOV RDI,R15 MOV RSI,R12 CALL 0x00184aa4 TEST EAX,EAX JZ 0x001842b6 MOV RDX,qword ptr [R13 + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOVZX ESI,CH MOV RDX,qword ptr [RDX + RSI*0x8] TEST RDX,RDX JZ 0x00184245 MOVZX ECX,CL LEA RCX,[RCX + RCX*0x2] MOV ECX,dword ptr [RDX + RCX*0x4 + 0x4] MOV qword ptr [RBP + -0x30],RCX LAB_00184245: MOV EDX,0x1 CMP RCX,0x80 JC 0x0018429f MOV EDX,0x2 CMP RCX,0x800 JC 0x00184286 CMP RCX,0xffff JA 0x001842b6 MOV EDX,ECX AND DL,0x3f OR DL,0x80 MOV byte ptr [R14 + 0x2],DL SHR RCX,0x6 OR RCX,0x800 MOV EDX,0x3 LAB_00184286: MOV ESI,ECX AND SIL,0x3f OR SIL,0x80 MOV byte ptr [R14 + 0x1],SIL SHR RCX,0x6 OR RCX,0xc0 LAB_0018429f: MOV byte ptr [R14],CL MOV EAX,EAX ADD R14,RDX CMP byte ptr [R12 + RAX*0x1],0x0 LEA R12,[R12 + RAX*0x1] JNZ 0x0018420f LAB_001842b6: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casedn_str_utf8mb3(long param_1,char *param_2) { char *pcVar1; long lVar2; uint uVar3; ulong in_RAX; ulong uVar4; long lVar5; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { lVar2 = *(long *)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6); if (uVar3 == 0) break; lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8); if (lVar5 != 0) { local_38 = (ulong)*(uint *)(lVar5 + 4 + (local_38 & 0xff) * 0xc); } lVar5 = 1; uVar4 = local_38; if (0x7f < local_38) { lVar5 = 2; if (0x7ff < local_38) { if (0xffff < local_38) break; pcVar7[2] = (byte)local_38 & 0x3f | 0x80; uVar4 = local_38 >> 6 | 0x800; lVar5 = 3; } pcVar7[1] = (byte)uVar4 & 0x3f | 0x80; uVar4 = uVar4 >> 6 | 0xc0; } *pcVar7 = (char)uVar4; pcVar7 = pcVar7 + lVar5; pcVar1 = pcVar6 + uVar3; pcVar6 = pcVar6 + uVar3; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
25,399
ma_read_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { int block_of_record; uint b_type; MARIA_BLOCK_INFO block_info; File file; uchar *UNINIT_VAR(to); uint UNINIT_VAR(left_length); MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); DBUG_ENTER("_ma_read_dynamic_record"); if (filepos == HA_OFFSET_ERROR) goto err; file= info->dfile.file; block_of_record= 0; /* First block of record is numbered as zero. */ block_info.second_read= 0; do { /* A corrupted table can have wrong pointers. (Bug# 19835) */ if (filepos == HA_OFFSET_ERROR) goto panic; if (info->opt_flag & WRITE_CACHE_USED && (info->rec_cache.pos_in_file < filepos + MARIA_BLOCK_INFO_HEADER_LENGTH) && flush_io_cache(&info->rec_cache)) goto err; info->rec_cache.seek_not_done=1; if ((b_type= _ma_get_block_info(info, &block_info, file, filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_DELETED; goto err; } if (block_of_record++ == 0) /* First block */ { info->cur_row.total_length= block_info.rec_len; if (block_info.rec_len > (uint) share->base.max_pack_length) goto panic; if (share->base.blobs) { if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size, block_info.rec_len + share->base.extra_rec_buff_size, flag)) goto err; } to= info->rec_buff; left_length=block_info.rec_len; } if (left_length < block_info.data_len || ! block_info.data_len) goto panic; /* Wrong linked record */ /* copy information that is already read */ { uint offset= (uint) (block_info.filepos - filepos); uint prefetch_len= (sizeof(block_info.header) - offset); filepos+= sizeof(block_info.header); if (prefetch_len > block_info.data_len) prefetch_len= block_info.data_len; if (prefetch_len) { memcpy(to, block_info.header + offset, prefetch_len); block_info.data_len-= prefetch_len; left_length-= prefetch_len; to+= prefetch_len; } } /* read rest of record from file */ if (block_info.data_len) { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file < filepos + block_info.data_len && flush_io_cache(&info->rec_cache)) goto err; /* What a pity that this method is not called 'file_pread' and that there is no equivalent without seeking. We are at the right position already. :( */ if (share->file_read(info, to, block_info.data_len, filepos, MYF(MY_NABP))) goto panic; left_length-=block_info.data_len; to+=block_info.data_len; } filepos= block_info.next_filepos; } while (left_length); info->update|= HA_STATE_AKTIV; /* We have a aktive record */ fast_ma_writeinfo(info); DBUG_RETURN(_ma_rec_unpack(info,buf,info->rec_buff,block_info.rec_len) != MY_FILE_ERROR ? 0 : my_errno); err: fast_ma_writeinfo(info); DBUG_RETURN(my_errno); panic: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; }
O0
c
ma_read_dynamic_record: 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 %rdx, -0x80(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x98(%rbp) movl -0x9c(%rbp), %eax movl %eax, -0x9c(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movsbl 0x7d9(%rax), %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax orl $0x10, %eax movl %eax, %eax movq %rax, -0xb0(%rbp) cmpq $-0x1, -0x80(%rbp) jne 0x44ecf jmp 0x45248 movq -0x70(%rbp), %rax movl 0x480(%rax), %eax movl %eax, -0x8c(%rbp) movl $0x0, -0x84(%rbp) movl $0x0, -0x10(%rbp) cmpq $-0x1, -0x80(%rbp) jne 0x44efc jmp 0x45271 movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x44f45 movq -0x70(%rbp), %rax movq 0x4b8(%rax), %rax movq -0x80(%rbp), %rcx addq $0x14, %rcx cmpq %rcx, %rax jae 0x44f45 movq -0x70(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xafda0 cmpl $0x0, %eax je 0x44f45 jmp 0x45248 movq -0x70(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x70(%rbp), %rdi movl -0x8c(%rbp), %edx movq -0x80(%rbp), %rcx leaq -0x60(%rbp), %rsi callq 0x43270 movl %eax, -0x88(%rbp) andl $0x3c, %eax cmpl $0x0, %eax je 0x44f96 movl -0x88(%rbp), %eax andl $0x14, %eax cmpl $0x0, %eax je 0x44f91 callq 0xc0d80 movl $0x86, (%rax) jmp 0x45248 movl -0x84(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0x84(%rbp) cmpl $0x0, %eax jne 0x4504a movq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x110(%rax) movq -0x48(%rbp), %rax movq -0xa8(%rbp), %rcx movq 0x3b0(%rcx), %rcx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x44fdd jmp 0x45271 movq -0xa8(%rbp), %rax cmpl $0x0, 0x3f0(%rax) je 0x4502e movq -0x70(%rbp), %rdi addq $0x3a0, %rdi # imm = 0x3A0 movq -0x70(%rbp), %rsi addq $0x460, %rsi # imm = 0x460 movq -0x48(%rbp), %rdx movq -0xa8(%rbp), %rax movl 0x424(%rax), %eax addq %rax, %rdx movq -0xb0(%rbp), %rcx callq 0x6fe10 cmpb $0x0, %al je 0x4502c jmp 0x45248 jmp 0x4502e movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rax movq %rax, -0x98(%rbp) movq -0x48(%rbp), %rax movl %eax, -0x9c(%rbp) movl -0x9c(%rbp), %eax cmpq -0x40(%rbp), %rax jb 0x4505d cmpq $0x0, -0x40(%rbp) jne 0x45062 jmp 0x45271 movq -0x28(%rbp), %rax subq -0x80(%rbp), %rax movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax movl %eax, %ecx movl $0x14, %eax subq %rcx, %rax movl %eax, -0xb8(%rbp) movq -0x80(%rbp), %rax addq $0x14, %rax movq %rax, -0x80(%rbp) movl -0xb8(%rbp), %eax cmpq -0x40(%rbp), %rax jbe 0x450a8 movq -0x40(%rbp), %rax movl %eax, -0xb8(%rbp) cmpl $0x0, -0xb8(%rbp) je 0x45112 movq -0x98(%rbp), %rdi leaq -0x60(%rbp), %rsi movl -0xb4(%rbp), %eax addq %rax, %rsi movl -0xb8(%rbp), %eax movl %eax, %edx callq 0x270d0 movl -0xb8(%rbp), %eax movl %eax, %ecx movq -0x40(%rbp), %rax subq %rcx, %rax movq %rax, -0x40(%rbp) movl -0xb8(%rbp), %ecx movl -0x9c(%rbp), %eax subl %ecx, %eax movl %eax, -0x9c(%rbp) movl -0xb8(%rbp), %ecx movq -0x98(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x98(%rbp) cmpq $0x0, -0x40(%rbp) je 0x451bf movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x45166 movq -0x70(%rbp), %rax movq 0x4b8(%rax), %rax movq -0x80(%rbp), %rcx addq -0x40(%rbp), %rcx cmpq %rcx, %rax jae 0x45166 movq -0x70(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xafda0 cmpl $0x0, %eax je 0x45166 jmp 0x45248 movq -0xa8(%rbp), %rax movq 0x6e0(%rax), %rax movq -0x70(%rbp), %rdi movq -0x98(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x80(%rbp), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x4519a jmp 0x45271 movq -0x40(%rbp), %rcx movl -0x9c(%rbp), %eax subq %rcx, %rax movl %eax, -0x9c(%rbp) movq -0x40(%rbp), %rax addq -0x98(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) cmpl $0x0, -0x9c(%rbp) jne 0x44ef0 movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x7b8(%rax) jne 0x45202 movq -0x70(%rbp), %rdi xorl %esi, %esi callq 0x3ae00 jmp 0x45204 movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rdx movq -0x48(%rbp), %rcx callq 0x44770 cmpq $-0x1, %rax je 0x45230 xorl %eax, %eax movl %eax, -0xbc(%rbp) jmp 0x4523d callq 0xc0d80 movl (%rax), %eax movl %eax, -0xbc(%rbp) movl -0xbc(%rbp), %eax movl %eax, -0x64(%rbp) jmp 0x45281 movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x7b8(%rax) jne 0x45263 movq -0x70(%rbp), %rdi xorl %esi, %esi callq 0x3ae00 jmp 0x45265 callq 0xc0d80 movl (%rax), %eax movl %eax, -0x64(%rbp) jmp 0x45281 movq -0x70(%rbp), %rdi movl $0x7f, %esi callq 0x38a40 jmp 0x45248 movl -0x64(%rbp), %eax movl %eax, -0xc0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x452ab movl -0xc0(%rbp), %eax addq $0xc0, %rsp popq %rbp retq callq 0x272b0
_ma_read_dynamic_record: 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 [rbp+var_80], rdx mov rax, [rbp+var_98] mov [rbp+var_98], rax mov eax, [rbp+var_9C] mov [rbp+var_9C], eax mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_A8], rax mov rax, [rbp+var_A8] movsx edx, byte ptr [rax+7D9h] xor eax, eax mov ecx, offset stru_10000 cmp edx, 0 cmovnz eax, ecx or eax, 10h mov eax, eax mov [rbp+var_B0], rax cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jnz short loc_44ECF jmp loc_45248 loc_44ECF: mov rax, [rbp+var_70] mov eax, [rax+480h] mov [rbp+var_8C], eax mov [rbp+var_84], 0 mov [rbp+var_10], 0 loc_44EF0: cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jnz short loc_44EFC jmp loc_45271 loc_44EFC: mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_44F45 mov rax, [rbp+var_70] mov rax, [rax+4B8h] mov rcx, [rbp+var_80] add rcx, 14h cmp rax, rcx jnb short loc_44F45 mov rdi, [rbp+var_70] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_44F45 jmp loc_45248 loc_44F45: mov rax, [rbp+var_70] mov dword ptr [rax+598h], 1 mov rdi, [rbp+var_70] mov edx, [rbp+var_8C] mov rcx, [rbp+var_80] lea rsi, [rbp+var_60] call _ma_get_block_info mov [rbp+var_88], eax and eax, 3Ch cmp eax, 0 jz short loc_44F96 mov eax, [rbp+var_88] and eax, 14h cmp eax, 0 jz short loc_44F91 call _my_thread_var mov dword ptr [rax], 86h loc_44F91: jmp loc_45248 loc_44F96: mov eax, [rbp+var_84] mov ecx, eax add ecx, 1 mov [rbp+var_84], ecx cmp eax, 0 jnz loc_4504A mov rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+110h], rcx mov rax, [rbp+var_48] mov rcx, [rbp+var_A8] mov rcx, [rcx+3B0h] mov ecx, ecx cmp rax, rcx jbe short loc_44FDD jmp loc_45271 loc_44FDD: mov rax, [rbp+var_A8] cmp dword ptr [rax+3F0h], 0 jz short loc_4502E mov rdi, [rbp+var_70] add rdi, 3A0h mov rsi, [rbp+var_70] add rsi, 460h mov rdx, [rbp+var_48] mov rax, [rbp+var_A8] mov eax, [rax+424h] add rdx, rax mov rcx, [rbp+var_B0] call _ma_alloc_buffer cmp al, 0 jz short loc_4502C jmp loc_45248 loc_4502C: jmp short $+2 loc_4502E: mov rax, [rbp+var_70] mov rax, [rax+3A0h] mov [rbp+var_98], rax mov rax, [rbp+var_48] mov [rbp+var_9C], eax loc_4504A: mov eax, [rbp+var_9C] cmp rax, [rbp+var_40] jb short loc_4505D cmp [rbp+var_40], 0 jnz short loc_45062 loc_4505D: jmp loc_45271 loc_45062: mov rax, [rbp+var_28] sub rax, [rbp+var_80] mov [rbp+var_B4], eax mov eax, [rbp+var_B4] mov ecx, eax mov eax, 14h sub rax, rcx mov [rbp+var_B8], eax mov rax, [rbp+var_80] add rax, 14h mov [rbp+var_80], rax mov eax, [rbp+var_B8] cmp rax, [rbp+var_40] jbe short loc_450A8 mov rax, [rbp+var_40] mov [rbp+var_B8], eax loc_450A8: cmp [rbp+var_B8], 0 jz short loc_45112 mov rdi, [rbp+var_98] lea rsi, [rbp+var_60] mov eax, [rbp+var_B4] add rsi, rax mov eax, [rbp+var_B8] mov edx, eax call _memcpy mov eax, [rbp+var_B8] mov ecx, eax mov rax, [rbp+var_40] sub rax, rcx mov [rbp+var_40], rax mov ecx, [rbp+var_B8] mov eax, [rbp+var_9C] sub eax, ecx mov [rbp+var_9C], eax mov ecx, [rbp+var_B8] mov rax, [rbp+var_98] mov ecx, ecx add rax, rcx mov [rbp+var_98], rax loc_45112: cmp [rbp+var_40], 0 jz loc_451BF mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_45166 mov rax, [rbp+var_70] mov rax, [rax+4B8h] mov rcx, [rbp+var_80] add rcx, [rbp+var_40] cmp rax, rcx jnb short loc_45166 mov rdi, [rbp+var_70] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_45166 jmp loc_45248 loc_45166: mov rax, [rbp+var_A8] mov rax, [rax+6E0h] mov rdi, [rbp+var_70] mov rsi, [rbp+var_98] mov rdx, [rbp+var_40] mov rcx, [rbp+var_80] mov r8d, 4 call rax cmp rax, 0 jz short loc_4519A jmp loc_45271 loc_4519A: mov rcx, [rbp+var_40] mov eax, [rbp+var_9C] sub rax, rcx mov [rbp+var_9C], eax mov rax, [rbp+var_40] add rax, [rbp+var_98] mov [rbp+var_98], rax loc_451BF: mov rax, [rbp+var_20] mov [rbp+var_80], rax cmp [rbp+var_9C], 0 jnz loc_44EF0 mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 2 mov [rax+624h], ecx mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+7B8h], 0 jnz short loc_45202 mov rdi, [rbp+var_70] xor esi, esi call _ma_writeinfo loc_45202: jmp short $+2 loc_45204: mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] mov rax, [rbp+var_70] mov rdx, [rax+3A0h] mov rcx, [rbp+var_48] call _ma_rec_unpack cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_45230 xor eax, eax mov [rbp+var_BC], eax jmp short loc_4523D loc_45230: call _my_thread_var mov eax, [rax] mov [rbp+var_BC], eax loc_4523D: mov eax, [rbp+var_BC] mov [rbp+var_64], eax jmp short loc_45281 loc_45248: mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+7B8h], 0 jnz short loc_45263 mov rdi, [rbp+var_70] xor esi, esi call _ma_writeinfo loc_45263: jmp short $+2 loc_45265: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax jmp short loc_45281 loc_45271: mov rdi, [rbp+var_70] mov esi, 7Fh call _ma_set_fatal_error jmp short loc_45248 loc_45281: mov eax, [rbp+var_64] mov [rbp+var_C0], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_452AB mov eax, [rbp+var_C0] add rsp, 0C0h pop rbp retn loc_452AB: call ___stack_chk_fail
long long ma_read_dynamic_record(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5, int a6) { long long v6; // rdx unsigned int v7; // eax unsigned long long v8; // rcx int v9; // eax unsigned int v12; // [rsp+8h] [rbp-B8h] int v13; // [rsp+Ch] [rbp-B4h] long long v14; // [rsp+10h] [rbp-B0h] long long v15; // [rsp+18h] [rbp-A8h] unsigned int v16; // [rsp+24h] [rbp-9Ch] long long v17; // [rsp+28h] [rbp-98h] unsigned int v18; // [rsp+34h] [rbp-8Ch] char block_info; // [rsp+38h] [rbp-88h] int v20; // [rsp+3Ch] [rbp-84h] long long v22; // [rsp+40h] [rbp-80h] unsigned __int8 v24[24]; // [rsp+60h] [rbp-60h] BYREF unsigned long long v25; // [rsp+78h] [rbp-48h] unsigned long long v26; // [rsp+80h] [rbp-40h] long long v27; // [rsp+98h] [rbp-28h] long long v28; // [rsp+A0h] [rbp-20h] int v29; // [rsp+B0h] [rbp-10h] unsigned long long v30; // [rsp+B8h] [rbp-8h] v30 = __readfsqword(0x28u); v15 = *(_QWORD *)a1; v6 = (unsigned int)*(char *)(*(_QWORD *)a1 + 2009LL); v7 = 0; v8 = (unsigned long long)&stru_10000; if ( *(_BYTE *)(*(_QWORD *)a1 + 2009LL) ) v7 = (unsigned int)&stru_10000; v14 = v7 | 0x10; if ( a3 == -1 ) { LABEL_38: if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) ) ma_writeinfo((long long *)a1, 0); return *(unsigned int *)my_thread_var(); } else { v18 = *(_DWORD *)(a1 + 1152); v20 = 0; v29 = 0; do { if ( a3 == -1 ) { LABEL_41: ma_set_fatal_error((_DWORD *)a1, 127, v6, v8, a5, a6); goto LABEL_38; } if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 && *(_QWORD *)(a1 + 1208) < (unsigned long long)(a3 + 20) && (unsigned int)my_b_flush_io_cache(a1 + 1208, 1LL) ) { goto LABEL_38; } *(_DWORD *)(a1 + 1432) = 1; block_info = ma_get_block_info(a1, v24, v18, a3, a5, a6); if ( (block_info & 0x3C) != 0 ) { if ( (block_info & 0x14) != 0 ) *(_DWORD *)my_thread_var() = 134; goto LABEL_38; } v9 = v20; v8 = (unsigned int)++v20; if ( !v9 ) { *(_QWORD *)(a1 + 272) = v25; v8 = (unsigned int)*(_QWORD *)(v15 + 944); if ( v25 > v8 ) goto LABEL_41; if ( *(_DWORD *)(v15 + 1008) && (unsigned __int8)ma_alloc_buffer(a1 + 928, a1 + 1120, *(unsigned int *)(v15 + 1060) + v25, v14) ) { goto LABEL_38; } v17 = *(_QWORD *)(a1 + 928); v16 = v25; } if ( v16 < v26 || !v26 ) goto LABEL_41; v13 = v27 - a3; v8 = (unsigned int)(v27 - a3); v12 = 20 - v8; v22 = a3 + 20; if ( (unsigned int)(20 - v8) > v26 ) v12 = v26; if ( v12 ) { memcpy(v17, &v24[v13], v12); v26 -= v12; v16 -= v12; v8 = v12; v17 += v12; } if ( v26 ) { if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 && *(_QWORD *)(a1 + 1208) < v26 + v22 && (unsigned int)my_b_flush_io_cache(a1 + 1208, 1LL) ) { goto LABEL_38; } if ( (*(long long ( **)(long long, long long, unsigned long long, long long, long long))(v15 + 1760))( a1, v17, v26, v22, 4LL) ) { goto LABEL_41; } v8 = v26; v16 -= v26; v17 += v26; } a3 = v28; } while ( v16 ); *(_DWORD *)(a1 + 1572) |= 2u; if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) ) ma_writeinfo((long long *)a1, 0); if ( ma_rec_unpack((_DWORD *)a1, a2, *(_QWORD *)(a1 + 928), v25, a5, a6) == -1 ) return *(unsigned int *)my_thread_var(); else return 0; } }
_ma_read_dynamic_record: 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 qword ptr [RBP + -0x80],RDX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x98],RAX MOV EAX,dword ptr [RBP + -0x9c] MOV dword ptr [RBP + -0x9c],EAX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOVSX EDX,byte ptr [RAX + 0x7d9] XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX OR EAX,0x10 MOV EAX,EAX MOV qword ptr [RBP + -0xb0],RAX CMP qword ptr [RBP + -0x80],-0x1 JNZ 0x00144ecf JMP 0x00145248 LAB_00144ecf: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x480] MOV dword ptr [RBP + -0x8c],EAX MOV dword ptr [RBP + -0x84],0x0 MOV dword ptr [RBP + -0x10],0x0 LAB_00144ef0: CMP qword ptr [RBP + -0x80],-0x1 JNZ 0x00144efc JMP 0x00145271 LAB_00144efc: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00144f45 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x4b8] MOV RCX,qword ptr [RBP + -0x80] ADD RCX,0x14 CMP RAX,RCX JNC 0x00144f45 MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001afda0 CMP EAX,0x0 JZ 0x00144f45 JMP 0x00145248 LAB_00144f45: MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + 0x598],0x1 MOV RDI,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RBP + -0x8c] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x60] CALL 0x00143270 MOV dword ptr [RBP + -0x88],EAX AND EAX,0x3c CMP EAX,0x0 JZ 0x00144f96 MOV EAX,dword ptr [RBP + -0x88] AND EAX,0x14 CMP EAX,0x0 JZ 0x00144f91 CALL 0x001c0d80 MOV dword ptr [RAX],0x86 LAB_00144f91: JMP 0x00145248 LAB_00144f96: MOV EAX,dword ptr [RBP + -0x84] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0x84],ECX CMP EAX,0x0 JNZ 0x0014504a MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x110],RCX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0xa8] MOV RCX,qword ptr [RCX + 0x3b0] MOV ECX,ECX CMP RAX,RCX JBE 0x00144fdd JMP 0x00145271 LAB_00144fdd: MOV RAX,qword ptr [RBP + -0xa8] CMP dword ptr [RAX + 0x3f0],0x0 JZ 0x0014502e MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x3a0 MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x460 MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0xa8] MOV EAX,dword ptr [RAX + 0x424] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0xb0] CALL 0x0016fe10 CMP AL,0x0 JZ 0x0014502c JMP 0x00145248 LAB_0014502c: JMP 0x0014502e LAB_0014502e: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x3a0] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x9c],EAX LAB_0014504a: MOV EAX,dword ptr [RBP + -0x9c] CMP RAX,qword ptr [RBP + -0x40] JC 0x0014505d CMP qword ptr [RBP + -0x40],0x0 JNZ 0x00145062 LAB_0014505d: JMP 0x00145271 LAB_00145062: MOV RAX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RBP + -0x80] MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] MOV ECX,EAX MOV EAX,0x14 SUB RAX,RCX MOV dword ptr [RBP + -0xb8],EAX MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x14 MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0xb8] CMP RAX,qword ptr [RBP + -0x40] JBE 0x001450a8 MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0xb8],EAX LAB_001450a8: CMP dword ptr [RBP + -0xb8],0x0 JZ 0x00145112 MOV RDI,qword ptr [RBP + -0x98] LEA RSI,[RBP + -0x60] MOV EAX,dword ptr [RBP + -0xb4] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0xb8] MOV EDX,EAX CALL 0x001270d0 MOV EAX,dword ptr [RBP + -0xb8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x40] SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV ECX,dword ptr [RBP + -0xb8] MOV EAX,dword ptr [RBP + -0x9c] SUB EAX,ECX MOV dword ptr [RBP + -0x9c],EAX MOV ECX,dword ptr [RBP + -0xb8] MOV RAX,qword ptr [RBP + -0x98] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x98],RAX LAB_00145112: CMP qword ptr [RBP + -0x40],0x0 JZ 0x001451bf MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00145166 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x4b8] MOV RCX,qword ptr [RBP + -0x80] ADD RCX,qword ptr [RBP + -0x40] CMP RAX,RCX JNC 0x00145166 MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001afda0 CMP EAX,0x0 JZ 0x00145166 JMP 0x00145248 LAB_00145166: MOV RAX,qword ptr [RBP + -0xa8] MOV RAX,qword ptr [RAX + 0x6e0] MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x80] MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0014519a JMP 0x00145271 LAB_0014519a: MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x9c] SUB RAX,RCX MOV dword ptr [RBP + -0x9c],EAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x98],RAX LAB_001451bf: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX CMP dword ptr [RBP + -0x9c],0x0 JNZ 0x00144ef0 MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x2 MOV dword ptr [RAX + 0x624],ECX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00145202 MOV RDI,qword ptr [RBP + -0x70] XOR ESI,ESI CALL 0x0013ae00 LAB_00145202: JMP 0x00145204 LAB_00145204: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x48] CALL 0x00144770 CMP RAX,-0x1 JZ 0x00145230 XOR EAX,EAX MOV dword ptr [RBP + -0xbc],EAX JMP 0x0014523d LAB_00145230: CALL 0x001c0d80 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xbc],EAX LAB_0014523d: MOV EAX,dword ptr [RBP + -0xbc] MOV dword ptr [RBP + -0x64],EAX JMP 0x00145281 LAB_00145248: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00145263 MOV RDI,qword ptr [RBP + -0x70] XOR ESI,ESI CALL 0x0013ae00 LAB_00145263: JMP 0x00145265 LAB_00145265: CALL 0x001c0d80 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX JMP 0x00145281 LAB_00145271: MOV RDI,qword ptr [RBP + -0x70] MOV ESI,0x7f CALL 0x00138a40 JMP 0x00145248 LAB_00145281: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0xc0],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001452ab MOV EAX,dword ptr [RBP + -0xc0] ADD RSP,0xc0 POP RBP RET LAB_001452ab: CALL 0x001272b0
int4 _ma_read_dynamic_record(long *param_1,int8 param_2,long param_3) { long lVar1; char cVar2; uint uVar3; int iVar4; uint uVar5; long lVar6; long lVar7; int4 *puVar8; long in_FS_OFFSET; int4 local_c4; uint local_c0; uint local_a4; void *local_a0; int local_8c; long local_88; int4 local_6c; int1 local_68 [24]; ulong local_50; ulong local_48; int8 local_30; long local_28; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar7 = *param_1; uVar3 = 0; if (*(char *)(lVar7 + 0x7d9) != '\0') { uVar3 = 0x10000; } if (param_3 == -1) { LAB_00145248: if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } puVar8 = (int4 *)_my_thread_var(); local_6c = *puVar8; } else { lVar1 = param_1[0x90]; local_8c = 0; local_18 = 0; local_88 = param_3; do { if (local_88 == -1) { LAB_00145271: _ma_set_fatal_error(param_1,0x7f); goto LAB_00145248; } if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] < local_88 + 0x14U)) && (iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) goto LAB_00145248; *(int4 *)(param_1 + 0xb3) = 1; uVar5 = _ma_get_block_info(param_1,local_68,(int)lVar1,local_88); if ((uVar5 & 0x3c) != 0) { if ((uVar5 & 0x14) != 0) { puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x86; } goto LAB_00145248; } if (local_8c == 0) { param_1[0x22] = local_50; if ((*(ulong *)(lVar7 + 0x3b0) & 0xffffffff) < local_50) goto LAB_00145271; if ((*(int *)(lVar7 + 0x3f0) != 0) && (cVar2 = _ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c, local_50 + *(uint *)(lVar7 + 0x424),uVar3 | 0x10), cVar2 != '\0')) goto LAB_00145248; local_a0 = (void *)param_1[0x74]; local_a4 = (uint)local_50; } if ((local_a4 < local_48) || (local_48 == 0)) goto LAB_00145271; uVar5 = (int)local_30 - (int)local_88; local_c0 = 0x14 - uVar5; if (local_48 < local_c0) { local_c0 = (uint)local_48; } if (local_c0 != 0) { memcpy(local_a0,local_68 + uVar5,(ulong)local_c0); local_48 = local_48 - local_c0; local_a4 = local_a4 - local_c0; local_a0 = (void *)((long)local_a0 + (ulong)local_c0); } if (local_48 != 0) { if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] < local_88 + 0x14 + local_48)) && (iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) goto LAB_00145248; lVar6 = (**(code **)(lVar7 + 0x6e0))(param_1,local_a0,local_48,local_88 + 0x14,4); if (lVar6 != 0) goto LAB_00145271; local_a4 = local_a4 - (int)local_48; local_a0 = (void *)(local_48 + (long)local_a0); } local_88 = local_28; local_8c = local_8c + 1; } while (local_a4 != 0); *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2; if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } lVar7 = _ma_rec_unpack(param_1,param_2,param_1[0x74],local_50); if (lVar7 == -1) { puVar8 = (int4 *)_my_thread_var(); local_c4 = *puVar8; } else { local_c4 = 0; } local_6c = local_c4; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }