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
47,600
ma_set_connect_attrs
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static my_bool ma_set_connect_attrs(MYSQL *mysql, const char *host) { char buffer[255]; int rc= 0; rc= mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_client_name") + mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_client_version") + mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_os") + mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_server_host") + #ifdef _WIN32 mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_thread") + #endif mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_pid") + mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_platform"); rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_client_name", "libmariadb") + mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_client_version", MARIADB_PACKAGE_VERSION) + mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_os", MARIADB_SYSTEM_TYPE); if (host && *host) rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_server_host", host); #ifdef _WIN32 snprintf(buffer, 255, "%lu", (ulong) GetCurrentThreadId()); rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_thread", buffer); snprintf(buffer, 255, "%lu", (ulong) GetCurrentProcessId()); #else snprintf(buffer, 255, "%lu", (ulong) getpid()); #endif rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_pid", buffer); rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_platform", MARIADB_MACHINE_TYPE); return(test(rc>0)); }
O0
c
ma_set_connect_attrs: pushq %rbp movq %rsp, %rbp subq $0x150, %rsp # imm = 0x150 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x118(%rbp) movq %rsi, -0x120(%rbp) movl $0x0, -0x124(%rbp) movq -0x118(%rbp), %rdi movl $0x22, %esi leaq 0x31571(%rip), %rdx # 0x4ee94 callq 0x225d0 movl %eax, -0x140(%rbp) movq -0x118(%rbp), %rdi movl $0x22, %esi leaq 0x31560(%rip), %rdx # 0x4eea1 callq 0x225d0 movl %eax, %ecx movl -0x140(%rbp), %eax addl %ecx, %eax movl %eax, -0x13c(%rbp) movq -0x118(%rbp), %rdi movl $0x22, %esi leaq 0x31548(%rip), %rdx # 0x4eeb1 callq 0x225d0 movl %eax, %ecx movl -0x13c(%rbp), %eax addl %ecx, %eax movl %eax, -0x138(%rbp) movq -0x118(%rbp), %rdi movl $0x22, %esi leaq 0x31524(%rip), %rdx # 0x4eeb5 callq 0x225d0 movl %eax, %ecx movl -0x138(%rbp), %eax addl %ecx, %eax movl %eax, -0x134(%rbp) movq -0x118(%rbp), %rdi movl $0x22, %esi leaq 0x31509(%rip), %rdx # 0x4eec2 callq 0x225d0 movl %eax, %ecx movl -0x134(%rbp), %eax addl %ecx, %eax movl %eax, -0x130(%rbp) movq -0x118(%rbp), %rdi movl $0x22, %esi leaq 0x314e6(%rip), %rdx # 0x4eec7 callq 0x225d0 movl %eax, %ecx movl -0x130(%rbp), %eax addl %ecx, %eax movl %eax, -0x124(%rbp) movq -0x118(%rbp), %rdi movl $0x21, %esi leaq 0x3148b(%rip), %rdx # 0x4ee94 leaq 0x314c1(%rip), %rcx # 0x4eed1 movb $0x0, %al callq 0x18340 movl %eax, -0x12c(%rbp) movq -0x118(%rbp), %rdi movl $0x21, %esi leaq 0x31471(%rip), %rdx # 0x4eea1 leaq 0x313df(%rip), %rcx # 0x4ee16 movb $0x0, %al callq 0x18340 movl %eax, %ecx movl -0x12c(%rbp), %eax addl %ecx, %eax movl %eax, -0x128(%rbp) movq -0x118(%rbp), %rdi movl $0x21, %esi leaq 0x31450(%rip), %rdx # 0x4eeb1 leaq 0x31474(%rip), %rcx # 0x4eedc movb $0x0, %al callq 0x18340 movl %eax, %ecx movl -0x128(%rbp), %eax addl %ecx, %eax addl -0x124(%rbp), %eax movl %eax, -0x124(%rbp) cmpq $0x0, -0x120(%rbp) je 0x1dacb movq -0x120(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x1dacb movq -0x118(%rbp), %rdi movq -0x120(%rbp), %rcx movl $0x21, %esi leaq 0x313fd(%rip), %rdx # 0x4eeb5 movb $0x0, %al callq 0x18340 addl -0x124(%rbp), %eax movl %eax, -0x124(%rbp) callq 0x13650 movslq %eax, %rcx leaq 0x31408(%rip), %rdx # 0x4eee2 xorl %eax, %eax movb %al, -0x142(%rbp) leaq -0x110(%rbp), %rdi movq %rdi, -0x150(%rbp) movl $0xff, %esi callq 0x136d0 movq -0x150(%rbp), %rcx movb -0x142(%rbp), %al movq -0x118(%rbp), %rdi leaq 0x313ad(%rip), %rdx # 0x4eec2 movl $0x21, %esi movl %esi, -0x148(%rbp) callq 0x18340 movl -0x148(%rbp), %esi movl %eax, %edx movb -0x142(%rbp), %al movl -0x124(%rbp), %ecx addl %edx, %ecx movl %ecx, -0x124(%rbp) movq -0x118(%rbp), %rdi leaq 0x31378(%rip), %rdx # 0x4eec7 leaq 0x31390(%rip), %rcx # 0x4eee6 callq 0x18340 movl %eax, %ecx movl -0x124(%rbp), %eax addl %ecx, %eax movl %eax, -0x124(%rbp) movl -0x124(%rbp), %eax testl %eax, %eax setg %al movb %al, -0x141(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x1db9d movb -0x141(%rbp), %al addq $0x150, %rsp # imm = 0x150 popq %rbp retq callq 0x134b0 nopw %cs:(%rax,%rax)
ma_set_connect_attrs: push rbp mov rbp, rsp sub rsp, 150h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_118], rdi mov [rbp+var_120], rsi mov [rbp+var_124], 0 mov rdi, [rbp+var_118] mov esi, 22h ; '"' lea rdx, aClientName; "_client_name" call mysql_options mov [rbp+var_140], eax mov rdi, [rbp+var_118] mov esi, 22h ; '"' lea rdx, aClientVersion; "_client_version" call mysql_options mov ecx, eax mov eax, [rbp+var_140] add eax, ecx mov [rbp+var_13C], eax mov rdi, [rbp+var_118] mov esi, 22h ; '"' lea rdx, aOs; "_os" call mysql_options mov ecx, eax mov eax, [rbp+var_13C] add eax, ecx mov [rbp+var_138], eax mov rdi, [rbp+var_118] mov esi, 22h ; '"' lea rdx, aServerHost; "_server_host" call mysql_options mov ecx, eax mov eax, [rbp+var_138] add eax, ecx mov [rbp+var_134], eax mov rdi, [rbp+var_118] mov esi, 22h ; '"' lea rdx, aPid; "_pid" call mysql_options mov ecx, eax mov eax, [rbp+var_134] add eax, ecx mov [rbp+var_130], eax mov rdi, [rbp+var_118] mov esi, 22h ; '"' lea rdx, aPlatform; "_platform" call mysql_options mov ecx, eax mov eax, [rbp+var_130] add eax, ecx mov [rbp+var_124], eax mov rdi, [rbp+var_118] mov esi, 21h ; '!' lea rdx, aClientName; "_client_name" lea rcx, aLibmariadb; "libmariadb" mov al, 0 call mysql_optionsv mov [rbp+var_12C], eax mov rdi, [rbp+var_118] mov esi, 21h ; '!' lea rdx, aClientVersion; "_client_version" lea rcx, a332; "3.3.2" mov al, 0 call mysql_optionsv mov ecx, eax mov eax, [rbp+var_12C] add eax, ecx mov [rbp+var_128], eax mov rdi, [rbp+var_118] mov esi, 21h ; '!' lea rdx, aOs; "_os" lea rcx, aLinux; "Linux" mov al, 0 call mysql_optionsv mov ecx, eax mov eax, [rbp+var_128] add eax, ecx add eax, [rbp+var_124] mov [rbp+var_124], eax cmp [rbp+var_120], 0 jz short loc_1DACB mov rax, [rbp+var_120] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_1DACB mov rdi, [rbp+var_118] mov rcx, [rbp+var_120] mov esi, 21h ; '!' lea rdx, aServerHost; "_server_host" mov al, 0 call mysql_optionsv add eax, [rbp+var_124] mov [rbp+var_124], eax loc_1DACB: call _getpid movsxd rcx, eax lea rdx, aLu; "%lu" xor eax, eax mov [rbp+var_142], al lea rdi, [rbp+var_110] mov [rbp+var_150], rdi mov esi, 0FFh call _snprintf mov rcx, [rbp+var_150] mov al, [rbp+var_142] mov rdi, [rbp+var_118] lea rdx, aPid; "_pid" mov esi, 21h ; '!' mov [rbp+var_148], esi call mysql_optionsv mov esi, [rbp+var_148] mov edx, eax mov al, [rbp+var_142] mov ecx, [rbp+var_124] add ecx, edx mov [rbp+var_124], ecx mov rdi, [rbp+var_118] lea rdx, aPlatform; "_platform" lea rcx, aX8664; "x86_64" call mysql_optionsv mov ecx, eax mov eax, [rbp+var_124] add eax, ecx mov [rbp+var_124], eax mov eax, [rbp+var_124] test eax, eax setnle al mov [rbp+var_141], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_1DB9D mov al, [rbp+var_141] add rsp, 150h pop rbp retn loc_1DB9D: call ___stack_chk_fail
bool ma_set_connect_attrs(long long a1, _BYTE *a2) { int v2; // eax int v4; // [rsp+10h] [rbp-140h] int v5; // [rsp+14h] [rbp-13Ch] int v6; // [rsp+18h] [rbp-138h] int v7; // [rsp+1Ch] [rbp-134h] int v8; // [rsp+20h] [rbp-130h] int v9; // [rsp+24h] [rbp-12Ch] int v10; // [rsp+28h] [rbp-128h] int v11; // [rsp+2Ch] [rbp-124h] int v12; // [rsp+2Ch] [rbp-124h] int v13; // [rsp+2Ch] [rbp-124h] _BYTE v14[264]; // [rsp+40h] [rbp-110h] BYREF unsigned long long v15; // [rsp+148h] [rbp-8h] v15 = __readfsqword(0x28u); v4 = mysql_options(a1, 34LL, "_client_name"); v5 = mysql_options(a1, 34LL, "_client_version") + v4; v6 = mysql_options(a1, 34LL, "_os") + v5; v7 = mysql_options(a1, 34LL, "_server_host") + v6; v8 = mysql_options(a1, 34LL, "_pid") + v7; v11 = mysql_options(a1, 34LL, "_platform") + v8; v9 = mysql_optionsv(a1, 33, "_client_name", "libmariadb"); v10 = mysql_optionsv(a1, 33, "_client_version", "3.3.2") + v9; v12 = v11 + mysql_optionsv(a1, 33, "_os", "Linux") + v10; if ( a2 && *a2 ) v12 += mysql_optionsv(a1, 33, "_server_host", a2); v2 = getpid(); snprintf(v14, 255LL, "%lu", v2); v13 = mysql_optionsv(a1, 33, "_pid", v14) + v12; return (int)(mysql_optionsv(a1, 33, "_platform", "x86_64") + v13) > 0; }
ma_set_connect_attrs: PUSH RBP MOV RBP,RSP SUB RSP,0x150 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x118],RDI MOV qword ptr [RBP + -0x120],RSI MOV dword ptr [RBP + -0x124],0x0 MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x22 LEA RDX,[0x14ee94] CALL 0x001225d0 MOV dword ptr [RBP + -0x140],EAX MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x22 LEA RDX,[0x14eea1] CALL 0x001225d0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x140] ADD EAX,ECX MOV dword ptr [RBP + -0x13c],EAX MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x22 LEA RDX,[0x14eeb1] CALL 0x001225d0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x13c] ADD EAX,ECX MOV dword ptr [RBP + -0x138],EAX MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x22 LEA RDX,[0x14eeb5] CALL 0x001225d0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x138] ADD EAX,ECX MOV dword ptr [RBP + -0x134],EAX MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x22 LEA RDX,[0x14eec2] CALL 0x001225d0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x134] ADD EAX,ECX MOV dword ptr [RBP + -0x130],EAX MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x22 LEA RDX,[0x14eec7] CALL 0x001225d0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x130] ADD EAX,ECX MOV dword ptr [RBP + -0x124],EAX MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x21 LEA RDX,[0x14ee94] LEA RCX,[0x14eed1] MOV AL,0x0 CALL 0x00118340 MOV dword ptr [RBP + -0x12c],EAX MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x21 LEA RDX,[0x14eea1] LEA RCX,[0x14ee16] MOV AL,0x0 CALL 0x00118340 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x12c] ADD EAX,ECX MOV dword ptr [RBP + -0x128],EAX MOV RDI,qword ptr [RBP + -0x118] MOV ESI,0x21 LEA RDX,[0x14eeb1] LEA RCX,[0x14eedc] MOV AL,0x0 CALL 0x00118340 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x128] ADD EAX,ECX ADD EAX,dword ptr [RBP + -0x124] MOV dword ptr [RBP + -0x124],EAX CMP qword ptr [RBP + -0x120],0x0 JZ 0x0011dacb MOV RAX,qword ptr [RBP + -0x120] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0011dacb MOV RDI,qword ptr [RBP + -0x118] MOV RCX,qword ptr [RBP + -0x120] MOV ESI,0x21 LEA RDX,[0x14eeb5] MOV AL,0x0 CALL 0x00118340 ADD EAX,dword ptr [RBP + -0x124] MOV dword ptr [RBP + -0x124],EAX LAB_0011dacb: CALL 0x00113650 MOVSXD RCX,EAX LEA RDX,[0x14eee2] XOR EAX,EAX MOV byte ptr [RBP + -0x142],AL LEA RDI,[RBP + -0x110] MOV qword ptr [RBP + -0x150],RDI MOV ESI,0xff CALL 0x001136d0 MOV RCX,qword ptr [RBP + -0x150] MOV AL,byte ptr [RBP + -0x142] MOV RDI,qword ptr [RBP + -0x118] LEA RDX,[0x14eec2] MOV ESI,0x21 MOV dword ptr [RBP + -0x148],ESI CALL 0x00118340 MOV ESI,dword ptr [RBP + -0x148] MOV EDX,EAX MOV AL,byte ptr [RBP + -0x142] MOV ECX,dword ptr [RBP + -0x124] ADD ECX,EDX MOV dword ptr [RBP + -0x124],ECX MOV RDI,qword ptr [RBP + -0x118] LEA RDX,[0x14eec7] LEA RCX,[0x14eee6] CALL 0x00118340 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x124] ADD EAX,ECX MOV dword ptr [RBP + -0x124],EAX MOV EAX,dword ptr [RBP + -0x124] TEST EAX,EAX SETG AL MOV byte ptr [RBP + -0x141],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0011db9d MOV AL,byte ptr [RBP + -0x141] ADD RSP,0x150 POP RBP RET LAB_0011db9d: CALL 0x001134b0
int8 ma_set_connect_attrs(int8 param_1,char *param_2) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; __pid_t _Var10; long in_FS_OFFSET; int local_12c; char local_118 [264]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = mysql_options(param_1,0x22,"_client_name"); iVar2 = mysql_options(param_1,0x22,"_client_version"); iVar3 = mysql_options(param_1,0x22,&DAT_0014eeb1); iVar4 = mysql_options(param_1,0x22,"_server_host"); iVar5 = mysql_options(param_1,0x22,&DAT_0014eec2); iVar6 = mysql_options(param_1,0x22,"_platform"); iVar7 = mysql_optionsv(param_1,0x21,"_client_name","libmariadb"); iVar8 = mysql_optionsv(param_1,0x21,"_client_version","3.3.2"); iVar9 = mysql_optionsv(param_1,0x21,&DAT_0014eeb1,"Linux"); local_12c = iVar7 + iVar8 + iVar9 + iVar1 + iVar2 + iVar3 + iVar4 + iVar5 + iVar6; if ((param_2 != (char *)0x0) && (*param_2 != '\0')) { iVar1 = mysql_optionsv(param_1,0x21,"_server_host",param_2); local_12c = iVar1 + local_12c; } _Var10 = getpid(); snprintf(local_118,0xff,"%lu",(long)_Var10); iVar1 = mysql_optionsv(param_1,0x21,&DAT_0014eec2,local_118); iVar2 = mysql_optionsv(param_1,0x21,"_platform","x86_64"); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),0 < local_12c + iVar1 + iVar2 ); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,601
js_function_proto_fileName
bluesky950520[P]quickjs/quickjs.c
static JSValue js_function_proto_fileName(JSContext *ctx, JSValue this_val) { JSFunctionBytecode *b = JS_GetFunctionBytecode(this_val); if (b) { return JS_AtomToString(ctx, b->filename); } return JS_UNDEFINED; }
O1
c
js_function_proto_fileName: pushq %rax movq %rsi, (%rsp) cmpl $-0x1, %edx jne 0x71093 movq (%rsp), %rcx movzwl 0x6(%rcx), %edx xorl %eax, %eax cmpq $0x38, %rdx ja 0x71095 movabsq $0x110000000012000, %rsi # imm = 0x110000000012000 btq %rdx, %rsi jae 0x71095 movq 0x30(%rcx), %rax jmp 0x71095 xorl %eax, %eax testq %rax, %rax je 0x710a9 movl 0x68(%rax), %esi movl $0x1, %edx callq 0x1fb46 jmp 0x710b0 movl $0x3, %edx xorl %eax, %eax popq %rcx retq
js_function_proto_fileName: push rax mov [rsp+8+var_8], rsi cmp edx, 0FFFFFFFFh jnz short loc_71093 mov rcx, [rsp+8+var_8] movzx edx, word ptr [rcx+6] xor eax, eax cmp rdx, 38h ; '8' ja short loc_71095 mov rsi, 110000000012000h bt rsi, rdx jnb short loc_71095 mov rax, [rcx+30h] jmp short loc_71095 loc_71093: xor eax, eax loc_71095: test rax, rax jz short loc_710A9 mov esi, [rax+68h] mov edx, 1 call __JS_AtomToValue jmp short loc_710B0 loc_710A9: mov edx, 3 xor eax, eax loc_710B0: pop rcx retn
long long js_function_proto_fileName(long long a1, long long a2, int a3) { unsigned long long v3; // rdx long long v4; // rax long long v5; // rsi if ( a3 == -1 ) { v3 = *(unsigned __int16 *)(a2 + 6); v4 = 0LL; if ( v3 <= 0x38 ) { v5 = 0x110000000012000LL; if ( _bittest64(&v5, v3) ) v4 = *(_QWORD *)(a2 + 48); } } else { v4 = 0LL; } if ( v4 ) return _JS_AtomToValue(a1, *(_DWORD *)(v4 + 104), 1); else return 0LL; }
js_function_proto_fileName: PUSH RAX MOV qword ptr [RSP],RSI CMP EDX,-0x1 JNZ 0x00171093 MOV RCX,qword ptr [RSP] MOVZX EDX,word ptr [RCX + 0x6] XOR EAX,EAX CMP RDX,0x38 JA 0x00171095 MOV RSI,0x110000000012000 BT RSI,RDX JNC 0x00171095 MOV RAX,qword ptr [RCX + 0x30] JMP 0x00171095 LAB_00171093: XOR EAX,EAX LAB_00171095: TEST RAX,RAX JZ 0x001710a9 MOV ESI,dword ptr [RAX + 0x68] MOV EDX,0x1 CALL 0x0011fb46 JMP 0x001710b0 LAB_001710a9: MOV EDX,0x3 XOR EAX,EAX LAB_001710b0: POP RCX RET
int8 js_function_proto_fileName(int8 param_1,long param_2,int param_3) { long lVar1; int8 uVar2; if (param_3 == -1) { lVar1 = 0; if (((ulong)*(ushort *)(param_2 + 6) < 0x39) && ((0x110000000012000U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) { lVar1 = *(long *)(param_2 + 0x30); } } else { lVar1 = 0; } if (lVar1 == 0) { uVar2 = 0; } else { uVar2 = __JS_AtomToValue(param_1,*(int4 *)(lVar1 + 0x68),1); } return uVar2; }
47,602
js_function_proto_fileName
bluesky950520[P]quickjs/quickjs.c
static JSValue js_function_proto_fileName(JSContext *ctx, JSValue this_val) { JSFunctionBytecode *b = JS_GetFunctionBytecode(this_val); if (b) { return JS_AtomToString(ctx, b->filename); } return JS_UNDEFINED; }
O3
c
js_function_proto_fileName: movq %rdx, %rax movl $0x3, %edx cmpl $-0x1, %eax jne 0x7374c movzwl 0x6(%rsi), %ecx xorl %eax, %eax cmpq $0x38, %rcx ja 0x7374b movabsq $0x110000000012000, %r8 # imm = 0x110000000012000 btq %rcx, %r8 jae 0x7374b movq 0x30(%rsi), %rax testq %rax, %rax je 0x7374c pushq %rax movl 0x68(%rax), %esi movl $0x1, %edx callq 0x20277 addq $0x8, %rsp retq xorl %eax, %eax retq
js_function_proto_fileName: mov rax, rdx mov edx, 3 cmp eax, 0FFFFFFFFh jnz short loc_7374C movzx ecx, word ptr [rsi+6] xor eax, eax cmp rcx, 38h ; '8' ja short locret_7374B mov r8, 110000000012000h bt r8, rcx jnb short locret_7374B mov rax, [rsi+30h] test rax, rax jz short loc_7374C push rax mov esi, [rax+68h] mov edx, 1 call __JS_AtomToValue add rsp, 8 locret_7374B: retn loc_7374C: xor eax, eax retn
long long js_function_proto_fileName(long long a1, long long a2, int a3) { unsigned long long v3; // rcx long long result; // rax long long v5; // r8 long long v6; // rax if ( a3 != -1 ) return 0LL; v3 = *(unsigned __int16 *)(a2 + 6); result = 0LL; if ( v3 <= 0x38 ) { v5 = 0x110000000012000LL; if ( _bittest64(&v5, v3) ) { v6 = *(_QWORD *)(a2 + 48); if ( v6 ) return _JS_AtomToValue(a1, *(_DWORD *)(v6 + 104), 1); return 0LL; } } return result; }
js_function_proto_fileName: MOV RAX,RDX MOV EDX,0x3 CMP EAX,-0x1 JNZ 0x0017374c MOVZX ECX,word ptr [RSI + 0x6] XOR EAX,EAX CMP RCX,0x38 JA 0x0017374b MOV R8,0x110000000012000 BT R8,RCX JNC 0x0017374b MOV RAX,qword ptr [RSI + 0x30] TEST RAX,RAX JZ 0x0017374c PUSH RAX MOV ESI,dword ptr [RAX + 0x68] MOV EDX,0x1 CALL 0x00120277 ADD RSP,0x8 LAB_0017374b: RET LAB_0017374c: XOR EAX,EAX RET
int8 js_function_proto_fileName(int8 param_1,long param_2,int param_3) { int8 uVar1; if (param_3 != -1) { return 0; } uVar1 = 0; if (((ulong)*(ushort *)(param_2 + 6) < 0x39) && ((0x110000000012000U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) { if (*(long *)(param_2 + 0x30) == 0) { return 0; } uVar1 = __JS_AtomToValue(param_1,*(int4 *)(*(long *)(param_2 + 0x30) + 0x68),1); } return uVar1; }
47,603
ma_enlarge_root
eloqsql/storage/maria/ma_write.c
my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, my_off_t *root) { uint t_length, nod_flag; MARIA_KEY_PARAM s_temp; MARIA_SHARE *share= info->s; MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link; MARIA_KEYDEF *keyinfo= key->keyinfo; MARIA_PAGE page; my_bool res= 0; DBUG_ENTER("_ma_enlarge_root"); page.info= info; page.keyinfo= keyinfo; page.buff= info->buff; page.flag= 0; nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0; /* Store pointer to prev page if nod */ _ma_kpointer(info, page.buff + share->keypage_header, *root); t_length= (*keyinfo->pack_key)(key, nod_flag, (uchar*) 0, (uchar*) 0, (uchar*) 0, &s_temp); page.size= share->keypage_header + t_length + nod_flag; bzero(page.buff, share->keypage_header); _ma_store_keynr(share, page.buff, keyinfo->key_nr); if (nod_flag) page.flag|= KEYPAGE_FLAG_ISNOD; if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID)) page.flag|= KEYPAGE_FLAG_HAS_TRANSID; (*keyinfo->store_key)(keyinfo, page.buff + share->keypage_header + nod_flag, &s_temp); /* Mark that info->buff was used */ info->keyread_buff_used= info->page_changed= 1; if ((page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) == HA_OFFSET_ERROR) DBUG_RETURN(1); *root= page.pos; page_store_info(share, &page); /* Clear unitialized part of page to avoid valgrind/purify warnings and to get a clean page that is easier to compress and compare with pages generated with redo */ bzero(page.buff + page.size, share->block_size - page.size); if (share->now_transactional && _ma_log_new(&page, 1)) res= 1; if (_ma_write_keypage(&page, page_link->write_lock, PAGECACHE_PRIORITY_HIGH)) res= 1; DBUG_RETURN(res); }
O0
c
ma_enlarge_root: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x80(%rbp) leaq -0x98(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0xa8(%rbp) movb $0x0, -0xe1(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xe0(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0xd8(%rbp) movq -0x10(%rbp), %rax movq 0x378(%rax), %rax movq %rax, -0xd0(%rbp) movl $0x0, -0xb4(%rbp) movq -0x20(%rbp), %rax cmpq $-0x1, (%rax) je 0x88db7 movq -0x80(%rbp), %rax movl 0x3e4(%rax), %eax movl %eax, -0xec(%rbp) jmp 0x88dc1 xorl %eax, %eax movl %eax, -0xec(%rbp) jmp 0x88dc1 movl -0xec(%rbp), %eax movl %eax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0xd0(%rbp), %rsi movq -0x80(%rbp), %rax movl 0x744(%rax), %eax addq %rax, %rsi movq -0x20(%rbp), %rax movq (%rax), %rdx callq 0x720e0 movq -0xa8(%rbp), %rax movq 0xf0(%rax), %rax movq -0x18(%rbp), %rdi movl -0x28(%rbp), %esi xorl %ecx, %ecx movl %ecx, %r8d leaq -0x78(%rbp), %r9 movq %r8, %rdx movq %r8, %rcx callq *%rax movl %eax, -0x24(%rbp) movq -0x80(%rbp), %rax movl 0x744(%rax), %eax addl -0x24(%rbp), %eax addl -0x28(%rbp), %eax movl %eax, -0xc0(%rbp) movq -0xd0(%rbp), %rdi movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2f0 movq -0xa8(%rbp), %rax movb 0xa5(%rax), %dl movq -0xd0(%rbp), %rax movq -0x80(%rbp), %rcx movl 0x744(%rcx), %ecx subl $0x1, %ecx subl $0x1, %ecx subl $0x2, %ecx movl %ecx, %ecx movb %dl, (%rax,%rcx) cmpl $0x0, -0x28(%rbp) je 0x88e88 movl -0xb4(%rbp), %eax orl $0x1, %eax movl %eax, -0xb4(%rbp) movq -0x18(%rbp), %rax movl 0x18(%rax), %eax andl $0x180000, %eax # imm = 0x180000 cmpl $0x0, %eax je 0x88ea8 movl -0xb4(%rbp), %eax orl $0x2, %eax movl %eax, -0xb4(%rbp) movq -0xa8(%rbp), %rax movq 0xf8(%rax), %rax movq -0xa8(%rbp), %rdi movq -0xd0(%rbp), %rsi movq -0x80(%rbp), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi leaq -0x78(%rbp), %rdx callq *%rax movq -0x10(%rbp), %rax movb $0x1, 0x684(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x685(%rax) movq -0x10(%rbp), %rdi movl $0x6, %esi leaq -0xa0(%rbp), %rdx callq 0x76960 movq %rax, -0xc8(%rbp) cmpq $-0x1, %rax jne 0x88f20 jmp 0x88f17 movb $0x1, -0x1(%rbp) jmp 0x89027 movq -0xc8(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movl -0xb4(%rbp), %eax movb %al, %dl movq -0xd0(%rbp), %rax movq -0x80(%rbp), %rcx movl 0x744(%rcx), %ecx subl $0x2, %ecx subl $0x1, %ecx movl %ecx, %ecx movb %dl, (%rax,%rcx) movl -0xc0(%rbp), %eax movl %eax, -0xe8(%rbp) movl -0xe8(%rbp), %eax movb %al, %dl movq -0xd0(%rbp), %rax movq -0x80(%rbp), %rcx movl 0x744(%rcx), %ecx movb %dl, -0x1(%rax,%rcx) movl -0xe8(%rbp), %eax shrl $0x8, %eax movb %al, %dl movq -0xd0(%rbp), %rax movq -0x80(%rbp), %rcx movl 0x744(%rcx), %ecx movb %dl, -0x2(%rax,%rcx) movq -0xd0(%rbp), %rdi movl -0xc0(%rbp), %eax addq %rax, %rdi movq -0x80(%rbp), %rax movl 0x7bc(%rax), %eax subl -0xc0(%rbp), %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2f0 movq -0x80(%rbp), %rax movsbl 0x7e7(%rax), %eax cmpl $0x0, %eax je 0x88ff6 leaq -0xe0(%rbp), %rdi movl $0x1, %esi callq 0x89040 movsbl %al, %eax cmpl $0x0, %eax je 0x88ff6 movb $0x1, -0xe1(%rbp) movq -0xa0(%rbp), %rax movl 0xc(%rax), %esi leaq -0xe0(%rbp), %rdi movl $0x6, %edx callq 0x76390 cmpb $0x0, %al je 0x8901c movb $0x1, -0xe1(%rbp) jmp 0x8901e movb -0xe1(%rbp), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xf0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_enlarge_root: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_80], rax lea rax, [rbp+var_98] mov [rbp+var_A0], rax mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_A8], rax mov [rbp+var_E1], 0 mov rax, [rbp+var_10] mov [rbp+var_E0], rax mov rax, [rbp+var_A8] mov [rbp+var_D8], rax mov rax, [rbp+var_10] mov rax, [rax+378h] mov [rbp+var_D0], rax mov [rbp+var_B4], 0 mov rax, [rbp+var_20] cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh jz short loc_88DB7 mov rax, [rbp+var_80] mov eax, [rax+3E4h] mov [rbp+var_EC], eax jmp short loc_88DC1 loc_88DB7: xor eax, eax mov [rbp+var_EC], eax jmp short $+2 loc_88DC1: mov eax, [rbp+var_EC] mov [rbp+var_28], eax mov rdi, [rbp+var_10] mov rsi, [rbp+var_D0] mov rax, [rbp+var_80] mov eax, [rax+744h] add rsi, rax mov rax, [rbp+var_20] mov rdx, [rax] call _ma_kpointer mov rax, [rbp+var_A8] mov rax, [rax+0F0h] mov rdi, [rbp+var_18] mov esi, [rbp+var_28] xor ecx, ecx mov r8d, ecx lea r9, [rbp+var_78] mov rdx, r8 mov rcx, r8 call rax mov [rbp+var_24], eax mov rax, [rbp+var_80] mov eax, [rax+744h] add eax, [rbp+var_24] add eax, [rbp+var_28] mov [rbp+var_C0], eax mov rdi, [rbp+var_D0] mov rax, [rbp+var_80] mov eax, [rax+744h] mov edx, eax xor esi, esi call _memset mov rax, [rbp+var_A8] mov dl, [rax+0A5h] mov rax, [rbp+var_D0] mov rcx, [rbp+var_80] mov ecx, [rcx+744h] sub ecx, 1 sub ecx, 1 sub ecx, 2 mov ecx, ecx mov [rax+rcx], dl cmp [rbp+var_28], 0 jz short loc_88E88 mov eax, [rbp+var_B4] or eax, 1 mov [rbp+var_B4], eax loc_88E88: mov rax, [rbp+var_18] mov eax, [rax+18h] and eax, 180000h cmp eax, 0 jz short loc_88EA8 mov eax, [rbp+var_B4] or eax, 2 mov [rbp+var_B4], eax loc_88EA8: mov rax, [rbp+var_A8] mov rax, [rax+0F8h] mov rdi, [rbp+var_A8] mov rsi, [rbp+var_D0] mov rcx, [rbp+var_80] mov ecx, [rcx+744h] add rsi, rcx mov ecx, [rbp+var_28] add rsi, rcx lea rdx, [rbp+var_78] call rax mov rax, [rbp+var_10] mov byte ptr [rax+684h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+685h], 1 mov rdi, [rbp+var_10] mov esi, 6 lea rdx, [rbp+var_A0] call _ma_new mov [rbp+var_C8], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_88F20 jmp short $+2 loc_88F17: mov [rbp+var_1], 1 jmp loc_89027 loc_88F20: mov rcx, [rbp+var_C8] mov rax, [rbp+var_20] mov [rax], rcx mov eax, [rbp+var_B4] mov dl, al mov rax, [rbp+var_D0] mov rcx, [rbp+var_80] mov ecx, [rcx+744h] sub ecx, 2 sub ecx, 1 mov ecx, ecx mov [rax+rcx], dl mov eax, [rbp+var_C0] mov [rbp+var_E8], eax mov eax, [rbp+var_E8] mov dl, al mov rax, [rbp+var_D0] mov rcx, [rbp+var_80] mov ecx, [rcx+744h] mov [rax+rcx-1], dl mov eax, [rbp+var_E8] shr eax, 8 mov dl, al mov rax, [rbp+var_D0] mov rcx, [rbp+var_80] mov ecx, [rcx+744h] mov [rax+rcx-2], dl mov rdi, [rbp+var_D0] mov eax, [rbp+var_C0] add rdi, rax mov rax, [rbp+var_80] mov eax, [rax+7BCh] sub eax, [rbp+var_C0] mov eax, eax mov edx, eax xor esi, esi call _memset mov rax, [rbp+var_80] movsx eax, byte ptr [rax+7E7h] cmp eax, 0 jz short loc_88FF6 lea rdi, [rbp+var_E0] mov esi, 1 call _ma_log_new movsx eax, al cmp eax, 0 jz short loc_88FF6 mov [rbp+var_E1], 1 loc_88FF6: mov rax, [rbp+var_A0] mov esi, [rax+0Ch] lea rdi, [rbp+var_E0] mov edx, 6 call _ma_write_keypage cmp al, 0 jz short loc_8901C mov [rbp+var_E1], 1 loc_8901C: jmp short $+2 loc_8901E: mov al, [rbp+var_E1] mov [rbp+var_1], al loc_89027: mov al, [rbp+var_1] add rsp, 0F0h pop rbp retn
char ma_enlarge_root(long long *a1, long long a2, unsigned long long *a3) { unsigned int v4; // [rsp+4h] [rbp-ECh] char v5; // [rsp+9h] [rbp-E7h] char v6; // [rsp+Fh] [rbp-E1h] long long *v7[2]; // [rsp+10h] [rbp-E0h] BYREF long long v8; // [rsp+20h] [rbp-D0h] long long v9; // [rsp+28h] [rbp-C8h] unsigned int v10; // [rsp+30h] [rbp-C0h] int v11; // [rsp+3Ch] [rbp-B4h] long long v12; // [rsp+48h] [rbp-A8h] char *v13; // [rsp+50h] [rbp-A0h] BYREF char v14; // [rsp+58h] [rbp-98h] BYREF long long v15; // [rsp+70h] [rbp-80h] _BYTE v16[80]; // [rsp+78h] [rbp-78h] BYREF unsigned int v17; // [rsp+C8h] [rbp-28h] int v18; // [rsp+CCh] [rbp-24h] unsigned long long *v19; // [rsp+D0h] [rbp-20h] long long v20; // [rsp+D8h] [rbp-18h] long long *v21; // [rsp+E0h] [rbp-10h] v21 = a1; v20 = a2; v19 = a3; v15 = *a1; v13 = &v14; v12 = *(_QWORD *)(a2 + 8); v6 = 0; v7[0] = a1; v7[1] = (long long *)v12; v8 = a1[111]; v11 = 0; if ( *a3 == -1LL ) v4 = 0; else v4 = *(_DWORD *)(v15 + 996); v17 = v4; ma_kpointer((long long)v21, (_BYTE *)(*(unsigned int *)(v15 + 1860) + v8), *v19); v18 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))(v12 + 240))( v20, v17, 0LL, 0LL, 0LL, v16); v10 = v17 + v18 + *(_DWORD *)(v15 + 1860); memset(v8, 0LL, *(unsigned int *)(v15 + 1860)); *(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(v15 + 1860) - 4)) = *(_BYTE *)(v12 + 165); if ( v17 ) v11 |= 1u; if ( (*(_DWORD *)(v20 + 24) & 0x180000) != 0 ) v11 |= 2u; (*(void ( **)(long long, long long, _BYTE *))(v12 + 248))(v12, v17 + *(unsigned int *)(v15 + 1860) + v8, v16); *((_BYTE *)v21 + 1668) = 1; *((_BYTE *)v21 + 1669) = 1; v9 = ma_new(v21, 6, &v13); if ( v9 == -1 ) return 1; *v19 = v9; *(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(v15 + 1860) - 3)) = v11; v5 = BYTE1(v10); *(_BYTE *)(v8 + *(unsigned int *)(v15 + 1860) - 1) = v10; *(_BYTE *)(v8 + *(unsigned int *)(v15 + 1860) - 2) = v5; memset(v10 + v8, 0LL, *(_DWORD *)(v15 + 1980) - v10); if ( *(_BYTE *)(v15 + 2023) && (unsigned __int8)ma_log_new(v7, 1LL) ) v6 = 1; if ( ma_write_keypage(v7, *((_DWORD *)v13 + 3), 6) ) return 1; return v6; }
_ma_enlarge_root: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x80],RAX LEA RAX,[RBP + -0x98] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0xa8],RAX MOV byte ptr [RBP + -0xe1],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xe0],RAX MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x378] MOV qword ptr [RBP + -0xd0],RAX MOV dword ptr [RBP + -0xb4],0x0 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],-0x1 JZ 0x00188db7 MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x3e4] MOV dword ptr [RBP + -0xec],EAX JMP 0x00188dc1 LAB_00188db7: XOR EAX,EAX MOV dword ptr [RBP + -0xec],EAX JMP 0x00188dc1 LAB_00188dc1: MOV EAX,dword ptr [RBP + -0xec] MOV dword ptr [RBP + -0x28],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0xd0] MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX] CALL 0x001720e0 MOV RAX,qword ptr [RBP + -0xa8] MOV RAX,qword ptr [RAX + 0xf0] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x28] XOR ECX,ECX MOV R8D,ECX LEA R9,[RBP + -0x78] MOV RDX,R8 MOV RCX,R8 CALL RAX MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] ADD EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0xc0],EAX MOV RDI,qword ptr [RBP + -0xd0] MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2f0 MOV RAX,qword ptr [RBP + -0xa8] MOV DL,byte ptr [RAX + 0xa5] MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0x80] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x1 SUB ECX,0x1 SUB ECX,0x2 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],DL CMP dword ptr [RBP + -0x28],0x0 JZ 0x00188e88 MOV EAX,dword ptr [RBP + -0xb4] OR EAX,0x1 MOV dword ptr [RBP + -0xb4],EAX LAB_00188e88: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0x180000 CMP EAX,0x0 JZ 0x00188ea8 MOV EAX,dword ptr [RBP + -0xb4] OR EAX,0x2 MOV dword ptr [RBP + -0xb4],EAX LAB_00188ea8: MOV RAX,qword ptr [RBP + -0xa8] MOV RAX,qword ptr [RAX + 0xf8] MOV RDI,qword ptr [RBP + -0xa8] MOV RSI,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0x80] MOV ECX,dword ptr [RCX + 0x744] ADD RSI,RCX MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX LEA RDX,[RBP + -0x78] CALL RAX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x684],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x685],0x1 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x6 LEA RDX,[RBP + -0xa0] CALL 0x00176960 MOV qword ptr [RBP + -0xc8],RAX CMP RAX,-0x1 JNZ 0x00188f20 JMP 0x00188f17 LAB_00188f17: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00189027 LAB_00188f20: MOV RCX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0xb4] MOV DL,AL MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0x80] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x2 SUB ECX,0x1 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0xc0] MOV dword ptr [RBP + -0xe8],EAX MOV EAX,dword ptr [RBP + -0xe8] MOV DL,AL MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0x80] MOV ECX,dword ptr [RCX + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x1],DL MOV EAX,dword ptr [RBP + -0xe8] SHR EAX,0x8 MOV DL,AL MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0x80] MOV ECX,dword ptr [RCX + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x2],DL MOV RDI,qword ptr [RBP + -0xd0] MOV EAX,dword ptr [RBP + -0xc0] ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x7bc] SUB EAX,dword ptr [RBP + -0xc0] MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2f0 MOV RAX,qword ptr [RBP + -0x80] MOVSX EAX,byte ptr [RAX + 0x7e7] CMP EAX,0x0 JZ 0x00188ff6 LEA RDI,[RBP + -0xe0] MOV ESI,0x1 CALL 0x00189040 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00188ff6 MOV byte ptr [RBP + -0xe1],0x1 LAB_00188ff6: MOV RAX,qword ptr [RBP + -0xa0] MOV ESI,dword ptr [RAX + 0xc] LEA RDI,[RBP + -0xe0] MOV EDX,0x6 CALL 0x00176390 CMP AL,0x0 JZ 0x0018901c MOV byte ptr [RBP + -0xe1],0x1 LAB_0018901c: JMP 0x0018901e LAB_0018901e: MOV AL,byte ptr [RBP + -0xe1] MOV byte ptr [RBP + -0x1],AL LAB_00189027: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xf0 POP RBP RET
int8 _ma_enlarge_root(long *param_1,long param_2,long *param_3) { char cVar1; int8 uVar2; int7 uVar3; uint local_f4; int1 local_e9; long *local_e8; long local_e0; void *local_d8; long local_d0; uint local_c8; uint local_bc; long local_b0; int1 *local_a8; int1 local_a0 [24]; long local_88; int1 local_80 [80]; uint local_30; int local_2c; long *local_28; long local_20; long *local_18; int1 local_9; local_88 = *param_1; local_a8 = local_a0; local_e0 = *(long *)(param_2 + 8); local_e9 = 0; local_d8 = (void *)param_1[0x6f]; local_bc = 0; if (*param_3 == -1) { local_f4 = 0; } else { local_f4 = *(uint *)(local_88 + 0x3e4); } local_30 = local_f4; local_e8 = param_1; local_b0 = local_e0; local_28 = param_3; local_20 = param_2; local_18 = param_1; _ma_kpointer(param_1,(long)local_d8 + (ulong)*(uint *)(local_88 + 0x744),*param_3); local_2c = (**(code **)(local_b0 + 0xf0))(local_20,local_30,0,0,0,local_80); local_c8 = *(int *)(local_88 + 0x744) + local_2c + local_30; memset(local_d8,0,(ulong)*(uint *)(local_88 + 0x744)); *(int1 *)((long)local_d8 + (ulong)(*(int *)(local_88 + 0x744) - 4)) = *(int1 *)(local_b0 + 0xa5); if (local_30 != 0) { local_bc = local_bc | 1; } if ((*(uint *)(local_20 + 0x18) & 0x180000) != 0) { local_bc = local_bc | 2; } (**(code **)(local_b0 + 0xf8)) (local_b0,(long)local_d8 + (ulong)local_30 + (ulong)*(uint *)(local_88 + 0x744),local_80 ); *(int1 *)((long)local_18 + 0x684) = 1; *(int1 *)((long)local_18 + 0x685) = 1; local_d0 = _ma_new(local_18,6,&local_a8); if (local_d0 == -1) { local_9 = 1; uVar3 = 0xffffffffffffff; } else { *local_28 = local_d0; *(char *)((long)local_d8 + (ulong)(*(int *)(local_88 + 0x744) - 3)) = (char)local_bc; *(char *)((long)local_d8 + ((ulong)*(uint *)(local_88 + 0x744) - 1)) = (char)local_c8; *(char *)((long)local_d8 + ((ulong)*(uint *)(local_88 + 0x744) - 2)) = (char)(local_c8 >> 8); memset((void *)((long)local_d8 + (ulong)local_c8),0, (ulong)(*(int *)(local_88 + 0x7bc) - local_c8)); if (*(char *)(local_88 + 0x7e7) != '\0') { cVar1 = _ma_log_new(&local_e8,1); if (cVar1 != '\0') { local_e9 = 1; } } uVar2 = _ma_write_keypage(&local_e8,*(int4 *)(local_a8 + 0xc),6); if ((char)uVar2 != '\0') { local_e9 = 1; } uVar3 = (int7)((ulong)uVar2 >> 8); local_9 = local_e9; } return CONCAT71(uVar3,local_9); }
47,604
ma_open
eloqsql/libmariadb/libmariadb/ma_io.c
MA_FILE *ma_open(const char *location, const char *mode, MYSQL *mysql) { int CodePage= -1; FILE *fp= NULL; MA_FILE *ma_file= NULL; if (!location || !location[0]) return NULL; #ifdef HAVE_REMOTEIO if (strstr(location, "://")) goto remote; #endif #ifdef _WIN32 if (mysql && mysql->charset) CodePage= madb_get_windows_cp(mysql->charset->csname); #endif if (CodePage == -1) { if (!(fp= fopen(location, mode))) { return NULL; } } #ifdef _WIN32 /* See CONC-44: we need to support non ascii filenames too, so we convert current character set to wchar_t and try to open the file via _wsopen */ else { wchar_t *w_filename= NULL; wchar_t *w_mode= NULL; int len; DWORD Length; len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), NULL, 0); if (!len) return NULL; if (!(w_filename= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t)))) { my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return NULL; } Length= len; len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), w_filename, (int)Length); if (!len) { /* todo: error handling */ free(w_filename); return NULL; } len= (int)strlen(mode); if (!(w_mode= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t)))) { my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); free(w_filename); return NULL; } Length= len; len= MultiByteToWideChar(CodePage, 0, mode, (int)strlen(mode), w_mode, (int)Length); if (!len) { /* todo: error handling */ free(w_filename); free(w_mode); return NULL; } fp= _wfopen(w_filename, w_mode); free(w_filename); free(w_mode); } #endif if (fp) { ma_file= (MA_FILE *)malloc(sizeof(MA_FILE)); if (!ma_file) { fclose(fp); my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return NULL; } ma_file->type= MA_FILE_LOCAL; ma_file->ptr= (void *)fp; } return ma_file; #ifdef HAVE_REMOTEIO remote: /* check if plugin for remote io is available and try * to open location */ { MYSQL mysql; if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *) mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN))) return rio_plugin->methods->mopen(location, mode); return NULL; } #endif }
O0
c
ma_open: pushq %rbp movq %rsp, %rbp subq $0x540, %rsp # imm = 0x540 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x510(%rbp) movq %rsi, -0x518(%rbp) movq %rdx, -0x520(%rbp) movl $0xffffffff, -0x524(%rbp) # imm = 0xFFFFFFFF movq $0x0, -0x530(%rbp) movq $0x0, -0x538(%rbp) cmpq $0x0, -0x510(%rbp) je 0x3b0f3 movq -0x510(%rbp), %rax cmpb $0x0, (%rax) jne 0x3b103 movq $0x0, -0x508(%rbp) jmp 0x3b254 movq -0x510(%rbp), %rdi leaq 0x164d2(%rip), %rsi # 0x515e3 callq 0x13100 cmpq $0x0, %rax je 0x3b121 jmp 0x3b1ed cmpl $-0x1, -0x524(%rbp) jne 0x3b15c movq -0x510(%rbp), %rdi movq -0x518(%rbp), %rsi callq 0x134d0 movq %rax, -0x530(%rbp) cmpq $0x0, %rax jne 0x3b15a movq $0x0, -0x508(%rbp) jmp 0x3b254 jmp 0x3b15c cmpq $0x0, -0x530(%rbp) je 0x3b1dd movl $0x10, %edi callq 0x135b0 movq %rax, -0x538(%rbp) cmpq $0x0, -0x538(%rbp) jne 0x3b1be movq -0x530(%rbp), %rdi callq 0x13420 movq -0x520(%rbp), %rdi leaq 0x28fa5(%rip), %rax # 0x64140 movq (%rax), %rdx movl $0x7d8, %esi # imm = 0x7D8 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x1ac80 movq $0x0, -0x508(%rbp) jmp 0x3b254 movq -0x538(%rbp), %rax movl $0x1, (%rax) movq -0x530(%rbp), %rcx movq -0x538(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x538(%rbp), %rax movq %rax, -0x508(%rbp) jmp 0x3b254 leaq 0x2ad7c(%rip), %rax # 0x65f70 cmpq $0x0, (%rax) jne 0x3b21f leaq -0x500(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0x64, %edx callq 0x3aec0 leaq 0x2ad5a(%rip), %rcx # 0x65f70 movq %rax, (%rcx) cmpq $0x0, %rax je 0x3b249 leaq 0x2ad4a(%rip), %rax # 0x65f70 movq (%rax), %rax movq 0x58(%rax), %rax movq (%rax), %rax movq -0x510(%rbp), %rdi movq -0x518(%rbp), %rsi callq *%rax movq %rax, -0x508(%rbp) jmp 0x3b254 movq $0x0, -0x508(%rbp) movq -0x508(%rbp), %rax movq %rax, -0x540(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3b284 movq -0x540(%rbp), %rax addq $0x540, %rsp # imm = 0x540 popq %rbp retq callq 0x134b0 nopl (%rax)
ma_open: push rbp mov rbp, rsp sub rsp, 540h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_510], rdi mov [rbp+var_518], rsi mov [rbp+var_520], rdx mov [rbp+var_524], 0FFFFFFFFh mov [rbp+var_530], 0 mov [rbp+var_538], 0 cmp [rbp+var_510], 0 jz short loc_3B0F3 mov rax, [rbp+var_510] cmp byte ptr [rax], 0 jnz short loc_3B103 loc_3B0F3: mov [rbp+var_508], 0 jmp loc_3B254 loc_3B103: mov rdi, [rbp+var_510] lea rsi, asc_515E3; "://" call _strstr cmp rax, 0 jz short loc_3B121 jmp loc_3B1ED loc_3B121: cmp [rbp+var_524], 0FFFFFFFFh jnz short loc_3B15C mov rdi, [rbp+var_510] mov rsi, [rbp+var_518] call _fopen64 mov [rbp+var_530], rax cmp rax, 0 jnz short loc_3B15A mov [rbp+var_508], 0 jmp loc_3B254 loc_3B15A: jmp short $+2 loc_3B15C: cmp [rbp+var_530], 0 jz short loc_3B1DD mov edi, 10h call _malloc mov [rbp+var_538], rax cmp [rbp+var_538], 0 jnz short loc_3B1BE mov rdi, [rbp+var_530] call _fclose mov rdi, [rbp+var_520] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D8h xor eax, eax mov ecx, eax mov al, 0 call my_set_error mov [rbp+var_508], 0 jmp loc_3B254 loc_3B1BE: mov rax, [rbp+var_538] mov dword ptr [rax], 1 mov rcx, [rbp+var_530] mov rax, [rbp+var_538] mov [rax+8], rcx loc_3B1DD: mov rax, [rbp+var_538] mov [rbp+var_508], rax jmp short loc_3B254 loc_3B1ED: lea rax, rio_plugin cmp qword ptr [rax], 0 jnz short loc_3B21F lea rdi, [rbp+var_500] xor eax, eax mov esi, eax mov edx, 64h ; 'd' call mysql_client_find_plugin lea rcx, rio_plugin mov [rcx], rax cmp rax, 0 jz short loc_3B249 loc_3B21F: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax] mov rdi, [rbp+var_510] mov rsi, [rbp+var_518] call rax mov [rbp+var_508], rax jmp short loc_3B254 loc_3B249: mov [rbp+var_508], 0 loc_3B254: mov rax, [rbp+var_508] mov [rbp+var_540], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3B284 mov rax, [rbp+var_540] add rsp, 540h pop rbp retn loc_3B284: call ___stack_chk_fail
long long ma_open(_BYTE *a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-538h] long long v5; // [rsp+10h] [rbp-530h] _BYTE v8[1272]; // [rsp+40h] [rbp-500h] BYREF unsigned long long v9; // [rsp+538h] [rbp-8h] v9 = __readfsqword(0x28u); if ( !a1 || !*a1 ) return 0LL; if ( strstr(a1, "://") ) { if ( rio_plugin ) return (**(long long ( ***)(_BYTE *, long long))(rio_plugin + 88LL))(a1, a2); rio_plugin = mysql_client_find_plugin((long long)v8, 0LL, 0x64u); if ( rio_plugin ) return (**(long long ( ***)(_BYTE *, long long))(rio_plugin + 88LL))(a1, a2); else return 0LL; } else { v5 = fopen64(a1, a2); if ( v5 ) { v4 = malloc(16LL); if ( v4 ) { *(_DWORD *)v4 = 1; *(_QWORD *)(v4 + 8) = v5; return v4; } else { fclose(v5); my_set_error(a3, 0x7D8u, (long long)SQLSTATE_UNKNOWN, 0LL); return 0LL; } } else { return 0LL; } } }
ma_open: PUSH RBP MOV RBP,RSP SUB RSP,0x540 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x510],RDI MOV qword ptr [RBP + -0x518],RSI MOV qword ptr [RBP + -0x520],RDX MOV dword ptr [RBP + -0x524],0xffffffff MOV qword ptr [RBP + -0x530],0x0 MOV qword ptr [RBP + -0x538],0x0 CMP qword ptr [RBP + -0x510],0x0 JZ 0x0013b0f3 MOV RAX,qword ptr [RBP + -0x510] CMP byte ptr [RAX],0x0 JNZ 0x0013b103 LAB_0013b0f3: MOV qword ptr [RBP + -0x508],0x0 JMP 0x0013b254 LAB_0013b103: MOV RDI,qword ptr [RBP + -0x510] LEA RSI,[0x1515e3] CALL 0x00113100 CMP RAX,0x0 JZ 0x0013b121 JMP 0x0013b1ed LAB_0013b121: CMP dword ptr [RBP + -0x524],-0x1 JNZ 0x0013b15c MOV RDI,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RBP + -0x518] CALL 0x001134d0 MOV qword ptr [RBP + -0x530],RAX CMP RAX,0x0 JNZ 0x0013b15a MOV qword ptr [RBP + -0x508],0x0 JMP 0x0013b254 LAB_0013b15a: JMP 0x0013b15c LAB_0013b15c: CMP qword ptr [RBP + -0x530],0x0 JZ 0x0013b1dd MOV EDI,0x10 CALL 0x001135b0 MOV qword ptr [RBP + -0x538],RAX CMP qword ptr [RBP + -0x538],0x0 JNZ 0x0013b1be MOV RDI,qword ptr [RBP + -0x530] CALL 0x00113420 MOV RDI,qword ptr [RBP + -0x520] LEA RAX,[0x164140] MOV RDX,qword ptr [RAX] MOV ESI,0x7d8 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x0011ac80 MOV qword ptr [RBP + -0x508],0x0 JMP 0x0013b254 LAB_0013b1be: MOV RAX,qword ptr [RBP + -0x538] MOV dword ptr [RAX],0x1 MOV RCX,qword ptr [RBP + -0x530] MOV RAX,qword ptr [RBP + -0x538] MOV qword ptr [RAX + 0x8],RCX LAB_0013b1dd: MOV RAX,qword ptr [RBP + -0x538] MOV qword ptr [RBP + -0x508],RAX JMP 0x0013b254 LAB_0013b1ed: LEA RAX,[0x165f70] CMP qword ptr [RAX],0x0 JNZ 0x0013b21f LEA RDI,[RBP + -0x500] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x64 CALL 0x0013aec0 LEA RCX,[0x165f70] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x0013b249 LAB_0013b21f: LEA RAX,[0x165f70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RBP + -0x518] CALL RAX MOV qword ptr [RBP + -0x508],RAX JMP 0x0013b254 LAB_0013b249: MOV qword ptr [RBP + -0x508],0x0 LAB_0013b254: MOV RAX,qword ptr [RBP + -0x508] MOV qword ptr [RBP + -0x540],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013b284 MOV RAX,qword ptr [RBP + -0x540] ADD RSP,0x540 POP RBP RET LAB_0013b284: CALL 0x001134b0
int4 * ma_open(char *param_1,char *param_2,int8 param_3) { char *pcVar1; FILE *__stream; long in_FS_OFFSET; int4 *local_540; int4 *local_510; int1 local_508 [1272]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_540 = (int4 *)0x0; if ((param_1 == (char *)0x0) || (*param_1 == '\0')) { local_510 = (int4 *)0x0; } else { pcVar1 = strstr(param_1,"://"); if (pcVar1 == (char *)0x0) { __stream = fopen64(param_1,param_2); if (__stream == (FILE *)0x0) { local_510 = (int4 *)0x0; } else { if (__stream != (FILE *)0x0) { local_540 = (int4 *)malloc(0x10); if (local_540 == (int4 *)0x0) { fclose(__stream); my_set_error(param_3,0x7d8,SQLSTATE_UNKNOWN,0); local_510 = (int4 *)0x0; goto LAB_0013b254; } *local_540 = 1; *(FILE **)(local_540 + 2) = __stream; } local_510 = local_540; } } else if ((rio_plugin == 0) && (rio_plugin = mysql_client_find_plugin(local_508,0,100), rio_plugin == 0)) { local_510 = (int4 *)0x0; } else { local_510 = (int4 *)(*(code *)**(int8 **)(rio_plugin + 0x58))(param_1,param_2); } } LAB_0013b254: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_510; }
47,605
string_buffer_fill
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_fill(StringBuffer *s, int c, int count) { /* XXX: optimize */ if (s->len + count > s->size) { if (string_buffer_realloc(s, s->len + count, c)) return -1; } while (count-- > 0) { if (string_buffer_putc16(s, c)) return -1; } return 0; }
O3
c
string_buffer_fill: pushq %rbp pushq %r14 pushq %rbx movl %edx, %ebx movl %esi, %ebp movq %rdi, %r14 movl 0x10(%rdi), %esi addl %edx, %esi cmpl 0x14(%rdi), %esi jle 0x7f91f movq %r14, %rdi movl %ebp, %edx callq 0x4305b movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x7f93e incl %ebx decl %ebx testl %ebx, %ebx jle 0x7f93c movq %r14, %rdi movl %ebp, %esi callq 0x4886d testl %eax, %eax je 0x7f921 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x7f93e xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
string_buffer_fill: push rbp push r14 push rbx mov ebx, edx mov ebp, esi mov r14, rdi mov esi, [rdi+10h] add esi, edx cmp esi, [rdi+14h] jle short loc_7F91F mov rdi, r14 mov edx, ebp call string_buffer_realloc mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_7F93E loc_7F91F: inc ebx loc_7F921: dec ebx test ebx, ebx jle short loc_7F93C mov rdi, r14 mov esi, ebp call string_buffer_putc16 test eax, eax jz short loc_7F921 mov eax, 0FFFFFFFFh jmp short loc_7F93E loc_7F93C: xor eax, eax loc_7F93E: pop rbx pop r14 pop rbp retn
long long string_buffer_fill( long long a1, unsigned int a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v16; // esi int v17; // ecx long long result; // rax int v19; // ebx v16 = a3 + *(_DWORD *)(a1 + 16); if ( v16 <= *(_DWORD *)(a1 + 20) || (v17 = string_buffer_realloc(a1, v16, a2, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14), result = 0xFFFFFFFFLL, !v17) ) { v19 = a3 + 1; while ( --v19 > 0 ) { if ( (unsigned int)string_buffer_putc16(a1, a2) ) return 0xFFFFFFFFLL; } return 0LL; } return result; }
string_buffer_fill: PUSH RBP PUSH R14 PUSH RBX MOV EBX,EDX MOV EBP,ESI MOV R14,RDI MOV ESI,dword ptr [RDI + 0x10] ADD ESI,EDX CMP ESI,dword ptr [RDI + 0x14] JLE 0x0017f91f MOV RDI,R14 MOV EDX,EBP CALL 0x0014305b MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x0017f93e LAB_0017f91f: INC EBX LAB_0017f921: DEC EBX TEST EBX,EBX JLE 0x0017f93c MOV RDI,R14 MOV ESI,EBP CALL 0x0014886d TEST EAX,EAX JZ 0x0017f921 MOV EAX,0xffffffff JMP 0x0017f93e LAB_0017f93c: XOR EAX,EAX LAB_0017f93e: POP RBX POP R14 POP RBP RET
int8 string_buffer_fill(long param_1,int4 param_2,int param_3) { int iVar1; iVar1 = *(int *)(param_1 + 0x10) + param_3; if ((*(int *)(param_1 + 0x14) < iVar1) && (iVar1 = string_buffer_realloc(param_1,iVar1,param_2), iVar1 != 0)) { return 0xffffffff; } param_3 = param_3 + 1; do { param_3 = param_3 + -1; if (param_3 < 1) { return 0; } iVar1 = string_buffer_putc16(param_1,param_2); } while (iVar1 == 0); return 0xffffffff; }
47,606
my_mb_wc_utf16_quick
eloqsql/strings/ctype-utf16.h
static inline int my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { if (s + 2 > e) return MY_CS_TOOSMALL2; /* High bytes: 0xD[89AB] = B'110110??' Low bytes: 0xD[CDEF] = B'110111??' Surrogate mask: 0xFC = B'11111100' */ if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */ { if (s + 4 > e) return MY_CS_TOOSMALL4; if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */ return MY_CS_ILSEQ; *pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]); return 4; } if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */ return MY_CS_ILSEQ; *pwc= MY_UTF16_WC2(s[0], s[1]); return 2; }
O0
c
my_mb_wc_utf16_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x581aa movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x58288 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xd8, %eax jne 0x58247 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x581db movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x58288 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax je 0x581fb movl $0x0, -0x4(%rbp) jmp 0x58288 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0x3, %eax shll $0x12, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0xa, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx andl $0x3, %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx addl %ecx, %eax addl $0x10000, %eax # imm = 0x10000 movslq %eax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x58288 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax jne 0x58263 movl $0x0, -0x4(%rbp) jmp 0x58288 movq -0x18(%rbp), %rax movzbl (%rax), %eax shll $0x8, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_mb_wc_utf16_quick: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_581AA mov [rbp+var_4], 0FFFFFF9Ah jmp loc_58288 loc_581AA: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0D8h jnz loc_58247 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_581DB mov [rbp+var_4], 0FFFFFF98h jmp loc_58288 loc_581DB: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] and eax, 0FCh cmp eax, 0DCh jz short loc_581FB mov [rbp+var_4], 0 jmp loc_58288 loc_581FB: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 3 shl eax, 12h mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 0Ah add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] and ecx, 3 shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] add eax, ecx add eax, 10000h movsxd rcx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_58288 loc_58247: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0DCh jnz short loc_58263 mov [rbp+var_4], 0 jmp short loc_58288 loc_58263: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] shl eax, 8 mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 loc_58288: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf16_quick(_QWORD *a1, unsigned __int8 *a2, unsigned long long a3) { if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (*a2 & 0xFC) == 0xD8 ) { if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[2] & 0xFC) == 0xDC ) { *a1 = a2[3] + ((a2[2] & 3) << 8) + (a2[1] << 10) + ((*a2 & 3) << 18) + 0x10000; return 4; } else { return 0; } } else { return (unsigned int)-104; } } else if ( (*a2 & 0xFC) == 0xDC ) { return 0; } else { *a1 = a2[1] + (*a2 << 8); return 2; } } else { return (unsigned int)-102; } }
my_mb_wc_utf16_quick: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x001581aa MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00158288 LAB_001581aa: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xd8 JNZ 0x00158247 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x001581db MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00158288 LAB_001581db: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] AND EAX,0xfc CMP EAX,0xdc JZ 0x001581fb MOV dword ptr [RBP + -0x4],0x0 JMP 0x00158288 LAB_001581fb: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0x3 SHL EAX,0x12 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0xa ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] AND ECX,0x3 SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] ADD EAX,ECX ADD EAX,0x10000 MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x00158288 LAB_00158247: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xdc JNZ 0x00158263 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00158288 LAB_00158263: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 LAB_00158288: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf16_quick(long *param_1,byte *param_2,byte *param_3) { int4 local_c; if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((*param_2 & 0xfc) == 0xd8) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if ((param_2[2] & 0xfc) == 0xdc) { *param_1 = (long)(int)((*param_2 & 3) * 0x40000 + (uint)param_2[1] * 0x400 + (param_2[2] & 3) * 0x100 + (uint)param_2[3] + 0x10000); local_c = 4; } else { local_c = 0; } } else if ((*param_2 & 0xfc) == 0xdc) { local_c = 0; } else { *param_1 = (long)(int)((uint)*param_2 * 0x100 + (uint)param_2[1]); local_c = 2; } return local_c; }
47,607
limbs_from_be_bytes
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/bytes.h
static inline void limbs_from_be_bytes(limb_t *restrict ret, const unsigned char *in, size_t n) { limb_t limb = 0; while(n--) { limb <<= 8; limb |= *in++; /* * 'if (n % sizeof(limb_t) == 0)' is omitted because it's cheaper * to perform redundant stores than to pay penalty for * mispredicted branch. Besides, some compilers unroll the * loop and remove redundant stores to 'restrict'-ed storage... */ ret[n / sizeof(limb_t)] = limb; } }
O2
c
limbs_from_be_bytes: pushq %rbp movq %rsp, %rbp decq %rdx xorl %eax, %eax cmpq $-0x1, %rdx je 0x5ac13 shlq $0x8, %rax movzbl (%rsi), %ecx incq %rsi orq %rcx, %rax movq %rdx, %rcx andq $-0x8, %rcx movq %rax, (%rdi,%rcx) decq %rdx jmp 0x5abf0 popq %rbp retq
limbs_from_be_bytes: push rbp mov rbp, rsp dec rdx xor eax, eax loc_5ABF0: cmp rdx, 0FFFFFFFFFFFFFFFFh jz short loc_5AC13 shl rax, 8 movzx ecx, byte ptr [rsi] inc rsi or rax, rcx mov rcx, rdx and rcx, 0FFFFFFFFFFFFFFF8h mov [rdi+rcx], rax dec rdx jmp short loc_5ABF0 loc_5AC13: pop rbp retn
long long limbs_from_be_bytes(long long a1, unsigned __int8 *a2, long long a3) { long long v3; // rdx long long result; // rax long long v5; // rcx v3 = a3 - 1; result = 0LL; while ( v3 != -1 ) { v5 = *a2++; result = v5 | (result << 8); *(_QWORD *)(a1 + (v3-- & 0xFFFFFFFFFFFFFFF8LL)) = result; } return result; }
limbs_from_be_bytes: PUSH RBP MOV RBP,RSP DEC RDX XOR EAX,EAX LAB_0015abf0: CMP RDX,-0x1 JZ 0x0015ac13 SHL RAX,0x8 MOVZX ECX,byte ptr [RSI] INC RSI OR RAX,RCX MOV RCX,RDX AND RCX,-0x8 MOV qword ptr [RDI + RCX*0x1],RAX DEC RDX JMP 0x0015abf0 LAB_0015ac13: POP RBP RET
void limbs_from_be_bytes(long param_1,byte *param_2,long param_3) { byte bVar1; ulong uVar2; ulong uVar3; uVar2 = 0; for (uVar3 = param_3 - 1; uVar3 != 0xffffffffffffffff; uVar3 = uVar3 - 1) { bVar1 = *param_2; param_2 = param_2 + 1; uVar2 = uVar2 << 8 | (ulong)bVar1; *(ulong *)(param_1 + (uVar3 & 0xfffffffffffffff8)) = uVar2; } return; }
47,608
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op)
monkey531[P]llama/common/minja.hpp
Expression(const Location & location) : location(location) {}
O3
cpp
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op): leaq 0x8909f(%rip), %rax # 0xdb278 addq $0x10, %rax movq %rax, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x5220a movq 0x8ad8d(%rip), %r9 # 0xdcf88 cmpb $0x0, (%r9) je 0x52206 incl 0x8(%rax) jmp 0x5220a lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rdi) leaq 0x89607(%rip), %rax # 0xdb820 addq $0x10, %rax movq %rax, (%rdi) xorl %eax, %eax movq %rax, 0x28(%rdi) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x20(%rdi) movq %rax, (%rdx) movq %rax, 0x38(%rdi) movups (%rcx), %xmm0 movq %rax, 0x8(%rcx) movups %xmm0, 0x30(%rdi) movq %rax, (%rcx) movups (%r8), %xmm0 movups %xmm0, 0x40(%rdi) movq 0x10(%r8), %rcx movq %rcx, 0x50(%rdi) movq %rax, 0x10(%r8) xorps %xmm0, %xmm0 movups %xmm0, (%r8) movups 0x18(%r8), %xmm1 movups %xmm1, 0x58(%rdi) movq 0x28(%r8), %rcx movq %rcx, 0x68(%rdi) movq %rax, 0x28(%r8) movups %xmm0, 0x18(%r8) retq
_ZN5minja14MethodCallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12VariableExprEEONS_19ArgumentsExpressionE: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rdi], rax mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_5220A mov r9, cs:__libc_single_threaded_ptr cmp byte ptr [r9], 0 jz short loc_52206 inc dword ptr [rax+8] jmp short loc_5220A loc_52206: lock inc dword ptr [rax+8] loc_5220A: mov rax, [rsi+10h] mov [rdi+18h], rax lea rax, _ZTVN5minja14MethodCallExprE; `vtable for'minja::MethodCallExpr add rax, 10h mov [rdi], rax xor eax, eax mov [rdi+28h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rdi+20h], xmm0 mov [rdx], rax mov [rdi+38h], rax movups xmm0, xmmword ptr [rcx] mov [rcx+8], rax movups xmmword ptr [rdi+30h], xmm0 mov [rcx], rax movups xmm0, xmmword ptr [r8] movups xmmword ptr [rdi+40h], xmm0 mov rcx, [r8+10h] mov [rdi+50h], rcx mov [r8+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r8], xmm0 movups xmm1, xmmword ptr [r8+18h] movups xmmword ptr [rdi+58h], xmm1 mov rcx, [r8+28h] mov [rdi+68h], rcx mov [r8+28h], rax movups xmmword ptr [r8+18h], xmm0 retn
long long minja::MethodCallExpr::MethodCallExpr( long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, long long a5) { long long v5; // rax long long result; // rax __int128 v7; // xmm0 __int128 v8; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::Expression + 2; *(_QWORD *)(a1 + 8) = *a2; v5 = a2[1]; *(_QWORD *)(a1 + 16) = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v5 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v5 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::MethodCallExpr + 2; result = 0LL; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a4 = 0LL; *(_OWORD *)(a1 + 64) = *(_OWORD *)a5; *(_QWORD *)(a1 + 80) = *(_QWORD *)(a5 + 16); *(_QWORD *)(a5 + 16) = 0LL; *(_OWORD *)a5 = 0LL; *(_OWORD *)(a1 + 88) = *(_OWORD *)(a5 + 24); *(_QWORD *)(a1 + 104) = *(_QWORD *)(a5 + 40); *(_QWORD *)(a5 + 40) = 0LL; *(_OWORD *)(a5 + 24) = 0LL; return result; }
MethodCallExpr: LEA RAX,[0x1db278] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x0015220a MOV R9,qword ptr [0x001dcf88] CMP byte ptr [R9],0x0 JZ 0x00152206 INC dword ptr [RAX + 0x8] JMP 0x0015220a LAB_00152206: INC.LOCK dword ptr [RAX + 0x8] LAB_0015220a: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RDI + 0x18],RAX LEA RAX,[0x1db820] ADD RAX,0x10 MOV qword ptr [RDI],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOV qword ptr [RDX],RAX MOV qword ptr [RDI + 0x38],RAX MOVUPS XMM0,xmmword ptr [RCX] MOV qword ptr [RCX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [RCX],RAX MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOV RCX,qword ptr [R8 + 0x10] MOV qword ptr [RDI + 0x50],RCX MOV qword ptr [R8 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R8],XMM0 MOVUPS XMM1,xmmword ptr [R8 + 0x18] MOVUPS xmmword ptr [RDI + 0x58],XMM1 MOV RCX,qword ptr [R8 + 0x28] MOV qword ptr [RDI + 0x68],RCX MOV qword ptr [R8 + 0x28],RAX MOVUPS xmmword ptr [R8 + 0x18],XMM0 RET
/* minja::MethodCallExpr::MethodCallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::VariableExpr>&&, minja::ArgumentsExpression&&) */ void __thiscall minja::MethodCallExpr::MethodCallExpr (MethodCallExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3, ArgumentsExpression *param_4) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_001db288; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001dcf88 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_evaluate_001db830; *(int8 *)(this + 0x28) = 0; uVar2 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar2; *(int8 *)param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar2; *(int8 *)param_3 = 0; uVar2 = *(int8 *)(param_4 + 8); *(int8 *)(this + 0x40) = *(int8 *)param_4; *(int8 *)(this + 0x48) = uVar2; *(int8 *)(this + 0x50) = *(int8 *)(param_4 + 0x10); *(int8 *)(param_4 + 0x10) = 0; *(int8 *)param_4 = 0; *(int8 *)(param_4 + 8) = 0; uVar2 = *(int8 *)(param_4 + 0x20); *(int8 *)(this + 0x58) = *(int8 *)(param_4 + 0x18); *(int8 *)(this + 0x60) = uVar2; *(int8 *)(this + 0x68) = *(int8 *)(param_4 + 0x28); *(int8 *)(param_4 + 0x28) = 0; *(int8 *)(param_4 + 0x18) = 0; *(int8 *)(param_4 + 0x20) = 0; return; }
47,609
my_tmpdir
eloqsql/mysys/mf_tempdir.c
char *my_tmpdir(MY_TMPDIR *tmpdir) { char *dir; if (!tmpdir->max) return tmpdir->list[0]; mysql_mutex_lock(&tmpdir->mutex); dir=tmpdir->list[tmpdir->cur]; tmpdir->cur= (tmpdir->cur == tmpdir->max) ? 0 : tmpdir->cur+1; mysql_mutex_unlock(&tmpdir->mutex); return dir; }
O3
c
my_tmpdir: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 cmpl $0x0, 0x34(%rdi) je 0xbd8ff leaq 0x38(%r14), %rbx cmpq $0x0, 0x78(%r14) jne 0xbd914 movq %rbx, %rdi callq 0x2b230 movq 0x28(%r14), %rax movl 0x30(%r14), %ecx leal 0x1(%rcx), %edx xorl %esi, %esi cmpl 0x34(%r14), %ecx cmovnel %edx, %esi movq (%rax,%rcx,8), %r15 movl %esi, 0x30(%r14) movq 0x78(%r14), %rdi testq %rdi, %rdi jne 0xbd92a movq %rbx, %rdi callq 0x2b1f0 jmp 0xbd906 movq 0x28(%r14), %rax movq (%rax), %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x4b8b5(%rip), %rsi # 0x1091d0 movq %rbx, %rdi movl $0x4f, %edx callq 0x324c0 jmp 0xbd8d0 leaq 0x2fb2d7(%rip), %rax # 0x3b8c08 movq (%rax), %rax callq *0x160(%rax) jmp 0xbd8f5
my_tmpdir: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdi cmp dword ptr [rdi+34h], 0 jz short loc_BD8FF lea rbx, [r14+38h] cmp qword ptr [r14+78h], 0 jnz short loc_BD914 mov rdi, rbx call _pthread_mutex_lock loc_BD8D0: mov rax, [r14+28h] mov ecx, [r14+30h] lea edx, [rcx+1] xor esi, esi cmp ecx, [r14+34h] cmovnz esi, edx mov r15, [rax+rcx*8] mov [r14+30h], esi mov rdi, [r14+78h] test rdi, rdi jnz short loc_BD92A loc_BD8F5: mov rdi, rbx call _pthread_mutex_unlock jmp short loc_BD906 loc_BD8FF: mov rax, [r14+28h] mov r15, [rax] loc_BD906: mov rax, r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_BD914: lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 4Fh ; 'O' call psi_mutex_lock jmp short loc_BD8D0 loc_BD92A: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_BD8F5
long long my_tmpdir(long long a1) { long long v2; // rcx int v3; // esi long long v4; // r15 long long v5; // rdi if ( !*(_DWORD *)(a1 + 52) ) return **(_QWORD **)(a1 + 40); if ( *(_QWORD *)(a1 + 120) ) psi_mutex_lock(a1 + 56, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_tempdir.c", 0x4Fu); else pthread_mutex_lock(a1 + 56); v2 = *(unsigned int *)(a1 + 48); v3 = 0; if ( (_DWORD)v2 != *(_DWORD *)(a1 + 52) ) v3 = v2 + 1; v4 = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 8 * v2); *(_DWORD *)(a1 + 48) = v3; v5 = *(_QWORD *)(a1 + 120); if ( v5 ) ((void ( *)(long long))PSI_server[44])(v5); pthread_mutex_unlock(a1 + 56); return v4; }
my_tmpdir: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI CMP dword ptr [RDI + 0x34],0x0 JZ 0x001bd8ff LEA RBX,[R14 + 0x38] CMP qword ptr [R14 + 0x78],0x0 JNZ 0x001bd914 MOV RDI,RBX CALL 0x0012b230 LAB_001bd8d0: MOV RAX,qword ptr [R14 + 0x28] MOV ECX,dword ptr [R14 + 0x30] LEA EDX,[RCX + 0x1] XOR ESI,ESI CMP ECX,dword ptr [R14 + 0x34] CMOVNZ ESI,EDX MOV R15,qword ptr [RAX + RCX*0x8] MOV dword ptr [R14 + 0x30],ESI MOV RDI,qword ptr [R14 + 0x78] TEST RDI,RDI JNZ 0x001bd92a LAB_001bd8f5: MOV RDI,RBX CALL 0x0012b1f0 JMP 0x001bd906 LAB_001bd8ff: MOV RAX,qword ptr [R14 + 0x28] MOV R15,qword ptr [RAX] LAB_001bd906: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001bd914: LEA RSI,[0x2091d0] MOV RDI,RBX MOV EDX,0x4f CALL 0x001324c0 JMP 0x001bd8d0 LAB_001bd92a: LEA RAX,[0x4b8c08] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001bd8f5
int8 my_tmpdir(long param_1) { pthread_mutex_t *__mutex; uint uVar1; int iVar2; int8 uVar3; if (*(int *)(param_1 + 0x34) == 0) { uVar3 = **(int8 **)(param_1 + 0x28); } else { __mutex = (pthread_mutex_t *)(param_1 + 0x38); if (*(long *)(param_1 + 0x78) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_tempdir.c",0x4f); } uVar1 = *(uint *)(param_1 + 0x30); iVar2 = 0; if (uVar1 != *(uint *)(param_1 + 0x34)) { iVar2 = uVar1 + 1; } uVar3 = *(int8 *)(*(long *)(param_1 + 0x28) + (ulong)uVar1 * 8); *(int *)(param_1 + 0x30) = iVar2; if (*(long *)(param_1 + 0x78) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } return uVar3; }
47,610
ma_change_bitmap_page
eloqsql/storage/maria/ma_bitmap.c
static my_bool _ma_change_bitmap_page(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, pgcache_page_no_t page) { DBUG_ENTER("_ma_change_bitmap_page"); _ma_check_bitmap(bitmap); /* We have to mark the file changed here, as otherwise the following read/write to pagecache may force a page out from this file, which would cause _ma_mark_file_changed() to be called with bitmaplock hold! */ _ma_bitmap_mark_file_changed(info->s, 1); if (bitmap->changed) { if (write_changed_bitmap(info->s, bitmap)) DBUG_RETURN(1); bitmap->changed= 0; } DBUG_RETURN(_ma_read_bitmap_page(info, bitmap, page)); }
O0
c
ma_change_bitmap_page: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x63a86 movq -0x10(%rbp), %rax movq (%rax), %rdi movl $0x1, %esi callq 0x625a0 movq -0x18(%rbp), %rax cmpb $0x0, 0x20(%rax) je 0x63ac5 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi callq 0x62670 cmpb $0x0, %al je 0x63abd jmp 0x63ab7 movb $0x1, -0x1(%rbp) jmp 0x63adb movq -0x18(%rbp), %rax movb $0x0, 0x20(%rax) jmp 0x63ac7 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x66090 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_change_bitmap_page: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_63A86: mov rax, [rbp+var_10] mov rdi, [rax] mov esi, 1 call _ma_bitmap_mark_file_changed mov rax, [rbp+var_18] cmp byte ptr [rax+20h], 0 jz short loc_63AC5 mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_18] call write_changed_bitmap cmp al, 0 jz short loc_63ABD jmp short $+2 loc_63AB7: mov [rbp+var_1], 1 jmp short loc_63ADB loc_63ABD: mov rax, [rbp+var_18] mov byte ptr [rax+20h], 0 loc_63AC5: jmp short $+2 loc_63AC7: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _ma_read_bitmap_page mov [rbp+var_1], al loc_63ADB: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_change_bitmap_page(long long *a1, long long a2, long long a3) { ma_bitmap_mark_file_changed(*a1, 1); if ( !*(_BYTE *)(a2 + 32) ) return ma_read_bitmap_page(a1, a2, a3); if ( !write_changed_bitmap(*a1, a2) ) { *(_BYTE *)(a2 + 32) = 0; return ma_read_bitmap_page(a1, a2, a3); } return 1; }
_ma_change_bitmap_page: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x00163a86 LAB_00163a86: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x1 CALL 0x001625a0 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x20],0x0 JZ 0x00163ac5 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00162670 CMP AL,0x0 JZ 0x00163abd JMP 0x00163ab7 LAB_00163ab7: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00163adb LAB_00163abd: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x20],0x0 LAB_00163ac5: JMP 0x00163ac7 LAB_00163ac7: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00166090 MOV byte ptr [RBP + -0x1],AL LAB_00163adb: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 _ma_change_bitmap_page(int8 *param_1,long param_2,int8 param_3) { char cVar1; int1 uVar2; _ma_bitmap_mark_file_changed(*param_1,1); if (*(char *)(param_2 + 0x20) != '\0') { cVar1 = write_changed_bitmap(*param_1,param_2); if (cVar1 != '\0') { return 1; } *(int1 *)(param_2 + 0x20) = 0; } uVar2 = _ma_read_bitmap_page(param_1,param_2,param_3); return uVar2; }
47,611
gguf_get_meta_data
ngxson[P]ggml-easy/ggml/src/gguf.cpp
void gguf_get_meta_data(const struct gguf_context * ctx, void * data) { std::vector<int8_t> buf; gguf_write_to_buf(ctx, buf, /*only_meta =*/ true); memcpy(data, buf.data(), buf.size()); }
O1
cpp
gguf_get_meta_data: pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movq $0x0, 0x10(%rsi) movl $0x1, %edx callq 0x16da0 movq (%rsp), %r14 movq 0x8(%rsp), %rdx subq %r14, %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x16dc0 testq %r14, %r14 je 0x3f6cc movq 0x10(%rsp), %rsi subq %r14, %rsi movq %r14, %rdi callq 0x17080 addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x3f6ed movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x17080 movq %rbx, %rdi callq 0x17e30 nop
gguf_get_meta_data: push r14 push rbx sub rsp, 18h mov rbx, rsi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 mov edx, 1 call __Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb; gguf_write_to_buf(gguf_context const*,std::vector<signed char> &,bool) mov r14, [rsp+28h+var_28] mov rdx, [rsp+28h+var_20] sub rdx, r14 mov rdi, rbx mov rsi, r14 call _memcpy test r14, r14 jz short loc_3F6CC mov rsi, [rsp+28h+var_18] sub rsi, r14; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) loc_3F6CC: add rsp, 18h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_3F6ED mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F6ED: mov rdi, rbx call __Unwind_Resume
void gguf_get_meta_data(_QWORD *a1, long long a2) { void *v2; // r14 __int128 v3; // [rsp+0h] [rbp-28h] BYREF long long v4; // [rsp+10h] [rbp-18h] v3 = 0LL; v4 = 0LL; gguf_write_to_buf(a1, (long long)&v3, 1); v2 = (void *)v3; memcpy(a2, v3, *((_QWORD *)&v3 + 1) - v3); if ( v2 ) operator delete(v2, v4 - (_QWORD)v2); }
gguf_get_meta_data: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RSI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 LAB_0013f696: MOV EDX,0x1 CALL 0x00116da0 LAB_0013f6a0: MOV R14,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] SUB RDX,R14 MOV RDI,RBX MOV RSI,R14 CALL 0x00116dc0 TEST R14,R14 JZ 0x0013f6cc MOV RSI,qword ptr [RSP + 0x10] SUB RSI,R14 MOV RDI,R14 CALL 0x00117080 LAB_0013f6cc: ADD RSP,0x18 POP RBX POP R14 RET
void gguf_get_meta_data(gguf_context *param_1,void *param_2) { void *pvVar1; void *local_28; long lStack_20; long local_18; local_28 = (void *)0x0; lStack_20 = 0; local_18 = 0; /* try { // try from 0013f696 to 0013f69f has its CatchHandler @ 0013f6d4 */ gguf_write_to_buf(param_1,(vector *)&local_28,true); pvVar1 = local_28; memcpy(param_2,local_28,lStack_20 - (long)local_28); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,local_18 - (long)pvVar1); } return; }
47,612
mi_ft_store
eloqsql/storage/myisam/ft_update.c
static int _mi_ft_store(MI_INFO *info, uint keynr, uchar *keybuf, FT_WORD *wlist, my_off_t filepos) { uint key_length; DBUG_ENTER("_mi_ft_store"); for (; wlist->pos; wlist++) { key_length=_ft_make_key(info,keynr,keybuf,wlist,filepos); if (_mi_ck_write(info,keynr,(uchar*) keybuf,key_length)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O3
c
mi_ft_store: xorl %eax, %eax cmpq $0x0, (%rcx) je 0x75678 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r12 movq %rdx, %r15 movl %esi, %r13d movq %rdi, %rbx movq %rbx, %rdi movl %r13d, %esi movq %r15, %rdx movq %r12, %rcx movq %r14, %r8 callq 0x754e5 movq %rbx, %rdi movl %r13d, %esi movq %r15, %rdx movl %eax, %ecx callq 0x8914b testl %eax, %eax jne 0x75665 cmpq $0x0, 0x18(%r12) leaq 0x18(%r12), %r12 jne 0x7562c xorl %eax, %eax jmp 0x7566a movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_ft_store: xor eax, eax cmp qword ptr [rcx], 0 jz short locret_75678 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r12, rcx mov r15, rdx mov r13d, esi mov rbx, rdi loc_7562C: mov rdi, rbx mov esi, r13d mov rdx, r15 mov rcx, r12 mov r8, r14 call _ft_make_key mov rdi, rbx mov esi, r13d mov rdx, r15 mov ecx, eax call _mi_ck_write test eax, eax jnz short loc_75665 cmp qword ptr [r12+18h], 0 lea r12, [r12+18h] jnz short loc_7562C xor eax, eax jmp short loc_7566A loc_75665: mov eax, 1 loc_7566A: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_75678: retn
long long mi_ft_store(long long a1, unsigned int a2, long long a3, _QWORD *a4, long long a5, __m128i a6) { long long result; // rax long long i; // r12 unsigned int key; // eax result = 0LL; if ( *a4 ) { for ( i = (long long)a4; ; i += 24LL ) { key = ft_make_key(a1, a2, a3, i, a5, a6); if ( (unsigned int)mi_ck_write(a1, a2, a3, key) ) break; if ( *(_QWORD *)(i + 24) == 0LL ) return 0LL; } return 1LL; } return result; }
_mi_ft_store: XOR EAX,EAX CMP qword ptr [RCX],0x0 JZ 0x00175678 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R12,RCX MOV R15,RDX MOV R13D,ESI MOV RBX,RDI LAB_0017562c: MOV RDI,RBX MOV ESI,R13D MOV RDX,R15 MOV RCX,R12 MOV R8,R14 CALL 0x001754e5 MOV RDI,RBX MOV ESI,R13D MOV RDX,R15 MOV ECX,EAX CALL 0x0018914b TEST EAX,EAX JNZ 0x00175665 CMP qword ptr [R12 + 0x18],0x0 LEA R12,[R12 + 0x18] JNZ 0x0017562c XOR EAX,EAX JMP 0x0017566a LAB_00175665: MOV EAX,0x1 LAB_0017566a: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_00175678: RET
int8 _mi_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4, int8 param_5,int8 param_6) { long *plVar1; int4 uVar2; int iVar3; int8 uVar4; if (*param_4 != 0) { uVar4 = 0; do { uVar2 = _ft_make_key(param_1,param_2,param_3,param_4,param_5,param_6,uVar4); iVar3 = _mi_ck_write(param_1,param_2,param_3,uVar2); if (iVar3 != 0) { return 1; } plVar1 = param_4 + 3; param_4 = param_4 + 3; } while (*plVar1 != 0); } return 0; }
47,613
js_iterator_proto_reduce
bluesky950520[P]quickjs/quickjs.c
static JSValue js_iterator_proto_reduce(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue item, method, ret, func, index_val, acc; JSValue args[3]; int64_t idx; BOOL done; if (check_iterator(ctx, this_val) < 0) return JS_EXCEPTION; if (check_function(ctx, argv[0])) return JS_EXCEPTION; acc = JS_UNDEFINED; func = js_dup(argv[0]); method = JS_GetProperty(ctx, this_val, JS_ATOM_next); if (JS_IsException(method)) goto exception; if (argc > 1) { acc = js_dup(argv[1]); idx = 0; } else { acc = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done); if (JS_IsException(acc)) goto exception; if (done) { JS_ThrowTypeError(ctx, "empty iterator"); goto exception; } idx = 1; } for (/* empty */; /*empty*/; idx++) { item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done); if (JS_IsException(item)) goto exception; if (done) break; index_val = js_int64(idx); args[0] = acc; args[1] = item; args[2] = index_val; ret = JS_Call(ctx, func, JS_UNDEFINED, countof(args), args); JS_FreeValue(ctx, item); JS_FreeValue(ctx, index_val); if (JS_IsException(ret)) goto exception; JS_FreeValue(ctx, acc); acc = ret; index_val = JS_UNDEFINED; ret = JS_UNDEFINED; item = JS_UNDEFINED; } JS_FreeValue(ctx, func); JS_FreeValue(ctx, method); return acc; exception: JS_IteratorClose(ctx, this_val, TRUE); JS_FreeValue(ctx, acc); JS_FreeValue(ctx, func); JS_FreeValue(ctx, method); return JS_EXCEPTION; }
O0
c
js_iterator_proto_reduce: subq $0x1b8, %rsp # imm = 0x1B8 movq %rsi, 0x198(%rsp) movq %rdx, 0x1a0(%rsp) movq %rdi, 0x190(%rsp) movl %ecx, 0x18c(%rsp) movq %r8, 0x180(%rsp) movq 0x190(%rsp), %rdi movq 0x198(%rsp), %rsi movq 0x1a0(%rsp), %rdx callq 0xc54b0 cmpl $0x0, %eax jge 0xc491c movl $0x0, 0x1a8(%rsp) movq $0x6, 0x1b0(%rsp) jmp 0xc4f35 movq 0x190(%rsp), %rdi movq 0x180(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x6da80 cmpl $0x0, %eax je 0xc4959 movl $0x0, 0x1a8(%rsp) movq $0x6, 0x1b0(%rsp) jmp 0xc4f35 movl $0x0, 0xd0(%rsp) movq $0x3, 0xd8(%rsp) movq 0xd0(%rsp), %rax movq %rax, 0x120(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x128(%rsp) movq 0x180(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x216d0 movq %rax, 0xc0(%rsp) movq %rdx, 0xc8(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0x140(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x148(%rsp) movq 0x190(%rsp), %rdi movq 0x198(%rsp), %rsi movq 0x1a0(%rsp), %rdx movl $0x6b, %ecx callq 0x29d80 movq %rax, 0xb0(%rsp) movq %rdx, 0xb8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x160(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x168(%rsp) movq 0x160(%rsp), %rdi movq 0x168(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xc4a45 jmp 0xc4ea5 cmpl $0x1, 0x18c(%rsp) jle 0xc4aa5 movq 0x180(%rsp), %rax movq 0x10(%rax), %rdi movq 0x18(%rax), %rsi callq 0x216d0 movq %rax, 0xa0(%rsp) movq %rdx, 0xa8(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x120(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x128(%rsp) movq $0x0, 0xe8(%rsp) jmp 0xc4b7c movq 0x190(%rsp), %rdi movq 0x198(%rsp), %rsi movq 0x1a0(%rsp), %rdx movq 0x160(%rsp), %rcx movq 0x168(%rsp), %r8 xorl %r9d, %r9d xorl %eax, %eax leaq 0xe4(%rsp), %rax movq $0x0, (%rsp) movq %rax, 0x8(%rsp) callq 0x6eeb0 movq %rax, 0x90(%rsp) movq %rdx, 0x98(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x120(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x128(%rsp) movq 0x120(%rsp), %rdi movq 0x128(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xc4b3b jmp 0xc4ea5 cmpl $0x0, 0xe4(%rsp) je 0xc4b70 movq 0x190(%rsp), %rdi leaq 0x4c134(%rip), %rsi # 0x110c88 movb $0x0, %al callq 0x2d300 movq %rax, 0x80(%rsp) movq %rdx, 0x88(%rsp) jmp 0xc4ea5 movq $0x1, 0xe8(%rsp) jmp 0xc4b7e movq 0x190(%rsp), %rdi movq 0x198(%rsp), %rsi movq 0x1a0(%rsp), %rdx movq 0x160(%rsp), %rcx movq 0x168(%rsp), %r8 xorl %r9d, %r9d xorl %eax, %eax leaq 0xe4(%rsp), %rax movq $0x0, (%rsp) movq %rax, 0x8(%rsp) callq 0x6eeb0 movq %rax, 0x70(%rsp) movq %rdx, 0x78(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x170(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x178(%rsp) movq 0x170(%rsp), %rdi movq 0x178(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xc4c08 jmp 0xc4ea5 cmpl $0x0, 0xe4(%rsp) je 0xc4c17 jmp 0xc4e46 movq 0xe8(%rsp), %rdi callq 0x37480 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x138(%rsp) movq 0x120(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0x128(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x170(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x178(%rsp), %rax movq %rax, 0x108(%rsp) movq 0x130(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x138(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x190(%rsp), %rdi movl $0x0, 0x40(%rsp) movq $0x3, 0x48(%rsp) leaq 0xf0(%rsp), %rax movq 0x140(%rsp), %rsi movq 0x148(%rsp), %rdx movq 0x40(%rsp), %rcx movq 0x48(%rsp), %r8 movl $0x3, %r9d movq %rax, (%rsp) callq 0x3a050 movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x150(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x158(%rsp) movq 0x190(%rsp), %rdi movq 0x170(%rsp), %rsi movq 0x178(%rsp), %rdx callq 0x23c90 movq 0x190(%rsp), %rdi movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx callq 0x23c90 movq 0x150(%rsp), %rdi movq 0x158(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xc4d6f jmp 0xc4ea5 movq 0x190(%rsp), %rdi movq 0x120(%rsp), %rsi movq 0x128(%rsp), %rdx callq 0x23c90 movq 0x150(%rsp), %rax movq %rax, 0x120(%rsp) movq 0x158(%rsp), %rax movq %rax, 0x128(%rsp) movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x138(%rsp) movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x150(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x158(%rsp) movl $0x0, 0x10(%rsp) movq $0x3, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x170(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x178(%rsp) movq 0xe8(%rsp), %rax addq $0x1, %rax movq %rax, 0xe8(%rsp) jmp 0xc4b7e movq 0x190(%rsp), %rdi movq 0x140(%rsp), %rsi movq 0x148(%rsp), %rdx callq 0x23c90 movq 0x190(%rsp), %rdi movq 0x160(%rsp), %rsi movq 0x168(%rsp), %rdx callq 0x23c90 movq 0x120(%rsp), %rax movq %rax, 0x1a8(%rsp) movq 0x128(%rsp), %rax movq %rax, 0x1b0(%rsp) jmp 0xc4f35 movq 0x190(%rsp), %rdi movq 0x198(%rsp), %rsi movq 0x1a0(%rsp), %rdx movl $0x1, %ecx callq 0x67fc0 movq 0x190(%rsp), %rdi movq 0x120(%rsp), %rsi movq 0x128(%rsp), %rdx callq 0x23c90 movq 0x190(%rsp), %rdi movq 0x140(%rsp), %rsi movq 0x148(%rsp), %rdx callq 0x23c90 movq 0x190(%rsp), %rdi movq 0x160(%rsp), %rsi movq 0x168(%rsp), %rdx callq 0x23c90 movl $0x0, 0x1a8(%rsp) movq $0x6, 0x1b0(%rsp) movq 0x1a8(%rsp), %rax movq 0x1b0(%rsp), %rdx addq $0x1b8, %rsp # imm = 0x1B8 retq nopl (%rax)
js_iterator_proto_reduce: sub rsp, 1B8h mov [rsp+1B8h+var_20], rsi mov [rsp+1B8h+var_18], rdx mov [rsp+1B8h+var_28], rdi mov [rsp+1B8h+var_2C], ecx mov [rsp+1B8h+var_38], r8 mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_20] mov rdx, [rsp+1B8h+var_18] call check_iterator cmp eax, 0 jge short loc_C491C mov dword ptr [rsp+1B8h+var_10], 0 mov [rsp+1B8h+var_8], 6 jmp loc_C4F35 loc_C491C: mov rdi, [rsp+1B8h+var_28] mov rax, [rsp+1B8h+var_38] mov rsi, [rax] mov rdx, [rax+8] call check_function cmp eax, 0 jz short loc_C4959 mov dword ptr [rsp+1B8h+var_10], 0 mov [rsp+1B8h+var_8], 6 jmp loc_C4F35 loc_C4959: mov dword ptr [rsp+1B8h+var_E8], 0 mov [rsp+1B8h+var_E0], 3 mov rax, [rsp+1B8h+var_E8] mov [rsp+1B8h+var_98], rax mov rax, [rsp+1B8h+var_E0] mov [rsp+1B8h+var_90], rax mov rax, [rsp+1B8h+var_38] mov rdi, [rax] mov rsi, [rax+8] call js_dup mov [rsp+1B8h+var_F8], rax mov [rsp+1B8h+var_F0], rdx mov rax, [rsp+1B8h+var_F8] mov [rsp+1B8h+var_78], rax mov rax, [rsp+1B8h+var_F0] mov [rsp+1B8h+var_70], rax mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_20] mov rdx, [rsp+1B8h+var_18] mov ecx, 6Bh ; 'k' call JS_GetProperty mov [rsp+1B8h+var_108], rax mov [rsp+1B8h+var_100], rdx mov rax, [rsp+1B8h+var_108] mov [rsp+1B8h+var_58], rax mov rax, [rsp+1B8h+var_100] mov [rsp+1B8h+var_50], rax mov rdi, [rsp+1B8h+var_58] mov rsi, [rsp+1B8h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_C4A45 jmp loc_C4EA5 loc_C4A45: cmp [rsp+1B8h+var_2C], 1 jle short loc_C4AA5 mov rax, [rsp+1B8h+var_38] mov rdi, [rax+10h] mov rsi, [rax+18h] call js_dup mov [rsp+1B8h+var_118], rax mov [rsp+1B8h+var_110], rdx mov rax, [rsp+1B8h+var_118] mov [rsp+1B8h+var_98], rax mov rax, [rsp+1B8h+var_110] mov [rsp+1B8h+var_90], rax mov [rsp+1B8h+var_D0], 0 jmp loc_C4B7C loc_C4AA5: mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_20] mov rdx, [rsp+1B8h+var_18] mov rcx, [rsp+1B8h+var_58] mov r8, [rsp+1B8h+var_50] xor r9d, r9d xor eax, eax lea rax, [rsp+1B8h+var_D4] mov [rsp+1B8h+var_1B8], 0 mov [rsp+1B8h+var_1B0], rax call JS_IteratorNext mov [rsp+1B8h+var_128], rax mov [rsp+1B8h+var_120], rdx mov rax, [rsp+1B8h+var_128] mov [rsp+1B8h+var_98], rax mov rax, [rsp+1B8h+var_120] mov [rsp+1B8h+var_90], rax mov rdi, [rsp+1B8h+var_98] mov rsi, [rsp+1B8h+var_90] call JS_IsException_1 cmp eax, 0 jz short loc_C4B3B jmp loc_C4EA5 loc_C4B3B: cmp [rsp+1B8h+var_D4], 0 jz short loc_C4B70 mov rdi, [rsp+1B8h+var_28] lea rsi, aEmptyIterator; "empty iterator" mov al, 0 call JS_ThrowTypeError mov [rsp+1B8h+var_138], rax mov [rsp+1B8h+var_130], rdx jmp loc_C4EA5 loc_C4B70: mov [rsp+1B8h+var_D0], 1 loc_C4B7C: jmp short $+2 loc_C4B7E: mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_20] mov rdx, [rsp+1B8h+var_18] mov rcx, [rsp+1B8h+var_58] mov r8, [rsp+1B8h+var_50] xor r9d, r9d xor eax, eax lea rax, [rsp+1B8h+var_D4] mov [rsp+1B8h+var_1B8], 0 mov [rsp+1B8h+var_1B0], rax call JS_IteratorNext mov [rsp+1B8h+var_148], rax mov [rsp+1B8h+var_140], rdx mov rax, [rsp+1B8h+var_148] mov [rsp+1B8h+var_48], rax mov rax, [rsp+1B8h+var_140] mov [rsp+1B8h+var_40], rax mov rdi, [rsp+1B8h+var_48] mov rsi, [rsp+1B8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_C4C08 jmp loc_C4EA5 loc_C4C08: cmp [rsp+1B8h+var_D4], 0 jz short loc_C4C17 jmp loc_C4E46 loc_C4C17: mov rdi, [rsp+1B8h+var_D0] call js_int64 mov [rsp+1B8h+var_158], rax mov [rsp+1B8h+var_150], rdx mov rax, [rsp+1B8h+var_158] mov [rsp+1B8h+var_88], rax mov rax, [rsp+1B8h+var_150] mov [rsp+1B8h+var_80], rax mov rax, [rsp+1B8h+var_98] mov [rsp+1B8h+var_C8], rax mov rax, [rsp+1B8h+var_90] mov [rsp+1B8h+var_C0], rax mov rax, [rsp+1B8h+var_48] mov [rsp+1B8h+var_B8], rax mov rax, [rsp+1B8h+var_40] mov [rsp+1B8h+var_B0], rax mov rax, [rsp+1B8h+var_88] mov [rsp+1B8h+var_A8], rax mov rax, [rsp+1B8h+var_80] mov [rsp+1B8h+var_A0], rax mov rdi, [rsp+1B8h+var_28] mov dword ptr [rsp+1B8h+var_178], 0 mov [rsp+1B8h+var_170], 3 lea rax, [rsp+1B8h+var_C8] mov rsi, [rsp+1B8h+var_78] mov rdx, [rsp+1B8h+var_70] mov rcx, [rsp+1B8h+var_178] mov r8, [rsp+1B8h+var_170] mov r9d, 3 mov [rsp+1B8h+var_1B8], rax call JS_Call mov [rsp+1B8h+var_168], rax mov [rsp+1B8h+var_160], rdx mov rax, [rsp+1B8h+var_168] mov [rsp+1B8h+var_68], rax mov rax, [rsp+1B8h+var_160] mov [rsp+1B8h+var_60], rax mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_48] mov rdx, [rsp+1B8h+var_40] call JS_FreeValue mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_88] mov rdx, [rsp+1B8h+var_80] call JS_FreeValue mov rdi, [rsp+1B8h+var_68] mov rsi, [rsp+1B8h+var_60] call JS_IsException_1 cmp eax, 0 jz short loc_C4D6F jmp loc_C4EA5 loc_C4D6F: mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_98] mov rdx, [rsp+1B8h+var_90] call JS_FreeValue mov rax, [rsp+1B8h+var_68] mov [rsp+1B8h+var_98], rax mov rax, [rsp+1B8h+var_60] mov [rsp+1B8h+var_90], rax mov dword ptr [rsp+1B8h+var_188], 0 mov [rsp+1B8h+var_180], 3 mov rax, [rsp+1B8h+var_188] mov [rsp+1B8h+var_88], rax mov rax, [rsp+1B8h+var_180] mov [rsp+1B8h+var_80], rax mov dword ptr [rsp+1B8h+var_198], 0 mov [rsp+1B8h+var_190], 3 mov rax, [rsp+1B8h+var_198] mov [rsp+1B8h+var_68], rax mov rax, [rsp+1B8h+var_190] mov [rsp+1B8h+var_60], rax mov dword ptr [rsp+1B8h+var_1A8], 0 mov [rsp+1B8h+var_1A0], 3 mov rax, [rsp+1B8h+var_1A8] mov [rsp+1B8h+var_48], rax mov rax, [rsp+1B8h+var_1A0] mov [rsp+1B8h+var_40], rax mov rax, [rsp+1B8h+var_D0] add rax, 1 mov [rsp+1B8h+var_D0], rax jmp loc_C4B7E loc_C4E46: mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_78] mov rdx, [rsp+1B8h+var_70] call JS_FreeValue mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_58] mov rdx, [rsp+1B8h+var_50] call JS_FreeValue mov rax, [rsp+1B8h+var_98] mov [rsp+1B8h+var_10], rax mov rax, [rsp+1B8h+var_90] mov [rsp+1B8h+var_8], rax jmp loc_C4F35 loc_C4EA5: mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_20] mov rdx, [rsp+1B8h+var_18] mov ecx, 1 call JS_IteratorClose mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_98] mov rdx, [rsp+1B8h+var_90] call JS_FreeValue mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_78] mov rdx, [rsp+1B8h+var_70] call JS_FreeValue mov rdi, [rsp+1B8h+var_28] mov rsi, [rsp+1B8h+var_58] mov rdx, [rsp+1B8h+var_50] call JS_FreeValue mov dword ptr [rsp+1B8h+var_10], 0 mov [rsp+1B8h+var_8], 6 loc_C4F35: mov rax, [rsp+1B8h+var_10] mov rdx, [rsp+1B8h+var_8] add rsp, 1B8h retn
long long js_iterator_proto_reduce( long long a1, long long a2, long long a3, int a4, long long *a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { double v13; // xmm4_8 double v14; // xmm5_8 long long v15; // rdx long long v16; // rdx __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx long long v20; // rdx long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 long long v25; // rdx long long v26; // rdx long long v27; // rdx char v29; // [rsp+0h] [rbp-1B8h] long long v30; // [rsp+10h] [rbp-1A8h] long long v31; // [rsp+20h] [rbp-198h] long long v32; // [rsp+30h] [rbp-188h] long long v33; // [rsp+D0h] [rbp-E8h] int v34; // [rsp+E4h] [rbp-D4h] BYREF long long v35; // [rsp+E8h] [rbp-D0h] _QWORD v36[6]; // [rsp+F0h] [rbp-C8h] BYREF long long v37; // [rsp+120h] [rbp-98h] long long v38; // [rsp+128h] [rbp-90h] long long v39; // [rsp+130h] [rbp-88h] long long v40; // [rsp+138h] [rbp-80h] _DWORD *v41; // [rsp+140h] [rbp-78h] long long v42; // [rsp+148h] [rbp-70h] long long v43; // [rsp+150h] [rbp-68h] long long v44; // [rsp+158h] [rbp-60h] long long Property; // [rsp+160h] [rbp-58h] long long v46; // [rsp+168h] [rbp-50h] long long v47; // [rsp+170h] [rbp-48h] long long v48; // [rsp+178h] [rbp-40h] long long *v49; // [rsp+180h] [rbp-38h] int v50; // [rsp+18Ch] [rbp-2Ch] long long v51; // [rsp+190h] [rbp-28h] long long v52; // [rsp+198h] [rbp-20h] long long v53; // [rsp+1A0h] [rbp-18h] long long v54; // [rsp+1A8h] [rbp-10h] long long v55; // [rsp+1B0h] [rbp-8h] v52 = a2; v53 = a3; v51 = a1; v50 = a4; v49 = a5; if ( (int)check_iterator(a1, a2, a3) >= 0 ) { if ( (unsigned int)check_function(v51, *v49, v49[1], a6, a7, a8, a9, v13, v14, a12, a13) ) { LODWORD(v54) = 0; v55 = 6LL; } else { LODWORD(v33) = 0; v37 = v33; v38 = 3LL; v41 = js_dup((_DWORD *)*v49, v49[1]); v42 = v15; Property = JS_GetProperty(v51, v52, v53, 107); v46 = v16; if ( !JS_IsException_1(Property, v16) ) { if ( v50 > 1 ) { v37 = (long long)js_dup((_DWORD *)v49[2], v49[3]); v38 = v19; v35 = 0LL; goto LABEL_12; } v37 = JS_IteratorNext(v51, v52, v53, Property, v46, 0, 0LL, &v34); v38 = v20; if ( !JS_IsException_1(v37, v20) ) { if ( v34 ) { JS_ThrowTypeError( v51, (long long)"empty iterator", v21, v22, v23, v24, a6, a7, a8, a9, v17, v18, a12, a13, v29); } else { v35 = 1LL; LABEL_12: while ( 1 ) { v47 = JS_IteratorNext(v51, v52, v53, Property, v46, 0, 0LL, &v34); v48 = v25; if ( JS_IsException_1(v47, v25) ) break; if ( v34 ) { JS_FreeValue(v51, (long long)v41, v42); JS_FreeValue(v51, Property, v46); v54 = v37; v55 = v38; return v54; } v39 = js_int64(v35); v40 = v26; v36[0] = v37; v36[1] = v38; v36[2] = v47; v36[3] = v48; v36[4] = v39; v36[5] = v26; v43 = JS_Call(v51, (int)v41, v42, 0, 3, 3, (long long)v36); v44 = v27; JS_FreeValue(v51, v47, v48); JS_FreeValue(v51, v39, v40); if ( JS_IsException_1(v43, v44) ) break; JS_FreeValue(v51, v37, v38); v37 = v43; v38 = v44; LODWORD(v32) = 0; v39 = v32; v40 = 3LL; LODWORD(v31) = 0; v43 = v31; v44 = 3LL; LODWORD(v30) = 0; v47 = v30; v48 = 3LL; ++v35; } } } } JS_IteratorClose(v51, v52, v53, 1, a6, a7, a8, a9, *(double *)v17.m128_u64, *(double *)v18.m128_u64, a12, a13); JS_FreeValue(v51, v37, v38); JS_FreeValue(v51, (long long)v41, v42); JS_FreeValue(v51, Property, v46); LODWORD(v54) = 0; v55 = 6LL; } } else { LODWORD(v54) = 0; v55 = 6LL; } return v54; }
js_iterator_proto_reduce: SUB RSP,0x1b8 MOV qword ptr [RSP + 0x198],RSI MOV qword ptr [RSP + 0x1a0],RDX MOV qword ptr [RSP + 0x190],RDI MOV dword ptr [RSP + 0x18c],ECX MOV qword ptr [RSP + 0x180],R8 MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x198] MOV RDX,qword ptr [RSP + 0x1a0] CALL 0x001c54b0 CMP EAX,0x0 JGE 0x001c491c MOV dword ptr [RSP + 0x1a8],0x0 MOV qword ptr [RSP + 0x1b0],0x6 JMP 0x001c4f35 LAB_001c491c: MOV RDI,qword ptr [RSP + 0x190] MOV RAX,qword ptr [RSP + 0x180] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0016da80 CMP EAX,0x0 JZ 0x001c4959 MOV dword ptr [RSP + 0x1a8],0x0 MOV qword ptr [RSP + 0x1b0],0x6 JMP 0x001c4f35 LAB_001c4959: MOV dword ptr [RSP + 0xd0],0x0 MOV qword ptr [RSP + 0xd8],0x3 MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x120],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x128],RAX MOV RAX,qword ptr [RSP + 0x180] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001216d0 MOV qword ptr [RSP + 0xc0],RAX MOV qword ptr [RSP + 0xc8],RDX MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x140],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x148],RAX MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x198] MOV RDX,qword ptr [RSP + 0x1a0] MOV ECX,0x6b CALL 0x00129d80 MOV qword ptr [RSP + 0xb0],RAX MOV qword ptr [RSP + 0xb8],RDX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x160],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x168],RAX MOV RDI,qword ptr [RSP + 0x160] MOV RSI,qword ptr [RSP + 0x168] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001c4a45 JMP 0x001c4ea5 LAB_001c4a45: CMP dword ptr [RSP + 0x18c],0x1 JLE 0x001c4aa5 MOV RAX,qword ptr [RSP + 0x180] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RAX + 0x18] CALL 0x001216d0 MOV qword ptr [RSP + 0xa0],RAX MOV qword ptr [RSP + 0xa8],RDX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x120],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x128],RAX MOV qword ptr [RSP + 0xe8],0x0 JMP 0x001c4b7c LAB_001c4aa5: MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x198] MOV RDX,qword ptr [RSP + 0x1a0] MOV RCX,qword ptr [RSP + 0x160] MOV R8,qword ptr [RSP + 0x168] XOR R9D,R9D XOR EAX,EAX LEA RAX,[RSP + 0xe4] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX CALL 0x0016eeb0 MOV qword ptr [RSP + 0x90],RAX MOV qword ptr [RSP + 0x98],RDX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x120],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x128],RAX MOV RDI,qword ptr [RSP + 0x120] MOV RSI,qword ptr [RSP + 0x128] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001c4b3b JMP 0x001c4ea5 LAB_001c4b3b: CMP dword ptr [RSP + 0xe4],0x0 JZ 0x001c4b70 MOV RDI,qword ptr [RSP + 0x190] LEA RSI,[0x210c88] MOV AL,0x0 CALL 0x0012d300 MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x88],RDX JMP 0x001c4ea5 LAB_001c4b70: MOV qword ptr [RSP + 0xe8],0x1 LAB_001c4b7c: JMP 0x001c4b7e LAB_001c4b7e: MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x198] MOV RDX,qword ptr [RSP + 0x1a0] MOV RCX,qword ptr [RSP + 0x160] MOV R8,qword ptr [RSP + 0x168] XOR R9D,R9D XOR EAX,EAX LEA RAX,[RSP + 0xe4] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX CALL 0x0016eeb0 MOV qword ptr [RSP + 0x70],RAX MOV qword ptr [RSP + 0x78],RDX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x170],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x178],RAX MOV RDI,qword ptr [RSP + 0x170] MOV RSI,qword ptr [RSP + 0x178] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001c4c08 JMP 0x001c4ea5 LAB_001c4c08: CMP dword ptr [RSP + 0xe4],0x0 JZ 0x001c4c17 JMP 0x001c4e46 LAB_001c4c17: MOV RDI,qword ptr [RSP + 0xe8] CALL 0x00137480 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x130],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x138],RAX MOV RAX,qword ptr [RSP + 0x120] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0x128] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x178] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0x130] MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x138] MOV qword ptr [RSP + 0x118],RAX MOV RDI,qword ptr [RSP + 0x190] MOV dword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x48],0x3 LEA RAX,[RSP + 0xf0] MOV RSI,qword ptr [RSP + 0x140] MOV RDX,qword ptr [RSP + 0x148] MOV RCX,qword ptr [RSP + 0x40] MOV R8,qword ptr [RSP + 0x48] MOV R9D,0x3 MOV qword ptr [RSP],RAX CALL 0x0013a050 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x150],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x158],RAX MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x170] MOV RDX,qword ptr [RSP + 0x178] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x158] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001c4d6f JMP 0x001c4ea5 LAB_001c4d6f: MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x120] MOV RDX,qword ptr [RSP + 0x128] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x150] MOV qword ptr [RSP + 0x120],RAX MOV RAX,qword ptr [RSP + 0x158] MOV qword ptr [RSP + 0x128],RAX MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x130],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x138],RAX MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x150],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x158],RAX MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x3 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x170],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x178],RAX MOV RAX,qword ptr [RSP + 0xe8] ADD RAX,0x1 MOV qword ptr [RSP + 0xe8],RAX JMP 0x001c4b7e LAB_001c4e46: MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x140] MOV RDX,qword ptr [RSP + 0x148] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x160] MOV RDX,qword ptr [RSP + 0x168] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x120] MOV qword ptr [RSP + 0x1a8],RAX MOV RAX,qword ptr [RSP + 0x128] MOV qword ptr [RSP + 0x1b0],RAX JMP 0x001c4f35 LAB_001c4ea5: MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x198] MOV RDX,qword ptr [RSP + 0x1a0] MOV ECX,0x1 CALL 0x00167fc0 MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x120] MOV RDX,qword ptr [RSP + 0x128] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x140] MOV RDX,qword ptr [RSP + 0x148] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x190] MOV RSI,qword ptr [RSP + 0x160] MOV RDX,qword ptr [RSP + 0x168] CALL 0x00123c90 MOV dword ptr [RSP + 0x1a8],0x0 MOV qword ptr [RSP + 0x1b0],0x6 LAB_001c4f35: MOV RAX,qword ptr [RSP + 0x1a8] MOV RDX,qword ptr [RSP + 0x1b0] ADD RSP,0x1b8 RET
int1 [16] js_iterator_proto_reduce (int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5) { int1 auVar1 [16]; long lVar2; int8 uVar3; int iVar4; uint uStack_1a4; uint uStack_194; uint uStack_184; uint uStack_174; uint uStack_e4; int local_d4; long local_d0; int1 local_c8 [16]; int1 local_b8 [16]; int1 local_a8 [16]; int1 local_98 [16]; int1 local_88 [16]; int1 local_78 [16]; int1 local_68 [16]; int1 local_58 [16]; int1 local_48 [16]; int8 *local_38; int local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; iVar4 = check_iterator(param_1,param_2,param_3); if (iVar4 < 0) { local_10 = 0; local_8 = 6; goto LAB_001c4f35; } iVar4 = check_function(local_28,*local_38,local_38[1]); if (iVar4 != 0) { local_10 = 0; local_8 = 6; goto LAB_001c4f35; } local_98._0_8_ = (ulong)uStack_e4 << 0x20; local_98._8_8_ = 3; local_78 = js_dup(*local_38,local_38[1]); local_58 = JS_GetProperty(local_28,local_20,local_18,0x6b); iVar4 = JS_IsException(local_58._0_8_,local_58._8_8_); if (iVar4 == 0) { if (local_2c < 2) { local_98 = JS_IteratorNext(local_28,local_20,local_18,local_58._0_8_,local_58._8_8_,0,0, &local_d4); iVar4 = JS_IsException(local_98._0_8_,local_98._8_8_); if (iVar4 == 0) { if (local_d4 == 0) { local_d0 = 1; lVar2 = local_68._0_8_; uVar3 = local_68._8_8_; goto LAB_001c4b7e; } JS_ThrowTypeError(local_28,"empty iterator"); } } else { local_98 = js_dup(local_38[2],local_38[3]); local_d0 = 0; lVar2 = local_68._0_8_; uVar3 = local_68._8_8_; LAB_001c4b7e: while( true ) { local_68._8_8_ = uVar3; local_68._0_8_ = lVar2; local_48 = JS_IteratorNext(local_28,local_20,local_18,local_58._0_8_,local_58._8_8_,0,0, &local_d4); iVar4 = JS_IsException(local_48._0_8_,local_48._8_8_); if (iVar4 != 0) break; if (local_d4 != 0) { JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_); local_10 = local_98._0_4_; uStack_c = local_98._4_4_; local_8 = local_98._8_8_; goto LAB_001c4f35; } local_88 = js_int64(local_d0); local_a8 = local_88; local_c8 = local_98; local_b8 = local_48; local_68 = JS_Call(local_28,local_78._0_8_,local_78._8_8_,(ulong)uStack_174 << 0x20,3,3, local_c8); JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_); JS_FreeValue(local_28,local_88._0_8_,local_88._8_8_); iVar4 = JS_IsException(local_68._0_8_,local_68._8_8_); if (iVar4 != 0) break; JS_FreeValue(local_28,local_98._0_8_,local_98._8_8_); local_88._0_8_ = (ulong)uStack_184 << 0x20; local_88._8_8_ = 3; local_48._0_8_ = (ulong)uStack_1a4 << 0x20; local_48._8_8_ = 3; local_d0 = local_d0 + 1; lVar2 = (ulong)uStack_194 << 0x20; uVar3 = 3; local_98 = local_68; } } } JS_IteratorClose(local_28,local_20,local_18,1); JS_FreeValue(local_28,local_98._0_8_,local_98._8_8_); JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_); local_10 = 0; local_8 = 6; LAB_001c4f35: auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
47,614
js_iterator_proto_reduce
bluesky950520[P]quickjs/quickjs.c
static JSValue js_iterator_proto_reduce(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue item, method, ret, func, index_val, acc; JSValue args[3]; int64_t idx; BOOL done; if (check_iterator(ctx, this_val) < 0) return JS_EXCEPTION; if (check_function(ctx, argv[0])) return JS_EXCEPTION; acc = JS_UNDEFINED; func = js_dup(argv[0]); method = JS_GetProperty(ctx, this_val, JS_ATOM_next); if (JS_IsException(method)) goto exception; if (argc > 1) { acc = js_dup(argv[1]); idx = 0; } else { acc = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done); if (JS_IsException(acc)) goto exception; if (done) { JS_ThrowTypeError(ctx, "empty iterator"); goto exception; } idx = 1; } for (/* empty */; /*empty*/; idx++) { item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done); if (JS_IsException(item)) goto exception; if (done) break; index_val = js_int64(idx); args[0] = acc; args[1] = item; args[2] = index_val; ret = JS_Call(ctx, func, JS_UNDEFINED, countof(args), args); JS_FreeValue(ctx, item); JS_FreeValue(ctx, index_val); if (JS_IsException(ret)) goto exception; JS_FreeValue(ctx, acc); acc = ret; index_val = JS_UNDEFINED; ret = JS_UNDEFINED; item = JS_UNDEFINED; } JS_FreeValue(ctx, func); JS_FreeValue(ctx, method); return acc; exception: JS_IteratorClose(ctx, this_val, TRUE); JS_FreeValue(ctx, acc); JS_FreeValue(ctx, func); JS_FreeValue(ctx, method); return JS_EXCEPTION; }
O1
c
js_iterator_proto_reduce: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %rbp movq %rdi, %r12 cmpl $-0x1, %ebp jne 0x72a6a movq %r8, %rbx movl %ecx, %r14d movq %rsi, %r13 movq (%r8), %rsi movq 0x8(%r8), %rdx movq %r12, %rdi callq 0x415b1 movl $0x6, %edx testl %eax, %eax je 0x72a9c xorl %ebx, %ebx jmp 0x72a82 leaq 0x2c5b4(%rip), %rsi # 0x9f025 xorl %ebx, %ebx movq %r12, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %edx xorl %eax, %eax orq %rax, %rbx movq %rbx, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%rbx), %rcx movq 0x8(%rbx), %rax movq %rcx, 0x30(%rsp) movq %rcx, 0x70(%rsp) movq %rax, 0x38(%rsp) cmpl $-0x9, %eax jb 0x72abe movq 0x70(%rsp), %rax incl (%rax) movq %r12, %rdi movq %r13, %rsi movq %rbp, %rdx movl $0x6b, %ecx movq %r13, %r8 movq %rbp, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) cmpl $0x6, %edx movq %r13, 0x58(%rsp) jne 0x72b0a xorl %r13d, %r13d movl $0x3, %eax movq %rax, 0x10(%rsp) movq %rax, 0x18(%rsp) jmp 0x72d60 cmpl $0x2, %r14d jl 0x72d04 movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx movq %rax, %r14 movq %rax, 0x70(%rsp) movq %rcx, 0x10(%rsp) cmpl $-0x9, %ecx jb 0x72b35 movq 0x70(%rsp), %rax incl (%rax) movq %r14, %rax shrq $0x20, %rax movq %rax, 0x18(%rsp) xorl %ebx, %ebx leaq 0xc(%rsp), %rax movq %r12, %rdi movq %r13, %rsi movq %rbp, %rdx movq 0x20(%rsp), %rcx movq 0x28(%rsp), %r8 xorl %r9d, %r9d pushq %rax pushq $0x0 callq 0x41afc addq $0x10, %rsp cmpl $0x6, %edx je 0x72d5d movq %rax, %rsi movl %r14d, %ecx movq 0x10(%rsp), %r14 movq %rbp, 0x48(%rsp) cmpl $0x0, 0xc(%rsp) jne 0x72dc9 movq %rbx, %r13 shrq $0x1f, %r13 movl %ebx, %eax cvtsi2sd %rbx, %xmm0 movq %xmm0, %rdi cmoveq %rax, %rdi movq %rdi, 0x68(%rsp) movl $0x7, %eax cmovneq %rax, %r13 movq 0x18(%rsp), %rax shlq $0x20, %rax movl %ecx, %r15d orq %rax, %r15 movq %r15, 0x70(%rsp) movq %r14, 0x78(%rsp) movq %rsi, 0x80(%rsp) movq %rdx, 0x88(%rsp) movq %rdi, 0x90(%rsp) movq %r13, 0x98(%rsp) movl $0x0, 0xa8(%rsp) movq $0x3, 0xb0(%rsp) subq $0x20, %rsp movups 0xc8(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movl $0x3, %r8d movq %r12, %rdi movq %rsi, 0x80(%rsp) movq 0x50(%rsp), %rsi movq %r14, 0x70(%rsp) movq %rdx, %r14 movq 0x58(%rsp), %rdx movl %ecx, 0x64(%rsp) xorl %ecx, %ecx movl $0x3, %r9d callq 0x284ca addq $0x20, %rsp movq %rax, %rbp movq %rdx, 0x10(%rsp) movq 0x18(%r12), %rdi movq 0x60(%rsp), %rsi movq %r14, %rdx callq 0x1d8c6 movq %r12, %r14 movq 0x18(%r12), %rdi movq 0x68(%rsp), %rsi movq %r13, %rdx callq 0x1d8c6 cmpl $0x6, 0x10(%rsp) je 0x72e06 movq %r14, %r12 movq 0x18(%r14), %rdi movq %r15, %rsi movq 0x50(%rsp), %rdx callq 0x1d8c6 movq %rbp, %r13 movq %rbp, %rax shrq $0x20, %rax movq %rax, 0x18(%rsp) incq %rbx movq %r14, %rdi movq 0x58(%rsp), %rsi movq 0x48(%rsp), %rbp movq %rbp, %rdx movq 0x20(%rsp), %rcx movq 0x28(%rsp), %r8 xorl %r9d, %r9d leaq 0xc(%rsp), %rax pushq %rax pushq $0x0 callq 0x41afc addq $0x10, %rsp movq %rax, %rsi movl %r13d, %ecx movq 0x10(%rsp), %r14 cmpl $0x6, %edx jne 0x72b83 jmp 0x72d60 leaq 0xc(%rsp), %rax movq %r12, %rdi movq %r13, %rsi movq %rbp, %rdx movq 0x20(%rsp), %rcx movq 0x28(%rsp), %r8 xorl %r9d, %r9d pushq %rax pushq $0x0 callq 0x41afc addq $0x10, %rsp movq %rax, %r14 shrq $0x20, %rax movq %rdx, 0x10(%rsp) cmpl $0x6, %edx movq %rax, 0x18(%rsp) je 0x72d5d cmpl $0x0, 0xc(%rsp) je 0x72e24 leaq 0x2eeba(%rip), %rsi # 0xa1c0d movq %r12, %rdi xorl %eax, %eax callq 0x22567 movq %r14, %r13 movq %r12, %rdi movq 0x58(%rsp), %rsi movq %rbp, %rdx movl $0x1, %ecx callq 0x3faa9 movq 0x18(%rsp), %rax shlq $0x20, %rax movl %r13d, %esi orq %rax, %rsi movq 0x18(%r12), %rdi movq 0x10(%rsp), %rdx callq 0x1d8c6 movq 0x18(%r12), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x1d8c6 movq 0x18(%r12), %rdi movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x1d8c6 xorl %ebx, %ebx xorl %eax, %eax movl $0x6, %edx jmp 0x72a84 movq 0x18(%r12), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movl %ecx, %ebx callq 0x1d8c6 movq 0x18(%r12), %rdi movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x1d8c6 movq 0x18(%rsp), %rax shlq $0x20, %rax movl %ebx, %ebx movq %r14, %rdx jmp 0x72a84 movq 0x50(%rsp), %rax movq %rax, 0x10(%rsp) movl 0x44(%rsp), %eax movl %eax, %r13d movq %r14, %r12 movq 0x48(%rsp), %rbp jmp 0x72d60 movl $0x1, %ebx jmp 0x72b43
js_iterator_proto_reduce: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rbp, rdx mov r12, rdi cmp ebp, 0FFFFFFFFh jnz short loc_72A6A mov rbx, r8 mov r14d, ecx mov r13, rsi mov rsi, [r8] mov rdx, [r8+8] mov rdi, r12 call check_function mov edx, 6 test eax, eax jz short loc_72A9C xor ebx, ebx jmp short loc_72A82 loc_72A6A: lea rsi, aOperandPrototy+20h; "not an object" xor ebx, ebx mov rdi, r12 xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_72A82: xor eax, eax loc_72A84: or rbx, rax mov rax, rbx add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_72A9C: mov rcx, [rbx] mov rax, [rbx+8] mov [rsp+0E8h+var_B8], rcx mov [rsp+0E8h+var_78], rcx mov [rsp+0E8h+var_B0], rax cmp eax, 0FFFFFFF7h jb short loc_72ABE mov rax, [rsp+0E8h+var_78] inc dword ptr [rax] loc_72ABE: mov rdi, r12 mov rsi, r13 mov rdx, rbp mov ecx, 6Bh ; 'k' mov r8, r13 mov r9, rbp push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov [rsp+0E8h+var_C8], rax mov [rsp+0E8h+var_C0], rdx cmp edx, 6 mov [rsp+0E8h+var_90], r13 jnz short loc_72B0A xor r13d, r13d mov eax, 3 mov [rsp+0E8h+var_D8], rax mov [rsp+0E8h+var_D0], rax jmp loc_72D60 loc_72B0A: cmp r14d, 2 jl loc_72D04 mov rax, [rbx+10h] mov rcx, [rbx+18h] mov r14, rax mov [rsp+0E8h+var_78], rax mov [rsp+0E8h+var_D8], rcx cmp ecx, 0FFFFFFF7h jb short loc_72B35 mov rax, [rsp+0E8h+var_78] inc dword ptr [rax] loc_72B35: mov rax, r14 shr rax, 20h mov [rsp+0E8h+var_D0], rax xor ebx, ebx loc_72B43: lea rax, [rsp+0E8h+var_DC] mov rdi, r12 mov rsi, r13 mov rdx, rbp mov rcx, [rsp+0E8h+var_C8] mov r8, [rsp+0E8h+var_C0] xor r9d, r9d push rax push 0 call JS_IteratorNext add rsp, 10h cmp edx, 6 jz loc_72D5D mov rsi, rax mov ecx, r14d mov r14, [rsp+0E8h+var_D8] mov [rsp+0E8h+var_A0], rbp loc_72B83: cmp [rsp+0E8h+var_DC], 0 jnz loc_72DC9 mov r13, rbx shr r13, 1Fh mov eax, ebx cvtsi2sd xmm0, rbx movq rdi, xmm0 cmovz rdi, rax mov [rsp+0E8h+var_80], rdi mov eax, 7 cmovnz r13, rax mov rax, [rsp+0E8h+var_D0] shl rax, 20h mov r15d, ecx or r15, rax mov [rsp+0E8h+var_78], r15 mov [rsp+0E8h+var_70], r14 mov [rsp+0E8h+var_68], rsi mov [rsp+0E8h+var_60], rdx mov [rsp+0E8h+var_58], rdi mov [rsp+0E8h+var_50], r13 mov dword ptr [rsp+0E8h+var_40], 0 mov qword ptr [rsp+0E8h+var_40+8], 3 sub rsp, 20h movups xmm0, [rsp+108h+var_40] movups [rsp+108h+var_108], xmm0 lea rax, [rsp+108h+var_78] mov [rsp+108h+var_F8], rax mov [rsp+108h+var_F0], 2 mov r8d, 3 mov rdi, r12 mov [rsp+108h+var_88], rsi mov rsi, [rsp+108h+var_B8] mov [rsp+108h+var_98], r14 mov r14, rdx mov rdx, [rsp+108h+var_B0] mov [rsp+108h+var_A4], ecx xor ecx, ecx mov r9d, 3 call JS_CallInternal add rsp, 20h mov rbp, rax mov [rsp+0E8h+var_D8], rdx mov rdi, [r12+18h] mov rsi, [rsp+0E8h+var_88] mov rdx, r14 call JS_FreeValueRT mov r14, r12 mov rdi, [r12+18h] mov rsi, [rsp+0E8h+var_80] mov rdx, r13 call JS_FreeValueRT cmp dword ptr [rsp+0E8h+var_D8], 6 jz loc_72E06 mov r12, r14 mov rdi, [r14+18h] mov rsi, r15 mov rdx, [rsp+0E8h+var_98] call JS_FreeValueRT mov r13, rbp mov rax, rbp shr rax, 20h mov [rsp+0E8h+var_D0], rax inc rbx mov rdi, r14 mov rsi, [rsp+0E8h+var_90] mov rbp, [rsp+0E8h+var_A0] mov rdx, rbp mov rcx, [rsp+0E8h+var_C8] mov r8, [rsp+0E8h+var_C0] xor r9d, r9d lea rax, [rsp+0E8h+var_DC] push rax push 0 call JS_IteratorNext add rsp, 10h mov rsi, rax mov ecx, r13d mov r14, [rsp+0E8h+var_D8] cmp edx, 6 jnz loc_72B83 jmp short loc_72D60 loc_72D04: lea rax, [rsp+0E8h+var_DC] mov rdi, r12 mov rsi, r13 mov rdx, rbp mov rcx, [rsp+0E8h+var_C8] mov r8, [rsp+0E8h+var_C0] xor r9d, r9d push rax push 0 call JS_IteratorNext add rsp, 10h mov r14, rax shr rax, 20h mov [rsp+0E8h+var_D8], rdx cmp edx, 6 mov [rsp+0E8h+var_D0], rax jz short loc_72D5D cmp [rsp+0E8h+var_DC], 0 jz loc_72E24 lea rsi, aEmptyIterator; "empty iterator" mov rdi, r12 xor eax, eax call JS_ThrowTypeError loc_72D5D: mov r13, r14 loc_72D60: mov rdi, r12 mov rsi, [rsp+0E8h+var_90] mov rdx, rbp mov ecx, 1 call JS_IteratorClose mov rax, [rsp+0E8h+var_D0] shl rax, 20h mov esi, r13d or rsi, rax mov rdi, [r12+18h] mov rdx, [rsp+0E8h+var_D8] call JS_FreeValueRT mov rdi, [r12+18h] mov rsi, [rsp+0E8h+var_B8] mov rdx, [rsp+0E8h+var_B0] call JS_FreeValueRT mov rdi, [r12+18h] mov rsi, [rsp+0E8h+var_C8] mov rdx, [rsp+0E8h+var_C0] call JS_FreeValueRT xor ebx, ebx xor eax, eax mov edx, 6 jmp loc_72A84 loc_72DC9: mov rdi, [r12+18h] mov rsi, [rsp+0E8h+var_B8] mov rdx, [rsp+0E8h+var_B0] mov ebx, ecx call JS_FreeValueRT mov rdi, [r12+18h] mov rsi, [rsp+0E8h+var_C8] mov rdx, [rsp+0E8h+var_C0] call JS_FreeValueRT mov rax, [rsp+0E8h+var_D0] shl rax, 20h mov ebx, ebx mov rdx, r14 jmp loc_72A84 loc_72E06: mov rax, [rsp+0E8h+var_98] mov [rsp+0E8h+var_D8], rax mov eax, [rsp+0E8h+var_A4] mov r13d, eax mov r12, r14 mov rbp, [rsp+0E8h+var_A0] jmp loc_72D60 loc_72E24: mov ebx, 1 jmp loc_72B43
long long js_iterator_proto_reduce( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbp int v17; // r14d long long v18; // rbx long long v19; // rax long long v21; // rax __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // rdx unsigned int v25; // r13d long long v26; // rcx unsigned long long v27; // r14 unsigned long long v28; // rbx unsigned long long v29; // rax long long v30; // rdx _DWORD *v31; // rsi unsigned int v32; // ecx long long v33; // r14 long long v34; // r13 double v35; // rdi _DWORD *v36; // r15 long long v37; // r14 unsigned long long v38; // rbp long long v39; // rdx long long v40; // rdx long long v41; // rcx long long v42; // r8 long long v43; // r9 char v44; // [rsp+20h] [rbp-E8h] int v45; // [rsp+2Ch] [rbp-DCh] BYREF long long v46; // [rsp+30h] [rbp-D8h] long long v47; // [rsp+38h] [rbp-D0h] _DWORD *PropertyInternal2; // [rsp+40h] [rbp-C8h] long long v49; // [rsp+48h] [rbp-C0h] _DWORD *v50; // [rsp+50h] [rbp-B8h] long long v51; // [rsp+58h] [rbp-B0h] unsigned int v52; // [rsp+64h] [rbp-A4h] long long v53; // [rsp+68h] [rbp-A0h] long long v54; // [rsp+70h] [rbp-98h] long long v55; // [rsp+78h] [rbp-90h] _DWORD *v56; // [rsp+80h] [rbp-88h] double v57; // [rsp+88h] [rbp-80h] _QWORD v58[7]; // [rsp+90h] [rbp-78h] BYREF __m128 v59; // [rsp+C8h] [rbp-40h] v14 = a3; if ( (_DWORD)a3 != -1 ) { v18 = 0LL; JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v44); goto LABEL_5; } v17 = a4; if ( !(unsigned int)check_function( a1, *a5, a5[1], a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) { v21 = a5[1]; v50 = (_DWORD *)*a5; v58[0] = v50; v51 = v21; if ( (unsigned int)v21 >= 0xFFFFFFF7 ) ++*(_DWORD *)v58[0]; PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, a2, v14, 0x6Bu, a2, v14, 0LL, 0); v49 = v24; v55 = a2; if ( (_DWORD)v24 == 6 ) { v25 = 0; v46 = 3LL; v47 = 3LL; LABEL_29: JS_IteratorClose(a1, v55, v14, 1, a7, a8, a9, a10, *(double *)v22.m128_u64, *(double *)v23.m128_u64, a13, a14); JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)((v47 << 32) | v25), v46); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v50, v51); JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v49); v18 = 0LL; v19 = 0LL; return v19 | v18; } if ( v17 >= 2 ) { v26 = a5[3]; v27 = a5[2]; v58[0] = v27; v46 = v26; if ( (unsigned int)v26 >= 0xFFFFFFF7 ) ++*(_DWORD *)v58[0]; v47 = HIDWORD(v27); v28 = 0LL; LABEL_15: v29 = JS_IteratorNext(a1, a2, v14, (int)PropertyInternal2, v49, 0, 0LL, &v45); if ( (_DWORD)v30 != 6 ) { v31 = (_DWORD *)v29; v32 = v27; v33 = v46; v53 = v14; while ( 1 ) { if ( v45 ) { LODWORD(v18) = v32; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v50, v51); JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v49); v19 = v47 << 32; v18 = (unsigned int)v18; return v19 | v18; } v34 = v28 >> 31; v35 = (double)(int)v28; if ( !(v28 >> 31) ) *(_QWORD *)&v35 = (unsigned int)v28; v57 = v35; if ( v28 >> 31 ) v34 = 7LL; v36 = (_DWORD *)((v47 << 32) | v32); v58[0] = v36; v58[1] = v33; v58[2] = v31; v58[3] = v30; *(double *)&v58[4] = v35; v58[5] = v34; v59.m128_i32[0] = 0; v59.m128_u64[1] = 3LL; a7 = v59; v56 = v31; v54 = v33; v37 = v30; v52 = v32; v38 = JS_CallInternal( a1, (long long)v50, v51, 0LL, 3LL, 3LL, v59, a8, a9, a10, v22, v23, a13, a14, 0, 3, (long long)v58, 2u); v46 = v39; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v56, v37); JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)&v57, v34); if ( (_DWORD)v46 == 6 ) break; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v36, v54); v25 = v38; v47 = HIDWORD(v38); ++v28; v14 = v53; v31 = (_DWORD *)JS_IteratorNext(a1, v55, v53, (int)PropertyInternal2, v49, 0, 0LL, &v45); v32 = v25; v33 = v46; if ( (_DWORD)v30 == 6 ) goto LABEL_29; } v46 = v54; v25 = v52; v14 = v53; goto LABEL_29; } goto LABEL_28; } v27 = JS_IteratorNext(a1, a2, v14, (int)PropertyInternal2, v49, 0, 0LL, &v45); v46 = v40; v47 = HIDWORD(v27); if ( (_DWORD)v40 != 6 ) { if ( !v45 ) { v28 = 1LL; goto LABEL_15; } JS_ThrowTypeError(a1, (long long)"empty iterator", v40, v41, v42, v43, a7, a8, a9, a10, v22, v23, a13, a14, v44); } LABEL_28: v25 = v27; goto LABEL_29; } v18 = 0LL; LABEL_5: v19 = 0LL; return v19 | v18; }
47,615
js_iterator_proto_reduce
bluesky950520[P]quickjs/quickjs.c
static JSValue js_iterator_proto_reduce(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue item, method, ret, func, index_val, acc; JSValue args[3]; int64_t idx; BOOL done; if (check_iterator(ctx, this_val) < 0) return JS_EXCEPTION; if (check_function(ctx, argv[0])) return JS_EXCEPTION; acc = JS_UNDEFINED; func = js_dup(argv[0]); method = JS_GetProperty(ctx, this_val, JS_ATOM_next); if (JS_IsException(method)) goto exception; if (argc > 1) { acc = js_dup(argv[1]); idx = 0; } else { acc = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done); if (JS_IsException(acc)) goto exception; if (done) { JS_ThrowTypeError(ctx, "empty iterator"); goto exception; } idx = 1; } for (/* empty */; /*empty*/; idx++) { item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done); if (JS_IsException(item)) goto exception; if (done) break; index_val = js_int64(idx); args[0] = acc; args[1] = item; args[2] = index_val; ret = JS_Call(ctx, func, JS_UNDEFINED, countof(args), args); JS_FreeValue(ctx, item); JS_FreeValue(ctx, index_val); if (JS_IsException(ret)) goto exception; JS_FreeValue(ctx, acc); acc = ret; index_val = JS_UNDEFINED; ret = JS_UNDEFINED; item = JS_UNDEFINED; } JS_FreeValue(ctx, func); JS_FreeValue(ctx, method); return acc; exception: JS_IteratorClose(ctx, this_val, TRUE); JS_FreeValue(ctx, acc); JS_FreeValue(ctx, func); JS_FreeValue(ctx, method); return JS_EXCEPTION; }
O2
c
js_iterator_proto_reduce: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %r8, %rbx movl %ecx, %ebp movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %r15 movq %rdx, %rsi callq 0x60e07 pushq $0x6 popq %r14 testl %eax, %eax js 0x60b7c movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq %r15, %rdi callq 0x3949a testl %eax, %eax jne 0x60b7c movq (%rbx), %rax movq %rax, 0x48(%rsp) movq 0x8(%rbx), %rax movq %rax, 0x58(%rsp) cmpl $-0x9, %eax jb 0x608dc movq 0x48(%rsp), %rax incl (%rax) pushq $0x6b popq %rcx movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1b043 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) cmpl $0x6, %edx jne 0x6090d movq $0x0, 0x30(%rsp) pushq $0x3 popq %rbp jmp 0x60b31 cmpl $0x2, %ebp jl 0x60a80 movq 0x10(%rbx), %r14 movq 0x18(%rbx), %rcx movq %rcx, %rax cmpl $-0x9, %ecx jb 0x60929 incl (%r14) movq %r14, %rbx shrq $0x20, %rbx xorl %ebp, %ebp movq %rbx, 0x28(%rsp) movq %rax, 0x20(%rsp) movq %r13, 0x60(%rsp) movq %r12, 0x50(%rsp) andq $0x0, (%rsp) leaq 0x1c(%rsp), %rax movq %rax, 0x8(%rsp) movq %r15, %rbx movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movq 0x38(%rsp), %rcx movq 0x40(%rsp), %r8 xorl %r9d, %r9d callq 0x398cc movq %rdx, %r12 cmpl $0x6, %r12d movq %r14, 0x30(%rsp) je 0x60adc cmpl $0x0, 0x1c(%rsp) movl %r14d, %r13d jne 0x60ae5 movq %rax, %r15 movq %rbp, %rdi callq 0x20a0b movq %rax, %rcx movq %rax, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq 0x28(%rsp), %rax shlq $0x20, %rax orq %rax, %r13 movq %r13, 0x80(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x88(%rsp) movq %r15, 0x90(%rsp) movq %r12, 0x98(%rsp) movq %rcx, 0xa0(%rsp) movq %rdx, 0xa8(%rsp) leaq 0x80(%rsp), %rax movq %rax, (%rsp) movq %r15, 0x68(%rsp) movq %rbx, %r15 movq %rbx, %rdi movq 0x48(%rsp), %rsi movq 0x58(%rsp), %rdx xorl %ecx, %ecx pushq $0x3 popq %r8 pushq $0x3 popq %r9 callq 0x21eb6 movq %rax, %r14 movq %rdx, %rbx movq %r15, %rdi movq 0x68(%rsp), %rsi movq %r12, %rdx callq 0x1801e movq %r15, %rdi movq 0x78(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x1801e cmpl $0x6, %ebx je 0x60b19 movq %r15, %rdi movq %r13, %rsi movq 0x20(%rsp), %rdx callq 0x1801e movq %r14, %rax shrq $0x20, %rax movq %rax, 0x28(%rsp) incq %rbp movq %rbx, 0x20(%rsp) movq 0x60(%rsp), %r13 movq 0x50(%rsp), %r12 jmp 0x60946 andq $0x0, (%rsp) leaq 0x1c(%rsp), %rax movq %rax, 0x8(%rsp) movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movq 0x38(%rsp), %rcx movq 0x40(%rsp), %r8 xorl %r9d, %r9d callq 0x398cc movq %rax, %rbx movq %rdx, %rbp movq %rax, 0x30(%rsp) shrq $0x20, %rbx cmpl $0x6, %ebp je 0x60b31 cmpl $0x0, 0x1c(%rsp) je 0x60b9c leaq 0x28077(%rip), %rsi # 0x88b47 movq %r15, %rdi xorl %eax, %eax callq 0x1c64d jmp 0x60b31 pushq $0x6 popq %r14 movq %rbx, %r15 jmp 0x60b22 movq %rbx, %rdi movq 0x48(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1801e movq %rbx, %rdi movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0x1801e movq 0x28(%rsp), %rax shlq $0x20, %rax movq 0x20(%rsp), %r14 jmp 0x60b81 pushq $0x6 popq %r14 movq 0x60(%rsp), %r13 movq 0x50(%rsp), %r12 movq 0x20(%rsp), %rbp movq 0x28(%rsp), %rbx pushq $0x1 popq %rcx movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x37d41 shlq $0x20, %rbx movl 0x30(%rsp), %esi orq %rbx, %rsi movq %r15, %rdi movq %rbp, %rdx callq 0x1801e movq %r15, %rdi movq 0x48(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1801e movq %r15, %rdi movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0x1801e xorl %r13d, %r13d xorl %eax, %eax orq %rax, %r13 movq %r13, %rax movq %r14, %rdx addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbp, %rax pushq $0x1 popq %rbp movq 0x30(%rsp), %r14 jmp 0x60932
js_iterator_proto_reduce: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rbx, r8 mov ebp, ecx mov r13, rdx mov r12, rsi mov r15, rdi mov rsi, rdx call check_iterator push 6 pop r14 test eax, eax js loc_60B7C mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, r15 call check_function test eax, eax jnz loc_60B7C mov rax, [rbx] mov [rsp+0E8h+var_A0], rax mov rax, [rbx+8] mov [rsp+0E8h+var_90], rax cmp eax, 0FFFFFFF7h jb short loc_608DC mov rax, [rsp+0E8h+var_A0] inc dword ptr [rax] loc_608DC: push 6Bh ; 'k' pop rcx mov rdi, r15 mov rsi, r12 mov rdx, r13 call JS_GetProperty mov [rsp+0E8h+var_B0], rax mov [rsp+0E8h+var_A8], rdx cmp edx, 6 jnz short loc_6090D mov [rsp+0E8h+var_B8], 0 push 3 pop rbp jmp loc_60B31 loc_6090D: cmp ebp, 2 jl loc_60A80 mov r14, [rbx+10h] mov rcx, [rbx+18h] mov rax, rcx cmp ecx, 0FFFFFFF7h jb short loc_60929 inc dword ptr [r14] loc_60929: mov rbx, r14 shr rbx, 20h xor ebp, ebp loc_60932: mov [rsp+0E8h+var_C0], rbx mov [rsp+0E8h+var_C8], rax mov [rsp+0E8h+var_88], r13 mov [rsp+0E8h+var_98], r12 loc_60946: and [rsp+0E8h+var_E8], 0 lea rax, [rsp+0E8h+var_CC] mov [rsp+0E8h+var_E0], rax mov rbx, r15 mov rdi, r15 mov rsi, r12 mov rdx, r13 mov rcx, [rsp+0E8h+var_B0] mov r8, [rsp+0E8h+var_A8] xor r9d, r9d call JS_IteratorNext mov r12, rdx cmp r12d, 6 mov [rsp+0E8h+var_B8], r14 jz loc_60ADC cmp [rsp+0E8h+var_CC], 0 mov r13d, r14d jnz loc_60AE5 mov r15, rax mov rdi, rbp call js_int64 mov rcx, rax mov [rsp+0E8h+var_70], rax mov [rsp+0E8h+var_78], rdx mov rax, [rsp+0E8h+var_C0] shl rax, 20h or r13, rax mov [rsp+0E8h+var_68], r13 mov rax, [rsp+0E8h+var_C8] mov [rsp+0E8h+var_60], rax mov [rsp+0E8h+var_58], r15 mov [rsp+0E8h+var_50], r12 mov [rsp+0E8h+var_48], rcx mov [rsp+0E8h+var_40], rdx lea rax, [rsp+0E8h+var_68] mov [rsp+0E8h+var_E8], rax mov [rsp+0E8h+var_80], r15 mov r15, rbx mov rdi, rbx mov rsi, [rsp+0E8h+var_A0] mov rdx, [rsp+0E8h+var_90] xor ecx, ecx push 3 pop r8 push 3 pop r9 call JS_Call mov r14, rax mov rbx, rdx mov rdi, r15 mov rsi, [rsp+0E8h+var_80] mov rdx, r12 call JS_FreeValue mov rdi, r15 mov rsi, [rsp+0E8h+var_70] mov rdx, [rsp+0E8h+var_78] call JS_FreeValue cmp ebx, 6 jz loc_60B19 mov rdi, r15 mov rsi, r13 mov rdx, [rsp+0E8h+var_C8] call JS_FreeValue mov rax, r14 shr rax, 20h mov [rsp+0E8h+var_C0], rax inc rbp mov [rsp+0E8h+var_C8], rbx mov r13, [rsp+0E8h+var_88] mov r12, [rsp+0E8h+var_98] jmp loc_60946 loc_60A80: and [rsp+0E8h+var_E8], 0 lea rax, [rsp+0E8h+var_CC] mov [rsp+0E8h+var_E0], rax mov rdi, r15 mov rsi, r12 mov rdx, r13 mov rcx, [rsp+0E8h+var_B0] mov r8, [rsp+0E8h+var_A8] xor r9d, r9d call JS_IteratorNext mov rbx, rax mov rbp, rdx mov [rsp+0E8h+var_B8], rax shr rbx, 20h cmp ebp, 6 jz short loc_60B31 cmp [rsp+0E8h+var_CC], 0 jz loc_60B9C lea rsi, aEmptyIterator; "empty iterator" mov rdi, r15 xor eax, eax call JS_ThrowTypeError jmp short loc_60B31 loc_60ADC: push 6 pop r14 mov r15, rbx jmp short loc_60B22 loc_60AE5: mov rdi, rbx mov rsi, [rsp+0E8h+var_A0] mov rdx, [rsp+0E8h+var_90] call JS_FreeValue mov rdi, rbx mov rsi, [rsp+0E8h+var_B0] mov rdx, [rsp+0E8h+var_A8] call JS_FreeValue mov rax, [rsp+0E8h+var_C0] shl rax, 20h mov r14, [rsp+0E8h+var_C8] jmp short loc_60B81 loc_60B19: push 6 pop r14 mov r13, [rsp+0E8h+var_88] loc_60B22: mov r12, [rsp+0E8h+var_98] mov rbp, [rsp+0E8h+var_C8] mov rbx, [rsp+0E8h+var_C0] loc_60B31: push 1 pop rcx mov rdi, r15 mov rsi, r12 mov rdx, r13 call JS_IteratorClose shl rbx, 20h mov esi, dword ptr [rsp+0E8h+var_B8] or rsi, rbx mov rdi, r15 mov rdx, rbp call JS_FreeValue mov rdi, r15 mov rsi, [rsp+0E8h+var_A0] mov rdx, [rsp+0E8h+var_90] call JS_FreeValue mov rdi, r15 mov rsi, [rsp+0E8h+var_B0] mov rdx, [rsp+0E8h+var_A8] call JS_FreeValue loc_60B7C: xor r13d, r13d xor eax, eax loc_60B81: or r13, rax mov rax, r13 mov rdx, r14 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_60B9C: mov rax, rbp push 1 pop rbp mov r14, [rsp+0E8h+var_B8] jmp loc_60932
long long js_iterator_proto_reduce( long long a1, long long a2, long long a3, int a4, unsigned long long a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v15; // r13 int v16; // r12d long long v17; // r15 double v18; // xmm4_8 double v19; // xmm5_8 __m128 v20; // xmm4 __m128 v21; // xmm5 long long v22; // rdx long long v23; // rbp unsigned long long v24; // r14 long long v25; // rax long long v26; // rbp long long v27; // rbx unsigned long long v28; // rax long long v29; // rdx long long v30; // r12 long long v31; // r13 long long v32; // r15 long long v33; // rdx long long v34; // rdx long long v35; // rbx unsigned long long v36; // rax long long v37; // rdx long long v38; // rcx long long v39; // r8 long long v40; // r9 unsigned long long v41; // rax char v43; // [rsp+0h] [rbp-E8h] int v44; // [rsp+1Ch] [rbp-CCh] BYREF long long v45; // [rsp+20h] [rbp-C8h] unsigned long long v46; // [rsp+28h] [rbp-C0h] unsigned long long v47; // [rsp+30h] [rbp-B8h] long long Property; // [rsp+38h] [rbp-B0h] long long v49; // [rsp+40h] [rbp-A8h] _DWORD *v50; // [rsp+48h] [rbp-A0h] long long i; // [rsp+50h] [rbp-98h] long long v52; // [rsp+58h] [rbp-90h] long long v53; // [rsp+60h] [rbp-88h] long long v54; // [rsp+68h] [rbp-80h] long long v55; // [rsp+70h] [rbp-78h] long long v56; // [rsp+78h] [rbp-70h] _QWORD v57[13]; // [rsp+80h] [rbp-68h] BYREF v15 = a3; v16 = a2; v17 = a1; if ( (int)check_iterator(a1, a3) < 0 || (unsigned int)check_function(a1, *(_QWORD *)a5, *(_QWORD *)(a5 + 8), a6, a7, a8, a9, v18, v19, a12, a13) ) { goto LABEL_24; } v50 = *(_DWORD **)a5; v52 = *(_QWORD *)(a5 + 8); if ( (unsigned int)v52 >= 0xFFFFFFF7 ) ++*v50; Property = JS_GetProperty(a1, a2, v15, 107); v49 = v22; if ( (_DWORD)v22 != 6 ) { if ( a4 < 2 ) { v36 = JS_IteratorNext(a1, a2, v15, Property, v49, 0, 0LL, &v44); v23 = v37; v47 = v36; a5 = HIDWORD(v36); if ( (_DWORD)v37 == 6 ) goto LABEL_23; if ( v44 ) { JS_ThrowTypeError(a1, (long long)"empty iterator", v37, v38, v39, v40, a6, a7, a8, a9, v20, v21, a12, a13, v43); goto LABEL_23; } v25 = v37; v26 = 1LL; v24 = v47; } else { v24 = *(_QWORD *)(a5 + 16); v25 = *(_QWORD *)(a5 + 24); if ( (unsigned int)v25 >= 0xFFFFFFF7 ) ++*(_DWORD *)v24; a5 = HIDWORD(v24); v26 = 0LL; } v46 = a5; v45 = v25; v53 = v15; for ( i = a2; ; v16 = i ) { v27 = v17; v28 = JS_IteratorNext(v17, v16, v15, Property, v49, 0, 0LL, &v44); v30 = v29; v47 = v24; if ( (_DWORD)v29 == 6 ) break; v31 = (unsigned int)v24; if ( v44 ) { JS_FreeValue(v17, (long long)v50, v52); JS_FreeValue(v17, Property, v49); v41 = v46 << 32; return v41 | v31; } v32 = v28; v56 = js_int64(v26); v55 = v33; v15 = (v46 << 32) | (unsigned int)v24; v57[0] = v15; v57[1] = v45; v57[2] = v32; v57[3] = v30; v57[4] = v56; v57[5] = v33; v54 = v32; v17 = v27; v24 = JS_Call(v27, (int)v50, v52, 0, 3, 3, (long long)v57); v35 = v34; JS_FreeValue(v17, v54, v30); JS_FreeValue(v17, v56, v55); if ( (_DWORD)v35 == 6 ) { LODWORD(v15) = v53; break; } JS_FreeValue(v17, v15, v45); v46 = HIDWORD(v24); ++v26; v45 = v35; LODWORD(v15) = v53; } v16 = i; v23 = v45; a5 = v46; goto LABEL_23; } v47 = 0LL; v23 = 3LL; LABEL_23: JS_IteratorClose(v17, v16, v15, 1, a6, a7, a8, a9, *(double *)v20.m128_u64, *(double *)v21.m128_u64, a12, a13); JS_FreeValue(v17, (a5 << 32) | (unsigned int)v47, v23); JS_FreeValue(v17, (long long)v50, v52); JS_FreeValue(v17, Property, v49); LABEL_24: v31 = 0LL; v41 = 0LL; return v41 | v31; }
js_iterator_proto_reduce: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RBX,R8 MOV EBP,ECX MOV R13,RDX MOV R12,RSI MOV R15,RDI MOV RSI,RDX CALL 0x00160e07 PUSH 0x6 POP R14 TEST EAX,EAX JS 0x00160b7c MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RDI,R15 CALL 0x0013949a TEST EAX,EAX JNZ 0x00160b7c MOV RAX,qword ptr [RBX] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x58],RAX CMP EAX,-0x9 JC 0x001608dc MOV RAX,qword ptr [RSP + 0x48] INC dword ptr [RAX] LAB_001608dc: PUSH 0x6b POP RCX MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 CALL 0x0011b043 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX CMP EDX,0x6 JNZ 0x0016090d MOV qword ptr [RSP + 0x30],0x0 PUSH 0x3 POP RBP JMP 0x00160b31 LAB_0016090d: CMP EBP,0x2 JL 0x00160a80 MOV R14,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RBX + 0x18] MOV RAX,RCX CMP ECX,-0x9 JC 0x00160929 INC dword ptr [R14] LAB_00160929: MOV RBX,R14 SHR RBX,0x20 XOR EBP,EBP LAB_00160932: MOV qword ptr [RSP + 0x28],RBX MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x60],R13 MOV qword ptr [RSP + 0x50],R12 LAB_00160946: AND qword ptr [RSP],0x0 LEA RAX,[RSP + 0x1c] MOV qword ptr [RSP + 0x8],RAX MOV RBX,R15 MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV RCX,qword ptr [RSP + 0x38] MOV R8,qword ptr [RSP + 0x40] XOR R9D,R9D CALL 0x001398cc MOV R12,RDX CMP R12D,0x6 MOV qword ptr [RSP + 0x30],R14 JZ 0x00160adc CMP dword ptr [RSP + 0x1c],0x0 MOV R13D,R14D JNZ 0x00160ae5 MOV R15,RAX MOV RDI,RBP CALL 0x00120a0b MOV RCX,RAX MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x70],RDX MOV RAX,qword ptr [RSP + 0x28] SHL RAX,0x20 OR R13,RAX MOV qword ptr [RSP + 0x80],R13 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x90],R15 MOV qword ptr [RSP + 0x98],R12 MOV qword ptr [RSP + 0xa0],RCX MOV qword ptr [RSP + 0xa8],RDX LEA RAX,[RSP + 0x80] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x68],R15 MOV R15,RBX MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x58] XOR ECX,ECX PUSH 0x3 POP R8 PUSH 0x3 POP R9 CALL 0x00121eb6 MOV R14,RAX MOV RBX,RDX MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,R12 CALL 0x0011801e MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x70] CALL 0x0011801e CMP EBX,0x6 JZ 0x00160b19 MOV RDI,R15 MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011801e MOV RAX,R14 SHR RAX,0x20 MOV qword ptr [RSP + 0x28],RAX INC RBP MOV qword ptr [RSP + 0x20],RBX MOV R13,qword ptr [RSP + 0x60] MOV R12,qword ptr [RSP + 0x50] JMP 0x00160946 LAB_00160a80: AND qword ptr [RSP],0x0 LEA RAX,[RSP + 0x1c] MOV qword ptr [RSP + 0x8],RAX MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV RCX,qword ptr [RSP + 0x38] MOV R8,qword ptr [RSP + 0x40] XOR R9D,R9D CALL 0x001398cc MOV RBX,RAX MOV RBP,RDX MOV qword ptr [RSP + 0x30],RAX SHR RBX,0x20 CMP EBP,0x6 JZ 0x00160b31 CMP dword ptr [RSP + 0x1c],0x0 JZ 0x00160b9c LEA RSI,[0x188b47] MOV RDI,R15 XOR EAX,EAX CALL 0x0011c64d JMP 0x00160b31 LAB_00160adc: PUSH 0x6 POP R14 MOV R15,RBX JMP 0x00160b22 LAB_00160ae5: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x58] CALL 0x0011801e MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] CALL 0x0011801e MOV RAX,qword ptr [RSP + 0x28] SHL RAX,0x20 MOV R14,qword ptr [RSP + 0x20] JMP 0x00160b81 LAB_00160b19: PUSH 0x6 POP R14 MOV R13,qword ptr [RSP + 0x60] LAB_00160b22: MOV R12,qword ptr [RSP + 0x50] MOV RBP,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x28] LAB_00160b31: PUSH 0x1 POP RCX MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 CALL 0x00137d41 SHL RBX,0x20 MOV ESI,dword ptr [RSP + 0x30] OR RSI,RBX MOV RDI,R15 MOV RDX,RBP CALL 0x0011801e MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x58] CALL 0x0011801e MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] CALL 0x0011801e LAB_00160b7c: XOR R13D,R13D XOR EAX,EAX LAB_00160b81: OR R13,RAX MOV RAX,R13 MOV RDX,R14 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00160b9c: MOV RAX,RBP PUSH 0x1 POP RBP MOV R14,qword ptr [RSP + 0x30] JMP 0x00160932
int1 [16] js_iterator_proto_reduce (int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5) { int *piVar1; int1 auVar2 [16]; int iVar3; ulong uVar4; ulong uVar5; int1 auVar6 [16]; int1 auVar7 [16]; long lStackY_f0; int local_cc; int8 local_c8; int8 *local_c0; ulong local_b8; int1 local_b0 [16]; int *local_a0; int8 local_98; int8 local_90; int8 local_88; int8 local_80; int8 local_78; int8 local_70; ulong local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; iVar3 = check_iterator(param_1,param_3); if ((iVar3 < 0) || (iVar3 = check_function(param_1,*param_5,param_5[1]), iVar3 != 0)) goto LAB_00160b7c; local_a0 = (int *)*param_5; local_90 = param_5[1]; if (0xfffffff6 < (uint)local_90) { *local_a0 = *local_a0 + 1; } local_b0 = JS_GetProperty(param_1,param_2,param_3,0x6b); if (local_b0._8_4_ == 6) { auVar2 = ZEXT816(3) << 0x40; } else if (param_4 < 2) { auVar7 = JS_IteratorNext(param_1,param_2,param_3,local_b0._0_8_,local_b0._8_8_,0,0,&local_cc); local_b8 = auVar7._0_8_; param_5 = (int8 *)(local_b8 >> 0x20); auVar2 = auVar7; if (auVar7._8_4_ != 6) { if (local_cc == 0) { lStackY_f0 = 1; local_c0 = param_5; local_98 = param_2; local_88 = param_3; goto LAB_00160946; } JS_ThrowTypeError(param_1,"empty iterator"); auVar2._8_8_ = auVar7._8_8_; auVar2._0_8_ = local_b8; } } else { piVar1 = *(int **)*(int1 (*) [16])(param_5 + 2); auVar7 = *(int1 (*) [16])(param_5 + 2); if (0xfffffff6 < (uint)param_5[3]) { *piVar1 = *piVar1 + 1; } local_c0 = (int8 *)((ulong)piVar1 >> 0x20); lStackY_f0 = 0; local_98 = param_2; local_88 = param_3; LAB_00160946: while( true ) { param_3 = local_88; local_c8 = auVar7._8_8_; uVar4 = auVar7._0_8_; auVar6 = JS_IteratorNext(param_1,local_98,local_88,local_b0._0_8_,local_b0._8_8_,0,0,&local_cc ); auVar2._8_8_ = local_c8; auVar2._0_8_ = uVar4; param_5 = local_c0; param_2 = local_98; if (auVar6._8_4_ == 6) break; uVar5 = uVar4 & 0xffffffff; local_b8 = uVar4; if (local_cc != 0) { JS_FreeValue(param_1,local_a0,local_90); JS_FreeValue(param_1,local_b0._0_8_,local_b0._8_8_); uVar4 = (long)local_c0 << 0x20; goto LAB_00160b81; } auVar7 = js_int64(lStackY_f0); local_78 = auVar7._8_8_; local_70 = auVar7._0_8_; uVar5 = uVar5 | (long)local_c0 << 0x20; local_60 = local_c8; local_80 = auVar6._0_8_; local_68 = uVar5; local_58 = auVar6._0_8_; local_50 = auVar6._8_8_; local_48 = local_70; local_40 = local_78; auVar7 = JS_Call(param_1,local_a0,local_90,0,3,3,&local_68); JS_FreeValue(param_1,local_80,auVar6._8_8_); JS_FreeValue(param_1,local_70,local_78); auVar2._8_8_ = local_c8; auVar2._0_8_ = local_b8; param_5 = local_c0; param_2 = local_98; param_3 = local_88; if (auVar7._8_4_ == 6) break; JS_FreeValue(param_1,uVar5,local_c8); local_c0 = (int8 *)(auVar7._0_8_ >> 0x20); lStackY_f0 = lStackY_f0 + 1; } } local_b8 = auVar2._0_8_; JS_IteratorClose(param_1,param_2,param_3,1); JS_FreeValue(param_1,local_b8 & 0xffffffff | (long)param_5 << 0x20,auVar2._8_8_); JS_FreeValue(param_1,local_a0,local_90); JS_FreeValue(param_1,local_b0._0_8_,local_b0._8_8_); LAB_00160b7c: local_c8 = 6; uVar5 = 0; uVar4 = 0; LAB_00160b81: auVar7._8_8_ = local_c8; auVar7._0_8_ = uVar5 | uVar4; return auVar7; }
47,616
LefDefParser::lefiPin::propType(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
char lefiPin::propType(int index) const { char msg[160]; if (index < 0 || index >= numProperties_) { sprintf(msg, "ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d", index, numProperties_); lefiError(0, 1352, msg); return 0; } return propTypes_[index]; }
O3
cpp
LefDefParser::lefiPin::propType(int) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %edx testl %esi, %esi setns %al movl 0x28c(%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x36fc2 movq 0x2b0(%rdi), %rax movl %edx, %ecx movb (%rax,%rcx), %bl jmp 0x36fe7 leaq 0x29da8(%rip), %rsi # 0x60d71 xorl %ebx, %ebx movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x548, %esi # imm = 0x548 movq %r14, %rdx callq 0x33d78 movl %ebx, %eax addq $0xa8, %rsp popq %rbx popq %r14 retq
_ZNK12LefDefParser7lefiPin8propTypeEi: push r14 push rbx sub rsp, 0A8h mov edx, esi test esi, esi setns al mov ecx, [rdi+28Ch] cmp ecx, esi setnle sil test al, sil jz short loc_36FC2 mov rax, [rdi+2B0h] mov ecx, edx mov bl, [rax+rcx] jmp short loc_36FE7 loc_36FC2: lea rsi, aErrorLefpars13_24; "ERROR (LEFPARS-1352): The index number "... xor ebx, ebx mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf xor edi, edi; this mov esi, 548h; int mov rdx, r14; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) loc_36FE7: mov eax, ebx add rsp, 0A8h pop rbx pop r14 retn
long long LefDefParser::lefiPin::propType(LefDefParser::lefiPin *this, signed int a2) { unsigned int v2; // ebx int v3; // ecx const char *v4; // rcx _BYTE v6[184]; // [rsp+0h] [rbp-B8h] BYREF v3 = *((_DWORD *)this + 163); if ( v3 > a2 && a2 >= 0 ) { LOBYTE(v2) = *(_BYTE *)(*((_QWORD *)this + 86) + (unsigned int)a2); } else { v2 = 0; sprintf( v6, "ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d", a2, v3); LefDefParser::lefiError(0LL, 1352, (long long)v6, v4); } return v2; }
propType: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV EDX,ESI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI + 0x28c] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x00136fc2 MOV RAX,qword ptr [RDI + 0x2b0] MOV ECX,EDX MOV BL,byte ptr [RAX + RCX*0x1] JMP 0x00136fe7 LAB_00136fc2: LEA RSI,[0x160d71] XOR EBX,EBX MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x548 MOV RDX,R14 CALL 0x00133d78 LAB_00136fe7: MOV EAX,EBX ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::lefiPin::propType(int) const */ ulong __thiscall LefDefParser::lefiPin::propType(lefiPin *this,int param_1) { int8 unaff_RBX; ulong uVar1; char acStack_b8 [168]; if (param_1 < 0 || *(int *)(this + 0x28c) <= param_1) { uVar1 = 0; sprintf(acStack_b8, "ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d" ); lefiError(0,0x548,acStack_b8); } else { uVar1 = CONCAT71((int7)((ulong)unaff_RBX >> 8), *(int1 *)(*(long *)(this + 0x2b0) + (ulong)(uint)param_1)); } return uVar1 & 0xffffffff; }
47,617
ma_SHA1Init
eloqsql/libmariadb/libmariadb/ma_sha1.c
void ma_SHA1Init(_MA_SHA1_CTX * context) { context->count[0] = context->count[1] = 0; /* Load magic initialization constants. */ context->state[0] = 0x67452301; context->state[1] = 0xefcdab89; context->state[2] = 0x98badcfe; context->state[3] = 0x10325476; context->state[4] = 0xc3d2e1f0; }
O0
c
ma_SHA1Init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x8(%rbp), %rax movl $0x67452301, (%rax) # imm = 0x67452301 movq -0x8(%rbp), %rax movl $0xefcdab89, 0x4(%rax) # imm = 0xEFCDAB89 movq -0x8(%rbp), %rax movl $0x98badcfe, 0x8(%rax) # imm = 0x98BADCFE movq -0x8(%rbp), %rax movl $0x10325476, 0xc(%rax) # imm = 0x10325476 movq -0x8(%rbp), %rax movl $0xc3d2e1f0, 0x10(%rax) # imm = 0xC3D2E1F0 popq %rbp retq nopw %cs:(%rax,%rax)
ma_SHA1Init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov dword ptr [rax+18h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_8] mov dword ptr [rax], 67452301h mov rax, [rbp+var_8] mov dword ptr [rax+4], 0EFCDAB89h mov rax, [rbp+var_8] mov dword ptr [rax+8], 98BADCFEh mov rax, [rbp+var_8] mov dword ptr [rax+0Ch], 10325476h mov rax, [rbp+var_8] mov dword ptr [rax+10h], 0C3D2E1F0h pop rbp retn
_DWORD * ma_SHA1Init(_DWORD *a1) { _DWORD *result; // rax a1[6] = 0; a1[5] = 0; *a1 = 1732584193; a1[1] = -271733879; a1[2] = -1732584194; a1[3] = 271733878; result = a1; a1[4] = -1009589776; return result; }
ma_SHA1Init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x67452301 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0xefcdab89 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],0x98badcfe MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],0x10325476 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],0xc3d2e1f0 POP RBP RET
void ma_SHA1Init(int4 *param_1) { param_1[6] = 0; param_1[5] = 0; *param_1 = 0x67452301; param_1[1] = 0xefcdab89; param_1[2] = 0x98badcfe; param_1[3] = 0x10325476; param_1[4] = 0xc3d2e1f0; return; }
47,618
ma_SHA1Init
eloqsql/libmariadb/libmariadb/ma_sha1.c
void ma_SHA1Init(_MA_SHA1_CTX * context) { context->count[0] = context->count[1] = 0; /* Load magic initialization constants. */ context->state[0] = 0x67452301; context->state[1] = 0xefcdab89; context->state[2] = 0x98badcfe; context->state[3] = 0x10325476; context->state[4] = 0xc3d2e1f0; }
O0
c
ma_SHA1Init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x8(%rbp), %rax movl $0x67452301, (%rax) # imm = 0x67452301 movq -0x8(%rbp), %rax movl $0xefcdab89, 0x4(%rax) # imm = 0xEFCDAB89 movq -0x8(%rbp), %rax movl $0x98badcfe, 0x8(%rax) # imm = 0x98BADCFE movq -0x8(%rbp), %rax movl $0x10325476, 0xc(%rax) # imm = 0x10325476 movq -0x8(%rbp), %rax movl $0xc3d2e1f0, 0x10(%rax) # imm = 0xC3D2E1F0 popq %rbp retq nopw %cs:(%rax,%rax)
ma_SHA1Init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov dword ptr [rax+18h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_8] mov dword ptr [rax], 67452301h mov rax, [rbp+var_8] mov dword ptr [rax+4], 0EFCDAB89h mov rax, [rbp+var_8] mov dword ptr [rax+8], 98BADCFEh mov rax, [rbp+var_8] mov dword ptr [rax+0Ch], 10325476h mov rax, [rbp+var_8] mov dword ptr [rax+10h], 0C3D2E1F0h pop rbp retn
_DWORD * ma_SHA1Init(_DWORD *a1) { _DWORD *result; // rax a1[6] = 0; a1[5] = 0; *a1 = 1732584193; a1[1] = -271733879; a1[2] = -1732584194; a1[3] = 271733878; result = a1; a1[4] = -1009589776; return result; }
ma_SHA1Init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x67452301 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0xefcdab89 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],0x98badcfe MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],0x10325476 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],0xc3d2e1f0 POP RBP RET
void ma_SHA1Init(int4 *param_1) { param_1[6] = 0; param_1[5] = 0; *param_1 = 0x67452301; param_1[1] = 0xefcdab89; param_1[2] = 0x98badcfe; param_1[3] = 0x10325476; param_1[4] = 0xc3d2e1f0; return; }
47,619
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=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>)
monkey531[P]llama/common/./json.hpp
basic_json& operator=(basic_json other) noexcept ( std::is_nothrow_move_constructible<value_t>::value&& std::is_nothrow_move_assignable<value_t>::value&& std::is_nothrow_move_constructible<json_value>::value&& std::is_nothrow_move_assignable<json_value>::value&& std::is_nothrow_move_assignable<json_base_class_t>::value ) { // check that passed value is valid other.assert_invariant(); using std::swap; swap(m_data.m_type, other.m_data.m_type); swap(m_data.m_value, other.m_data.m_value); json_base_class_t::operator=(std::move(other)); set_parents(); assert_invariant(); return *this; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi movl $0x1, %esi callq 0x284e2 movb (%r14), %al movb (%rbx), %cl movb %cl, (%r14) movb %al, (%rbx) movq 0x8(%r14), %rax movq 0x8(%rbx), %rcx movq %rcx, 0x8(%r14) movq %rax, 0x8(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x284e2 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsi mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov al, [r14] mov cl, [rbx] mov [r14], cl mov [rbx], al mov rax, [r14+8] mov rcx, [rbx+8] mov [r14+8], rcx mov [rbx+8], rax 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, r14 add rsp, 8 pop rbx pop r14 retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( long long a1, long long a2) { char v2; // al long long v3; // rax nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a2); v2 = *(_BYTE *)a1; *(_BYTE *)a1 = *(_BYTE *)a2; *(_BYTE *)a2 = v2; v3 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return a1; }
operator=: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI MOV ESI,0x1 CALL 0x001284e2 MOV AL,byte ptr [R14] MOV CL,byte ptr [RBX] MOV byte ptr [R14],CL MOV byte ptr [RBX],AL MOV RAX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [R14 + 0x8],RCX MOV qword ptr [RBX + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x001284e2 MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::TEMPNAMEPLACEHOLDERVALUE(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>) */ 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:: 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=(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_2) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; int8 uVar2; assert_invariant(SUB81(param_2,0)); bVar1 = *this; *this = *param_2; *param_2 = bVar1; uVar2 = *(int8 *)(this + 8); *(int8 *)(this + 8) = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = uVar2; assert_invariant(SUB81(this,0)); return this; }
47,620
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const
monkey531[P]llama/common/minja.hpp
T get(const std::string & key, T default_value) const { if (!contains(key)) return default_value; return at(key).get<T>(); }
O3
cpp
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %r14 movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movq %rsi, %rdi movq %rdx, %rsi callq 0x54a9a testb %al, %al je 0x71fb4 leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %r12, %rsi callq 0x423f6 movq %r15, %rdi movq %r14, %rsi callq 0x5463c movq %rbx, %rdi movq %rax, %rsi callq 0x3f486 leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3d7c0 movq %r14, %rdi callq 0x4a3ae movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x71f75 callq 0x2f99c movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x71f84 callq 0x2f99c movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x71f93 callq 0x2f99c movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x72008 movq 0x6afe4(%rip), %rax # 0xdcf88 cmpb $0x0, (%rax) je 0x71ff3 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x71ffd leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq (%r14), %rdx leaq 0x10(%r14), %rax cmpq %rax, %rdx je 0x71fd3 movq %rdx, (%rbx) movq (%rax), %rcx movq %rcx, 0x10(%rbx) jmp 0x71fd9 movups (%rax), %xmm0 movups %xmm0, (%rcx) movq 0x8(%r14), %rcx movq %rcx, 0x8(%rbx) movq %rax, (%r14) movq $0x0, 0x8(%r14) movb $0x0, 0x10(%r14) jmp 0x72008 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x72008 movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x3d734 movq %rbx, %rdi callq 0x18b90
_ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_: push r15 push r14 push r12 push rbx sub rsp, 58h mov r14, rcx mov r12, rdx mov r15, rsi mov rbx, rdi mov rdi, rsi mov rsi, rdx call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) test al, al jz loc_71FB4 lea r14, [rsp+78h+var_70] mov rdi, r14 mov rsi, r12 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r15; this mov rsi, r14; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rbx mov rsi, rax call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea r14, [rsp+78h+var_30] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_71F75 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_71F75: mov rdi, [rsp+78h+var_48] test rdi, rdi jz short loc_71F84 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_71F84: mov rdi, [rsp+78h+var_58] test rdi, rdi jz short loc_71F93 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_71F93: mov rdi, [rsp+78h+var_68] test rdi, rdi jz short loc_72008 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_71FF3 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_71FFD loc_71FB4: lea rcx, [rbx+10h] mov [rbx], rcx mov rdx, [r14] lea rax, [r14+10h] cmp rdx, rax jz short loc_71FD3 mov [rbx], rdx mov rcx, [rax] mov [rbx+10h], rcx jmp short loc_71FD9 loc_71FD3: movups xmm0, xmmword ptr [rax] movups xmmword ptr [rcx], xmm0 loc_71FD9: mov rcx, [r14+8] mov [rbx+8], rcx mov [r14], rax mov qword ptr [r14+8], 0 mov byte ptr [r14+10h], 0 jmp short loc_72008 loc_71FF3: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_71FFD: cmp eax, 1 jnz short loc_72008 mov rax, [rdi] call qword ptr [rax+18h] loc_72008: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long minja::Value::get<std::string>(long long a1, minja::Value *a2, long long a3, long long a4) { _QWORD *v6; // rax long long v7; // rdi signed __int32 v8; // eax _OWORD *v9; // rax __int128 v11; // [rsp+8h] [rbp-70h] BYREF volatile signed __int32 *v12; // [rsp+20h] [rbp-58h] volatile signed __int32 *v13; // [rsp+30h] [rbp-48h] volatile signed __int32 *v14; // [rsp+40h] [rbp-38h] void **v15[6]; // [rsp+48h] [rbp-30h] BYREF if ( minja::Value::contains((long long)a2) ) { minja::Value::Value(&v11); v6 = (_QWORD *)minja::Value::at(a2, (const minja::Value *)&v11); minja::Value::get<std::string>(a1, v6); 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 *)v15); 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(v15); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); if ( v12 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12); v7 = *((_QWORD *)&v11 + 1); if ( *((_QWORD *)&v11 + 1) ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(*((_QWORD *)&v11 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v11 + 1) + 12LL) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v11 + 1) + 12LL), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } } else { *(_QWORD *)a1 = a1 + 16; v9 = (_OWORD *)(a4 + 16); if ( *(_QWORD *)a4 == a4 + 16 ) { *(_OWORD *)(a1 + 16) = *v9; } else { *(_QWORD *)a1 = *(_QWORD *)a4; *(_QWORD *)(a1 + 16) = *(_QWORD *)v9; } *(_QWORD *)(a1 + 8) = *(_QWORD *)(a4 + 8); *(_QWORD *)a4 = v9; *(_QWORD *)(a4 + 8) = 0LL; *(_BYTE *)(a4 + 16) = 0; } return a1; }
get<std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RCX MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RSI MOV RSI,RDX CALL 0x00154a9a TEST AL,AL JZ 0x00171fb4 LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,R12 CALL 0x001423f6 LAB_00171f3a: MOV RDI,R15 MOV RSI,R14 CALL 0x0015463c MOV RDI,RBX MOV RSI,RAX CALL 0x0013f486 LAB_00171f50: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x0013d7c0 MOV RDI,R14 CALL 0x0014a3ae MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x00171f75 CALL 0x0012f99c LAB_00171f75: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00171f84 CALL 0x0012f99c LAB_00171f84: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x00171f93 CALL 0x0012f99c LAB_00171f93: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00172008 MOV RAX,qword ptr [0x001dcf88] CMP byte ptr [RAX],0x0 JZ 0x00171ff3 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00171ffd LAB_00171fb4: LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOV RDX,qword ptr [R14] LEA RAX,[R14 + 0x10] CMP RDX,RAX JZ 0x00171fd3 MOV qword ptr [RBX],RDX MOV RCX,qword ptr [RAX] MOV qword ptr [RBX + 0x10],RCX JMP 0x00171fd9 LAB_00171fd3: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RCX],XMM0 LAB_00171fd9: MOV RCX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x8],0x0 MOV byte ptr [R14 + 0x10],0x0 JMP 0x00172008 LAB_00171ff3: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00171ffd: CMP EAX,0x1 JNZ 0x00172008 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00172008: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >(std::__cxx11::string const&, std::__cxx11::string) const */ long * minja::Value::get<std::__cxx11::string> (long *param_1,Value *param_2,string *param_3,int8 *param_4) { long *plVar1; int *piVar2; long lVar3; char cVar4; int iVar5; Value local_70 [8]; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; data local_30 [16]; cVar4 = contains(param_2,param_3); if (cVar4 == '\0') { *param_1 = (long)(param_1 + 2); plVar1 = param_4 + 2; if ((long *)*param_4 == plVar1) { lVar3 = param_4[3]; param_1[2] = *plVar1; param_1[3] = lVar3; } else { *param_1 = (long)*param_4; param_1[2] = *plVar1; } param_1[1] = param_4[1]; *param_4 = plVar1; param_4[1] = 0; *(int1 *)(param_4 + 2) = 0; } else { Value(local_70,param_3); /* try { // try from 00171f3a to 00171f4f has its CatchHandler @ 00172017 */ at(param_2,local_70); get<std::__cxx11::string>(); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_30,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_30); if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (long *)0x0) { if (*PTR___libc_single_threaded_001dcf88 == '\0') { LOCK(); piVar2 = (int *)((long)local_68 + 0xc); iVar5 = *piVar2; *piVar2 = *piVar2 + -1; UNLOCK(); } else { iVar5 = *(int *)((long)local_68 + 0xc); *(int *)((long)local_68 + 0xc) = iVar5 + -1; } if (iVar5 == 1) { (**(code **)(*local_68 + 0x18))(); } } } return param_1; }
47,621
glfwPlatformSetWindowTitle
untodesu[P]riteg/build_O1/_deps/glfw-src/src/x11_window.c
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) { #if defined(X_HAVE_UTF8_STRING) Xutf8SetWMProperties(_glfw.x11.display, window->x11.handle, title, title, NULL, 0, NULL, NULL, NULL); #else // This may be a slightly better fallback than using XStoreName and // XSetIconName, which always store their arguments using STRING XmbSetWMProperties(_glfw.x11.display, window->x11.handle, title, title, NULL, 0, NULL, NULL, NULL); #endif XChangeProperty(_glfw.x11.display, window->x11.handle, _glfw.x11.NET_WM_NAME, _glfw.x11.UTF8_STRING, 8, PropModeReplace, (unsigned char*) title, strlen(title)); XChangeProperty(_glfw.x11.display, window->x11.handle, _glfw.x11.NET_WM_ICON_NAME, _glfw.x11.UTF8_STRING, 8, PropModeReplace, (unsigned char*) title, strlen(title)); XFlush(_glfw.x11.display); }
O1
c
glfwPlatformSetWindowTitle: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq 0x81c2e(%rip), %r15 # 0xa4638 movq 0x1fec0(%r15), %rdi movq 0x348(%r14), %rsi subq $0x20, %rsp xorps %xmm0, %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq %rbx, %rdx movq %rbx, %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0xc260 addq $0x20, %rsp movq %r15, %rax movq 0x1fec0(%r15), %r15 movq 0x348(%r14), %r12 movq 0x20408(%rax), %r13 movq 0x20550(%rax), %rbp movq %rbx, %rdi callq 0xc3a0 movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movq %rbp, %rcx movl $0x8, %r8d xorl %r9d, %r9d pushq %rax pushq %rbx callq 0xc720 addq $0x10, %rsp leaq 0x81ba9(%rip), %rax # 0xa4638 movq 0x1fec0(%rax), %r15 movq 0x348(%r14), %r14 movq 0x20410(%rax), %r12 movq 0x20550(%rax), %r13 movq %rax, %rbp movq %rbx, %rdi callq 0xc3a0 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %r13, %rcx movl $0x8, %r8d xorl %r9d, %r9d pushq %rax pushq %rbx callq 0xc720 addq $0x10, %rsp movq 0x1fec0(%rbp), %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xcce0
_glfwPlatformSetWindowTitle: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi lea r15, _glfw mov rdi, [r15+1FEC0h] mov rsi, [r14+348h] sub rsp, 20h xorps xmm0, xmm0 movups [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], 0 mov rdx, rbx mov rcx, rbx xor r8d, r8d xor r9d, r9d call _Xutf8SetWMProperties add rsp, 20h mov rax, r15 mov r15, [r15+1FEC0h] mov r12, [r14+348h] mov r13, qword ptr ds:loc_20408[rax] mov rbp, [rax+20550h] mov rdi, rbx call _strlen mov rdi, r15 mov rsi, r12 mov rdx, r13 mov rcx, rbp mov r8d, 8 xor r9d, r9d push rax push rbx call _XChangeProperty add rsp, 10h lea rax, _glfw mov r15, [rax+1FEC0h] mov r14, [r14+348h] mov r12, [rax+20410h] mov r13, [rax+20550h] mov rbp, rax mov rdi, rbx call _strlen mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, r13 mov r8d, 8 xor r9d, r9d push rax push rbx call _XChangeProperty add rsp, 10h mov rdi, [rbp+1FEC0h] add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _XFlush
long long glfwPlatformSetWindowTitle(long long a1, long long a2) { long long v2; // r15 long long v3; // r12 long long v4; // r13 long long v5; // rbp long long v6; // rax long long v7; // r15 long long v8; // r14 long long v9; // r12 long long v10; // r13 long long v11; // rax Xutf8SetWMProperties(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), a2, a2, 0LL, 0LL, 0LL, 0LL, 0LL); v2 = *(_QWORD *)&glfw[32688]; v3 = *(_QWORD *)(a1 + 840); v4 = *(_QWORD *)((char *)&loc_20408 + (_QWORD)glfw); v5 = *(_QWORD *)&glfw[33108]; v6 = strlen(a2); XChangeProperty(v2, v3, v4, v5, 8LL, 0LL, a2, v6); v7 = *(_QWORD *)&glfw[32688]; v8 = *(_QWORD *)(a1 + 840); v9 = *(_QWORD *)&glfw[33028]; v10 = *(_QWORD *)&glfw[33108]; v11 = strlen(a2); XChangeProperty(v7, v8, v9, v10, 8LL, 0LL, a2, v11); return XFlush(*(_QWORD *)&glfw[32688]); }
_glfwPlatformSetWindowTitle: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA R15,[0x1a4638] MOV RDI,qword ptr [R15 + 0x1fec0] MOV RSI,qword ptr [R14 + 0x348] SUB RSP,0x20 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV RDX,RBX MOV RCX,RBX XOR R8D,R8D XOR R9D,R9D CALL 0x0010c260 ADD RSP,0x20 MOV RAX,R15 MOV R15,qword ptr [R15 + 0x1fec0] MOV R12,qword ptr [R14 + 0x348] MOV R13,qword ptr [RAX + 0x20408] MOV RBP,qword ptr [RAX + 0x20550] MOV RDI,RBX CALL 0x0010c3a0 MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV RCX,RBP MOV R8D,0x8 XOR R9D,R9D PUSH RAX PUSH RBX CALL 0x0010c720 ADD RSP,0x10 LEA RAX,[0x1a4638] MOV R15,qword ptr [RAX + 0x1fec0] MOV R14,qword ptr [R14 + 0x348] MOV R12,qword ptr [RAX + 0x20410] MOV R13,qword ptr [RAX + 0x20550] MOV RBP,RAX MOV RDI,RBX CALL 0x0010c3a0 MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,R13 MOV R8D,0x8 XOR R9D,R9D PUSH RAX PUSH RBX CALL 0x0010c720 ADD RSP,0x10 MOV RDI,qword ptr [RBP + 0x1fec0] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0010cce0
void _glfwPlatformSetWindowTitle(long param_1,char *param_2) { int8 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; size_t sVar5; Xutf8SetWMProperties(DAT_001c44f8,*(int8 *)(param_1 + 0x348),param_2,param_2,0,0,0,0,0); uVar4 = DAT_001c4b88; uVar3 = DAT_001c4a40; uVar2 = DAT_001c44f8; uVar1 = *(int8 *)(param_1 + 0x348); sVar5 = strlen(param_2); XChangeProperty(uVar2,uVar1,uVar3,uVar4,8,0,param_2,sVar5); uVar4 = DAT_001c4b88; uVar3 = DAT_001c4a48; uVar2 = DAT_001c44f8; uVar1 = *(int8 *)(param_1 + 0x348); sVar5 = strlen(param_2); XChangeProperty(uVar2,uVar1,uVar3,uVar4,8,0,param_2,sVar5); XFlush(DAT_001c44f8); return; }
47,622
mi_keyseg_write
eloqsql/storage/myisam/mi_open.c
int mi_keyseg_write(File file, const HA_KEYSEG *keyseg) { uchar buff[HA_KEYSEG_SIZE]; uchar *ptr=buff; ulong pos; *ptr++= keyseg->type; *ptr++= keyseg->language & 0xFF; /* Collation ID, low byte */ *ptr++= keyseg->null_bit; *ptr++= keyseg->bit_start; *ptr++= keyseg->language >> 8; /* Collation ID, high byte */ *ptr++= keyseg->bit_length; mi_int2store(ptr,keyseg->flag); ptr+=2; mi_int2store(ptr,keyseg->length); ptr+=2; mi_int4store(ptr,keyseg->start); ptr+=4; pos= keyseg->null_bit ? keyseg->null_pos : keyseg->bit_pos; mi_int4store(ptr, pos); ptr+=4; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O3
c
mi_keyseg_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x70, %rsp movl %edi, %ebx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb 0x18(%rsi), %al movb %al, -0x30(%rbp) movzwl 0x16(%rsi), %eax movb %al, -0x2f(%rbp) movb 0x19(%rsi), %cl movb %cl, -0x2e(%rbp) movb 0x1a(%rsi), %dl movb %dl, -0x2d(%rbp) movb %ah, -0x2c(%rbp) movb 0x1b(%rsi), %al movb %al, -0x2b(%rbp) movzwl 0x12(%rsi), %eax rolw $0x8, %ax movw %ax, -0x2a(%rbp) movzwl 0x14(%rsi), %eax rolw $0x8, %ax movw %ax, -0x28(%rbp) movl 0x8(%rsi), %eax bswapl %eax movl %eax, -0x26(%rbp) testb %cl, %cl je 0x838bd movl 0xc(%rsi), %eax jmp 0x838c1 movzwl 0x10(%rsi), %eax bswapl %eax movl %eax, -0x22(%rbp) leaq 0x305783(%rip), %rax # 0x389050 movq (%rax), %rax leaq -0x80(%rbp), %rdi movl %ebx, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x83920 leaq -0x30(%rbp), %rsi movl $0x12, %edx movl $0x4, %ecx movl %ebx, %edi callq 0x2f280 movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx setne %cl movq %fs:0x28, %rdx cmpq -0x18(%rbp), %rdx jne 0x8393a movb %cl, %al addq $0x70, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x30(%rbp), %rdx leaq -0x38(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rcx callq 0x2e3ae movq (%r14), %rcx jmp 0x838fe callq 0x29220
mi_keyseg_write: push rbp mov rbp, rsp push r14 push rbx sub rsp, 70h mov ebx, edi mov rax, fs:28h mov [rbp+var_18], rax mov al, [rsi+18h] mov [rbp+var_30], al movzx eax, word ptr [rsi+16h] mov [rbp+var_2F], al mov cl, [rsi+19h] mov [rbp+var_2E], cl mov dl, [rsi+1Ah] mov [rbp+var_2D], dl mov [rbp+var_2C], ah mov al, [rsi+1Bh] mov [rbp+var_2B], al movzx eax, word ptr [rsi+12h] rol ax, 8 mov [rbp+var_2A], ax movzx eax, word ptr [rsi+14h] rol ax, 8 mov [rbp+var_28], ax mov eax, [rsi+8] bswap eax mov [rbp+var_26], eax test cl, cl jz short loc_838BD mov eax, [rsi+0Ch] jmp short loc_838C1 loc_838BD: movzx eax, word ptr [rsi+10h] loc_838C1: bswap eax mov [rbp+var_22], eax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] mov esi, ebx mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_83920 lea rsi, [rbp+var_30] mov edx, 12h mov ecx, 4 mov edi, ebx call my_write mov rcx, rax loc_838FE: xor eax, eax test rcx, rcx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_18] jnz short loc_8393A mov al, cl add rsp, 70h pop rbx pop r14 pop rbp retn loc_83920: lea rdx, [rbp+var_30] lea r14, [rbp+var_38] mov rdi, rax mov esi, ebx mov rcx, r14 call mi_keyseg_write_cold_1 mov rcx, [r14] jmp short loc_838FE loc_8393A: call ___stack_chk_fail
bool mi_keyseg_write(unsigned int a1, long long a2) { __int16 v2; // ax unsigned int v3; // eax long long v4; // rax long long v5; // rcx _BYTE v8[72]; // [rsp+0h] [rbp-80h] BYREF long long v9; // [rsp+48h] [rbp-38h] BYREF _BYTE v10[2]; // [rsp+50h] [rbp-30h] BYREF char v11; // [rsp+52h] [rbp-2Eh] char v12; // [rsp+53h] [rbp-2Dh] char v13; // [rsp+54h] [rbp-2Ch] char v14; // [rsp+55h] [rbp-2Bh] __int16 v15; // [rsp+56h] [rbp-2Ah] __int16 v16; // [rsp+58h] [rbp-28h] unsigned __int32 v17; // [rsp+5Ah] [rbp-26h] unsigned __int32 v18; // [rsp+5Eh] [rbp-22h] unsigned long long v19; // [rsp+68h] [rbp-18h] v19 = __readfsqword(0x28u); v10[0] = *(_BYTE *)(a2 + 24); v2 = *(_WORD *)(a2 + 22); v10[1] = v2; v11 = *(_BYTE *)(a2 + 25); v12 = *(_BYTE *)(a2 + 26); v13 = HIBYTE(v2); v14 = *(_BYTE *)(a2 + 27); v15 = __ROL2__(*(_WORD *)(a2 + 18), 8); v16 = __ROL2__(*(_WORD *)(a2 + 20), 8); v17 = _byteswap_ulong(*(_DWORD *)(a2 + 8)); if ( v11 ) v3 = *(_DWORD *)(a2 + 12); else v3 = *(unsigned __int16 *)(a2 + 16); v18 = _byteswap_ulong(v3); v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v8, a1, 7LL); if ( v4 ) { mi_keyseg_write_cold_1(v4, a1, (long long)v10, &v9); v5 = v9; } else { v5 = my_write(a1, (long long)v10, 18LL, 4LL); } return v5 != 0; }
mi_keyseg_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x70 MOV EBX,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV AL,byte ptr [RSI + 0x18] MOV byte ptr [RBP + -0x30],AL MOVZX EAX,word ptr [RSI + 0x16] MOV byte ptr [RBP + -0x2f],AL MOV CL,byte ptr [RSI + 0x19] MOV byte ptr [RBP + -0x2e],CL MOV DL,byte ptr [RSI + 0x1a] MOV byte ptr [RBP + -0x2d],DL MOV byte ptr [RBP + -0x2c],AH MOV AL,byte ptr [RSI + 0x1b] MOV byte ptr [RBP + -0x2b],AL MOVZX EAX,word ptr [RSI + 0x12] ROL AX,0x8 MOV word ptr [RBP + -0x2a],AX MOVZX EAX,word ptr [RSI + 0x14] ROL AX,0x8 MOV word ptr [RBP + -0x28],AX MOV EAX,dword ptr [RSI + 0x8] BSWAP EAX MOV dword ptr [RBP + -0x26],EAX TEST CL,CL JZ 0x001838bd MOV EAX,dword ptr [RSI + 0xc] JMP 0x001838c1 LAB_001838bd: MOVZX EAX,word ptr [RSI + 0x10] LAB_001838c1: BSWAP EAX MOV dword ptr [RBP + -0x22],EAX LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] MOV ESI,EBX MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00183920 LEA RSI,[RBP + -0x30] MOV EDX,0x12 MOV ECX,0x4 MOV EDI,EBX CALL 0x0012f280 MOV RCX,RAX LAB_001838fe: XOR EAX,EAX TEST RCX,RCX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x18] JNZ 0x0018393a MOV AL,CL ADD RSP,0x70 POP RBX POP R14 POP RBP RET LAB_00183920: LEA RDX,[RBP + -0x30] LEA R14,[RBP + -0x38] MOV RDI,RAX MOV ESI,EBX MOV RCX,R14 CALL 0x0012e3ae MOV RCX,qword ptr [R14] JMP 0x001838fe LAB_0018393a: CALL 0x00129220
bool mi_keyseg_write(int4 param_1,long param_2) { uint uVar1; long lVar2; long in_FS_OFFSET; int1 local_88 [72]; long local_40; int1 local_38; int1 local_37; char local_36; int1 local_35; int1 local_34; int1 local_33; ushort local_32; ushort local_30; uint local_2e; uint local_2a; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_38 = *(int1 *)(param_2 + 0x18); local_37 = (int1)*(int2 *)(param_2 + 0x16); local_36 = *(char *)(param_2 + 0x19); local_35 = *(int1 *)(param_2 + 0x1a); local_34 = (int1)((ushort)*(int2 *)(param_2 + 0x16) >> 8); local_33 = *(int1 *)(param_2 + 0x1b); local_32 = *(ushort *)(param_2 + 0x12) << 8 | *(ushort *)(param_2 + 0x12) >> 8; local_30 = *(ushort *)(param_2 + 0x14) << 8 | *(ushort *)(param_2 + 0x14) >> 8; uVar1 = *(uint *)(param_2 + 8); local_2e = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; if (local_36 == '\0') { uVar1 = (uint)*(ushort *)(param_2 + 0x10); } else { uVar1 = *(uint *)(param_2 + 0xc); } local_2a = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; lVar2 = (**(code **)(PSI_server + 0x158))(local_88,param_1,7); if (lVar2 == 0) { local_40 = my_write(param_1,&local_38,0x12,4); } else { mi_keyseg_write_cold_1(lVar2,param_1,&local_38,&local_40); } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return local_40 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,623
my_strxfrm_desc_and_reverse
eloqsql/strings/ctype-simple.c
void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, uint flags, uint level) { if (flags & (MY_STRXFRM_DESC_LEVEL1 << level)) { if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str <= strend;) { uchar tmp= *str; *str++= ~*strend; *strend--= ~tmp; } } else { for (; str < strend; str++) *str= ~*str; } } else if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str < strend;) { uchar tmp= *str; *str++= *strend; *strend--= tmp; } } }
O0
c
my_strxfrm_desc_and_reverse: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movl -0x14(%rbp), %eax movl -0x18(%rbp), %ecx movl $0x100, %edx # imm = 0x100 shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax je 0x4c25c movl -0x14(%rbp), %eax movl -0x18(%rbp), %ecx movl $0x10000, %edx # imm = 0x10000 shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax je 0x4c22c movq -0x10(%rbp), %rax addq $-0x1, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax ja 0x4c22a movq -0x8(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movq -0x10(%rbp), %rax movzbl (%rax), %eax xorl $-0x1, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movzbl -0x19(%rbp), %eax xorl $-0x1, %eax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x4c1de jmp 0x4c25a jmp 0x4c22e movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x4c258 movq -0x8(%rbp), %rax movzbl (%rax), %eax xorl $-0x1, %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, (%rax) movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x4c22e jmp 0x4c25a jmp 0x4c2c2 movl -0x14(%rbp), %eax movl -0x18(%rbp), %ecx movl $0x10000, %edx # imm = 0x10000 shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax je 0x4c2c0 movq -0x10(%rbp), %rax addq $-0x1, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x4c2be movq -0x8(%rbp), %rax movb (%rax), %al movb %al, -0x1a(%rbp) movq -0x10(%rbp), %rax movb (%rax), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movb -0x1a(%rbp), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x4c27e jmp 0x4c2c0 jmp 0x4c2c2 popq %rbp retq nopw %cs:(%rax,%rax)
my_strxfrm_desc_and_reverse: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov eax, [rbp+var_14] mov ecx, [rbp+var_18] mov edx, 100h shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jz loc_4C25C mov eax, [rbp+var_14] mov ecx, [rbp+var_18] mov edx, 10000h shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jz short loc_4C22C mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_10], rax loc_4C1DE: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] ja short loc_4C22A mov rax, [rbp+var_8] mov al, [rax] mov [rbp+var_19], al mov rax, [rbp+var_10] movzx eax, byte ptr [rax] xor eax, 0FFFFFFFFh mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl movzx eax, [rbp+var_19] xor eax, 0FFFFFFFFh mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_10], rdx mov [rax], cl jmp short loc_4C1DE loc_4C22A: jmp short loc_4C25A loc_4C22C: jmp short $+2 loc_4C22E: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_4C258 mov rax, [rbp+var_8] movzx eax, byte ptr [rax] xor eax, 0FFFFFFFFh mov cl, al mov rax, [rbp+var_8] mov [rax], cl mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_4C22E loc_4C258: jmp short $+2 loc_4C25A: jmp short loc_4C2C2 loc_4C25C: mov eax, [rbp+var_14] mov ecx, [rbp+var_18] mov edx, 10000h shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jz short loc_4C2C0 mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_10], rax loc_4C27E: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_4C2BE mov rax, [rbp+var_8] mov al, [rax] mov [rbp+var_1A], al mov rax, [rbp+var_10] mov cl, [rax] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov cl, [rbp+var_1A] mov rax, [rbp+var_10] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_10], rdx mov [rax], cl jmp short loc_4C27E loc_4C2BE: jmp short $+2 loc_4C2C0: jmp short $+2 loc_4C2C2: pop rbp retn
_BYTE * my_strxfrm_desc_and_reverse(_BYTE *a1, unsigned long long a2, unsigned int a3, char a4) { _BYTE *result; // rax _BYTE *v5; // rax _BYTE *v6; // rax _BYTE *v7; // rax _BYTE *v8; // rax char v9; // [rsp+0h] [rbp-1Ah] char v10; // [rsp+1h] [rbp-19h] _BYTE *i; // [rsp+Ah] [rbp-10h] _BYTE *j; // [rsp+Ah] [rbp-10h] if ( ((256 << a4) & a3) != 0 ) { if ( ((0x10000 << a4) & a3) != 0 ) { for ( i = (_BYTE *)(a2 - 1); ; --i ) { result = a1; if ( a1 > i ) break; v10 = *a1; v5 = a1++; *v5 = ~*i; v6 = i; *v6 = ~v10; } } else { while ( 1 ) { result = a1; if ( (unsigned long long)a1 >= a2 ) break; *a1 = ~*a1; ++a1; } } } else { result = (_BYTE *)((0x10000 << a4) & a3); if ( (_DWORD)result ) { for ( j = (_BYTE *)(a2 - 1); ; --j ) { result = a1; if ( a1 >= j ) break; v9 = *a1; v7 = a1++; *v7 = *j; v8 = j; *v8 = v9; } } } return result; }
my_strxfrm_desc_and_reverse: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV EAX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x18] MOV EDX,0x100 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JZ 0x0014c25c MOV EAX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x18] MOV EDX,0x10000 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JZ 0x0014c22c MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x1 MOV qword ptr [RBP + -0x10],RAX LAB_0014c1de: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JA 0x0014c22a MOV RAX,qword ptr [RBP + -0x8] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] XOR EAX,0xffffffff 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 MOVZX EAX,byte ptr [RBP + -0x19] XOR EAX,0xffffffff MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0014c1de LAB_0014c22a: JMP 0x0014c25a LAB_0014c22c: JMP 0x0014c22e LAB_0014c22e: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x0014c258 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] XOR EAX,0xffffffff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c22e LAB_0014c258: JMP 0x0014c25a LAB_0014c25a: JMP 0x0014c2c2 LAB_0014c25c: MOV EAX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x18] MOV EDX,0x10000 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JZ 0x0014c2c0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x1 MOV qword ptr [RBP + -0x10],RAX LAB_0014c27e: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x0014c2be MOV RAX,qword ptr [RBP + -0x8] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x1a],AL MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV CL,byte ptr [RBP + -0x1a] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0014c27e LAB_0014c2be: JMP 0x0014c2c0 LAB_0014c2c0: JMP 0x0014c2c2 LAB_0014c2c2: POP RBP RET
void my_strxfrm_desc_and_reverse(byte *param_1,byte *param_2,uint param_3,byte param_4) { byte bVar1; byte *local_18; byte *local_10; if ((param_3 & 0x100 << (param_4 & 0x1f)) == 0) { if ((param_3 & 0x10000 << (param_4 & 0x1f)) != 0) { local_18 = param_2 + -1; local_10 = param_1; while (local_10 < local_18) { bVar1 = *local_10; *local_10 = *local_18; *local_18 = bVar1; local_18 = local_18 + -1; local_10 = local_10 + 1; } } } else { local_10 = param_1; if ((param_3 & 0x10000 << (param_4 & 0x1f)) == 0) { for (; local_10 < param_2; local_10 = local_10 + 1) { *local_10 = *local_10 ^ 0xff; } } else { local_18 = param_2 + -1; local_10 = param_1; while (local_10 <= local_18) { bVar1 = *local_10; *local_10 = *local_18 ^ 0xff; *local_18 = bVar1 ^ 0xff; local_18 = local_18 + -1; local_10 = local_10 + 1; } } } return; }
47,624
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log(spdlog::details::log_msg const&)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/sinks/ansicolor_sink-inl.h
SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::log(const details::log_msg &msg) { // Wrap the originally formatted message in color codes. // If color is not supported in the terminal, log as is instead. std::lock_guard<mutex_t> lock(mutex_); msg.color_range_start = 0; msg.color_range_end = 0; memory_buf_t formatted; formatter_->format(msg, formatted); if (should_do_colors_ && msg.color_range_end > msg.color_range_start) { // before color range print_range_(formatted, 0, msg.color_range_start); // in color range print_ccode_(colors_.at(static_cast<size_t>(msg.level))); print_range_(formatted, msg.color_range_start, msg.color_range_end); print_ccode_(reset); // after color range print_range_(formatted, msg.color_range_end, formatted.size()); } else // no color { print_range_(formatted, 0, formatted.size()); } fflush(target_file_); }
O3
c
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log(spdlog::details::log_msg const&): pushq %r15 pushq %r14 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rsi) leaq 0x20(%rsp), %r15 movq $0x0, -0x10(%r15) leaq 0x74e51(%rip), %rax # 0xb00e8 addq $0x10, %rax movq %rax, -0x20(%r15) movq %r15, -0x18(%r15) movq $0xfa, -0x8(%r15) movq 0x1d8(%rdi), %rdi movq (%rdi), %rax movq %rsp, %rdx callq *0x10(%rax) cmpb $0x1, 0x1d0(%rbx) jne 0x3b372 movq 0x28(%r14), %rdx cmpq %rdx, 0x30(%r14) jbe 0x3b372 movq 0x8(%rsp), %rdi movq 0x1c0(%rbx), %rcx movl $0x1, %esi callq 0x11cf0 movslq 0x10(%r14), %rsi cmpq $0x7, %rsi jae 0x3b3ba shlq $0x5, %rsi movq 0x1e0(%rbx,%rsi), %rdi movq 0x1e8(%rbx,%rsi), %rdx movq 0x1c0(%rbx), %rcx movl $0x1, %esi callq 0x11cf0 movq 0x28(%r14), %rax movq 0x30(%r14), %rdx movq 0x8(%rsp), %rdi addq %rax, %rdi subq %rax, %rdx movq 0x1c0(%rbx), %rcx movl $0x1, %esi callq 0x11cf0 movq 0x10(%rbx), %rdi movq 0x18(%rbx), %rdx movq 0x1c0(%rbx), %rcx movl $0x1, %esi callq 0x11cf0 movq 0x30(%r14), %rax movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rdi addq %rax, %rdi subq %rax, %rdx jmp 0x3b37c movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rdx movq 0x1c0(%rbx), %rcx movl $0x1, %esi callq 0x11cf0 movq 0x1c0(%rbx), %rdi callq 0x11610 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x3b3ad movq 0x18(%rsp), %rsi callq 0x11120 addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r14 popq %r15 retq leaq 0x481b3(%rip), %rdi # 0x83574 movl $0x7, %edx xorl %eax, %eax callq 0x11040 jmp 0x3b3cf movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x3b3e6 movq 0x18(%rsp), %rsi callq 0x11120 movq %rbx, %rdi callq 0x11760
_ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE3logERKNS2_7log_msgE: push r15 push r14 push rbx sub rsp, 120h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rsi+28h], xmm0 lea r15, [rsp+138h+var_118] mov qword ptr [r15-10h], 0 lea rax, _ZTVN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; `vtable for'fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> add rax, 10h mov [r15-20h], rax mov [r15-18h], r15 mov qword ptr [r15-8], 0FAh mov rdi, [rdi+1D8h] mov rax, [rdi] mov rdx, rsp call qword ptr [rax+10h] cmp byte ptr [rbx+1D0h], 1 jnz loc_3B372 mov rdx, [r14+28h] cmp [r14+30h], rdx jbe loc_3B372 mov rdi, [rsp+138h+var_130] mov rcx, [rbx+1C0h] mov esi, 1 call _fwrite movsxd rsi, dword ptr [r14+10h] cmp rsi, 7 jnb loc_3B3BA shl rsi, 5 mov rdi, [rbx+rsi+1E0h] mov rdx, [rbx+rsi+1E8h] mov rcx, [rbx+1C0h] mov esi, 1 call _fwrite mov rax, [r14+28h] mov rdx, [r14+30h] mov rdi, [rsp+138h+var_130] add rdi, rax sub rdx, rax mov rcx, [rbx+1C0h] mov esi, 1 call _fwrite mov rdi, [rbx+10h] mov rdx, [rbx+18h] mov rcx, [rbx+1C0h] mov esi, 1 call _fwrite mov rax, [r14+30h] mov rdx, [rsp+138h+var_128] mov rdi, [rsp+138h+var_130] add rdi, rax sub rdx, rax jmp short loc_3B37C loc_3B372: mov rdi, [rsp+138h+var_130] mov rdx, [rsp+138h+var_128] loc_3B37C: mov rcx, [rbx+1C0h] mov esi, 1 call _fwrite mov rdi, [rbx+1C0h] call _fflush mov rdi, [rsp+138h+var_130]; void * cmp rdi, r15 jz short loc_3B3AD mov rsi, [rsp+138h+var_120]; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3B3AD: add rsp, 120h pop rbx pop r14 pop r15 retn loc_3B3BA: lea rdi, aArrayAtNWhichI; "array::at: __n (which is %zu) >= _Nm (w"... mov edx, 7 xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) jmp short $+2 loc_3B3CF: mov rbx, rax mov rdi, [rsp+138h+var_130]; void * cmp rdi, r15 jz short loc_3B3E6 mov rsi, [rsp+138h+var_120]; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3B3E6: mov rdi, rbx call __Unwind_Resume
void spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log(long long a1, long long a2) { unsigned long long v4; // rdx unsigned long long v5; // rsi long long v6; // rax char *v7; // rdi long long v8; // rdx long long *v9; // [rsp+0h] [rbp-138h] BYREF void *v10; // [rsp+8h] [rbp-130h] long long v11; // [rsp+10h] [rbp-128h] unsigned long long v12; // [rsp+18h] [rbp-120h] _BYTE v13[280]; // [rsp+20h] [rbp-118h] BYREF *(_OWORD *)(a2 + 40) = 0LL; v11 = 0LL; v9 = &`vtable for'fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> + 2; v10 = v13; v12 = 250LL; (*(void ( **)(_QWORD, long long, long long **))(**(_QWORD **)(a1 + 472) + 16LL))(*(_QWORD *)(a1 + 472), a2, &v9); if ( *(_BYTE *)(a1 + 464) == 1 && (v4 = *(_QWORD *)(a2 + 40), *(_QWORD *)(a2 + 48) > v4) ) { fwrite(v10, 1LL, v4, *(_QWORD *)(a1 + 448)); v5 = *(int *)(a2 + 16); if ( v5 >= 7 ) std::__throw_out_of_range_fmt("array::at: __n (which is %zu) >= _Nm (which is %zu)", v5, 7uLL); fwrite(*(_QWORD *)(a1 + 32 * v5 + 480), 1LL, *(_QWORD *)(a1 + 32 * v5 + 488), *(_QWORD *)(a1 + 448)); fwrite((char *)v10 + *(_QWORD *)(a2 + 40), 1LL, *(_QWORD *)(a2 + 48) - *(_QWORD *)(a2 + 40), *(_QWORD *)(a1 + 448)); fwrite(*(_QWORD *)(a1 + 16), 1LL, *(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 448)); v6 = *(_QWORD *)(a2 + 48); v7 = (char *)v10 + v6; v8 = v11 - v6; } else { v7 = (char *)v10; v8 = v11; } fwrite(v7, 1LL, v8, *(_QWORD *)(a1 + 448)); fflush(*(_QWORD *)(a1 + 448)); if ( v10 != v13 ) operator delete(v10, v12); }
log: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x120 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x28],XMM0 LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],0x0 LEA RAX,[0x1b00e8] ADD RAX,0x10 MOV qword ptr [R15 + -0x20],RAX MOV qword ptr [R15 + -0x18],R15 MOV qword ptr [R15 + -0x8],0xfa MOV RDI,qword ptr [RDI + 0x1d8] MOV RAX,qword ptr [RDI] LAB_0013b2b5: MOV RDX,RSP CALL qword ptr [RAX + 0x10] CMP byte ptr [RBX + 0x1d0],0x1 JNZ 0x0013b372 MOV RDX,qword ptr [R14 + 0x28] CMP qword ptr [R14 + 0x30],RDX JBE 0x0013b372 MOV RDI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RBX + 0x1c0] MOV ESI,0x1 CALL 0x00111cf0 MOVSXD RSI,dword ptr [R14 + 0x10] CMP RSI,0x7 JNC 0x0013b3ba SHL RSI,0x5 MOV RDI,qword ptr [RBX + RSI*0x1 + 0x1e0] MOV RDX,qword ptr [RBX + RSI*0x1 + 0x1e8] MOV RCX,qword ptr [RBX + 0x1c0] MOV ESI,0x1 CALL 0x00111cf0 MOV RAX,qword ptr [R14 + 0x28] MOV RDX,qword ptr [R14 + 0x30] MOV RDI,qword ptr [RSP + 0x8] ADD RDI,RAX SUB RDX,RAX MOV RCX,qword ptr [RBX + 0x1c0] MOV ESI,0x1 CALL 0x00111cf0 MOV RDI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RBX + 0x1c0] MOV ESI,0x1 CALL 0x00111cf0 MOV RAX,qword ptr [R14 + 0x30] MOV RDX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x8] ADD RDI,RAX SUB RDX,RAX JMP 0x0013b37c LAB_0013b372: MOV RDI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0013b37c: MOV RCX,qword ptr [RBX + 0x1c0] MOV ESI,0x1 CALL 0x00111cf0 MOV RDI,qword ptr [RBX + 0x1c0] CALL 0x00111610 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x0013b3ad MOV RSI,qword ptr [RSP + 0x18] CALL 0x00111120 LAB_0013b3ad: ADD RSP,0x120 POP RBX POP R14 POP R15 RET LAB_0013b3ba: LEA RDI,[0x183574] MOV EDX,0x7 XOR EAX,EAX CALL 0x00111040
/* spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log(spdlog::details::log_msg const&) */ void __thiscall spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log (ansicolor_sink<spdlog::details::console_nullmutex> *this,log_msg *param_1) { size_t __n; ulong uVar1; int1 *__ptr; int **local_138; int1 *local_130; size_t local_128; ulong local_120; int1 local_118 [256]; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; local_128 = 0; local_138 = &PTR_grow_001b00f8; local_120 = 0xfa; /* try { // try from 0013b2b5 to 0013b2ba has its CatchHandler @ 0013b3cf */ local_130 = local_118; (**(code **)(**(long **)(this + 0x1d8) + 0x10))(*(long **)(this + 0x1d8),param_1,&local_138); __n = local_128; __ptr = local_130; if ((this[0x1d0] == (ansicolor_sink<spdlog::details::console_nullmutex>)0x1) && (*(ulong *)(param_1 + 0x28) < *(ulong *)(param_1 + 0x30))) { fwrite(local_130,1,*(ulong *)(param_1 + 0x28),*(FILE **)(this + 0x1c0)); uVar1 = (ulong)*(int *)(param_1 + 0x10); if (6 < uVar1) { /* try { // try from 0013b3ba to 0013b3cc has its CatchHandler @ 0013b3cd */ /* WARNING: Subroutine does not return */ std::__throw_out_of_range_fmt("array::at: __n (which is %zu) >= _Nm (which is %zu)",uVar1,7); } fwrite(*(void **)(this + uVar1 * 0x20 + 0x1e0),1,*(size_t *)(this + uVar1 * 0x20 + 0x1e8), *(FILE **)(this + 0x1c0)); fwrite(local_130 + *(long *)(param_1 + 0x28),1, *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28),*(FILE **)(this + 0x1c0)); fwrite(*(void **)(this + 0x10),1,*(size_t *)(this + 0x18),*(FILE **)(this + 0x1c0)); __n = local_128 - *(long *)(param_1 + 0x30); __ptr = local_130 + *(long *)(param_1 + 0x30); } fwrite(__ptr,1,__n,*(FILE **)(this + 0x1c0)); fflush(*(FILE **)(this + 0x1c0)); if (local_130 != local_118) { operator_delete(local_130,local_120); } return; }
47,625
js_new_shape2
bluesky950520[P]quickjs/quickjs.c
static no_inline JSShape *js_new_shape2(JSContext *ctx, JSObject *proto, int hash_size, int prop_size) { JSRuntime *rt = ctx->rt; void *sh_alloc; JSShape *sh; /* resize the shape hash table if necessary */ if (2 * (rt->shape_hash_count + 1) > rt->shape_hash_size) { resize_shape_hash(rt, rt->shape_hash_bits + 1); } sh_alloc = js_malloc(ctx, get_shape_size(hash_size, prop_size)); if (!sh_alloc) return NULL; sh = get_shape_from_alloc(sh_alloc, hash_size); sh->header.ref_count = 1; add_gc_object(rt, &sh->header, JS_GC_OBJ_TYPE_SHAPE); if (proto) js_dup(JS_MKPTR(JS_TAG_OBJECT, proto)); sh->proto = proto; memset(prop_hash_end(sh) - hash_size, 0, sizeof(prop_hash_end(sh)[0]) * hash_size); sh->prop_hash_mask = hash_size - 1; sh->prop_size = prop_size; sh->prop_count = 0; sh->deleted_prop_count = 0; /* insert in the hash table */ sh->hash = shape_initial_hash(proto); sh->is_hashed = TRUE; sh->has_small_array_index = FALSE; js_shape_hash_link(ctx->rt, sh); return sh; }
O1
c
js_new_shape2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, 0x4(%rsp) movq %rsi, %r14 movq %rdi, %rbx movq 0x18(%rdi), %r15 movl 0x18c(%r15), %eax leal 0x2(,%rax,2), %eax cmpl 0x188(%r15), %eax jle 0x3be63 movl 0x184(%r15), %r12d leal 0x1(%r12), %ecx movl $0x1, %ebp movl %ecx, (%rsp) shll %cl, %ebp movslq %ebp, %rdx shlq $0x3, %rdx movl $0x1, %esi movq %r15, %rdi callq 0xed01 testq %rax, %rax je 0x3be63 movq %rax, %r13 movslq 0x188(%r15), %rax testq %rax, %rax jle 0x3be1a movl $0x1f, %ecx subl %r12d, %ecx xorl %edx, %edx movq 0x190(%r15), %rsi movq (%rsi,%rdx,8), %rsi testq %rsi, %rsi je 0x3be12 movq 0x30(%rsi), %rdi movl 0x1c(%rsi), %r8d shrl %cl, %r8d movq (%r13,%r8,8), %r9 movq %r9, 0x30(%rsi) movq %rsi, (%r13,%r8,8) movq %rdi, %rsi testq %rdi, %rdi jne 0x3bdf1 incq %rdx cmpq %rax, %rdx jne 0x3bde1 movq 0x190(%r15), %r12 testq %r12, %r12 je 0x3be4b decq 0x28(%r15) movq %r12, %rdi callq *0x20(%r15) movq 0x30(%r15), %rcx movq 0x40(%r15), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r15) movq %r12, %rsi callq *0x10(%r15) movl (%rsp), %eax movl %eax, 0x184(%r15) movl %ebp, 0x188(%r15) movq %r13, 0x190(%r15) movl 0x4(%rsp), %ebp movl %ebp, %eax leaq 0x50(,%rax,8), %rsi movq %rbx, %rdi callq 0xede6 testq %rax, %rax je 0x3bf34 movq %rax, %rdx addq $0x10, %rax movl $0x1, 0x10(%rdx) movb $0x2, 0x14(%rdx) movq %rdx, %rcx addq $0x18, %rcx leaq 0x98(%r15), %rsi movq 0x98(%r15), %rdi movq %rcx, 0x8(%rdi) movq %rdi, 0x18(%rdx) movq %rsi, 0x20(%rdx) movq %rcx, 0x98(%r15) testq %r14, %r14 je 0x3bec4 incl (%r14) movq %r14, 0x48(%rdx) xorps %xmm0, %xmm0 movups %xmm0, (%rdx) movl $0x3, 0x30(%rdx) movl %ebp, 0x34(%rdx) movq $0x0, 0x38(%rdx) imull $0x9e370001, %r14d, %ecx # imm = 0x9E370001 shrq $0x20, %r14 addl %ecx, %r14d imull $0x9e370001, %r14d, %esi # imm = 0x9E370001 addl $0x3c6e0001, %esi # imm = 0x3C6E0001 movl %esi, 0x2c(%rdx) movw $0x1, 0x28(%rdx) movq 0x18(%rbx), %rdi xorl %ecx, %ecx subb 0x184(%rdi), %cl shrl %cl, %esi movq 0x190(%rdi), %rcx movq (%rcx,%rsi,8), %rcx movq %rcx, 0x40(%rdx) movq 0x190(%rdi), %rcx movq %rax, (%rcx,%rsi,8) incl 0x18c(%rdi) jmp 0x3bf36 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_new_shape2: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_34], edx mov r14, rsi mov rbx, rdi mov r15, [rdi+18h] mov eax, [r15+18Ch] lea eax, ds:2[rax*2] cmp eax, [r15+188h] jle loc_3BE63 mov r12d, [r15+184h] lea ecx, [r12+1] mov ebp, 1 mov [rsp+38h+var_38], ecx shl ebp, cl movsxd rdx, ebp shl rdx, 3 mov esi, 1 mov rdi, r15 call js_calloc_rt test rax, rax jz loc_3BE63 mov r13, rax movsxd rax, dword ptr [r15+188h] test rax, rax jle short loc_3BE1A mov ecx, 1Fh sub ecx, r12d xor edx, edx loc_3BDE1: mov rsi, [r15+190h] mov rsi, [rsi+rdx*8] test rsi, rsi jz short loc_3BE12 loc_3BDF1: mov rdi, [rsi+30h] mov r8d, [rsi+1Ch] shr r8d, cl mov r9, [r13+r8*8+0] mov [rsi+30h], r9 mov [r13+r8*8+0], rsi mov rsi, rdi test rdi, rdi jnz short loc_3BDF1 loc_3BE12: inc rdx cmp rdx, rax jnz short loc_3BDE1 loc_3BE1A: mov r12, [r15+190h] test r12, r12 jz short loc_3BE4B dec qword ptr [r15+28h] mov rdi, r12 call qword ptr [r15+20h] mov rcx, [r15+30h] mov rdi, [r15+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r15+30h], rcx mov rsi, r12 call qword ptr [r15+10h] loc_3BE4B: mov eax, [rsp+38h+var_38] mov [r15+184h], eax mov [r15+188h], ebp mov [r15+190h], r13 loc_3BE63: mov ebp, [rsp+38h+var_34] mov eax, ebp lea rsi, ds:50h[rax*8] mov rdi, rbx call js_malloc test rax, rax jz loc_3BF34 mov rdx, rax add rax, 10h mov dword ptr [rdx+10h], 1 mov byte ptr [rdx+14h], 2 mov rcx, rdx add rcx, 18h lea rsi, [r15+98h] mov rdi, [r15+98h] mov [rdi+8], rcx mov [rdx+18h], rdi mov [rdx+20h], rsi mov [r15+98h], rcx test r14, r14 jz short loc_3BEC4 inc dword ptr [r14] loc_3BEC4: mov [rdx+48h], r14 xorps xmm0, xmm0 movups xmmword ptr [rdx], xmm0 mov dword ptr [rdx+30h], 3 mov [rdx+34h], ebp mov qword ptr [rdx+38h], 0 imul ecx, r14d, 9E370001h shr r14, 20h add r14d, ecx imul esi, r14d, 9E370001h add esi, 3C6E0001h mov [rdx+2Ch], esi mov word ptr [rdx+28h], 1 mov rdi, [rbx+18h] xor ecx, ecx sub cl, [rdi+184h] shr esi, cl mov rcx, [rdi+190h] mov rcx, [rcx+rsi*8] mov [rdx+40h], rcx mov rcx, [rdi+190h] mov [rcx+rsi*8], rax inc dword ptr [rdi+18Ch] jmp short loc_3BF36 loc_3BF34: xor eax, eax loc_3BF36: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_new_shape2(long long a1, _DWORD *a2, unsigned int a3) { long long v5; // r15 int v6; // r12d int v7; // ebp long long v8; // rax long long v9; // r13 long long v10; // rax long long i; // rdx long long v12; // rsi long long v13; // rdi long long v14; // r8 long long v15; // r12 long long v16; // rax long long v17; // rdi long long v18; // rax long long v19; // rdx long long result; // rax long long v21; // rdi unsigned int v22; // esi long long v23; // rdi long long v24; // rsi int v25; // [rsp+0h] [rbp-38h] v5 = *(_QWORD *)(a1 + 24); if ( 2 * *(_DWORD *)(v5 + 396) + 2 > *(_DWORD *)(v5 + 392) ) { v6 = *(_DWORD *)(v5 + 388); v25 = v6 + 1; v7 = 1 << (v6 + 1); v8 = js_calloc_rt(v5, 1uLL, 8LL * v7); if ( v8 ) { v9 = v8; v10 = *(int *)(v5 + 392); if ( v10 > 0 ) { for ( i = 0LL; i != v10; ++i ) { v12 = *(_QWORD *)(*(_QWORD *)(v5 + 400) + 8 * i); if ( v12 ) { do { v13 = *(_QWORD *)(v12 + 48); v14 = (unsigned int)(*(_DWORD *)(v12 + 28) >> (31 - v6)); *(_QWORD *)(v12 + 48) = *(_QWORD *)(v9 + 8 * v14); *(_QWORD *)(v9 + 8 * v14) = v12; v12 = v13; } while ( v13 ); } } } v15 = *(_QWORD *)(v5 + 400); if ( v15 ) { --*(_QWORD *)(v5 + 40); v16 = (*(long long ( **)(long long))(v5 + 32))(v15); v17 = *(_QWORD *)(v5 + 64); *(_QWORD *)(v5 + 48) = *(_QWORD *)(v5 + 48) - v16 - 8; (*(void ( **)(long long, long long))(v5 + 16))(v17, v15); } *(_DWORD *)(v5 + 388) = v25; *(_DWORD *)(v5 + 392) = v7; *(_QWORD *)(v5 + 400) = v9; } } v18 = js_malloc(a1, 8LL * a3 + 80); if ( !v18 ) return 0LL; v19 = v18; result = v18 + 16; *(_DWORD *)(v19 + 16) = 1; *(_BYTE *)(v19 + 20) = 2; v21 = *(_QWORD *)(v5 + 152); *(_QWORD *)(v21 + 8) = v19 + 24; *(_QWORD *)(v19 + 24) = v21; *(_QWORD *)(v19 + 32) = v5 + 152; *(_QWORD *)(v5 + 152) = v19 + 24; if ( a2 ) ++*a2; *(_QWORD *)(v19 + 72) = a2; *(_OWORD *)v19 = 0LL; *(_DWORD *)(v19 + 48) = 3; *(_DWORD *)(v19 + 52) = a3; *(_QWORD *)(v19 + 56) = 0LL; v22 = -1640562687 * (-1640562687 * (_DWORD)a2 + HIDWORD(a2)) + 1013841921; *(_DWORD *)(v19 + 44) = v22; *(_WORD *)(v19 + 40) = 1; v23 = *(_QWORD *)(a1 + 24); v24 = v22 >> -*(_BYTE *)(v23 + 388); *(_QWORD *)(v19 + 64) = *(_QWORD *)(*(_QWORD *)(v23 + 400) + 8 * v24); *(_QWORD *)(*(_QWORD *)(v23 + 400) + 8 * v24) = result; ++*(_DWORD *)(v23 + 396); return result; }
js_new_shape2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV dword ptr [RSP + 0x4],EDX MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [RDI + 0x18] MOV EAX,dword ptr [R15 + 0x18c] LEA EAX,[0x2 + RAX*0x2] CMP EAX,dword ptr [R15 + 0x188] JLE 0x0013be63 MOV R12D,dword ptr [R15 + 0x184] LEA ECX,[R12 + 0x1] MOV EBP,0x1 MOV dword ptr [RSP],ECX SHL EBP,CL MOVSXD RDX,EBP SHL RDX,0x3 MOV ESI,0x1 MOV RDI,R15 CALL 0x0010ed01 TEST RAX,RAX JZ 0x0013be63 MOV R13,RAX MOVSXD RAX,dword ptr [R15 + 0x188] TEST RAX,RAX JLE 0x0013be1a MOV ECX,0x1f SUB ECX,R12D XOR EDX,EDX LAB_0013bde1: MOV RSI,qword ptr [R15 + 0x190] MOV RSI,qword ptr [RSI + RDX*0x8] TEST RSI,RSI JZ 0x0013be12 LAB_0013bdf1: MOV RDI,qword ptr [RSI + 0x30] MOV R8D,dword ptr [RSI + 0x1c] SHR R8D,CL MOV R9,qword ptr [R13 + R8*0x8] MOV qword ptr [RSI + 0x30],R9 MOV qword ptr [R13 + R8*0x8],RSI MOV RSI,RDI TEST RDI,RDI JNZ 0x0013bdf1 LAB_0013be12: INC RDX CMP RDX,RAX JNZ 0x0013bde1 LAB_0013be1a: MOV R12,qword ptr [R15 + 0x190] TEST R12,R12 JZ 0x0013be4b DEC qword ptr [R15 + 0x28] MOV RDI,R12 CALL qword ptr [R15 + 0x20] MOV RCX,qword ptr [R15 + 0x30] MOV RDI,qword ptr [R15 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R15 + 0x30],RCX MOV RSI,R12 CALL qword ptr [R15 + 0x10] LAB_0013be4b: MOV EAX,dword ptr [RSP] MOV dword ptr [R15 + 0x184],EAX MOV dword ptr [R15 + 0x188],EBP MOV qword ptr [R15 + 0x190],R13 LAB_0013be63: MOV EBP,dword ptr [RSP + 0x4] MOV EAX,EBP LEA RSI,[0x50 + RAX*0x8] MOV RDI,RBX CALL 0x0010ede6 TEST RAX,RAX JZ 0x0013bf34 MOV RDX,RAX ADD RAX,0x10 MOV dword ptr [RDX + 0x10],0x1 MOV byte ptr [RDX + 0x14],0x2 MOV RCX,RDX ADD RCX,0x18 LEA RSI,[R15 + 0x98] MOV RDI,qword ptr [R15 + 0x98] MOV qword ptr [RDI + 0x8],RCX MOV qword ptr [RDX + 0x18],RDI MOV qword ptr [RDX + 0x20],RSI MOV qword ptr [R15 + 0x98],RCX TEST R14,R14 JZ 0x0013bec4 INC dword ptr [R14] LAB_0013bec4: MOV qword ptr [RDX + 0x48],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDX],XMM0 MOV dword ptr [RDX + 0x30],0x3 MOV dword ptr [RDX + 0x34],EBP MOV qword ptr [RDX + 0x38],0x0 IMUL ECX,R14D,-0x61c8ffff SHR R14,0x20 ADD R14D,ECX IMUL ESI,R14D,-0x61c8ffff ADD ESI,0x3c6e0001 MOV dword ptr [RDX + 0x2c],ESI MOV word ptr [RDX + 0x28],0x1 MOV RDI,qword ptr [RBX + 0x18] XOR ECX,ECX SUB CL,byte ptr [RDI + 0x184] SHR ESI,CL MOV RCX,qword ptr [RDI + 0x190] MOV RCX,qword ptr [RCX + RSI*0x8] MOV qword ptr [RDX + 0x40],RCX MOV RCX,qword ptr [RDI + 0x190] MOV qword ptr [RCX + RSI*0x8],RAX INC dword ptr [RDI + 0x18c] JMP 0x0013bf36 LAB_0013bf34: XOR EAX,EAX LAB_0013bf36: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * js_new_shape2(long param_1,int *param_2,uint param_3) { int iVar1; int iVar2; int iVar3; long lVar4; long lVar5; long lVar6; long lVar7; int8 *puVar8; int8 *puVar9; long lVar10; int iVar11; uint uVar12; ulong uVar13; lVar4 = *(long *)(param_1 + 0x18); if (*(int *)(lVar4 + 0x188) < *(int *)(lVar4 + 0x18c) * 2 + 2) { iVar2 = *(int *)(lVar4 + 0x184); iVar1 = iVar2 + 1; iVar11 = 1 << ((byte)iVar1 & 0x1f); lVar6 = js_calloc_rt(lVar4,1,(long)iVar11 << 3); if (lVar6 != 0) { iVar3 = *(int *)(lVar4 + 0x188); if (0 < (long)iVar3) { lVar10 = 0; do { lVar7 = *(long *)(*(long *)(lVar4 + 400) + lVar10 * 8); while (lVar7 != 0) { lVar5 = *(long *)(lVar7 + 0x30); uVar13 = (ulong)(*(uint *)(lVar7 + 0x1c) >> (0x1fU - (char)iVar2 & 0x1f)); *(int8 *)(lVar7 + 0x30) = *(int8 *)(lVar6 + uVar13 * 8); *(long *)(lVar6 + uVar13 * 8) = lVar7; lVar7 = lVar5; } lVar10 = lVar10 + 1; } while (lVar10 != iVar3); } lVar10 = *(long *)(lVar4 + 400); if (lVar10 != 0) { *(long *)(lVar4 + 0x28) = *(long *)(lVar4 + 0x28) + -1; lVar7 = (**(code **)(lVar4 + 0x20))(lVar10); *(long *)(lVar4 + 0x30) = (*(long *)(lVar4 + 0x30) - lVar7) + -8; (**(code **)(lVar4 + 0x10))(*(int8 *)(lVar4 + 0x40),lVar10); } *(int *)(lVar4 + 0x184) = iVar1; *(int *)(lVar4 + 0x188) = iVar11; *(long *)(lVar4 + 400) = lVar6; } } puVar8 = (int8 *)js_malloc(param_1,(ulong)param_3 * 8 + 0x50); if (puVar8 == (int8 *)0x0) { puVar9 = (int8 *)0x0; } else { puVar9 = puVar8 + 2; *(int4 *)(puVar8 + 2) = 1; *(int1 *)((long)puVar8 + 0x14) = 2; lVar6 = *(long *)(lVar4 + 0x98); *(int8 **)(lVar6 + 8) = puVar8 + 3; puVar8[3] = lVar6; puVar8[4] = lVar4 + 0x98; *(int8 **)(lVar4 + 0x98) = puVar8 + 3; if (param_2 != (int *)0x0) { *param_2 = *param_2 + 1; } puVar8[9] = param_2; *puVar8 = 0; puVar8[1] = 0; *(int4 *)(puVar8 + 6) = 3; *(uint *)((long)puVar8 + 0x34) = param_3; puVar8[7] = 0; uVar12 = ((int)((ulong)param_2 >> 0x20) + (int)param_2 * -0x61c8ffff) * -0x61c8ffff + 0x3c6e0001 ; *(uint *)((long)puVar8 + 0x2c) = uVar12; *(int2 *)(puVar8 + 5) = 1; lVar4 = *(long *)(param_1 + 0x18); uVar13 = (ulong)(uVar12 >> (-*(char *)(lVar4 + 0x184) & 0x1fU)); puVar8[8] = *(int8 *)(*(long *)(lVar4 + 400) + uVar13 * 8); *(int8 **)(*(long *)(lVar4 + 400) + uVar13 * 8) = puVar9; *(int *)(lVar4 + 0x18c) = *(int *)(lVar4 + 0x18c) + 1; } return puVar9; }
47,626
js_new_shape2
bluesky950520[P]quickjs/quickjs.c
static no_inline JSShape *js_new_shape2(JSContext *ctx, JSObject *proto, int hash_size, int prop_size) { JSRuntime *rt = ctx->rt; void *sh_alloc; JSShape *sh; /* resize the shape hash table if necessary */ if (2 * (rt->shape_hash_count + 1) > rt->shape_hash_size) { resize_shape_hash(rt, rt->shape_hash_bits + 1); } sh_alloc = js_malloc(ctx, get_shape_size(hash_size, prop_size)); if (!sh_alloc) return NULL; sh = get_shape_from_alloc(sh_alloc, hash_size); sh->header.ref_count = 1; add_gc_object(rt, &sh->header, JS_GC_OBJ_TYPE_SHAPE); if (proto) js_dup(JS_MKPTR(JS_TAG_OBJECT, proto)); sh->proto = proto; memset(prop_hash_end(sh) - hash_size, 0, sizeof(prop_hash_end(sh)[0]) * hash_size); sh->prop_hash_mask = hash_size - 1; sh->prop_size = prop_size; sh->prop_count = 0; sh->deleted_prop_count = 0; /* insert in the hash table */ sh->hash = shape_initial_hash(proto); sh->is_hashed = TRUE; sh->has_small_array_index = FALSE; js_shape_hash_link(ctx->rt, sh); return sh; }
O2
c
js_new_shape2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, 0x4(%rsp) movq %rsi, %r14 movq %rdi, %rbx movq 0x18(%rdi), %r15 movl 0x18c(%r15), %eax leal 0x2(,%rax,2), %eax cmpl 0x188(%r15), %eax jle 0x34c2e movl 0x184(%r15), %ebp leal 0x1(%rbp), %ecx pushq $0x1 popq %r12 movl %ecx, (%rsp) shll %cl, %r12d movslq %r12d, %rsi shlq $0x3, %rsi movq %r15, %rdi callq 0x171a8 testq %rax, %rax je 0x34c2e movq %rax, %r13 movl 0x188(%r15), %eax pushq $0x1f popq %rcx subl %ebp, %ecx xorl %edx, %edx testl %eax, %eax cmovlel %edx, %eax movq 0x190(%r15), %rsi cmpq %rax, %rdx je 0x34c0e movq (%rsi,%rdx,8), %rsi testq %rsi, %rsi je 0x34c09 movq 0x30(%rsi), %rdi movl 0x1c(%rsi), %r8d shrl %cl, %r8d movq (%r13,%r8,8), %r9 movq %r9, 0x30(%rsi) movq %rsi, (%r13,%r8,8) movq %rdi, %rsi jmp 0x34be6 incq %rdx jmp 0x34bd6 movq %r15, %rdi callq 0x170cb movl (%rsp), %eax movl %eax, 0x184(%r15) movl %r12d, 0x188(%r15) movq %r13, 0x190(%r15) movl 0x4(%rsp), %ebp movl %ebp, %eax leaq 0x50(,%rax,8), %rsi movq %rbx, %rdi callq 0x17214 testq %rax, %rax je 0x34cd7 leaq 0x10(%rax), %r12 movl $0x1, 0x10(%rax) movb $0x2, 0x14(%rax) movq %rax, %rcx addq $0x18, %rcx leaq 0x98(%r15), %rdx movq 0x98(%r15), %rsi movq %rcx, 0x8(%rsi) movq %rsi, 0x18(%rax) movq %rdx, 0x20(%rax) movq %rcx, 0x98(%r15) testq %r14, %r14 je 0x34c8c incl (%r14) movq %r14, 0x48(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rax) movl $0x3, 0x30(%rax) movl %ebp, 0x34(%rax) andq $0x0, 0x38(%rax) imull $0x9e370001, %r14d, %ecx # imm = 0x9E370001 shrq $0x20, %r14 addl %ecx, %r14d imull $0x9e370001, %r14d, %ecx # imm = 0x9E370001 addl $0x3c6e0001, %ecx # imm = 0x3C6E0001 movl %ecx, 0x2c(%rax) movw $0x1, 0x28(%rax) movq 0x18(%rbx), %rdi movq %r12, %rsi callq 0x34cec jmp 0x34cda xorl %r12d, %r12d movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_new_shape2: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_34], edx mov r14, rsi mov rbx, rdi mov r15, [rdi+18h] mov eax, [r15+18Ch] lea eax, ds:2[rax*2] cmp eax, [r15+188h] jle loc_34C2E mov ebp, [r15+184h] lea ecx, [rbp+1] push 1 pop r12 mov [rsp+38h+var_38], ecx shl r12d, cl movsxd rsi, r12d shl rsi, 3 mov rdi, r15 call js_mallocz_rt test rax, rax jz short loc_34C2E mov r13, rax mov eax, [r15+188h] push 1Fh pop rcx sub ecx, ebp xor edx, edx test eax, eax cmovle eax, edx loc_34BD6: mov rsi, [r15+190h] cmp rdx, rax jz short loc_34C0E mov rsi, [rsi+rdx*8] loc_34BE6: test rsi, rsi jz short loc_34C09 mov rdi, [rsi+30h] mov r8d, [rsi+1Ch] shr r8d, cl mov r9, [r13+r8*8+0] mov [rsi+30h], r9 mov [r13+r8*8+0], rsi mov rsi, rdi jmp short loc_34BE6 loc_34C09: inc rdx jmp short loc_34BD6 loc_34C0E: mov rdi, r15 call js_free_rt mov eax, [rsp+38h+var_38] mov [r15+184h], eax mov [r15+188h], r12d mov [r15+190h], r13 loc_34C2E: mov ebp, [rsp+38h+var_34] mov eax, ebp lea rsi, ds:50h[rax*8] mov rdi, rbx call js_malloc test rax, rax jz loc_34CD7 lea r12, [rax+10h] mov dword ptr [rax+10h], 1 mov byte ptr [rax+14h], 2 mov rcx, rax add rcx, 18h lea rdx, [r15+98h] mov rsi, [r15+98h] mov [rsi+8], rcx mov [rax+18h], rsi mov [rax+20h], rdx mov [r15+98h], rcx test r14, r14 jz short loc_34C8C inc dword ptr [r14] loc_34C8C: mov [rax+48h], r14 xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov dword ptr [rax+30h], 3 mov [rax+34h], ebp and qword ptr [rax+38h], 0 imul ecx, r14d, 9E370001h shr r14, 20h add r14d, ecx imul ecx, r14d, 9E370001h add ecx, 3C6E0001h mov [rax+2Ch], ecx mov word ptr [rax+28h], 1 mov rdi, [rbx+18h] mov rsi, r12 call js_shape_hash_link jmp short loc_34CDA loc_34CD7: xor r12d, r12d loc_34CDA: mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_new_shape2(long long a1, _DWORD *a2, unsigned int a3) { long long v5; // r15 int v6; // ebp int v7; // r12d long long v8; // rax long long v9; // r13 long long v10; // rax long long v11; // rdx long long v12; // rsi long long i; // rsi long long v14; // rdi unsigned int v15; // r8d long long v16; // rax long long v17; // r12 long long v18; // rsi v5 = *(_QWORD *)(a1 + 24); if ( 2 * *(_DWORD *)(v5 + 396) + 2 > *(_DWORD *)(v5 + 392) ) { v6 = *(_DWORD *)(v5 + 388); v7 = 1 << (v6 + 1); v8 = js_mallocz_rt(v5, 8LL * v7); if ( v8 ) { v9 = v8; v10 = *(unsigned int *)(v5 + 392); v11 = 0LL; if ( (int)v10 <= 0 ) v10 = 0LL; while ( 1 ) { v12 = *(_QWORD *)(v5 + 400); if ( v11 == v10 ) break; for ( i = *(_QWORD *)(v12 + 8 * v11); i; i = v14 ) { v14 = *(_QWORD *)(i + 48); v15 = *(_DWORD *)(i + 28) >> (31 - v6); *(_QWORD *)(i + 48) = *(_QWORD *)(v9 + 8LL * v15); *(_QWORD *)(v9 + 8LL * v15) = i; } ++v11; } js_free_rt(v5, v12); *(_DWORD *)(v5 + 388) = v6 + 1; *(_DWORD *)(v5 + 392) = v7; *(_QWORD *)(v5 + 400) = v9; } } v16 = js_malloc(a1, 8LL * a3 + 80); if ( !v16 ) return 0LL; v17 = v16 + 16; *(_DWORD *)(v16 + 16) = 1; *(_BYTE *)(v16 + 20) = 2; v18 = *(_QWORD *)(v5 + 152); *(_QWORD *)(v18 + 8) = v16 + 24; *(_QWORD *)(v16 + 24) = v18; *(_QWORD *)(v16 + 32) = v5 + 152; *(_QWORD *)(v5 + 152) = v16 + 24; if ( a2 ) ++*a2; *(_QWORD *)(v16 + 72) = a2; *(_OWORD *)v16 = 0LL; *(_DWORD *)(v16 + 48) = 3; *(_DWORD *)(v16 + 52) = a3; *(_QWORD *)(v16 + 56) = 0LL; *(_DWORD *)(v16 + 44) = -1640562687 * (-1640562687 * (_DWORD)a2 + HIDWORD(a2)) + 1013841921; *(_WORD *)(v16 + 40) = 1; js_shape_hash_link(*(_QWORD *)(a1 + 24), v16 + 16); return v17; }
js_new_shape2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV dword ptr [RSP + 0x4],EDX MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [RDI + 0x18] MOV EAX,dword ptr [R15 + 0x18c] LEA EAX,[0x2 + RAX*0x2] CMP EAX,dword ptr [R15 + 0x188] JLE 0x00134c2e MOV EBP,dword ptr [R15 + 0x184] LEA ECX,[RBP + 0x1] PUSH 0x1 POP R12 MOV dword ptr [RSP],ECX SHL R12D,CL MOVSXD RSI,R12D SHL RSI,0x3 MOV RDI,R15 CALL 0x001171a8 TEST RAX,RAX JZ 0x00134c2e MOV R13,RAX MOV EAX,dword ptr [R15 + 0x188] PUSH 0x1f POP RCX SUB ECX,EBP XOR EDX,EDX TEST EAX,EAX CMOVLE EAX,EDX LAB_00134bd6: MOV RSI,qword ptr [R15 + 0x190] CMP RDX,RAX JZ 0x00134c0e MOV RSI,qword ptr [RSI + RDX*0x8] LAB_00134be6: TEST RSI,RSI JZ 0x00134c09 MOV RDI,qword ptr [RSI + 0x30] MOV R8D,dword ptr [RSI + 0x1c] SHR R8D,CL MOV R9,qword ptr [R13 + R8*0x8] MOV qword ptr [RSI + 0x30],R9 MOV qword ptr [R13 + R8*0x8],RSI MOV RSI,RDI JMP 0x00134be6 LAB_00134c09: INC RDX JMP 0x00134bd6 LAB_00134c0e: MOV RDI,R15 CALL 0x001170cb MOV EAX,dword ptr [RSP] MOV dword ptr [R15 + 0x184],EAX MOV dword ptr [R15 + 0x188],R12D MOV qword ptr [R15 + 0x190],R13 LAB_00134c2e: MOV EBP,dword ptr [RSP + 0x4] MOV EAX,EBP LEA RSI,[0x50 + RAX*0x8] MOV RDI,RBX CALL 0x00117214 TEST RAX,RAX JZ 0x00134cd7 LEA R12,[RAX + 0x10] MOV dword ptr [RAX + 0x10],0x1 MOV byte ptr [RAX + 0x14],0x2 MOV RCX,RAX ADD RCX,0x18 LEA RDX,[R15 + 0x98] MOV RSI,qword ptr [R15 + 0x98] MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [RAX + 0x18],RSI MOV qword ptr [RAX + 0x20],RDX MOV qword ptr [R15 + 0x98],RCX TEST R14,R14 JZ 0x00134c8c INC dword ptr [R14] LAB_00134c8c: MOV qword ptr [RAX + 0x48],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV dword ptr [RAX + 0x30],0x3 MOV dword ptr [RAX + 0x34],EBP AND qword ptr [RAX + 0x38],0x0 IMUL ECX,R14D,-0x61c8ffff SHR R14,0x20 ADD R14D,ECX IMUL ECX,R14D,-0x61c8ffff ADD ECX,0x3c6e0001 MOV dword ptr [RAX + 0x2c],ECX MOV word ptr [RAX + 0x28],0x1 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 CALL 0x00134cec JMP 0x00134cda LAB_00134cd7: XOR R12D,R12D LAB_00134cda: MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * js_new_shape2(long param_1,int *param_2,uint param_3) { int iVar1; int iVar2; long lVar3; long lVar4; long lVar5; ulong uVar6; int8 *puVar7; ulong uVar8; long lVar9; ulong uVar10; int iVar11; int8 *puVar12; lVar3 = *(long *)(param_1 + 0x18); if (*(int *)(lVar3 + 0x188) < *(int *)(lVar3 + 0x18c) * 2 + 2) { iVar2 = *(int *)(lVar3 + 0x184); iVar1 = iVar2 + 1; iVar11 = 1 << ((byte)iVar1 & 0x1f); lVar5 = js_mallocz_rt(lVar3,(long)iVar11 << 3); if (lVar5 != 0) { uVar8 = 0; uVar6 = (ulong)*(uint *)(lVar3 + 0x188); if ((int)*(uint *)(lVar3 + 0x188) < 1) { uVar6 = uVar8; } for (; uVar8 != uVar6; uVar8 = uVar8 + 1) { lVar9 = *(long *)(*(long *)(lVar3 + 400) + uVar8 * 8); while (lVar9 != 0) { lVar4 = *(long *)(lVar9 + 0x30); uVar10 = (ulong)(*(uint *)(lVar9 + 0x1c) >> (0x1fU - (char)iVar2 & 0x1f)); *(int8 *)(lVar9 + 0x30) = *(int8 *)(lVar5 + uVar10 * 8); *(long *)(lVar5 + uVar10 * 8) = lVar9; lVar9 = lVar4; } } js_free_rt(lVar3); *(int *)(lVar3 + 0x184) = iVar1; *(int *)(lVar3 + 0x188) = iVar11; *(long *)(lVar3 + 400) = lVar5; } } puVar7 = (int8 *)js_malloc(param_1,(ulong)param_3 * 8 + 0x50); if (puVar7 == (int8 *)0x0) { puVar12 = (int8 *)0x0; } else { puVar12 = puVar7 + 2; *(int4 *)(puVar7 + 2) = 1; *(int1 *)((long)puVar7 + 0x14) = 2; lVar5 = *(long *)(lVar3 + 0x98); *(int8 **)(lVar5 + 8) = puVar7 + 3; puVar7[3] = lVar5; puVar7[4] = lVar3 + 0x98; *(int8 **)(lVar3 + 0x98) = puVar7 + 3; if (param_2 != (int *)0x0) { *param_2 = *param_2 + 1; } puVar7[9] = param_2; *puVar7 = 0; puVar7[1] = 0; *(int4 *)(puVar7 + 6) = 3; *(uint *)((long)puVar7 + 0x34) = param_3; puVar7[7] = 0; *(int *)((long)puVar7 + 0x2c) = ((int)((ulong)param_2 >> 0x20) + (int)param_2 * -0x61c8ffff) * -0x61c8ffff + 0x3c6e0001; *(int2 *)(puVar7 + 5) = 1; js_shape_hash_link(*(int8 *)(param_1 + 0x18),puVar12); } return puVar12; }
47,627
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 0x1cd79 movl %ebx, %eax leaq 0x8a46e(%rip), %rcx # 0xa71c4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, %bpl jmp 0x1cdcf movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x1cd7b movl $0xffffffec, %edx # imm = 0xFFFFFFEC jmp 0x1cd7b movl $0xfffffffb, %edx # imm = 0xFFFFFFFB jmp 0x1cd7b xorl %edx, %edx xorl %edi, %edi xorl %esi, %esi callq 0x18170 testl %eax, %eax setne %bpl jne 0x1cdcf leaq 0xc025d(%rip), %rax # 0xdcff0 cmpl $0x0, (%rax) js 0x1cdcf callq 0x7eabf movq %rax, %r14 callq 0x18060 movq %rax, %r15 movl (%rax), %edi callq 0x18210 movl (%r15), %r9d leaq 0x8ae91(%rip), %rdx # 0xa7c4a xorl %ebp, %ebp movq %r14, %rdi movl $0x3, %esi movl %ebx, %ecx movq %rax, %r8 xorl %eax, %eax callq 0x7eb5c 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_1CD5D; jumptable 000000000001CD5D default case mov eax, ebx lea rcx, jpt_1CD5D movsxd rax, ds:(jpt_1CD5D - 0A71C4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1CD5F: mov bpl, 1; jumptable 000000000001CD5D case 0 jmp short loc_1CDCF loc_1CD64: mov edx, 0FFFFFFF6h; jumptable 000000000001CD5D case 2 jmp short loc_1CD7B loc_1CD6B: mov edx, 0FFFFFFECh; jumptable 000000000001CD5D case 3 jmp short loc_1CD7B loc_1CD72: mov edx, 0FFFFFFFBh; jumptable 000000000001CD5D case 1 jmp short loc_1CD7B def_1CD5D: xor edx, edx; jumptable 000000000001CD5D default case loc_1CD7B: xor edi, edi xor esi, esi call _setpriority test eax, eax setnz bpl jnz short loc_1CDCF lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_1CDCF 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_1CDCF: 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 0x0011cd79 MOV EAX,EBX LEA RCX,[0x1a71c4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BPL,0x1 JMP 0x0011cdcf caseD_2: MOV EDX,0xfffffff6 JMP 0x0011cd7b caseD_3: MOV EDX,0xffffffec JMP 0x0011cd7b caseD_1: MOV EDX,0xfffffffb JMP 0x0011cd7b default: XOR EDX,EDX LAB_0011cd7b: XOR EDI,EDI XOR ESI,ESI CALL 0x00118170 TEST EAX,EAX SETNZ BPL JNZ 0x0011cdcf LEA RAX,[0x1dcff0] CMP dword ptr [RAX],0x0 JS 0x0011cdcf CALL 0x0017eabf MOV R14,RAX CALL 0x00118060 MOV R15,RAX MOV EDI,dword ptr [RAX] CALL 0x00118210 MOV R9D,dword ptr [R15] LEA RDX,[0x1a7c4a] XOR EBP,EBP MOV RDI,R14 MOV ESI,0x3 MOV ECX,EBX MOV R8,RAX XOR EAX,EAX CALL 0x0017eb5c LAB_0011cdcf: 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_0011cdcf; 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_0011cdcf: return uVar5 & 0xffffffff; }
47,628
Item_sum_and::copy_or_same(THD*)
eloqsql/sql/item_sum.cc
Item *Item_sum_and::copy_or_same(THD* thd) { return new (thd->mem_root) Item_sum_and(thd, this); }
O0
cpp
Item_sum_and::copy_or_same(THD*): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rsi movq %rsi, -0x40(%rbp) movl $0x328, %edi # imm = 0x328 callq 0x87dea0 movq %rax, %rcx movq %rcx, -0x38(%rbp) movb $0x0, -0x11(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x30(%rbp) je 0xdf4a36 movq -0x48(%rbp), %rdx movq -0x38(%rbp), %rdi movb $0x1, -0x11(%rbp) movq -0x10(%rbp), %rsi callq 0xdfae30 jmp 0xdf4a2c movq -0x38(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xdf4a36 movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) testb $0x1, -0x11(%rbp) jne 0xdf4a54 jmp 0xdf4a61 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdi callq 0x87df70 jmp 0xdf4a63 movq -0x20(%rbp), %rdi callq 0x775a20 nopl (%rax)
_ZN12Item_sum_and12copy_or_sameEP3THD: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_48], rax mov rax, [rbp+var_10] mov rsi, [rax+28h] mov [rbp+var_40], rsi mov edi, 328h call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_38], rcx mov [rbp+var_11], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_30], rax jz short loc_DF4A36 mov rdx, [rbp+var_48]; Item_sum_and * mov rdi, [rbp+var_38]; this mov [rbp+var_11], 1 mov rsi, [rbp+var_10]; THD * call _ZN12Item_sum_andC2EP3THDPS_; Item_sum_and::Item_sum_and(THD *,Item_sum_and*) jmp short $+2 loc_DF4A2C: mov rax, [rbp+var_38] mov [rbp+var_30], rax jmp short $+2 loc_DF4A36: mov rax, [rbp+var_30] add rsp, 50h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax test [rbp+var_11], 1 jnz short loc_DF4A54 jmp short loc_DF4A61 loc_DF4A54: mov rsi, [rbp+var_40] mov rdi, [rbp+var_38] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_DF4A61: jmp short $+2 loc_DF4A63: mov rdi, [rbp+var_20] call __Unwind_Resume
Item_sum_and * Item_sum_and::copy_or_same(Item_sum_and *this, THD *a2) { Item_sum_and *v3; // [rsp+18h] [rbp-38h] long long v4; // [rsp+20h] [rbp-30h] v3 = (Item_sum_and *)Item::operator new(808LL, *((_QWORD *)a2 + 5)); v4 = 0LL; if ( v3 ) { Item_sum_and::Item_sum_and(v3, a2, this); return v3; } return (Item_sum_and *)v4; }
set_compressed: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00df4a0b MOV RDI,qword ptr [RBP + -0x18] LEA RAX,[0x1c62740] MOV RSI,qword ptr [RAX + 0xc0] CALL 0x008770a0 CMP EAX,0x0 JNZ 0x00df4a2b LAB_00df4a0b: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2a],0x18 LEA RCX,[0x1c62740] ADD RCX,0xc0 MOV qword ptr [RAX + 0x30],RCX MOV byte ptr [RBP + -0x1],0x0 JMP 0x00df4a43 LAB_00df4a2b: MOV RDX,qword ptr [RBP + -0x18] MOV EDI,0x1002 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x0141c1e0 MOV byte ptr [RBP + -0x1],0x1 LAB_00df4a43: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x20 POP RBP RET
/* Column_definition::set_compressed(char const*) */ int1 __thiscall Column_definition::set_compressed(Column_definition *this,char *param_1) { int iVar1; if ((param_1 != (char *)0x0) && (iVar1 = strcmp(param_1,(char *)compression_methods._192_8_), iVar1 != 0)) { my_error(0x1002,0,param_1); return 1; } this[0x2a] = (Column_definition)0x18; *(int8 *)(this + 0x30) = 0x1c62800; return 0; }
47,629
Item_sum_and::copy_or_same(THD*)
eloqsql/sql/item_sum.cc
Item *Item_sum_and::copy_or_same(THD* thd) { return new (thd->mem_root) Item_sum_and(thd, this); }
O3
cpp
Item_sum_and::copy_or_same(THD*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x28(%rsi), %rdi movl $0x328, %esi # imm = 0x328 callq 0xcf03ef movq %rax, %r15 testq %rax, %rax je 0xa1fb94 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0xa26200 leaq 0xa7ce4f(%rip), %rax # 0x149c9e0 movq %rax, (%r15) movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rdi callq 0x6da8ee
_ZN12Item_sum_and12copy_or_sameEP3THD: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rdi, [rsi+28h] mov esi, 328h call alloc_root mov r15, rax test rax, rax jz short loc_A1FB94 mov rdi, r15; this mov rsi, r14; THD * mov rdx, rbx; Item_sum_bit * call _ZN12Item_sum_bitC2EP3THDPS_; Item_sum_bit::Item_sum_bit(THD *,Item_sum_bit*) lea rax, off_149C9E0 mov [r15], rax loc_A1FB94: mov rax, r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov rdi, rax call __clang_call_terminate
Item_sum_bit * Item_sum_and::copy_or_same(Item_sum_and *this, THD *a2) { Item_sum_bit *v2; // rax Item_sum_bit *v3; // r15 v2 = (Item_sum_bit *)alloc_root(*((_QWORD *)a2 + 5), 808LL); v3 = v2; if ( v2 ) { Item_sum_bit::Item_sum_bit(v2, a2, this); *(_QWORD *)v3 = off_149C9E0; } return v3; }
47,630
wt_thd_cond_timedwait
eloqsql/mysys/waiting_threads.c
int wt_thd_cond_timedwait(WT_THD *thd, mysql_mutex_t *mutex) { int ret= WT_TIMEOUT; struct timespec timeout; my_hrtime_t before, after, starttime; WT_RESOURCE *rc= thd->waiting_for; ulonglong end_wait_time; DBUG_ENTER("wt_thd_cond_timedwait"); DBUG_PRINT("wt", ("enter: thd=%s, rc=%p", thd->name, rc)); #ifndef DBUG_OFF if (rc->cond_mutex) DBUG_ASSERT(rc->cond_mutex == mutex); else rc->cond_mutex= mutex; mysql_mutex_assert_owner(mutex); #endif before= starttime= my_hrtime(); rc_wrlock(rc); if (rc->owners.elements == 0) ret= WT_OK; rc_unlock(rc); end_wait_time= starttime.val *1000 + (*thd->timeout_short)*1000000ULL; set_timespec_time_nsec(timeout, end_wait_time); if (ret == WT_TIMEOUT && !thd->killed) ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout); if (ret == WT_TIMEOUT && !thd->killed) { int r= deadlock(thd, thd, 0, *thd->deadlock_search_depth_long); if (r == WT_FREE_TO_GO) ret= WT_OK; else if (r != WT_OK) ret= WT_DEADLOCK; else if (*thd->timeout_long > *thd->timeout_short) { end_wait_time= starttime.val *1000 + (*thd->timeout_long)*1000000ULL; set_timespec_time_nsec(timeout, end_wait_time); if (!thd->killed) ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout); } } after= my_hrtime(); if (stop_waiting(thd) == WT_DEADLOCK) /* if we're killed */ ret= WT_DEADLOCK; increment_wait_stats(after.val-before.val, ret); if (ret == WT_OK) increment_success_stats(); DBUG_RETURN(ret); }
O3
c
wt_thd_cond_timedwait: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, -0x40(%rbp) movq %rdi, %r14 movq 0x28(%rdi), %r15 callq 0x9e698 movq %rax, %r13 leaq 0x18(%r15), %r12 movq %r12, %rdi callq 0xa4555 movl 0xe8(%r15), %ebx movq %r12, %rdi callq 0xa45f6 movq 0x38(%r14), %rax imulq $0xf4240, (%rax), %rcx # imm = 0xF4240 movq %r13, -0x48(%rbp) imulq $0x3e8, %r13, %r13 # imm = 0x3E8 addq %r13, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00 subq %rax, %rcx movq %rdx, -0x38(%rbp) movq %rcx, -0x30(%rbp) testl %ebx, %ebx je 0xa70c6 cmpb $0x0, 0x60(%r14) je 0xa70ce movl $0x6e, %r12d jmp 0xa7198 xorl %r12d, %r12d jmp 0xa7198 leaq 0xa8(%r15), %rdi cmpq $0x0, 0xd8(%r15) jne 0xa721c leaq -0x38(%rbp), %rdx movq %rdi, %r15 movq -0x40(%rbp), %rbx movq %rbx, %rsi callq 0x29660 movl %eax, %r12d cmpl $0x6e, %eax jne 0xa7198 cmpb $0x0, 0x60(%r14) jne 0xa70bb movq 0x50(%r14), %rax movl (%rax), %ecx xorl %r12d, %r12d movq %r14, %rdi movq %r14, %rsi xorl %edx, %edx callq 0xa6ea6 cmpl $-0x3, %eax je 0xa7198 testl %eax, %eax jne 0xa7192 movq 0x38(%r14), %rcx movq 0x48(%r14), %rax movq (%rax), %rax cmpq (%rcx), %rax jbe 0xa70bb imulq $0xf4240, %rax, %rcx # imm = 0xF4240 addq %r13, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx movq %rdx, -0x38(%rbp) imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00 subq %rax, %rcx movq %rcx, -0x30(%rbp) cmpb $0x0, 0x60(%r14) movl $0x6e, %r12d jne 0xa7198 leaq -0x38(%rbp), %rdx movq %r15, %rdi movq %rbx, %rsi movl $0x437, %ecx # imm = 0x437 callq 0xa7241 movl %eax, %r12d jmp 0xa7198 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF callq 0x9e698 movq %rax, %r15 movq %r14, %rdi callq 0xa6fde cmpl $-0x1, %eax cmovel %eax, %r12d leaq 0xb6152a(%rip), %rcx # 0xc086e0 cmpl $0x6e, %r12d jne 0xa71c2 addq $0x60, %rcx jmp 0xa7208 subq -0x48(%rbp), %r15 movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD movq %r15, %rax mulq %rdx shrq $0x3, %rdx xorl %eax, %eax leaq 0xb6167d(%rip), %rsi # 0xc08860 cmpq (%rsi,%rax,8), %rdx jbe 0xa71f7 incq %rax cmpq $0x18, %rax jne 0xa71e3 movl $0x18, %eax movl %eax, %eax incl (%rcx,%rax,4) testl %r12d, %r12d jne 0xa720a leaq 0xb61650(%rip), %rcx # 0xc08858 incl (%rcx) movl %r12d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x35603(%rip), %rcx # 0xdc826 leaq -0x38(%rbp), %rdx movq %rdi, %r15 movq -0x40(%rbp), %rbx movq %rbx, %rsi movl $0x42a, %r8d # imm = 0x42A callq 0x2eef0 jmp 0xa70f6
wt_thd_cond_timedwait: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rbp+var_40], rsi mov r14, rdi mov r15, [rdi+28h] call my_hrtime mov r13, rax lea r12, [r15+18h] mov rdi, r12 call my_rw_wrlock mov ebx, [r15+0E8h] mov rdi, r12 call my_rw_unlock mov rax, [r14+38h] imul rcx, [rax], 0F4240h mov [rbp+var_48], r13 imul r13, 3E8h add rcx, r13 mov rax, rcx shr rax, 9 mov rdx, 44B82FA09B5A53h mul rdx shr rdx, 0Bh imul rax, rdx, 3B9ACA00h sub rcx, rax mov [rbp+var_38], rdx mov [rbp+var_30], rcx test ebx, ebx jz short loc_A70C6 cmp byte ptr [r14+60h], 0 jz short loc_A70CE loc_A70BB: mov r12d, 6Eh ; 'n' jmp loc_A7198 loc_A70C6: xor r12d, r12d jmp loc_A7198 loc_A70CE: lea rdi, [r15+0A8h] cmp qword ptr [r15+0D8h], 0 jnz loc_A721C lea rdx, [rbp+var_38] mov r15, rdi mov rbx, [rbp+var_40] mov rsi, rbx call _pthread_cond_timedwait loc_A70F6: mov r12d, eax cmp eax, 6Eh ; 'n' jnz loc_A7198 cmp byte ptr [r14+60h], 0 jnz short loc_A70BB mov rax, [r14+50h] mov ecx, [rax] xor r12d, r12d mov rdi, r14 mov rsi, r14 xor edx, edx call deadlock cmp eax, 0FFFFFFFDh jz short loc_A7198 test eax, eax jnz short loc_A7192 mov rcx, [r14+38h] mov rax, [r14+48h] mov rax, [rax] cmp rax, [rcx] jbe short loc_A70BB imul rcx, rax, 0F4240h add rcx, r13 mov rax, rcx shr rax, 9 mov rdx, 44B82FA09B5A53h mul rdx shr rdx, 0Bh mov [rbp+var_38], rdx imul rax, rdx, 3B9ACA00h sub rcx, rax mov [rbp+var_30], rcx cmp byte ptr [r14+60h], 0 mov r12d, 6Eh ; 'n' jnz short loc_A7198 lea rdx, [rbp+var_38] mov rdi, r15 mov rsi, rbx mov ecx, 437h call inline_mysql_cond_timedwait mov r12d, eax jmp short loc_A7198 loc_A7192: mov r12d, 0FFFFFFFFh loc_A7198: call my_hrtime mov r15, rax mov rdi, r14 call stop_waiting cmp eax, 0FFFFFFFFh cmovz r12d, eax lea rcx, wt_wait_stats cmp r12d, 6Eh ; 'n' jnz short loc_A71C2 add rcx, 60h ; '`' jmp short loc_A7208 loc_A71C2: sub r15, [rbp+var_48] mov rdx, 0CCCCCCCCCCCCCCCDh mov rax, r15 mul rdx shr rdx, 3 xor eax, eax lea rsi, wt_wait_table loc_A71E3: cmp rdx, [rsi+rax*8] jbe short loc_A71F7 inc rax cmp rax, 18h jnz short loc_A71E3 mov eax, 18h loc_A71F7: mov eax, eax inc dword ptr [rcx+rax*4] test r12d, r12d jnz short loc_A720A lea rcx, wt_success_stats loc_A7208: inc dword ptr [rcx] loc_A720A: mov eax, r12d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A721C: lea rcx, aWorkspaceLlm4b_43; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, [rbp+var_38] mov r15, rdi mov rbx, [rbp+var_40] mov rsi, rbx mov r8d, 42Ah call psi_cond_timedwait jmp loc_A70F6
long long wt_thd_cond_timedwait(long long a1, long long a2) { long long v3; // r15 unsigned long long v4; // r13 int v5; // ebx long long v6; // r13 unsigned long long v7; // rcx unsigned int v8; // r12d long long v9; // rdi long long v10; // r15 long long v11; // rbx unsigned int v12; // eax int v13; // eax unsigned long long v14; // rax unsigned long long v15; // r15 _DWORD *v16; // rcx long long v17; // rax unsigned long long v19; // [rsp+8h] [rbp-48h] unsigned long long v20; // [rsp+18h] [rbp-38h] BYREF unsigned long long v21; // [rsp+20h] [rbp-30h] v3 = *(_QWORD *)(a1 + 40); v4 = my_hrtime(); my_rw_wrlock(v3 + 24); v5 = *(_DWORD *)(v3 + 232); my_rw_unlock(v3 + 24); v19 = v4; v6 = 1000 * v4; v7 = v6 + 1000000LL * **(_QWORD **)(a1 + 56); v20 = v7 / 0x3B9ACA00; v21 = v7 % 0x3B9ACA00; if ( !v5 ) { v8 = 0; goto LABEL_15; } if ( *(_BYTE *)(a1 + 96) ) goto LABEL_3; v9 = v3 + 168; if ( *(_QWORD *)(v3 + 216) ) { v10 = v3 + 168; v11 = a2; v12 = psi_cond_timedwait( v9, a2, (long long)&v20, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c", 0x42Au); } else { v10 = v3 + 168; v11 = a2; v12 = pthread_cond_timedwait(v9, a2, &v20); } v8 = v12; if ( v12 != 110 ) goto LABEL_15; if ( *(_BYTE *)(a1 + 96) ) goto LABEL_3; v8 = 0; v13 = deadlock(a1, a1, 0, **(_DWORD **)(a1 + 80)); if ( v13 == -3 ) goto LABEL_15; if ( v13 ) { v8 = -1; goto LABEL_15; } v14 = **(_QWORD **)(a1 + 72); if ( v14 <= **(_QWORD **)(a1 + 56) ) { LABEL_3: v8 = 110; goto LABEL_15; } v20 = (v6 + 1000000 * v14) / 0x3B9ACA00; v21 = (v6 + 1000000 * v14) % 0x3B9ACA00; v8 = 110; if ( !*(_BYTE *)(a1 + 96) ) v8 = inline_mysql_cond_timedwait(v10, v11, &v20, 1079LL); LABEL_15: v15 = my_hrtime(); if ( (unsigned int)stop_waiting(a1) == -1 ) v8 = -1; if ( v8 == 110 ) { v16 = &wt_wait_stats[24]; LABEL_25: ++*v16; return v8; } v17 = 0LL; while ( (v15 - v19) / 0xA > wt_wait_table[v17] ) { if ( ++v17 == 24 ) { LODWORD(v17) = 24; break; } } ++wt_wait_stats[(unsigned int)v17]; if ( !v8 ) { v16 = &wt_success_stats; goto LABEL_25; } return v8; }
wt_thd_cond_timedwait: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x40],RSI MOV R14,RDI MOV R15,qword ptr [RDI + 0x28] CALL 0x0019e698 MOV R13,RAX LEA R12,[R15 + 0x18] MOV RDI,R12 CALL 0x001a4555 MOV EBX,dword ptr [R15 + 0xe8] MOV RDI,R12 CALL 0x001a45f6 MOV RAX,qword ptr [R14 + 0x38] IMUL RCX,qword ptr [RAX],0xf4240 MOV qword ptr [RBP + -0x48],R13 IMUL R13,R13,0x3e8 ADD RCX,R13 MOV RAX,RCX SHR RAX,0x9 MOV RDX,0x44b82fa09b5a53 MUL RDX SHR RDX,0xb IMUL RAX,RDX,0x3b9aca00 SUB RCX,RAX MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x30],RCX TEST EBX,EBX JZ 0x001a70c6 CMP byte ptr [R14 + 0x60],0x0 JZ 0x001a70ce LAB_001a70bb: MOV R12D,0x6e JMP 0x001a7198 LAB_001a70c6: XOR R12D,R12D JMP 0x001a7198 LAB_001a70ce: LEA RDI,[R15 + 0xa8] CMP qword ptr [R15 + 0xd8],0x0 JNZ 0x001a721c LEA RDX,[RBP + -0x38] MOV R15,RDI MOV RBX,qword ptr [RBP + -0x40] MOV RSI,RBX CALL 0x00129660 LAB_001a70f6: MOV R12D,EAX CMP EAX,0x6e JNZ 0x001a7198 CMP byte ptr [R14 + 0x60],0x0 JNZ 0x001a70bb MOV RAX,qword ptr [R14 + 0x50] MOV ECX,dword ptr [RAX] XOR R12D,R12D MOV RDI,R14 MOV RSI,R14 XOR EDX,EDX CALL 0x001a6ea6 CMP EAX,-0x3 JZ 0x001a7198 TEST EAX,EAX JNZ 0x001a7192 MOV RCX,qword ptr [R14 + 0x38] MOV RAX,qword ptr [R14 + 0x48] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RCX] JBE 0x001a70bb IMUL RCX,RAX,0xf4240 ADD RCX,R13 MOV RAX,RCX SHR RAX,0x9 MOV RDX,0x44b82fa09b5a53 MUL RDX SHR RDX,0xb MOV qword ptr [RBP + -0x38],RDX IMUL RAX,RDX,0x3b9aca00 SUB RCX,RAX MOV qword ptr [RBP + -0x30],RCX CMP byte ptr [R14 + 0x60],0x0 MOV R12D,0x6e JNZ 0x001a7198 LEA RDX,[RBP + -0x38] MOV RDI,R15 MOV RSI,RBX MOV ECX,0x437 CALL 0x001a7241 MOV R12D,EAX JMP 0x001a7198 LAB_001a7192: MOV R12D,0xffffffff LAB_001a7198: CALL 0x0019e698 MOV R15,RAX MOV RDI,R14 CALL 0x001a6fde CMP EAX,-0x1 CMOVZ R12D,EAX LEA RCX,[0xd086e0] CMP R12D,0x6e JNZ 0x001a71c2 ADD RCX,0x60 JMP 0x001a7208 LAB_001a71c2: SUB R15,qword ptr [RBP + -0x48] MOV RDX,-0x3333333333333333 MOV RAX,R15 MUL RDX SHR RDX,0x3 XOR EAX,EAX LEA RSI,[0xd08860] LAB_001a71e3: CMP RDX,qword ptr [RSI + RAX*0x8] JBE 0x001a71f7 INC RAX CMP RAX,0x18 JNZ 0x001a71e3 MOV EAX,0x18 LAB_001a71f7: MOV EAX,EAX INC dword ptr [RCX + RAX*0x4] TEST R12D,R12D JNZ 0x001a720a LEA RCX,[0xd08858] LAB_001a7208: INC dword ptr [RCX] LAB_001a720a: MOV EAX,R12D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a721c: LEA RCX,[0x1dc826] LEA RDX,[RBP + -0x38] MOV R15,RDI MOV RBX,qword ptr [RBP + -0x40] MOV RSI,RBX MOV R8D,0x42a CALL 0x0012eef0 JMP 0x001a70f6
int wt_thd_cond_timedwait(long param_1,pthread_mutex_t *param_2) { pthread_cond_t *__cond; int iVar1; int iVar2; long lVar3; long lVar4; ulong uVar5; int *piVar6; timespec local_40; lVar4 = *(long *)(param_1 + 0x28); lVar3 = my_hrtime(); my_rw_wrlock(lVar4 + 0x18); iVar1 = *(int *)(lVar4 + 0xe8); my_rw_unlock(lVar4 + 0x18); local_40.tv_nsec = **(long **)(param_1 + 0x38) * 1000000 + lVar3 * 1000; local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000; local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000; if (iVar1 == 0) { iVar1 = 0; goto LAB_001a7198; } if (*(char *)(param_1 + 0x60) == '\0') { __cond = (pthread_cond_t *)(lVar4 + 0xa8); if (*(long *)(lVar4 + 0xd8) == 0) { iVar1 = pthread_cond_timedwait(__cond,param_2,&local_40); } else { iVar1 = psi_cond_timedwait(__cond,param_2,&local_40, "/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c", 0x42a); } if (iVar1 != 0x6e) goto LAB_001a7198; if (*(char *)(param_1 + 0x60) == '\0') { iVar1 = 0; iVar2 = deadlock(param_1,param_1,0,**(int4 **)(param_1 + 0x50)); if (iVar2 == -3) goto LAB_001a7198; if (iVar2 != 0) { iVar1 = -1; goto LAB_001a7198; } if (**(ulong **)(param_1 + 0x38) < **(ulong **)(param_1 + 0x48)) { local_40.tv_nsec = **(ulong **)(param_1 + 0x48) * 1000000 + lVar3 * 1000; local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000; local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000; iVar1 = 0x6e; if (*(char *)(param_1 + 0x60) == '\0') { iVar1 = inline_mysql_cond_timedwait(__cond,param_2,&local_40,0x437); } goto LAB_001a7198; } } } iVar1 = 0x6e; LAB_001a7198: lVar4 = my_hrtime(); iVar2 = stop_waiting(param_1); if (iVar2 == -1) { iVar1 = -1; } if (iVar1 == 0x6e) { piVar6 = (int *)&DAT_00d08740; } else { uVar5 = 0; do { if ((ulong)(lVar4 - lVar3) / 10 <= (ulong)(&wt_wait_table)[uVar5]) goto LAB_001a71f7; uVar5 = uVar5 + 1; } while (uVar5 != 0x18); uVar5 = 0x18; LAB_001a71f7: (&wt_wait_stats)[uVar5 & 0xffffffff] = (&wt_wait_stats)[uVar5 & 0xffffffff] + 1; if (iVar1 != 0) { return iVar1; } piVar6 = &wt_success_stats; } *piVar6 = *piVar6 + 1; return iVar1; }
47,631
tree_walk_right_root_left
eloqsql/mysys/tree.c
static int tree_walk_right_root_left(TREE *tree, TREE_ELEMENT *element, tree_walk_action action, void *argument) { int error; if (element->right) /* Not null_element */ { if ((error=tree_walk_right_root_left(tree,element->right,action, argument)) == 0 && (error=(*action)(ELEMENT_KEY(tree,element), (element_count) element->count, argument)) == 0) error=tree_walk_right_root_left(tree,element->left,action,argument); return error; } return 0; }
O0
c
tree_walk_right_root_left: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0xfbf26 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx callq 0xfbe60 movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xfbf1e movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x208(%rax) je 0xfbed4 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x208(%rcx), %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) jmp 0xfbee0 movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq -0x40(%rbp), %rdi movq -0x18(%rbp), %rcx movl 0x10(%rcx), %esi andl $0x7fffffff, %esi # imm = 0x7FFFFFFF movq -0x28(%rbp), %rdx callq *%rax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xfbf1e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx callq 0xfbe60 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xfbf2d movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
tree_walk_right_root_left: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp qword ptr [rax+8], 0 jz loc_FBF26 mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+8] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] call tree_walk_right_root_left mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_FBF1E mov rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_10] cmp dword ptr [rax+208h], 0 jz short loc_FBED4 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov ecx, [rcx+208h] add rax, rcx mov [rbp+var_40], rax jmp short loc_FBEE0 loc_FBED4: mov rax, [rbp+var_18] mov rax, [rax+18h] mov [rbp+var_40], rax loc_FBEE0: mov rax, [rbp+var_38] mov rdi, [rbp+var_40] mov rcx, [rbp+var_18] mov esi, [rcx+10h] and esi, 7FFFFFFFh mov rdx, [rbp+var_28] call rax mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_FBF1E mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] call tree_walk_right_root_left mov [rbp+var_2C], eax loc_FBF1E: mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_FBF2D loc_FBF26: mov [rbp+var_4], 0 loc_FBF2D: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long tree_walk_right_root_left( long long a1, long long a2, long long ( *a3)(long long, _QWORD, long long), long long a4) { unsigned int v4; // eax unsigned int v6; // [rsp+14h] [rbp-2Ch] if ( *(_QWORD *)(a2 + 8) ) { v6 = tree_walk_right_root_left(a1, *(_QWORD *)(a2 + 8), a3, a4); if ( !v6 ) { if ( *(_DWORD *)(a1 + 520) ) v4 = a3(*(unsigned int *)(a1 + 520) + a2, *(_DWORD *)(a2 + 16) & 0x7FFFFFFF, a4); else v4 = a3(*(_QWORD *)(a2 + 24), *(_DWORD *)(a2 + 16) & 0x7FFFFFFF, a4); v6 = v4; if ( !v4 ) return (unsigned int)tree_walk_right_root_left(a1, *(_QWORD *)a2, a3, a4); } return v6; } else { return 0; } }
tree_walk_right_root_left: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x8],0x0 JZ 0x001fbf26 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] CALL 0x001fbe60 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001fbf1e MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x208],0x0 JZ 0x001fbed4 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x208] ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX JMP 0x001fbee0 LAB_001fbed4: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x40],RAX LAB_001fbee0: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RCX + 0x10] AND ESI,0x7fffffff MOV RDX,qword ptr [RBP + -0x28] CALL RAX MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001fbf1e MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] CALL 0x001fbe60 MOV dword ptr [RBP + -0x2c],EAX LAB_001fbf1e: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x001fbf2d LAB_001fbf26: MOV dword ptr [RBP + -0x4],0x0 LAB_001fbf2d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int tree_walk_right_root_left(long param_1,int8 *param_2,code *param_3,int8 param_4) { long local_48; int local_34; int local_c; if (param_2[1] == 0) { local_c = 0; } else { local_34 = tree_walk_right_root_left(param_1,param_2[1],param_3,param_4); if (local_34 == 0) { if (*(int *)(param_1 + 0x208) == 0) { local_48 = param_2[3]; } else { local_48 = (long)param_2 + (ulong)*(uint *)(param_1 + 0x208); } local_34 = (*param_3)(local_48,*(uint *)(param_2 + 2) & 0x7fffffff,param_4); if (local_34 == 0) { local_34 = tree_walk_right_root_left(param_1,*param_2,param_3,param_4); } } local_c = local_34; } return local_c; }
47,632
mysql_fetch_row_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_fetch_row_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_fetch_row, (parms->result), parms->result->handle, MYSQL_ROW, r_ptr) }
O3
c
mysql_fetch_row_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x78(%rdi), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rbx callq 0x1bf50 movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_fetch_row_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+78h] mov rax, [rax+480h] mov rbx, [rax+28h] call mysql_fetch_row mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_fetch_row_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx long long result; // rax v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v1 + 120) + 1152LL) + 40LL); result = mysql_fetch_row(v1); *(_QWORD *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_fetch_row_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x78] MOV RAX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0011bf50 MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_fetch_row_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x78) + 0x480) + 0x28); uVar2 = mysql_fetch_row(); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
47,633
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>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
llama.cpp/common/./json.hpp
bool key(string_t& val) { BasicJsonType k = BasicJsonType(val); // check callback for key const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k); key_keep_stack.push_back(keep); // add discarded value at given key and store the reference for later if (keep && ref_stack.back()) { object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); } return true; }
O3
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>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %rdi callq 0x34800 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0xc(%rsp) movb $0x4, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0x32e73 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) movl %eax, %ebp leaq 0x48(%rbx), %rdi movzbl %al, %esi callq 0x325c4 testb %bpl, %bpl je 0x32e5e movq 0x10(%rbx), %rax cmpq $0x0, -0x8(%rax) je 0x32e5e leaq 0xa8(%rbx), %rsi leaq 0x20(%rsp), %rdi callq 0x2d2fe movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rdi movq %r14, %rsi callq 0x34846 movb (%rax), %cl leaq 0x20(%rsp), %rdi movb (%rdi), %dl movb %dl, (%rax) movb %cl, (%rdi) movq 0x8(%rax), %rcx movq 0x8(%rdi), %rdx movq %rdx, 0x8(%rax) movq %rcx, 0x8(%rdi) movq %rax, 0x70(%rbx) callq 0x3488a leaq 0x10(%rsp), %rdi callq 0x3488a movb $0x1, %al addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x22310 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x3488a jmp 0x32e8a movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x3488a movq %rbx, %rdi callq 0x21b20
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyERSB_: push rbp push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+48h+var_3C], eax mov [rsp+48h+var_3D], 4 cmp qword ptr [rbx+90h], 0 jz loc_32E73 lea rdi, [rbx+80h] lea rsi, [rsp+48h+var_3C] lea rdx, [rsp+48h+var_3D] lea rcx, [rsp+48h+var_38] call qword ptr [rbx+98h] mov ebp, eax lea rdi, [rbx+48h] movzx esi, al call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) test bpl, bpl jz short loc_32E5E mov rax, [rbx+10h] cmp qword ptr [rax-8], 0 jz short loc_32E5E lea rsi, [rbx+0A8h] lea rdi, [rsp+48h+var_28] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, [rbx+10h] mov rax, [rax-8] mov rdi, [rax+8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator[](std::string const&) mov cl, [rax] lea rdi, [rsp+48h+var_28] mov dl, [rdi] mov [rax], dl mov [rdi], cl mov rcx, [rax+8] mov rdx, [rdi+8] mov [rax+8], rdx mov [rdi+8], rcx mov [rbx+70h], rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_32E5E: lea rdi, [rsp+48h+var_38] 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 al, 1 add rsp, 30h pop rbx pop r14 pop rbp retn loc_32E73: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov rbx, rax lea rdi, [rsp+48h+var_28] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_32E8A mov rbx, rax loc_32E8A: lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
char 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>>::key( long long a1, long long a2) { unsigned __int8 v2; // bp long long v3; // rax char v4; // cl long long v5; // rcx char v7; // [rsp+Bh] [rbp-3Dh] BYREF int v8; // [rsp+Ch] [rbp-3Ch] BYREF _BYTE v9[16]; // [rsp+10h] [rbp-38h] BYREF _BYTE v10[8]; // [rsp+20h] [rbp-28h] BYREF long long v11; // [rsp+28h] [rbp-20h] ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(v9); v8 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v7 = 4; if ( !*(_QWORD *)(a1 + 144) ) std::__throw_bad_function_call(); v2 = (*(long long ( **)(long long, int *, char *, _BYTE *))(a1 + 152))(a1 + 128, &v8, &v7, v9); std::vector<bool>::push_back(a1 + 72, v2); if ( v2 && *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)v10, (unsigned __int8 *)(a1 + 168)); v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[]( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) + 8LL), a2); v4 = *(_BYTE *)v3; *(_BYTE *)v3 = v10[0]; v10[0] = v4; v5 = *(_QWORD *)(v3 + 8); *(_QWORD *)(v3 + 8) = v11; v11 = v5; *(_QWORD *)(a1 + 112) = v3; 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(v10); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v9); return 1; }
key: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x10] CALL 0x00134800 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x4 CMP qword ptr [RBX + 0x90],0x0 JZ 0x00132e73 LEA RDI,[RBX + 0x80] LAB_00132de0: LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] MOV EBP,EAX LEA RDI,[RBX + 0x48] MOVZX ESI,AL CALL 0x001325c4 TEST BPL,BPL JZ 0x00132e5e MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RAX + -0x8],0x0 JZ 0x00132e5e LEA RSI,[RBX + 0xa8] LEA RDI,[RSP + 0x20] CALL 0x0012d2fe MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RDI,qword ptr [RAX + 0x8] LAB_00132e30: MOV RSI,R14 CALL 0x00134846 MOV CL,byte ptr [RAX] LEA RDI,[RSP + 0x20] MOV DL,byte ptr [RDI] MOV byte ptr [RAX],DL MOV byte ptr [RDI],CL MOV RCX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RDI + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RDI + 0x8],RCX MOV qword ptr [RBX + 0x70],RAX CALL 0x0013488a LAB_00132e5e: LEA RDI,[RSP + 0x10] CALL 0x0013488a MOV AL,0x1 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00132e73: CALL 0x00122310
/* 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> >::key(std::__cxx11::string&) */ int8 __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>> ::key(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,string *param_1) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; int8 uVar2; bool bVar3; 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> *pbVar4; int1 local_3d; int4 local_3c; data local_38 [16]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_28 [8]; int8 local_20; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ (local_38); local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_3d = 4; if (*(long *)(this + 0x90) != 0) { /* try { // try from 00132de0 to 00132e23 has its CatchHandler @ 00132e87 */ bVar3 = (bool)(**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_3d,local_38); std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x48),bVar3); if ((bVar3 != false) && (*(long *)(*(long *)(this + 0x10) + -8) != 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> ::basic_json(local_28,(basic_json *)(this + 0xa8)); /* try { // try from 00132e30 to 00132e37 has its CatchHandler @ 00132e78 */ pbVar4 = (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> *)ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator[](*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(*(long *)(*(long *)(this + 0x10) + -8) + 8),param_1); bVar1 = *pbVar4; *pbVar4 = local_28[0]; uVar2 = *(int8 *)(pbVar4 + 8); *(int8 *)(pbVar4 + 8) = local_20; *(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 + 0x70) = pbVar4; local_28[0] = bVar1; local_20 = uVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_28); } basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); return 1; } /* WARNING: Subroutine does not return */ /* try { // try from 00132e73 to 00132e77 has its CatchHandler @ 00132e87 */ std::__throw_bad_function_call(); }
47,634
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
llama.cpp/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0xbf5ce movq 0x8(%r14), %rax movq %rsi, %rdi movq %rax, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x212f0 movl $0x20, %edi callq 0x20650 movq %rax, %rbx movq %r14, %rdi callq 0x8a9a4 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x5b74e(%rip), %rsi # 0x11ad40 leaq 0x10(%rsp), %rdi callq 0x80414 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0xbc2ac xorl %ebp, %ebp leaq 0xa0a23(%rip), %rsi # 0x160040 leaq -0x48ccc(%rip), %rdx # 0x76958 movq %rbx, %rdi callq 0x20a50 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbf64a movq 0x20(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xbf654 jmp 0xbf65c movq %rax, %r14 movq %rbx, %rdi callq 0x20ef0 movq %r14, %rdi callq 0x20af0
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_BF5CE mov rax, [r14+8] mov rdi, rsi mov rsi, rax add rsp, 30h pop rbx pop r14 pop rbp jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_BF5CE: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BF64A mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BF64A: test bpl, bpl jnz short loc_BF654 jmp short loc_BF65C mov r14, rax loc_BF654: mov rdi, rbx; void * call ___cxa_free_exception loc_BF65C: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"type must be string, but is ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8)); }
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x001bf5ce MOV RAX,qword ptr [R14 + 0x8] MOV RDI,RSI MOV RSI,RAX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001212f0 LAB_001bf5ce: MOV EDI,0x20 CALL 0x00120650 MOV RBX,RAX MOV RDI,R14 CALL 0x0018a9a4 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001bf5eb: LEA RSI,[0x21ad40] LEA RDI,[RSP + 0x10] CALL 0x00180414 MOV BPL,0x1 LAB_001bf5ff: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x001bc2ac XOR EBP,EBP LEA RSI,[0x260040] LEA RDX,[0x176958] MOV RDI,RBX CALL 0x00120a50
/* void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::string_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,string_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json)0x3) { std::__cxx11::string::_M_assign((string *)param_2); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 001bf5eb to 001bf5fb has its CatchHandler @ 001bf651 */ concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be string, but is ",&local_40); /* try { // try from 001bf5ff to 001bf62b has its CatchHandler @ 001bf62c */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&type_error::typeinfo,exception::~exception); }
47,635
lf_hash_init
eloqsql/mysys/lf_hash.cc
void lf_hash_init(LF_HASH *hash, uint element_size, uint flags, uint key_offset, uint key_length, my_hash_get_key get_key, CHARSET_INFO *charset) { lf_alloc_init(&hash->alloc, sizeof(LF_SLIST)+element_size, offsetof(LF_SLIST, key)); lf_dynarray_init(&hash->array, sizeof(LF_SLIST *)); hash->size= 1; hash->count= 0; hash->element_size= element_size; hash->flags= flags; hash->charset= charset ? charset : &my_charset_bin; hash->key_offset= key_offset; hash->key_length= key_length; hash->get_key= get_key; hash->initializer= default_initializer; hash->hash_function= calc_hash; DBUG_ASSERT(get_key ? !key_offset && !key_length : key_length); }
O0
cpp
lf_hash_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movl %r8d, -0x18(%rbp) movq %r9, -0x20(%rbp) movq -0x8(%rbp), %rdi addq $0x28, %rdi movl -0xc(%rbp), %eax addq $0x20, %rax movl %eax, %esi movl $0x8, %edx callq 0xfc7e0 movq -0x8(%rbp), %rdi movl $0x8, %esi callq 0xfcce0 movq -0x8(%rbp), %rax movl $0x1, 0xc0(%rax) movq -0x8(%rbp), %rax movl $0x0, 0xc4(%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xb8(%rax) movl -0x10(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xbc(%rax) cmpq $0x0, 0x10(%rbp) je 0xfd3a1 movq 0x10(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0xfd3ae leaq 0x1c5d88(%rip), %rax # 0x2c3130 movq %rax, -0x28(%rbp) jmp 0xfd3ae movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) movl -0x14(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xb0(%rax) movl -0x18(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xb4(%rax) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x90(%rax) movq -0x8(%rbp), %rax leaq 0x2f(%rip), %rcx # 0xfd420 movq %rcx, 0x98(%rax) movq -0x8(%rbp), %rax leaq 0x5d(%rip), %rcx # 0xfd460 movq %rcx, 0xa0(%rax) jmp 0xfd40c addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
lf_hash_init: push rbp mov rbp, rsp sub rsp, 30h mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_14], ecx mov [rbp+var_18], r8d mov [rbp+var_20], r9 mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov eax, [rbp+var_C] add rax, 20h ; ' ' mov esi, eax mov edx, 8 call lf_alloc_init mov rdi, [rbp+var_8] mov esi, 8 call lf_dynarray_init mov rax, [rbp+var_8] mov dword ptr [rax+0C0h], 1 mov rax, [rbp+var_8] mov dword ptr [rax+0C4h], 0 mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+0B8h], ecx mov ecx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+0BCh], ecx cmp [rbp+arg_0], 0 jz short loc_FD3A1 mov rax, [rbp+arg_0] mov [rbp+var_28], rax jmp short loc_FD3AE loc_FD3A1: lea rax, my_charset_bin mov [rbp+var_28], rax jmp short $+2 loc_FD3AE: mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+0A8h], rcx mov ecx, [rbp+var_14] mov rax, [rbp+var_8] mov [rax+0B0h], ecx mov ecx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+0B4h], ecx mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+90h], rcx mov rax, [rbp+var_8] lea rcx, _ZL19default_initializerP10st_lf_hashPvPKv; default_initializer(st_lf_hash *,void *,void const*) mov [rax+98h], rcx mov rax, [rbp+var_8] lea rcx, _ZL9calc_hashPK15charset_info_stPKhm; calc_hash(charset_info_st const*,uchar const*,ulong) mov [rax+0A0h], rcx jmp short $+2 loc_FD40C: add rsp, 30h pop rbp retn
long long lf_hash_init(long long a1, int a2, int a3, int a4, int a5, long long a6, void *a7) { long long result; // rax void *v8; // [rsp+8h] [rbp-28h] lf_alloc_init(a1 + 40, a2 + 32, 8); lf_dynarray_init(a1, 8); *(_DWORD *)(a1 + 192) = 1; *(_DWORD *)(a1 + 196) = 0; *(_DWORD *)(a1 + 184) = a2; *(_DWORD *)(a1 + 188) = a3; if ( a7 ) v8 = a7; else v8 = &my_charset_bin; *(_QWORD *)(a1 + 168) = v8; *(_DWORD *)(a1 + 176) = a4; *(_DWORD *)(a1 + 180) = a5; *(_QWORD *)(a1 + 144) = a6; *(_QWORD *)(a1 + 152) = default_initializer; result = a1; *(_QWORD *)(a1 + 160) = calc_hash; return result; }
lf_hash_init: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV dword ptr [RBP + -0x14],ECX MOV dword ptr [RBP + -0x18],R8D MOV qword ptr [RBP + -0x20],R9 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV EAX,dword ptr [RBP + -0xc] ADD RAX,0x20 MOV ESI,EAX MOV EDX,0x8 CALL 0x001fc7e0 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x8 CALL 0x001fcce0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc0],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc4],0x0 MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xb8],ECX MOV ECX,dword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xbc],ECX CMP qword ptr [RBP + 0x10],0x0 JZ 0x001fd3a1 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x28],RAX JMP 0x001fd3ae LAB_001fd3a1: LEA RAX,[0x3c3130] MOV qword ptr [RBP + -0x28],RAX JMP 0x001fd3ae LAB_001fd3ae: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xb0],ECX MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xb4],ECX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x90],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1fd420] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1fd460] MOV qword ptr [RAX + 0xa0],RCX JMP 0x001fd40c LAB_001fd40c: ADD RSP,0x30 POP RBP RET
void lf_hash_init(long param_1,int param_2,int4 param_3,int4 param_4,int4 param_5, int8 param_6,int1 *param_7) { int1 *local_30; lf_alloc_init(param_1 + 0x28,param_2 + 0x20,8); lf_dynarray_init(param_1,8); *(int4 *)(param_1 + 0xc0) = 1; *(int4 *)(param_1 + 0xc4) = 0; *(int *)(param_1 + 0xb8) = param_2; *(int4 *)(param_1 + 0xbc) = param_3; if (param_7 == (int1 *)0x0) { local_30 = my_charset_bin; } else { local_30 = param_7; } *(int1 **)(param_1 + 0xa8) = local_30; *(int4 *)(param_1 + 0xb0) = param_4; *(int4 *)(param_1 + 0xb4) = param_5; *(int8 *)(param_1 + 0x90) = param_6; *(code **)(param_1 + 0x98) = default_initializer; *(code **)(param_1 + 0xa0) = calc_hash; return; }
47,636
PhiloxRNG::randn(unsigned int)
7CodeWizard[P]stablediffusion/rng_philox.hpp
std::vector<float> randn(uint32_t n) { std::vector<std::vector<uint32_t>> counter(4, std::vector<uint32_t>(n, 0)); for (uint32_t i = 0; i < n; i++) { counter[0][i] = this->offset; } for (uint32_t i = 0; i < n; i++) { counter[2][i] = i; } this->offset += 1; std::vector<uint64_t> key(n, this->seed); std::vector<std::vector<uint32_t>> key_uint32 = uint32(key); std::vector<std::vector<uint32_t>> g = philox4_32(counter, key_uint32); std::vector<float> result; for (uint32_t i = 0; i < n; ++i) { result.push_back(box_muller((float)g[0][i], (float)g[1][i])); } return result; }
O0
cpp
PhiloxRNG::randn(unsigned int): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x38(%rsp) movq %rdi, %rax movq %rax, 0x40(%rsp) movq %rdi, 0x120(%rsp) movq %rsi, 0x118(%rsp) movl %edx, 0x114(%rsp) movq 0x118(%rsp), %rax movq %rax, 0x48(%rsp) movl 0x114(%rsp), %eax movq %rax, 0x50(%rsp) movl $0x0, 0xdc(%rsp) leaq 0xdb(%rsp), %rdi movq %rdi, 0x58(%rsp) callq 0x4db00 movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rcx leaq 0xe0(%rsp), %rdi leaq 0xdc(%rsp), %rdx callq 0x4e8d0 jmp 0x4dcb2 leaq 0xcb(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x4e950 movq 0x30(%rsp), %rcx leaq 0xf8(%rsp), %rdi movl $0x4, %esi leaq 0xe0(%rsp), %rdx callq 0x4e960 jmp 0x4dce5 leaq 0xcb(%rsp), %rdi callq 0x4e9e0 leaq 0xe0(%rsp), %rdi callq 0x4dbb0 leaq 0xdb(%rsp), %rdi callq 0x4dba0 movl $0x0, 0xc4(%rsp) movl 0xc4(%rsp), %eax cmpl 0x114(%rsp), %eax jae 0x4ddc8 movq 0x48(%rsp), %rax movl 0x10(%rax), %eax movl %eax, 0x2c(%rsp) leaq 0xf8(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x4e9f0 movq %rax, %rdi movl 0xc4(%rsp), %eax movl %eax, %esi callq 0x4ea10 movl 0x2c(%rsp), %ecx movl %ecx, (%rax) movl 0xc4(%rsp), %eax addl $0x1, %eax movl %eax, 0xc4(%rsp) jmp 0x4dd17 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) jmp 0x4ddb6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) leaq 0xcb(%rsp), %rdi callq 0x4e9e0 leaq 0xe0(%rsp), %rdi callq 0x4dbb0 leaq 0xdb(%rsp), %rdi callq 0x4dba0 jmp 0x4e085 movl $0x0, 0xc0(%rsp) movl 0xc0(%rsp), %eax cmpl 0x114(%rsp), %eax jae 0x4de2a movl 0xc0(%rsp), %eax movl %eax, 0x28(%rsp) leaq 0xf8(%rsp), %rdi movl $0x2, %esi callq 0x4e9f0 movq %rax, %rdi movl 0xc0(%rsp), %eax movl %eax, %esi callq 0x4ea10 movl 0x28(%rsp), %ecx movl %ecx, (%rax) movl 0xc0(%rsp), %eax addl $0x1, %eax movl %eax, 0xc0(%rsp) jmp 0x4ddd3 movq 0x48(%rsp), %rax movl 0x10(%rax), %ecx incl %ecx movl %ecx, 0x10(%rax) movl 0x114(%rsp), %ecx movq %rcx, 0x10(%rsp) addq $0x8, %rax movq %rax, 0x18(%rsp) leaq 0xa7(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x4ea30 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rcx leaq 0xa8(%rsp), %rdi callq 0x4ea40 jmp 0x4de7c leaq 0xa7(%rsp), %rdi callq 0x4eac0 movq 0x48(%rsp), %rsi leaq 0x88(%rsp), %rdi leaq 0xa8(%rsp), %rdx callq 0x4ead0 jmp 0x4dea5 movq 0x48(%rsp), %rsi leaq 0x70(%rsp), %rdi leaq 0xf8(%rsp), %rdx leaq 0x88(%rsp), %rcx movl $0xa, %r8d callq 0x4eca0 jmp 0x4decc movq 0x38(%rsp), %rdi movb $0x0, 0x6f(%rsp) callq 0x3e3e0 movl $0x0, 0x68(%rsp) movl 0x68(%rsp), %eax cmpl 0x114(%rsp), %eax jae 0x4e00a xorl %eax, %eax movl %eax, %esi leaq 0x70(%rsp), %rdi movq %rdi, (%rsp) callq 0x4e9f0 movq %rax, %rdi movl 0x68(%rsp), %eax movl %eax, %esi callq 0x4ea10 movq (%rsp), %rdi movl (%rax), %eax cvtsi2ss %rax, %xmm0 movss %xmm0, 0x8(%rsp) movl $0x1, %esi callq 0x4e9f0 movq %rax, %rdi movl 0x68(%rsp), %eax movl %eax, %esi callq 0x4ea10 movq 0x48(%rsp), %rdi movss 0x8(%rsp), %xmm0 movl (%rax), %eax cvtsi2ss %rax, %xmm1 callq 0x4ee00 movss %xmm0, 0xc(%rsp) jmp 0x4df5c movq 0x38(%rsp), %rdi movss 0xc(%rsp), %xmm0 movss %xmm0, 0x64(%rsp) leaq 0x64(%rsp), %rsi callq 0x4b740 jmp 0x4df79 jmp 0x4df7b movl 0x68(%rsp), %eax addl $0x1, %eax movl %eax, 0x68(%rsp) jmp 0x4dee3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) leaq 0xa7(%rsp), %rdi callq 0x4eac0 jmp 0x4e078 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) jmp 0x4e06b movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) jmp 0x4e05e movq 0x38(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) callq 0x3e280 leaq 0x70(%rsp), %rdi callq 0x4eee0 jmp 0x4e05e movb $0x1, 0x6f(%rsp) testb $0x1, 0x6f(%rsp) jne 0x4e020 movq 0x38(%rsp), %rdi callq 0x3e280 leaq 0x70(%rsp), %rdi callq 0x4eee0 leaq 0x88(%rsp), %rdi callq 0x4eee0 leaq 0xa8(%rsp), %rdi callq 0x4ef40 leaq 0xf8(%rsp), %rdi callq 0x4eee0 movq 0x40(%rsp), %rax addq $0x128, %rsp # imm = 0x128 retq leaq 0x88(%rsp), %rdi callq 0x4eee0 leaq 0xa8(%rsp), %rdi callq 0x4ef40 leaq 0xf8(%rsp), %rdi callq 0x4eee0 movq 0xd0(%rsp), %rdi callq 0xbd30 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN9PhiloxRNG5randnEj: sub rsp, 128h mov [rsp+128h+var_F0], rdi mov rax, rdi mov [rsp+128h+var_E8], rax mov [rsp+128h+var_8], rdi mov [rsp+128h+var_10], rsi mov [rsp+128h+var_14], edx mov rax, [rsp+128h+var_10] mov [rsp+128h+var_E0], rax mov eax, [rsp+128h+var_14] mov [rsp+128h+var_D8], rax mov [rsp+128h+var_4C], 0 lea rdi, [rsp+128h+var_4D] mov [rsp+128h+var_D0], rdi call _ZNSaIjEC2Ev; std::allocator<uint>::allocator(void) mov rsi, [rsp+128h+var_D8] mov rcx, [rsp+128h+var_D0] lea rdi, [rsp+128h+var_48] lea rdx, [rsp+128h+var_4C] call _ZNSt6vectorIjSaIjEEC2EmRKjRKS0_; std::vector<uint>::vector(ulong,uint const&,std::allocator<uint> const&) jmp short $+2 loc_4DCB2: lea rdi, [rsp+128h+var_5D] mov [rsp+128h+var_F8], rdi call _ZNSaISt6vectorIjSaIjEEEC2Ev; std::allocator<std::vector<uint>>::allocator(void) mov rcx, [rsp+128h+var_F8] lea rdi, [rsp+128h+var_30] mov esi, 4 lea rdx, [rsp+128h+var_48] call _ZNSt6vectorIS_IjSaIjEESaIS1_EEC2EmRKS1_RKS2_; std::vector<std::vector<uint>>::vector(ulong,std::vector<uint> const&,std::allocator<std::vector<uint>> const&) jmp short $+2 loc_4DCE5: lea rdi, [rsp+128h+var_5D] call _ZNSaISt6vectorIjSaIjEEED2Ev; std::allocator<std::vector<uint>>::~allocator() lea rdi, [rsp+128h+var_48] call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector() lea rdi, [rsp+128h+var_4D] call _ZNSaIjED2Ev; std::allocator<uint>::~allocator() mov [rsp+128h+var_64], 0 loc_4DD17: mov eax, [rsp+128h+var_64] cmp eax, [rsp+128h+var_14] jnb loc_4DDC8 mov rax, [rsp+128h+var_E0] mov eax, [rax+10h] mov [rsp+128h+var_FC], eax lea rdi, [rsp+128h+var_30] xor eax, eax mov esi, eax call _ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm; std::vector<std::vector<uint>>::operator[](ulong) mov rdi, rax mov eax, [rsp+128h+var_64] mov esi, eax call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov ecx, [rsp+128h+var_FC] mov [rax], ecx mov eax, [rsp+128h+var_64] add eax, 1 mov [rsp+128h+var_64], eax jmp short loc_4DD17 mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax jmp short loc_4DDB6 mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax lea rdi, [rsp+arg_C3] call _ZNSaISt6vectorIjSaIjEEED2Ev; std::allocator<std::vector<uint>>::~allocator() lea rdi, [rsp+arg_D8] call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector() loc_4DDB6: lea rdi, [rsp+arg_D3] call _ZNSaIjED2Ev; std::allocator<uint>::~allocator() jmp loc_4E085 loc_4DDC8: mov [rsp+128h+var_68], 0 loc_4DDD3: mov eax, [rsp+128h+var_68] cmp eax, [rsp+128h+var_14] jnb short loc_4DE2A mov eax, [rsp+128h+var_68] mov [rsp+128h+var_100], eax lea rdi, [rsp+128h+var_30] mov esi, 2 call _ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm; std::vector<std::vector<uint>>::operator[](ulong) mov rdi, rax mov eax, [rsp+128h+var_68] mov esi, eax call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov ecx, [rsp+128h+var_100] mov [rax], ecx mov eax, [rsp+128h+var_68] add eax, 1 mov [rsp+128h+var_68], eax jmp short loc_4DDD3 loc_4DE2A: mov rax, [rsp+128h+var_E0] mov ecx, [rax+10h] inc ecx mov [rax+10h], ecx mov ecx, [rsp+128h+var_14] mov [rsp+128h+var_118], rcx add rax, 8 mov [rsp+128h+var_110], rax lea rdi, [rsp+128h+var_81] mov [rsp+128h+var_108], rdi call _ZNSaImEC2Ev; std::allocator<ulong>::allocator(void) mov rsi, [rsp+128h+var_118] mov rdx, [rsp+128h+var_110] mov rcx, [rsp+128h+var_108] lea rdi, [rsp+128h+var_80] call _ZNSt6vectorImSaImEEC2EmRKmRKS0_; std::vector<ulong>::vector(ulong,ulong const&,std::allocator<ulong> const&) jmp short $+2 loc_4DE7C: lea rdi, [rsp+128h+var_81] call _ZNSaImED2Ev; std::allocator<ulong>::~allocator() mov rsi, [rsp+128h+var_E0] lea rdi, [rsp+128h+var_A0] lea rdx, [rsp+128h+var_80] call _ZN9PhiloxRNG6uint32ERKSt6vectorImSaImEE; PhiloxRNG::uint32(std::vector<ulong> const&) jmp short $+2 loc_4DEA5: mov rsi, [rsp+128h+var_E0] lea rdi, [rsp+128h+var_B8] lea rdx, [rsp+128h+var_30] lea rcx, [rsp+128h+var_A0] mov r8d, 0Ah call _ZN9PhiloxRNG10philox4_32ERSt6vectorIS0_IjSaIjEESaIS2_EES5_i; PhiloxRNG::philox4_32(std::vector<std::vector<uint>> &,std::vector<std::vector<uint>> &,int) jmp short $+2 loc_4DECC: mov rdi, [rsp+128h+var_F0] mov [rsp+128h+var_B9], 0 call _ZNSt6vectorIfSaIfEEC2Ev; std::vector<float>::vector(void) mov [rsp+128h+var_C0], 0 loc_4DEE3: mov eax, [rsp+128h+var_C0] cmp eax, [rsp+128h+var_14] jnb loc_4E00A xor eax, eax mov esi, eax lea rdi, [rsp+128h+var_B8] mov [rsp+128h+var_128], rdi call _ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm; std::vector<std::vector<uint>>::operator[](ulong) mov rdi, rax mov eax, [rsp+128h+var_C0] mov esi, eax call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov rdi, [rsp+128h+var_128] mov eax, [rax] cvtsi2ss xmm0, rax movss [rsp+128h+var_120], xmm0 mov esi, 1 call _ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm; std::vector<std::vector<uint>>::operator[](ulong) mov rdi, rax mov eax, [rsp+128h+var_C0] mov esi, eax call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov rdi, [rsp+128h+var_E0]; this movss xmm0, [rsp+128h+var_120]; float mov eax, [rax] cvtsi2ss xmm1, rax; float call _ZN9PhiloxRNG10box_mullerEff; PhiloxRNG::box_muller(float,float) movss [rsp+128h+var_11C], xmm0 jmp short $+2 loc_4DF5C: mov rdi, [rsp+128h+var_F0] movss xmm0, [rsp+128h+var_11C] movss [rsp+128h+var_C4], xmm0 lea rsi, [rsp+128h+var_C4] call _ZNSt6vectorIfSaIfEE9push_backEOf; std::vector<float>::push_back(float &&) jmp short $+2 loc_4DF79: jmp short $+2 loc_4DF7B: mov eax, [rsp+128h+var_C0] add eax, 1 mov [rsp+128h+var_C0], eax jmp loc_4DEE3 mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax lea rdi, [rsp+arg_9F] call _ZNSaImED2Ev; std::allocator<ulong>::~allocator() jmp loc_4E078 mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax jmp loc_4E06B mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax jmp short loc_4E05E mov rdi, [rsp+arg_30] mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() lea rdi, [rsp+arg_68] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() jmp short loc_4E05E loc_4E00A: mov [rsp+128h+var_B9], 1 test [rsp+128h+var_B9], 1 jnz short loc_4E020 mov rdi, [rsp+128h+var_F0] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() loc_4E020: lea rdi, [rsp+128h+var_B8] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() lea rdi, [rsp+128h+var_A0] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() lea rdi, [rsp+128h+var_80] call _ZNSt6vectorImSaImEED2Ev; std::vector<ulong>::~vector() lea rdi, [rsp+128h+var_30] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() mov rax, [rsp+128h+var_E8] add rsp, 128h retn loc_4E05E: lea rdi, [rsp+arg_80] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() loc_4E06B: lea rdi, [rsp+arg_A0] call _ZNSt6vectorImSaImEED2Ev; std::vector<ulong>::~vector() loc_4E078: lea rdi, [rsp+arg_F0] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() loc_4E085: mov rdi, [rsp+arg_C8] call __Unwind_Resume
PhiloxRNG * PhiloxRNG::randn(PhiloxRNG *this, PhiloxRNG *a2, unsigned int a3) { int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d long long v7; // rax long long v8; // rax int v9; // r8d int v10; // r9d int v11; // ecx int v12; // r8d int v13; // r9d long long v14; // rax long long v15; // rax int *v16; // rax float v18; // [rsp+8h] [rbp-120h] unsigned int v19; // [rsp+10h] [rbp-118h] int v20; // [rsp+2Ch] [rbp-FCh] float v22; // [rsp+64h] [rbp-C4h] BYREF unsigned int k; // [rsp+68h] [rbp-C0h] char v24; // [rsp+6Fh] [rbp-B9h] _BYTE v25[24]; // [rsp+70h] [rbp-B8h] BYREF _BYTE v26[31]; // [rsp+88h] [rbp-A0h] BYREF char v27; // [rsp+A7h] [rbp-81h] BYREF _BYTE v28[24]; // [rsp+A8h] [rbp-80h] BYREF unsigned int j; // [rsp+C0h] [rbp-68h] unsigned int i; // [rsp+C4h] [rbp-64h] _BYTE v31[16]; // [rsp+CBh] [rbp-5Dh] BYREF char v32; // [rsp+DBh] [rbp-4Dh] BYREF int v33; // [rsp+DCh] [rbp-4Ch] BYREF long long v34[3]; // [rsp+E0h] [rbp-48h] BYREF _BYTE v35[28]; // [rsp+F8h] [rbp-30h] BYREF unsigned int v36; // [rsp+114h] [rbp-14h] PhiloxRNG *v37; // [rsp+118h] [rbp-10h] PhiloxRNG *v38; // [rsp+120h] [rbp-8h] v38 = this; v37 = a2; v36 = a3; v33 = 0; std::allocator<unsigned int>::allocator((long long)&v32); std::vector<unsigned int>::vector((unsigned int)v34, a3, (unsigned int)&v33, (unsigned int)&v32, v3, v4); std::allocator<std::vector<unsigned int>>::allocator(); std::vector<std::vector<unsigned int>>::vector((unsigned int)v35, 4, (unsigned int)v34, (unsigned int)v31, v5, v6); std::allocator<std::vector<unsigned int>>::~allocator(v31); std::vector<unsigned int>::~vector(v34); std::allocator<unsigned int>::~allocator((long long)&v32); for ( i = 0; i < v36; ++i ) { v20 = *((_DWORD *)a2 + 4); v7 = std::vector<std::vector<unsigned int>>::operator[](v35, 0LL); *(_DWORD *)std::vector<unsigned int>::operator[](v7, i) = v20; } for ( j = 0; j < v36; ++j ) { v8 = std::vector<std::vector<unsigned int>>::operator[](v35, 2LL); *(_DWORD *)std::vector<unsigned int>::operator[](v8, j) = j; } ++*((_DWORD *)a2 + 4); v19 = v36; std::allocator<unsigned long>::allocator(); std::vector<unsigned long>::vector((unsigned int)v28, v19, (_DWORD)a2 + 8, (unsigned int)&v27, v9, v10); std::allocator<unsigned long>::~allocator(&v27); PhiloxRNG::uint32((unsigned int)v26, (_DWORD)a2, (unsigned int)v28, v11, v12, v13); PhiloxRNG::philox4_32(v25, a2, v35, v26, 10LL); v24 = 0; std::vector<float>::vector((long long)this); for ( k = 0; k < v36; ++k ) { v14 = std::vector<std::vector<unsigned int>>::operator[](v25, 0LL); v18 = (float)*(int *)std::vector<unsigned int>::operator[](v14, k); v15 = std::vector<std::vector<unsigned int>>::operator[](v25, 1LL); v16 = (int *)std::vector<unsigned int>::operator[](v15, k); PhiloxRNG::box_muller(a2, v18, (float)*v16); v22 = v18; std::vector<float>::push_back((long long)this, (long long)&v22); } v24 = 1; std::vector<std::vector<unsigned int>>::~vector(v25); std::vector<std::vector<unsigned int>>::~vector(v26); std::vector<unsigned long>::~vector(v28); std::vector<std::vector<unsigned int>>::~vector(v35); return this; }
randn: SUB RSP,0x128 MOV qword ptr [RSP + 0x38],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x120],RDI MOV qword ptr [RSP + 0x118],RSI MOV dword ptr [RSP + 0x114],EDX MOV RAX,qword ptr [RSP + 0x118] MOV qword ptr [RSP + 0x48],RAX MOV EAX,dword ptr [RSP + 0x114] MOV qword ptr [RSP + 0x50],RAX MOV dword ptr [RSP + 0xdc],0x0 LEA RDI,[RSP + 0xdb] MOV qword ptr [RSP + 0x58],RDI CALL 0x0014db00 MOV RSI,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x58] LAB_0014dc9b: LEA RDI,[RSP + 0xe0] LEA RDX,[RSP + 0xdc] CALL 0x0014e8d0 JMP 0x0014dcb2 LAB_0014dcb2: LEA RDI,[RSP + 0xcb] MOV qword ptr [RSP + 0x30],RDI CALL 0x0014e950 MOV RCX,qword ptr [RSP + 0x30] LAB_0014dcc9: LEA RDI,[RSP + 0xf8] MOV ESI,0x4 LEA RDX,[RSP + 0xe0] CALL 0x0014e960 JMP 0x0014dce5 LAB_0014dce5: LEA RDI,[RSP + 0xcb] CALL 0x0014e9e0 LEA RDI,[RSP + 0xe0] CALL 0x0014dbb0 LEA RDI,[RSP + 0xdb] CALL 0x0014dba0 MOV dword ptr [RSP + 0xc4],0x0 LAB_0014dd17: MOV EAX,dword ptr [RSP + 0xc4] CMP EAX,dword ptr [RSP + 0x114] JNC 0x0014ddc8 MOV RAX,qword ptr [RSP + 0x48] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RSP + 0x2c],EAX LEA RDI,[RSP + 0xf8] XOR EAX,EAX MOV ESI,EAX CALL 0x0014e9f0 MOV RDI,RAX MOV EAX,dword ptr [RSP + 0xc4] MOV ESI,EAX CALL 0x0014ea10 MOV ECX,dword ptr [RSP + 0x2c] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP + 0xc4] ADD EAX,0x1 MOV dword ptr [RSP + 0xc4],EAX JMP 0x0014dd17 LAB_0014ddc8: MOV dword ptr [RSP + 0xc0],0x0 LAB_0014ddd3: MOV EAX,dword ptr [RSP + 0xc0] CMP EAX,dword ptr [RSP + 0x114] JNC 0x0014de2a MOV EAX,dword ptr [RSP + 0xc0] MOV dword ptr [RSP + 0x28],EAX LEA RDI,[RSP + 0xf8] MOV ESI,0x2 CALL 0x0014e9f0 MOV RDI,RAX MOV EAX,dword ptr [RSP + 0xc0] MOV ESI,EAX CALL 0x0014ea10 MOV ECX,dword ptr [RSP + 0x28] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP + 0xc0] ADD EAX,0x1 MOV dword ptr [RSP + 0xc0],EAX JMP 0x0014ddd3 LAB_0014de2a: MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RAX + 0x10] INC ECX MOV dword ptr [RAX + 0x10],ECX MOV ECX,dword ptr [RSP + 0x114] MOV qword ptr [RSP + 0x10],RCX ADD RAX,0x8 MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0xa7] MOV qword ptr [RSP + 0x20],RDI CALL 0x0014ea30 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] LAB_0014de6d: LEA RDI,[RSP + 0xa8] CALL 0x0014ea40 JMP 0x0014de7c LAB_0014de7c: LEA RDI,[RSP + 0xa7] CALL 0x0014eac0 MOV RSI,qword ptr [RSP + 0x48] LAB_0014de8e: LEA RDI,[RSP + 0x88] LEA RDX,[RSP + 0xa8] CALL 0x0014ead0 JMP 0x0014dea5 LAB_0014dea5: MOV RSI,qword ptr [RSP + 0x48] LEA RDI,[RSP + 0x70] LEA RDX,[RSP + 0xf8] LEA RCX,[RSP + 0x88] MOV R8D,0xa CALL 0x0014eca0 JMP 0x0014decc LAB_0014decc: MOV RDI,qword ptr [RSP + 0x38] MOV byte ptr [RSP + 0x6f],0x0 CALL 0x0013e3e0 MOV dword ptr [RSP + 0x68],0x0 LAB_0014dee3: MOV EAX,dword ptr [RSP + 0x68] CMP EAX,dword ptr [RSP + 0x114] JNC 0x0014e00a XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x70] MOV qword ptr [RSP],RDI CALL 0x0014e9f0 MOV RDI,RAX MOV EAX,dword ptr [RSP + 0x68] MOV ESI,EAX CALL 0x0014ea10 MOV RDI,qword ptr [RSP] MOV EAX,dword ptr [RAX] CVTSI2SS XMM0,RAX MOVSS dword ptr [RSP + 0x8],XMM0 MOV ESI,0x1 CALL 0x0014e9f0 MOV RDI,RAX MOV EAX,dword ptr [RSP + 0x68] MOV ESI,EAX CALL 0x0014ea10 MOV RDI,qword ptr [RSP + 0x48] MOVSS XMM0,dword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX] CVTSI2SS XMM1,RAX LAB_0014df4f: CALL 0x0014ee00 MOVSS dword ptr [RSP + 0xc],XMM0 JMP 0x0014df5c LAB_0014df5c: MOV RDI,qword ptr [RSP + 0x38] MOVSS XMM0,dword ptr [RSP + 0xc] MOVSS dword ptr [RSP + 0x64],XMM0 LEA RSI,[RSP + 0x64] CALL 0x0014b740 LAB_0014df77: JMP 0x0014df79 LAB_0014df79: JMP 0x0014df7b LAB_0014df7b: MOV EAX,dword ptr [RSP + 0x68] ADD EAX,0x1 MOV dword ptr [RSP + 0x68],EAX JMP 0x0014dee3 LAB_0014e00a: MOV byte ptr [RSP + 0x6f],0x1 TEST byte ptr [RSP + 0x6f],0x1 JNZ 0x0014e020 MOV RDI,qword ptr [RSP + 0x38] CALL 0x0013e280 LAB_0014e020: LEA RDI,[RSP + 0x70] CALL 0x0014eee0 LEA RDI,[RSP + 0x88] CALL 0x0014eee0 LEA RDI,[RSP + 0xa8] CALL 0x0014ef40 LEA RDI,[RSP + 0xf8] CALL 0x0014eee0 MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x128 RET
/* WARNING: Removing unreachable block (ram,0x0014e016) */ /* PhiloxRNG::randn(unsigned int) */ vector<float,std::allocator<float>> * PhiloxRNG::randn(uint param_1) { int4 uVar1; uint uVar2; vector<unsigned_int,std::allocator<unsigned_int>> *pvVar3; int4 *puVar4; uint *puVar5; ulong uVar6; uint in_EDX; vector *in_RSI; int4 in_register_0000003c; vector<float,std::allocator<float>> *this; float local_c4; uint local_c0; int1 local_b9; vector local_b8 [24]; vector local_a0 [31]; allocator<unsigned_long> local_81; vector<unsigned_long,std::allocator<unsigned_long>> local_80 [24]; uint local_68; uint local_64; allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>> local_5d [16]; allocator<unsigned_int> local_4d; uint local_4c; vector<unsigned_int,std::allocator<unsigned_int>> local_48 [24]; vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> local_30 [28]; uint local_14; vector<float,std::allocator<float>> *local_8; this = (vector<float,std::allocator<float>> *)CONCAT44(in_register_0000003c,param_1); local_4c = 0; local_14 = in_EDX; local_8 = this; std::allocator<unsigned_int>::allocator(&local_4d); /* try { // try from 0014dc9b to 0014dcaf has its CatchHandler @ 0014dd72 */ std::vector<unsigned_int,std::allocator<unsigned_int>>::vector (local_48,(ulong)in_EDX,&local_4c,(allocator *)&local_4d); std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>::allocator(local_5d); /* try { // try from 0014dcc9 to 0014dce2 has its CatchHandler @ 0014dd88 */ std:: vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> ::vector(local_30,4,(vector *)local_48,(allocator *)local_5d); std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>::~allocator(local_5d); std::vector<unsigned_int,std::allocator<unsigned_int>>::~vector(local_48); std::allocator<unsigned_int>::~allocator(&local_4d); for (local_64 = 0; local_64 < local_14; local_64 = local_64 + 1) { uVar1 = *(int4 *)(in_RSI + 0x10); pvVar3 = (vector<unsigned_int,std::allocator<unsigned_int>> *) std:: vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> ::operator[](local_30,0); puVar4 = (int4 *) std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (pvVar3,(ulong)local_64); *puVar4 = uVar1; } for (local_68 = 0; uVar2 = local_68, local_68 < local_14; local_68 = local_68 + 1) { pvVar3 = (vector<unsigned_int,std::allocator<unsigned_int>> *) std:: vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> ::operator[](local_30,2); puVar5 = (uint *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (pvVar3,(ulong)local_68); *puVar5 = uVar2; } *(int *)(in_RSI + 0x10) = *(int *)(in_RSI + 0x10) + 1; uVar6 = (ulong)local_14; std::allocator<unsigned_long>::allocator(&local_81); /* try { // try from 0014de6d to 0014de79 has its CatchHandler @ 0014df8b */ std::vector<unsigned_long,std::allocator<unsigned_long>>::vector (local_80,uVar6,(ulong *)(in_RSI + 8),(allocator *)&local_81); std::allocator<unsigned_long>::~allocator(&local_81); /* try { // try from 0014de8e to 0014dea2 has its CatchHandler @ 0014dfb1 */ uint32(local_a0); /* try { // try from 0014dea5 to 0014dec9 has its CatchHandler @ 0014dfca */ philox4_32(local_b8,in_RSI,(int)local_30); local_b9 = 0; std::vector<float,std::allocator<float>>::vector(this); for (local_c0 = 0; local_c0 < local_14; local_c0 = local_c0 + 1) { pvVar3 = (vector<unsigned_int,std::allocator<unsigned_int>> *) std:: vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> ::operator[]((vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> *)local_b8,0); puVar5 = (uint *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (pvVar3,(ulong)local_c0); uVar2 = *puVar5; pvVar3 = (vector<unsigned_int,std::allocator<unsigned_int>> *) std:: vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> ::operator[]((vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> *)local_b8,1); puVar5 = (uint *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (pvVar3,(ulong)local_c0); /* try { // try from 0014df4f to 0014df76 has its CatchHandler @ 0014dfe0 */ local_c4 = (float)box_muller((PhiloxRNG *)in_RSI,(float)uVar2,(float)*puVar5); std::vector<float,std::allocator<float>>::push_back(this,&local_c4); } local_b9 = 1; std:: vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> ::~vector((vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> *)local_b8); std:: vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> ::~vector((vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> *)local_a0); std::vector<unsigned_long,std::allocator<unsigned_long>>::~vector(local_80); std:: vector<std::vector<unsigned_int,std::allocator<unsigned_int>>,std::allocator<std::vector<unsigned_int,std::allocator<unsigned_int>>>> ::~vector(local_30); return this; }
47,637
PhiloxRNG::randn(unsigned int)
7CodeWizard[P]stablediffusion/rng_philox.hpp
std::vector<float> randn(uint32_t n) { std::vector<std::vector<uint32_t>> counter(4, std::vector<uint32_t>(n, 0)); for (uint32_t i = 0; i < n; i++) { counter[0][i] = this->offset; } for (uint32_t i = 0; i < n; i++) { counter[2][i] = i; } this->offset += 1; std::vector<uint64_t> key(n, this->seed); std::vector<std::vector<uint32_t>> key_uint32 = uint32(key); std::vector<std::vector<uint32_t>> g = philox4_32(counter, key_uint32); std::vector<float> result; for (uint32_t i = 0; i < n; ++i) { result.push_back(box_muller((float)g[0][i], (float)g[1][i])); } return result; }
O3
cpp
PhiloxRNG::randn(unsigned int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movl %edx, %r15d leaq 0x30(%rsp), %rdx movl $0x0, (%rdx) leaq 0x18(%rsp), %rdi leaq 0x60(%rsp), %rcx movq %r15, %rsi callq 0x3b298 leaq 0x48(%rsp), %rdi leaq 0x18(%rsp), %rdx leaq 0xc(%rsp), %rcx movl $0x4, %esi callq 0x3b414 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3ae66 movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0xa5d0 testl %ebp, %ebp je 0x3afec movq 0x48(%rsp), %rax movq (%rax), %rax movl 0x10(%r14), %ecx leaq -0x1(%r15), %rdx movq %rdx, %xmm0 pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1] leaq 0xc(,%r15,4), %rdx andq $-0x10, %rdx movdqa 0x7f214(%rip), %xmm2 # 0xba0b0 movdqa 0x7f21c(%rip), %xmm3 # 0xba0c0 xorl %esi, %esi movdqa 0x7f222(%rip), %xmm1 # 0xba0d0 pxor %xmm1, %xmm0 pcmpeqd %xmm4, %xmm4 movdqa 0x81b92(%rip), %xmm5 # 0xbca50 movdqa %xmm3, %xmm6 pxor %xmm1, %xmm6 movdqa %xmm6, %xmm7 pcmpgtd %xmm0, %xmm7 pcmpeqd %xmm0, %xmm6 pshufd $0xf5, %xmm6, %xmm8 # xmm8 = xmm6[1,1,3,3] pand %xmm7, %xmm8 pshufd $0xf5, %xmm7, %xmm6 # xmm6 = xmm7[1,1,3,3] por %xmm8, %xmm6 movd %xmm6, %edi notl %edi testb $0x1, %dil je 0x3aef6 movl %ecx, (%rax,%rsi) pxor %xmm4, %xmm6 pextrw $0x4, %xmm6, %edi testb $0x1, %dil je 0x3af09 movl %ecx, 0x4(%rax,%rsi) movdqa %xmm2, %xmm6 pxor %xmm1, %xmm6 movdqa %xmm6, %xmm7 pcmpgtd %xmm0, %xmm7 pcmpeqd %xmm0, %xmm6 pshufd $0xf5, %xmm6, %xmm8 # xmm8 = xmm6[1,1,3,3] pand %xmm7, %xmm8 pshufd $0xf5, %xmm7, %xmm6 # xmm6 = xmm7[1,1,3,3] por %xmm8, %xmm6 pxor %xmm4, %xmm6 pextrw $0x0, %xmm6, %edi testb $0x1, %dil je 0x3af45 movl %ecx, 0x8(%rax,%rsi) pextrw $0x4, %xmm6, %edi testb $0x1, %dil je 0x3af54 movl %ecx, 0xc(%rax,%rsi) paddq %xmm5, %xmm3 paddq %xmm5, %xmm2 addq $0x10, %rsi cmpq %rsi, %rdx jne 0x3aebe testl %ebp, %ebp je 0x3afec movq 0x48(%rsp), %rax movq 0x30(%rax), %rax leaq 0x1(%r15), %rcx andq $-0x2, %rcx movdqa 0x7f13a(%rip), %xmm2 # 0xba0c0 xorl %edx, %edx pcmpeqd %xmm3, %xmm3 movdqa 0x81acc(%rip), %xmm4 # 0xbca60 movdqa %xmm2, %xmm5 pxor %xmm1, %xmm5 movdqa %xmm5, %xmm6 pcmpgtd %xmm0, %xmm6 pcmpeqd %xmm0, %xmm5 pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3] pand %xmm6, %xmm7 pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3] por %xmm7, %xmm5 movd %xmm5, %esi notl %esi testb $0x1, %sil je 0x3afc9 movl %edx, (%rax,%rdx,4) pxor %xmm3, %xmm5 pextrw $0x4, %xmm5, %esi testb $0x1, %sil je 0x3afdf leal 0x1(%rdx), %esi movl %esi, 0x4(%rax,%rdx,4) addq $0x2, %rdx paddq %xmm4, %xmm2 cmpq %rdx, %rcx jne 0x3af94 incl 0x10(%r14) leaq 0x8(%r14), %rdx leaq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rcx movq %r15, %rsi callq 0x3b4ac leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rdx movq %r14, %rsi callq 0x3b5cc leaq 0x60(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x30(%rsp), %rcx movq %r14, %rsi movl $0xa, %r8d callq 0x3b694 pxor %xmm0, %xmm0 movdqu %xmm0, (%rbx) movq $0x0, 0x10(%rbx) testl %ebp, %ebp je 0x3b133 xorl %r13d, %r13d leaq 0xc(%rsp), %r12 movq 0x60(%rsp), %rax movq (%rax), %rcx movl (%rcx,%r13,4), %ecx xorps %xmm0, %xmm0 cvtsi2ss %rcx, %xmm0 movq 0x18(%rax), %rax movl (%rax,%r13,4), %ebp movss 0x48(%r14), %xmm1 movss 0x4c(%r14), %xmm2 movss %xmm2, 0x10(%rsp) mulss %xmm1, %xmm0 mulss 0x7ef81(%rip), %xmm1 # 0xba010 addss %xmm0, %xmm1 xorps %xmm0, %xmm0 cvtss2sd %xmm1, %xmm0 callq 0xa4a0 mulsd 0x81a11(%rip), %xmm0 # 0xbcab8 ucomisd 0x81a11(%rip), %xmm0 # 0xbcac0 jb 0x3b0b7 sqrtsd %xmm0, %xmm0 jmp 0x3b0bc callq 0xa480 xorps %xmm1, %xmm1 cvtsi2ss %rbp, %xmm1 movss 0x10(%rsp), %xmm2 mulss %xmm2, %xmm1 mulss 0x7ef3a(%rip), %xmm2 # 0xba010 addss %xmm1, %xmm2 cvtsd2ss %xmm0, %xmm0 cvtss2sd %xmm0, %xmm0 movsd %xmm0, 0x10(%rsp) xorps %xmm0, %xmm0 cvtss2sd %xmm2, %xmm0 callq 0xa0f0 mulsd 0x10(%rsp), %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, 0xc(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x3b11c movss %xmm0, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3b127 movq %rbx, %rdi movq %r12, %rdx callq 0x3a4c4 incq %r13 cmpq %r13, %r15 jne 0x3b055 leaq 0x60(%rsp), %rdi callq 0x3b752 leaq 0x30(%rsp), %rdi callq 0x3b752 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3b15e movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0xa5d0 leaq 0x48(%rsp), %rdi callq 0x3b752 movq %rbx, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 jmp 0x3b1cb movq %rax, %r14 jmp 0x3b1d5 movq %rax, %r14 jmp 0x3b1ec movq %rax, %r14 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3b1f6 movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0xa5d0 jmp 0x3b1f6 movq %rax, %r14 jmp 0x3b1f6 movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x3b1c1 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0xa5d0 leaq 0x60(%rsp), %rdi callq 0x3b752 leaq 0x30(%rsp), %rdi callq 0x3b752 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3b1ec movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0xa5d0 leaq 0x48(%rsp), %rdi callq 0x3b752 movq %r14, %rdi callq 0xaad0
_ZN9PhiloxRNG5randnEj: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov ebp, edx mov r14, rsi mov rbx, rdi mov r15d, edx lea rdx, [rsp+0A8h+var_78] mov dword ptr [rdx], 0 lea rdi, [rsp+0A8h+var_90] lea rcx, [rsp+0A8h+var_48] mov rsi, r15 call _ZNSt6vectorIjSaIjEEC2EmRKjRKS0_; std::vector<uint>::vector(ulong,uint const&,std::allocator<uint> const&) lea rdi, [rsp+0A8h+var_60] lea rdx, [rsp+0A8h+var_90] lea rcx, [rsp+0A8h+var_9C] mov esi, 4 call _ZNSt6vectorIS_IjSaIjEESaIS1_EEC2EmRKS1_RKS2_; std::vector<std::vector<uint>>::vector(ulong,std::vector<uint> const&,std::allocator<std::vector<uint>> const&) mov rdi, [rsp+0A8h+var_90]; void * test rdi, rdi jz short loc_3AE66 mov rsi, [rsp+0A8h+var_80] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AE66: test ebp, ebp jz loc_3AFEC mov rax, [rsp+0A8h+var_60] mov rax, [rax] mov ecx, [r14+10h] lea rdx, [r15-1] movq xmm0, rdx pshufd xmm0, xmm0, 44h ; 'D' lea rdx, ds:0Ch[r15*4] and rdx, 0FFFFFFFFFFFFFFF0h movdqa xmm2, cs:xmmword_BA0B0 movdqa xmm3, cs:xmmword_BA0C0 xor esi, esi movdqa xmm1, cs:xmmword_BA0D0 pxor xmm0, xmm1 pcmpeqd xmm4, xmm4 movdqa xmm5, cs:xmmword_BCA50 loc_3AEBE: movdqa xmm6, xmm3 pxor xmm6, xmm1 movdqa xmm7, xmm6 pcmpgtd xmm7, xmm0 pcmpeqd xmm6, xmm0 pshufd xmm8, xmm6, 0F5h pand xmm8, xmm7 pshufd xmm6, xmm7, 0F5h por xmm6, xmm8 movd edi, xmm6 not edi test dil, 1 jz short loc_3AEF6 mov [rax+rsi], ecx loc_3AEF6: pxor xmm6, xmm4 pextrw edi, xmm6, 4 test dil, 1 jz short loc_3AF09 mov [rax+rsi+4], ecx loc_3AF09: movdqa xmm6, xmm2 pxor xmm6, xmm1 movdqa xmm7, xmm6 pcmpgtd xmm7, xmm0 pcmpeqd xmm6, xmm0 pshufd xmm8, xmm6, 0F5h pand xmm8, xmm7 pshufd xmm6, xmm7, 0F5h por xmm6, xmm8 pxor xmm6, xmm4 pextrw edi, xmm6, 0 test dil, 1 jz short loc_3AF45 mov [rax+rsi+8], ecx loc_3AF45: pextrw edi, xmm6, 4 test dil, 1 jz short loc_3AF54 mov [rax+rsi+0Ch], ecx loc_3AF54: paddq xmm3, xmm5 paddq xmm2, xmm5 add rsi, 10h cmp rdx, rsi jnz loc_3AEBE test ebp, ebp jz short loc_3AFEC mov rax, [rsp+0A8h+var_60] mov rax, [rax+30h] lea rcx, [r15+1] and rcx, 0FFFFFFFFFFFFFFFEh movdqa xmm2, cs:xmmword_BA0C0 xor edx, edx pcmpeqd xmm3, xmm3 movdqa xmm4, cs:xmmword_BCA60 loc_3AF94: movdqa xmm5, xmm2 pxor xmm5, xmm1 movdqa xmm6, xmm5 pcmpgtd xmm6, xmm0 pcmpeqd xmm5, xmm0 pshufd xmm7, xmm5, 0F5h pand xmm7, xmm6 pshufd xmm5, xmm6, 0F5h por xmm5, xmm7 movd esi, xmm5 not esi test sil, 1 jz short loc_3AFC9 mov [rax+rdx*4], edx loc_3AFC9: pxor xmm5, xmm3 pextrw esi, xmm5, 4 test sil, 1 jz short loc_3AFDF lea esi, [rdx+1] mov [rax+rdx*4+4], esi loc_3AFDF: add rdx, 2 paddq xmm2, xmm4 cmp rcx, rdx jnz short loc_3AF94 loc_3AFEC: inc dword ptr [r14+10h] lea rdx, [r14+8] lea rdi, [rsp+0A8h+var_90] lea rcx, [rsp+0A8h+var_78] mov rsi, r15 call _ZNSt6vectorImSaImEEC2EmRKmRKS0_; std::vector<ulong>::vector(ulong,ulong const&,std::allocator<ulong> const&) lea rdi, [rsp+0A8h+var_78]; int lea rdx, [rsp+0A8h+var_90]; int mov rsi, r14; int call _ZN9PhiloxRNG6uint32ERKSt6vectorImSaImEE; PhiloxRNG::uint32(std::vector<ulong> const&) lea rdi, [rsp+0A8h+var_48] lea rdx, [rsp+0A8h+var_60] lea rcx, [rsp+0A8h+var_78] mov rsi, r14 mov r8d, 0Ah call _ZN9PhiloxRNG10philox4_32ERSt6vectorIS0_IjSaIjEESaIS2_EES5_i; PhiloxRNG::philox4_32(std::vector<std::vector<uint>> &,std::vector<std::vector<uint>> &,int) pxor xmm0, xmm0 movdqu xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 test ebp, ebp jz loc_3B133 xor r13d, r13d lea r12, [rsp+0A8h+var_9C] loc_3B055: mov rax, [rsp+0A8h+var_48] mov rcx, [rax] mov ecx, [rcx+r13*4] xorps xmm0, xmm0 cvtsi2ss xmm0, rcx mov rax, [rax+18h] mov ebp, [rax+r13*4] movss xmm1, dword ptr [r14+48h] movss xmm2, dword ptr [r14+4Ch] movss dword ptr [rsp+0A8h+var_98], xmm2 mulss xmm0, xmm1 mulss xmm1, cs:dword_BA010 addss xmm1, xmm0 xorps xmm0, xmm0 cvtss2sd xmm0, xmm1 call _log mulsd xmm0, cs:qword_BCAB8 ucomisd xmm0, cs:qword_BCAC0 jb short loc_3B0B7 sqrtsd xmm0, xmm0 jmp short loc_3B0BC loc_3B0B7: call _sqrt loc_3B0BC: xorps xmm1, xmm1 cvtsi2ss xmm1, rbp movss xmm2, dword ptr [rsp+0A8h+var_98] mulss xmm1, xmm2 mulss xmm2, cs:dword_BA010 addss xmm2, xmm1 cvtsd2ss xmm0, xmm0 cvtss2sd xmm0, xmm0 movsd [rsp+0A8h+var_98], xmm0 xorps xmm0, xmm0 cvtss2sd xmm0, xmm2 call _sin mulsd xmm0, [rsp+0A8h+var_98] cvtsd2ss xmm0, xmm0 movss [rsp+0A8h+var_9C], xmm0 mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_3B11C movss dword ptr [rsi], xmm0 add rsi, 4 mov [rbx+8], rsi jmp short loc_3B127 loc_3B11C: mov rdi, rbx mov rdx, r12 call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) loc_3B127: inc r13 cmp r15, r13 jnz loc_3B055 loc_3B133: lea rdi, [rsp+0A8h+var_48] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() lea rdi, [rsp+0A8h+var_78] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() mov rdi, [rsp+0A8h+var_90]; void * test rdi, rdi jz short loc_3B15E mov rsi, [rsp+0A8h+var_80] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3B15E: lea rdi, [rsp+0A8h+var_60] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() mov rax, rbx add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax jmp short loc_3B1CB mov r14, rax jmp short loc_3B1D5 mov r14, rax jmp short loc_3B1EC mov r14, rax mov rdi, [rsp+arg_10]; void * test rdi, rdi jz short loc_3B1F6 mov rsi, [rsp+arg_20] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3B1F6 mov r14, rax jmp short loc_3B1F6 mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_3B1C1 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3B1C1: lea rdi, [rsp+arg_58] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() loc_3B1CB: lea rdi, [rsp+arg_28] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() loc_3B1D5: mov rdi, [rsp+arg_10]; void * test rdi, rdi jz short loc_3B1EC mov rsi, [rsp+arg_20] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3B1EC: lea rdi, [rsp+arg_40] call _ZNSt6vectorIS_IjSaIjEESaIS1_EED2Ev; std::vector<std::vector<uint>>::~vector() loc_3B1F6: mov rdi, r14 call __Unwind_Resume
PhiloxRNG * PhiloxRNG::randn(PhiloxRNG *this, long long a2, unsigned int a3) { long long v5; // r15 long long v6; // rax int v7; // ecx __m128i si128; // xmm2 __m128i v9; // xmm3 long long v10; // rsi __m128i v11; // xmm1 __m128i v12; // xmm0 __m128i v13; // xmm5 __m128i v14; // xmm6 __m128i v15; // xmm7 __m128i v16; // xmm6 __m128i v17; // xmm6 __m128i v18; // xmm7 __m128i v19; // xmm6 long long v20; // rax __m128i v21; // xmm2 long long v22; // rdx __m128i v23; // xmm4 __m128i v24; // xmm5 __m128i v25; // xmm6 __m128i v26; // xmm5 int v27; // ecx int v28; // r8d int v29; // r9d long long v30; // r13 int v31; // ecx int v32; // ebp float v33; // xmm1_4 double v34; // xmm0_8 double v35; // xmm0_8 float v36; // xmm2_4 float v37; // xmm0_4 double v38; // xmm0_8 float v39; // xmm0_4 float *v40; // rsi void *v42; // [rsp+0h] [rbp-A8h] int v43; // [rsp+8h] [rbp-A0h] float v44; // [rsp+Ch] [rbp-9Ch] BYREF double v45; // [rsp+10h] [rbp-98h] void *v46[2]; // [rsp+18h] [rbp-90h] BYREF long long v47; // [rsp+28h] [rbp-80h] int v48[6]; // [rsp+30h] [rbp-78h] BYREF _QWORD v49[3]; // [rsp+48h] [rbp-60h] BYREF _QWORD v50[9]; // [rsp+60h] [rbp-48h] BYREF v5 = a3; v48[0] = 0; std::vector<unsigned int>::vector(v46, a3, v48, v50); std::vector<std::vector<unsigned int>>::vector(v49, 4LL, v46, &v44); if ( v46[0] ) operator delete(v46[0], v47 - (unsigned long long)v46[0]); if ( a3 ) { v6 = *(_QWORD *)v49[0]; v7 = *(_DWORD *)(a2 + 16); si128 = _mm_load_si128((const __m128i *)&xmmword_BA0B0); v9 = _mm_load_si128((const __m128i *)&xmmword_BA0C0); v10 = 0LL; v11 = _mm_load_si128((const __m128i *)&xmmword_BA0D0); v12 = _mm_xor_si128(_mm_shuffle_epi32((__m128i)(unsigned long long)(v5 - 1), 68), v11); v13 = _mm_load_si128((const __m128i *)&xmmword_BCA50); do { v14 = _mm_xor_si128(v9, v11); v15 = _mm_cmpgt_epi32(v14, v12); v16 = _mm_or_si128( _mm_shuffle_epi32(v15, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v14, v12), 245), v15)); if ( (~_mm_cvtsi128_si32(v16) & 1) != 0 ) *(_DWORD *)(v6 + v10) = v7; if ( (_mm_extract_epi16(_mm_xor_si128(v16, (__m128i)-1LL), 4) & 1) != 0 ) *(_DWORD *)(v6 + v10 + 4) = v7; v17 = _mm_xor_si128(si128, v11); v18 = _mm_cmpgt_epi32(v17, v12); v19 = _mm_xor_si128( _mm_or_si128( _mm_shuffle_epi32(v18, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v12), 245), v18)), (__m128i)-1LL); if ( (_mm_extract_epi16(v19, 0) & 1) != 0 ) *(_DWORD *)(v6 + v10 + 8) = v7; if ( (_mm_extract_epi16(v19, 4) & 1) != 0 ) *(_DWORD *)(v6 + v10 + 12) = v7; v9 = _mm_add_epi64(v9, v13); si128 = _mm_add_epi64(si128, v13); v10 += 16LL; } while ( ((4 * v5 + 12) & 0xFFFFFFFFFFFFFFF0LL) != v10 ); v20 = *(_QWORD *)(v49[0] + 48LL); v21 = _mm_load_si128((const __m128i *)&xmmword_BA0C0); v22 = 0LL; v23 = _mm_load_si128((const __m128i *)&xmmword_BCA60); do { v24 = _mm_xor_si128(v21, v11); v25 = _mm_cmpgt_epi32(v24, v12); v26 = _mm_or_si128( _mm_shuffle_epi32(v25, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v24, v12), 245), v25)); if ( (~_mm_cvtsi128_si32(v26) & 1) != 0 ) *(_DWORD *)(v20 + 4 * v22) = v22; if ( (_mm_extract_epi16(_mm_xor_si128(v26, (__m128i)-1LL), 4) & 1) != 0 ) *(_DWORD *)(v20 + 4 * v22 + 4) = v22 + 1; v22 += 2LL; v21 = _mm_add_epi64(v21, v23); } while ( ((v5 + 1) & 0xFFFFFFFFFFFFFFFELL) != v22 ); } ++*(_DWORD *)(a2 + 16); std::vector<unsigned long>::vector(v46, v5, a2 + 8, v48); PhiloxRNG::uint32((int)v48, a2, (int)v46, v27, v28, v29, v42, v43, *(long long *)&v45); PhiloxRNG::philox4_32(v50, a2, v49, v48, 10LL); *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = 0LL; if ( a3 ) { v30 = 0LL; do { v31 = *(_DWORD *)(*(_QWORD *)v50[0] + 4 * v30); v32 = *(_DWORD *)(*(_QWORD *)(v50[0] + 24LL) + 4 * v30); v33 = *(float *)(a2 + 72); LODWORD(v45) = *(_DWORD *)(a2 + 76); v34 = log((float)((float)(v33 * 0.5) + (float)((float)v31 * v33))) * -2.0; if ( v34 < 0.0 ) v35 = sqrt(v34); else v35 = sqrt(v34); v36 = (float)(*(float *)&v45 * 0.5) + (float)((float)v32 * *(float *)&v45); v37 = v35; v45 = v37; v38 = sin(v36); v39 = v38 * v45; v44 = v39; v40 = (float *)*((_QWORD *)this + 1); if ( v40 == *((float **)this + 2) ) { std::vector<float>::_M_realloc_insert<float>((long long *)this, (long long)v40, &v44); } else { *v40 = v39; *((_QWORD *)this + 1) = v40 + 1; } ++v30; } while ( v5 != v30 ); } std::vector<std::vector<unsigned int>>::~vector(v50); std::vector<std::vector<unsigned int>>::~vector(v48); if ( v46[0] ) operator delete(v46[0], v47 - (unsigned long long)v46[0]); std::vector<std::vector<unsigned int>>::~vector(v49); return this; }
47,638
my_cset_init_8bit
eloqsql/strings/ctype-simple.c
static my_bool my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { cs->state|= my_8bit_charset_flags_from_data(cs); cs->caseup_multiply= 1; cs->casedn_multiply= 1; cs->pad_char= ' '; if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni) return TRUE; return create_fromuni(cs, loader); }
O0
c
my_cset_init_8bit: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x4e670 movl %eax, %ecx movq -0x10(%rbp), %rax orl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x94(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x95(%rax) movq -0x10(%rbp), %rax movb $0x20, 0xb0(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x4f432 movq -0x10(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x4f432 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x4f432 movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x4f438 movb $0x1, -0x1(%rbp) jmp 0x4f448 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x4f520 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_cset_init_8bit: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] call my_8bit_charset_flags_from_data mov ecx, eax mov rax, [rbp+var_10] or ecx, [rax+0Ch] mov [rax+0Ch], ecx mov rax, [rbp+var_10] mov byte ptr [rax+94h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+95h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+0B0h], 20h ; ' ' mov rax, [rbp+var_10] cmp qword ptr [rax+48h], 0 jz short loc_4F432 mov rax, [rbp+var_10] cmp qword ptr [rax+50h], 0 jz short loc_4F432 mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz short loc_4F432 mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_4F438 loc_4F432: mov [rbp+var_1], 1 jmp short loc_4F448 loc_4F438: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call create_fromuni mov [rbp+var_1], al loc_4F448: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_cset_init_8bit(long long a1, long long a2) { *(_DWORD *)(a1 + 12) |= my_8bit_charset_flags_from_data(a1); *(_BYTE *)(a1 + 148) = 1; *(_BYTE *)(a1 + 149) = 1; *(_BYTE *)(a1 + 176) = 32; if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && *(_QWORD *)(a1 + 64) && *(_QWORD *)(a1 + 104) ) return create_fromuni(a1, a2); else return 1; }
my_cset_init_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014e670 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] OR ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x94],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x95],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xb0],0x20 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x48],0x0 JZ 0x0014f432 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x50],0x0 JZ 0x0014f432 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0014f432 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x0014f438 LAB_0014f432: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014f448 LAB_0014f438: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0014f520 MOV byte ptr [RBP + -0x1],AL LAB_0014f448: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_cset_init_8bit(long param_1,int8 param_2) { uint uVar1; int1 local_9; uVar1 = my_8bit_charset_flags_from_data(param_1); *(uint *)(param_1 + 0xc) = uVar1 | *(uint *)(param_1 + 0xc); *(int1 *)(param_1 + 0x94) = 1; *(int1 *)(param_1 + 0x95) = 1; *(int1 *)(param_1 + 0xb0) = 0x20; if ((((*(long *)(param_1 + 0x48) == 0) || (*(long *)(param_1 + 0x50) == 0)) || (*(long *)(param_1 + 0x40) == 0)) || (*(long *)(param_1 + 0x68) == 0)) { local_9 = 1; } else { local_9 = create_fromuni(param_1,param_2); } return local_9; }
47,639
google::protobuf::GeneratedCodeInfo_Annotation::Clear()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void GeneratedCodeInfo_Annotation::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo.Annotation) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.path_.Clear(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { _impl_.source_file_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000006u) { ::memset(&_impl_.begin_, 0, static_cast<size_t>( reinterpret_cast<char*>(&_impl_.end_) - reinterpret_cast<char*>(&_impl_.begin_)) + sizeof(_impl_.end_)); } _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); }
O0
cpp
google::protobuf::GeneratedCodeInfo_Annotation::Clear(): subq $0x58, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x0, 0x1c(%rsp) addq $0x10, %rdi addq $0x8, %rdi callq 0x183ef0 movq 0x10(%rsp), %rax addq $0x10, %rax movq %rax, 0x40(%rsp) movl $0x0, 0x3c(%rsp) movq 0x40(%rsp), %rax movslq 0x3c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x2d7c2d movq 0x10(%rsp), %rdi addq $0x10, %rdi addq $0x20, %rdi callq 0x2de2a0 movl 0x1c(%rsp), %eax andl $0x6, %eax cmpl $0x0, %eax je 0x2d7c6a movq 0x10(%rsp), %rax movq %rax, %rdi addq $0x10, %rdi addq $0x28, %rdi movq %rax, %rdx addq $0x10, %rdx addq $0x2c, %rdx addq $0x10, %rax addq $0x28, %rax subq %rax, %rdx addq $0x4, %rdx xorl %esi, %esi callq 0x8db70 movq 0x10(%rsp), %rax addq $0x10, %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi xorl %esi, %esi movl $0x4, %edx callq 0x8db70 movq 0x10(%rsp), %rax addq $0x8, %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0x2d7ccc movq 0x8(%rsp), %rdi callq 0x155740 addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf28GeneratedCodeInfo_Annotation5ClearEv: sub rsp, 58h mov [rsp+58h+var_38], rdi mov rdi, [rsp+58h+var_38] mov [rsp+58h+var_48], rdi mov [rsp+58h+var_3C], 0 add rdi, 10h add rdi, 8 call _ZN6google8protobuf13RepeatedFieldIiE5ClearEv; google::protobuf::RepeatedField<int>::Clear(void) mov rax, [rsp+58h+var_48] add rax, 10h mov [rsp+58h+var_18], rax mov [rsp+58h+var_1C], 0 mov rax, [rsp+58h+var_18] movsxd rcx, [rsp+58h+var_1C] mov eax, [rax+rcx*4] mov [rsp+58h+var_3C], eax mov eax, [rsp+58h+var_3C] and eax, 1 cmp eax, 0 jz short loc_2D7C2D mov rdi, [rsp+58h+var_48] add rdi, 10h add rdi, 20h ; ' '; this call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void) loc_2D7C2D: mov eax, [rsp+58h+var_3C] and eax, 6 cmp eax, 0 jz short loc_2D7C6A mov rax, [rsp+58h+var_48] mov rdi, rax add rdi, 10h add rdi, 28h ; '(' mov rdx, rax add rdx, 10h add rdx, 2Ch ; ',' add rax, 10h add rax, 28h ; '(' sub rdx, rax add rdx, 4 xor esi, esi call _memset loc_2D7C6A: mov rax, [rsp+58h+var_48] add rax, 10h mov [rsp+58h+var_10], rax mov rdi, [rsp+58h+var_10] xor esi, esi mov edx, 4 call _memset mov rax, [rsp+58h+var_48] add rax, 8 mov [rsp+58h+var_30], rax mov rax, [rsp+58h+var_30] mov [rsp+58h+var_50], rax mov [rsp+58h+var_28], rax mov rax, [rsp+58h+var_28] mov [rsp+58h+var_8], rax mov rax, [rsp+58h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_2D7CCC mov rdi, [rsp+58h+var_50]; void * call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void) loc_2D7CCC: add rsp, 58h retn
long long google::protobuf::GeneratedCodeInfo_Annotation::Clear( google::protobuf::GeneratedCodeInfo_Annotation *this) { long long result; // rax int v2; // [rsp+1Ch] [rbp-3Ch] google::protobuf::RepeatedField<int>::Clear((_DWORD *)this + 6); v2 = *((_DWORD *)this + 4); if ( (v2 & 1) != 0 ) google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::GeneratedCodeInfo_Annotation *)((char *)this + 48)); if ( (v2 & 6) != 0 ) memset((char *)this + 56, 0LL, 8LL); memset((char *)this + 16, 0LL, 4LL); result = *((_QWORD *)this + 1) & 1LL; if ( result ) return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8); return result; }
TransferTree: SUB RSP,0x78 MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x60],RDX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x002d48b0 MOV qword ptr [RSP + 0x50],RAX LAB_002d7bff: LEA RDI,[RSP + 0x50] CALL 0x002d4b40 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x40] CALL 0x002d7fe0 MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x48] CALL 0x002d6b00 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX CALL 0x002d5cb0 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x002d48e0 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x8] MOV RCX,RAX LEA RDI,[RSP + 0x20] CALL 0x002d71c0 LEA RDI,[RSP + 0x50] CALL 0x002d4900 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x002d4990 MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x18],RAX LEA RSI,[RSP + 0x18] CALL 0x001944f0 TEST AL,0x1 JNZ 0x002d7bff MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x58] CALL 0x002d49c0 ADD RSP,0x78 RET
/* google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::TransferTree(void* const*, unsigned long) */ void __thiscall google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap:: TransferTree(InnerMap *this,void **param_1,ulong param_2) { int8 *puVar1; MapKey *pMVar2; _Rb_tree_iterator *p_Var3; ulong uVar4; int8 local_60; int1 local_58 [24]; int8 local_40; int8 local_38; int8 local_30; int8 local_28; map<std::reference_wrapper<google::protobuf::MapKey_const>,void*,std::less<google::protobuf::MapKey>,google::protobuf::internal::MapAllocator<std::pair<std::reference_wrapper<google::protobuf::MapKey_const>const,void*>>> *local_20; ulong local_18; void **local_10; InnerMap *local_8; local_20 = (map<std::reference_wrapper<google::protobuf::MapKey_const>,void*,std::less<google::protobuf::MapKey>,google::protobuf::internal::MapAllocator<std::pair<std::reference_wrapper<google::protobuf::MapKey_const>const,void*>>> *)param_1[param_2]; local_18 = param_2; local_10 = param_1; local_8 = this; local_28 = std:: map<std::reference_wrapper<google::protobuf::MapKey_const>,void*,std::less<google::protobuf::MapKey>,google::protobuf::internal::MapAllocator<std::pair<std::reference_wrapper<google::protobuf::MapKey_const>const,void*>>> ::begin(local_20); do { puVar1 = (int8 *) std:: _Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey_const>const,void*>> ::operator->((_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey_const>const,void*>> *)&local_28); local_38 = *puVar1; local_30 = std::cref<google::protobuf::MapKey_const>(local_38); pMVar2 = (MapKey *) std::reference_wrapper<google::protobuf::MapKey_const>::get ((reference_wrapper<google::protobuf::MapKey_const> *)&local_30); BucketNumber<google::protobuf::MapKey>(this,pMVar2); local_40 = local_28; NodeFromTreeIterator(local_28); InsertUnique((ulong)local_58,(Node *)this); p_Var3 = (_Rb_tree_iterator *) std:: _Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey_const>const,void*>> ::operator++((_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey_const>const,void*>> *)&local_28); local_60 = std:: map<std::reference_wrapper<google::protobuf::MapKey_const>,void*,std::less<google::protobuf::MapKey>,google::protobuf::internal::MapAllocator<std::pair<std::reference_wrapper<google::protobuf::MapKey_const>const,void*>>> ::end(local_20); uVar4 = std::operator!=(p_Var3,(_Rb_tree_iterator *)&local_60); } while ((uVar4 & 1) != 0); DestroyTree(this,(map *)local_20); return; }
47,640
unpack_fields
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MYSQL_FIELD * unpack_fields(const MYSQL *mysql, MYSQL_DATA *data, MA_MEM_ROOT *alloc, uint fields, my_bool default_value) { MYSQL_ROWS *row; MYSQL_FIELD *field,*result; char *p; unsigned int i, field_count= sizeof(rset_field_offsets)/sizeof(size_t)/2; field=result=(MYSQL_FIELD*) ma_alloc_root(alloc,sizeof(MYSQL_FIELD)*fields); if (!result) return(0); for (row=data->data; row ; row = row->next,field++) { if (field >= result + fields) goto error; for (i=0; i < field_count; i++) { uint length= (uint)(row->data[i+1] - row->data[i] - 1); if (!row->data[i] && row->data[i][length]) goto error; *(char **)(((char *)field) + rset_field_offsets[i*2])= ma_strdup_root(alloc, (char *)row->data[i]); *(unsigned int *)(((char *)field) + rset_field_offsets[i*2+1])= length; } field->extension= NULL; if (ma_has_extended_type_info(mysql)) { if (row->data[i+1] - row->data[i] > 1) { size_t len= row->data[i+1] - row->data[i] - 1; MA_FIELD_EXTENSION *ext= new_ma_field_extension(alloc); if ((field->extension= ext)) ma_field_extension_init_type_info(alloc, ext, row->data[i], len); } i++; } p= (char *)row->data[i]; /* filler */ field->charsetnr= uint2korr(p); p+= 2; field->length= (uint) uint4korr(p); p+= 4; field->type= (enum enum_field_types)uint1korr(p); p++; field->flags= uint2korr(p); p+= 2; field->decimals= (uint) p[0]; p++; /* filler */ p+= 2; if (INTERNAL_NUM_FIELD(field)) field->flags|= NUM_FLAG; i++; /* This is used by deprecated function mysql_list_fields only, however the reported length is not correct, so we always zero it */ if (default_value && row->data[i]) field->def=ma_strdup_root(alloc,(char*) row->data[i]); else field->def=0; field->def_length= 0; field->max_length= 0; } if (field < result + fields) goto error; free_rows(data); /* Free old data */ return(result); error: free_rows(data); ma_free_root(alloc, MYF(0)); return(0); }
O0
c
unpack_fields: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movb %r8b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movb %al, -0x25(%rbp) movl $0x6, -0x50(%rbp) movq -0x20(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %esi shlq $0x7, %rsi callq 0x29040 movq %rax, -0x40(%rbp) movq %rax, -0x38(%rbp) cmpq $0x0, -0x40(%rbp) jne 0x1e3e2 movq $0x0, -0x8(%rbp) jmp 0x1e7d3 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x1e78b movq -0x38(%rbp), %rax movq -0x40(%rbp), %rcx movl -0x24(%rbp), %edx shlq $0x7, %rdx addq %rdx, %rcx cmpq %rcx, %rax jb 0x1e414 jmp 0x1e7b7 movl $0x0, -0x4c(%rbp) movl -0x4c(%rbp), %eax cmpl -0x50(%rbp), %eax jae 0x1e4ec movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx addl $0x1, %ecx movl %ecx, %ecx movq (%rax,%rcx,8), %rax movq -0x30(%rbp), %rcx movq 0x8(%rcx), %rcx movl -0x4c(%rbp), %edx movq (%rcx,%rdx,8), %rcx subq %rcx, %rax subq $0x1, %rax movl %eax, -0x54(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx cmpq $0x0, (%rax,%rcx,8) jne 0x1e486 movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx movq (%rax,%rcx,8), %rax movl -0x54(%rbp), %ecx movsbl (%rax,%rcx), %eax cmpl $0x0, %eax je 0x1e486 jmp 0x1e7b7 movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx movq (%rax,%rcx,8), %rsi callq 0x293b0 movq %rax, %rdx movq -0x38(%rbp), %rax movl -0x4c(%rbp), %ecx shll %ecx movl %ecx, %ecx movl %ecx, %esi leaq 0x4552b(%rip), %rcx # 0x639e0 movq (%rcx,%rsi,8), %rcx movq %rdx, (%rax,%rcx) movl -0x54(%rbp), %edx movq -0x38(%rbp), %rax movl -0x4c(%rbp), %ecx shll %ecx addl $0x1, %ecx movl %ecx, %ecx movl %ecx, %esi leaq 0x45509(%rip), %rcx # 0x639e0 movq (%rcx,%rsi,8), %rcx movl %edx, (%rax,%rcx) movl -0x4c(%rbp), %eax addl $0x1, %eax movl %eax, -0x4c(%rbp) jmp 0x1e41b movq -0x38(%rbp), %rax movq $0x0, 0x78(%rax) movq -0x10(%rbp), %rdi callq 0x1e7e0 cmpb $0x0, %al je 0x1e5ad movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx addl $0x1, %ecx movl %ecx, %ecx movq (%rax,%rcx,8), %rax movq -0x30(%rbp), %rcx movq 0x8(%rcx), %rcx movl -0x4c(%rbp), %edx movq (%rcx,%rdx,8), %rcx subq %rcx, %rax cmpq $0x1, %rax jle 0x1e5a4 movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx addl $0x1, %ecx movl %ecx, %ecx movq (%rax,%rcx,8), %rax movq -0x30(%rbp), %rcx movq 0x8(%rcx), %rcx movl -0x4c(%rbp), %edx movq (%rcx,%rdx,8), %rcx subq %rcx, %rax subq $0x1, %rax movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rdi callq 0x1e1f0 movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax movq -0x38(%rbp), %rcx movq %rax, 0x78(%rcx) cmpq $0x0, %rax je 0x1e5a2 movq -0x20(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx movq (%rax,%rcx,8), %rdx movq -0x60(%rbp), %rcx callq 0x1e810 jmp 0x1e5a4 movl -0x4c(%rbp), %eax addl $0x1, %eax movl %eax, -0x4c(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x48(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x6c(%rax) movq -0x48(%rbp), %rax addq $0x2, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movzbl (%rax), %eax movq -0x48(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x48(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x48(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x18, %ecx addl %ecx, %eax movl %eax, %eax movl %eax, %ecx movq -0x38(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x48(%rbp), %rax addq $0x4, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movzbl (%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x70(%rax) movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x48(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x64(%rax) movq -0x48(%rbp), %rax addq $0x2, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movsbl (%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x68(%rax) movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax addq $0x2, %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rax cmpl $0x9, 0x70(%rax) ja 0x1e6d0 movq -0x38(%rbp), %rax cmpl $0x7, 0x70(%rax) jne 0x1e6f1 movq -0x38(%rbp), %rax cmpq $0xe, 0x38(%rax) je 0x1e6f1 movq -0x38(%rbp), %rax cmpq $0x8, 0x38(%rax) je 0x1e6f1 movq -0x38(%rbp), %rax cmpl $0xd, 0x70(%rax) je 0x1e6f1 movq -0x38(%rbp), %rax cmpl $0xf6, 0x70(%rax) je 0x1e6f1 movq -0x38(%rbp), %rax cmpl $0x0, 0x70(%rax) jne 0x1e701 movq -0x38(%rbp), %rax movl 0x64(%rax), %ecx orl $0x8000, %ecx # imm = 0x8000 movl %ecx, 0x64(%rax) movl -0x4c(%rbp), %eax addl $0x1, %eax movl %eax, -0x4c(%rbp) movsbl -0x25(%rbp), %eax cmpl $0x0, %eax je 0x1e74a movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx cmpq $0x0, (%rax,%rcx,8) je 0x1e74a movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movl -0x4c(%rbp), %ecx movq (%rax,%rcx,8), %rsi callq 0x293b0 movq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x30(%rax) jmp 0x1e756 movq -0x38(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x38(%rbp), %rax movl $0x0, 0x60(%rax) movq -0x38(%rbp), %rax movq $0x0, 0x40(%rax) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax addq $0x80, %rax movq %rax, -0x38(%rbp) jmp 0x1e3ed movq -0x38(%rbp), %rax movq -0x40(%rbp), %rcx movl -0x24(%rbp), %edx shlq $0x7, %rdx addq %rdx, %rcx cmpq %rcx, %rax jae 0x1e7a4 jmp 0x1e7b7 movq -0x18(%rbp), %rdi callq 0x1aaa0 movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x1e7d3 movq -0x18(%rbp), %rdi callq 0x1aaa0 movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0x292a0 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopl (%rax)
unpack_fields: push rbp mov rbp, rsp sub rsp, 70h mov al, r8b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_25], al mov [rbp+var_50], 6 mov rdi, [rbp+var_20] mov eax, [rbp+var_24] mov esi, eax shl rsi, 7 call ma_alloc_root mov [rbp+var_40], rax mov [rbp+var_38], rax cmp [rbp+var_40], 0 jnz short loc_1E3E2 mov [rbp+var_8], 0 jmp loc_1E7D3 loc_1E3E2: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_30], rax loc_1E3ED: cmp [rbp+var_30], 0 jz loc_1E78B mov rax, [rbp+var_38] mov rcx, [rbp+var_40] mov edx, [rbp+var_24] shl rdx, 7 add rcx, rdx cmp rax, rcx jb short loc_1E414 jmp loc_1E7B7 loc_1E414: mov [rbp+var_4C], 0 loc_1E41B: mov eax, [rbp+var_4C] cmp eax, [rbp+var_50] jnb loc_1E4EC mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] add ecx, 1 mov ecx, ecx mov rax, [rax+rcx*8] mov rcx, [rbp+var_30] mov rcx, [rcx+8] mov edx, [rbp+var_4C] mov rcx, [rcx+rdx*8] sub rax, rcx sub rax, 1 mov [rbp+var_54], eax mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] cmp qword ptr [rax+rcx*8], 0 jnz short loc_1E486 mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] mov rax, [rax+rcx*8] mov ecx, [rbp+var_54] movsx eax, byte ptr [rax+rcx] cmp eax, 0 jz short loc_1E486 jmp loc_1E7B7 loc_1E486: mov rdi, [rbp+var_20] mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] mov rsi, [rax+rcx*8] call ma_strdup_root mov rdx, rax mov rax, [rbp+var_38] mov ecx, [rbp+var_4C] shl ecx, 1 mov ecx, ecx mov esi, ecx lea rcx, rset_field_offsets mov rcx, [rcx+rsi*8] mov [rax+rcx], rdx mov edx, [rbp+var_54] mov rax, [rbp+var_38] mov ecx, [rbp+var_4C] shl ecx, 1 add ecx, 1 mov ecx, ecx mov esi, ecx lea rcx, rset_field_offsets mov rcx, [rcx+rsi*8] mov [rax+rcx], edx mov eax, [rbp+var_4C] add eax, 1 mov [rbp+var_4C], eax jmp loc_1E41B loc_1E4EC: mov rax, [rbp+var_38] mov qword ptr [rax+78h], 0 mov rdi, [rbp+var_10] call ma_has_extended_type_info cmp al, 0 jz loc_1E5AD mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] add ecx, 1 mov ecx, ecx mov rax, [rax+rcx*8] mov rcx, [rbp+var_30] mov rcx, [rcx+8] mov edx, [rbp+var_4C] mov rcx, [rcx+rdx*8] sub rax, rcx cmp rax, 1 jle short loc_1E5A4 mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] add ecx, 1 mov ecx, ecx mov rax, [rax+rcx*8] mov rcx, [rbp+var_30] mov rcx, [rcx+8] mov edx, [rbp+var_4C] mov rcx, [rcx+rdx*8] sub rax, rcx sub rax, 1 mov [rbp+var_60], rax mov rdi, [rbp+var_20] call new_ma_field_extension mov [rbp+var_68], rax mov rax, [rbp+var_68] mov rcx, [rbp+var_38] mov [rcx+78h], rax cmp rax, 0 jz short loc_1E5A2 mov rdi, [rbp+var_20] mov rsi, [rbp+var_68] mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] mov rdx, [rax+rcx*8] mov rcx, [rbp+var_60] call ma_field_extension_init_type_info loc_1E5A2: jmp short $+2 loc_1E5A4: mov eax, [rbp+var_4C] add eax, 1 mov [rbp+var_4C], eax loc_1E5AD: mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] mov rax, [rax+rcx*8] mov [rbp+var_48], rax mov rax, [rbp+var_48] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_38] mov [rax+6Ch], ecx mov rax, [rbp+var_48] add rax, 2 mov [rbp+var_48], rax mov rax, [rbp+var_48] movzx eax, byte ptr [rax] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+3] shl ecx, 18h add eax, ecx mov eax, eax mov ecx, eax mov rax, [rbp+var_38] mov [rax+38h], rcx mov rax, [rbp+var_48] add rax, 4 mov [rbp+var_48], rax mov rax, [rbp+var_48] movzx ecx, byte ptr [rax] mov rax, [rbp+var_38] mov [rax+70h], ecx mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_48] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_38] mov [rax+64h], ecx mov rax, [rbp+var_48] add rax, 2 mov [rbp+var_48], rax mov rax, [rbp+var_48] movsx ecx, byte ptr [rax] mov rax, [rbp+var_38] mov [rax+68h], ecx mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_48] add rax, 2 mov [rbp+var_48], rax mov rax, [rbp+var_38] cmp dword ptr [rax+70h], 9 ja short loc_1E6D0 mov rax, [rbp+var_38] cmp dword ptr [rax+70h], 7 jnz short loc_1E6F1 mov rax, [rbp+var_38] cmp qword ptr [rax+38h], 0Eh jz short loc_1E6F1 mov rax, [rbp+var_38] cmp qword ptr [rax+38h], 8 jz short loc_1E6F1 loc_1E6D0: mov rax, [rbp+var_38] cmp dword ptr [rax+70h], 0Dh jz short loc_1E6F1 mov rax, [rbp+var_38] cmp dword ptr [rax+70h], 0F6h jz short loc_1E6F1 mov rax, [rbp+var_38] cmp dword ptr [rax+70h], 0 jnz short loc_1E701 loc_1E6F1: mov rax, [rbp+var_38] mov ecx, [rax+64h] or ecx, 8000h mov [rax+64h], ecx loc_1E701: mov eax, [rbp+var_4C] add eax, 1 mov [rbp+var_4C], eax movsx eax, [rbp+var_25] cmp eax, 0 jz short loc_1E74A mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] cmp qword ptr [rax+rcx*8], 0 jz short loc_1E74A mov rdi, [rbp+var_20] mov rax, [rbp+var_30] mov rax, [rax+8] mov ecx, [rbp+var_4C] mov rsi, [rax+rcx*8] call ma_strdup_root mov rcx, rax mov rax, [rbp+var_38] mov [rax+30h], rcx jmp short loc_1E756 loc_1E74A: mov rax, [rbp+var_38] mov qword ptr [rax+30h], 0 loc_1E756: mov rax, [rbp+var_38] mov dword ptr [rax+60h], 0 mov rax, [rbp+var_38] mov qword ptr [rax+40h], 0 mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_38] add rax, 80h mov [rbp+var_38], rax jmp loc_1E3ED loc_1E78B: mov rax, [rbp+var_38] mov rcx, [rbp+var_40] mov edx, [rbp+var_24] shl rdx, 7 add rcx, rdx cmp rax, rcx jnb short loc_1E7A4 jmp short loc_1E7B7 loc_1E7A4: mov rdi, [rbp+var_18] call free_rows mov rax, [rbp+var_40] mov [rbp+var_8], rax jmp short loc_1E7D3 loc_1E7B7: mov rdi, [rbp+var_18] call free_rows mov rdi, [rbp+var_20] xor esi, esi call ma_free_root mov [rbp+var_8], 0 loc_1E7D3: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long unpack_fields(long long a1, _QWORD *a2, long long a3, unsigned int a4, char a5) { long long v6; // [rsp+8h] [rbp-68h] long long v7; // [rsp+10h] [rbp-60h] unsigned int v8; // [rsp+1Ch] [rbp-54h] unsigned int i; // [rsp+24h] [rbp-4Ch] unsigned int v10; // [rsp+24h] [rbp-4Ch] unsigned __int8 *v11; // [rsp+28h] [rbp-48h] long long v12; // [rsp+30h] [rbp-40h] unsigned long long v13; // [rsp+38h] [rbp-38h] _QWORD *v14; // [rsp+40h] [rbp-30h] v12 = ma_alloc_root(a3, (unsigned long long)a4 << 7); v13 = v12; if ( !v12 ) return 0LL; v14 = (_QWORD *)*a2; while ( v14 ) { if ( v13 >= ((unsigned long long)a4 << 7) + v12 ) goto LABEL_31; for ( i = 0; i < 6; ++i ) { v8 = *(_QWORD *)(v14[1] + 8LL * (i + 1)) - *(_QWORD *)(v14[1] + 8LL * i) - 1; if ( !*(_QWORD *)(v14[1] + 8LL * i) && *(_BYTE *)(*(_QWORD *)(v14[1] + 8LL * i) + v8) ) goto LABEL_31; *(_QWORD *)(v13 + rset_field_offsets[2 * i]) = ma_strdup_root(a3, *(_QWORD *)(v14[1] + 8LL * i)); *(_DWORD *)(v13 + rset_field_offsets[2 * i + 1]) = v8; } *(_QWORD *)(v13 + 120) = 0LL; if ( (unsigned __int8)ma_has_extended_type_info(a1) ) { if ( (long long)(*(_QWORD *)(v14[1] + 8LL * (i + 1)) - *(_QWORD *)(v14[1] + 8LL * i)) > 1 ) { v7 = *(_QWORD *)(v14[1] + 8LL * (i + 1)) - *(_QWORD *)(v14[1] + 8LL * i) - 1LL; v6 = new_ma_field_extension(a3); *(_QWORD *)(v13 + 120) = v6; if ( v6 ) ma_field_extension_init_type_info(a3, v6, *(_QWORD *)(v14[1] + 8LL * i), v7); } ++i; } v11 = *(unsigned __int8 **)(v14[1] + 8LL * i); *(_DWORD *)(v13 + 108) = (unsigned __int16)((v11[1] << 8) + *v11); v11 += 2; *(_QWORD *)(v13 + 56) = (v11[3] << 24) + (v11[2] << 16) + (v11[1] << 8) + (unsigned int)*v11; v11 += 4; *(_DWORD *)(v13 + 112) = *v11++; *(_DWORD *)(v13 + 100) = (unsigned __int16)((v11[1] << 8) + *v11); *(_DWORD *)(v13 + 104) = (char)v11[2]; if ( *(_DWORD *)(v13 + 112) <= 9u && (*(_DWORD *)(v13 + 112) != 7 || *(_QWORD *)(v13 + 56) == 14LL || *(_QWORD *)(v13 + 56) == 8LL) || *(_DWORD *)(v13 + 112) == 13 || *(_DWORD *)(v13 + 112) == 246 || !*(_DWORD *)(v13 + 112) ) { *(_DWORD *)(v13 + 100) |= 0x8000u; } v10 = i + 1; if ( a5 && *(_QWORD *)(v14[1] + 8LL * v10) ) *(_QWORD *)(v13 + 48) = ma_strdup_root(a3, *(_QWORD *)(v14[1] + 8LL * v10)); else *(_QWORD *)(v13 + 48) = 0LL; *(_DWORD *)(v13 + 96) = 0; *(_QWORD *)(v13 + 64) = 0LL; v14 = (_QWORD *)*v14; v13 += 128LL; } if ( v13 >= ((unsigned long long)a4 << 7) + v12 ) { free_rows((long long)a2); return v12; } LABEL_31: free_rows((long long)a2); ma_free_root(a3, 0LL); return 0LL; }
unpack_fields: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV AL,R8B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV byte ptr [RBP + -0x25],AL MOV dword ptr [RBP + -0x50],0x6 MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV ESI,EAX SHL RSI,0x7 CALL 0x00129040 MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x40],0x0 JNZ 0x0011e3e2 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011e7d3 LAB_0011e3e2: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX LAB_0011e3ed: CMP qword ptr [RBP + -0x30],0x0 JZ 0x0011e78b MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x24] SHL RDX,0x7 ADD RCX,RDX CMP RAX,RCX JC 0x0011e414 JMP 0x0011e7b7 LAB_0011e414: MOV dword ptr [RBP + -0x4c],0x0 LAB_0011e41b: MOV EAX,dword ptr [RBP + -0x4c] CMP EAX,dword ptr [RBP + -0x50] JNC 0x0011e4ec MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] ADD ECX,0x1 MOV ECX,ECX MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX + 0x8] MOV EDX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RCX + RDX*0x8] SUB RAX,RCX SUB RAX,0x1 MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] CMP qword ptr [RAX + RCX*0x8],0x0 JNZ 0x0011e486 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RBP + -0x54] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x0 JZ 0x0011e486 JMP 0x0011e7b7 LAB_0011e486: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] MOV RSI,qword ptr [RAX + RCX*0x8] CALL 0x001293b0 MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x4c] SHL ECX,0x1 MOV ECX,ECX MOV ESI,ECX LEA RCX,[0x1639e0] MOV RCX,qword ptr [RCX + RSI*0x8] MOV qword ptr [RAX + RCX*0x1],RDX MOV EDX,dword ptr [RBP + -0x54] MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x4c] SHL ECX,0x1 ADD ECX,0x1 MOV ECX,ECX MOV ESI,ECX LEA RCX,[0x1639e0] MOV RCX,qword ptr [RCX + RSI*0x8] MOV dword ptr [RAX + RCX*0x1],EDX MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,0x1 MOV dword ptr [RBP + -0x4c],EAX JMP 0x0011e41b LAB_0011e4ec: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x78],0x0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011e7e0 CMP AL,0x0 JZ 0x0011e5ad MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] ADD ECX,0x1 MOV ECX,ECX MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX + 0x8] MOV EDX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RCX + RDX*0x8] SUB RAX,RCX CMP RAX,0x1 JLE 0x0011e5a4 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] ADD ECX,0x1 MOV ECX,ECX MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX + 0x8] MOV EDX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RCX + RDX*0x8] SUB RAX,RCX SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0011e1f0 MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RCX + 0x78],RAX CMP RAX,0x0 JZ 0x0011e5a2 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RBP + -0x60] CALL 0x0011e810 LAB_0011e5a2: JMP 0x0011e5a4 LAB_0011e5a4: MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,0x1 MOV dword ptr [RBP + -0x4c],EAX LAB_0011e5ad: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x6c],ECX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x2 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x18 ADD EAX,ECX MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x4 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x70],ECX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x64],ECX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x2 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x68],ECX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x2 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x70],0x9 JA 0x0011e6d0 MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x70],0x7 JNZ 0x0011e6f1 MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + 0x38],0xe JZ 0x0011e6f1 MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + 0x38],0x8 JZ 0x0011e6f1 LAB_0011e6d0: MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x70],0xd JZ 0x0011e6f1 MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x70],0xf6 JZ 0x0011e6f1 MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x70],0x0 JNZ 0x0011e701 LAB_0011e6f1: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x64] OR ECX,0x8000 MOV dword ptr [RAX + 0x64],ECX LAB_0011e701: MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,0x1 MOV dword ptr [RBP + -0x4c],EAX MOVSX EAX,byte ptr [RBP + -0x25] CMP EAX,0x0 JZ 0x0011e74a MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0011e74a MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x4c] MOV RSI,qword ptr [RAX + RCX*0x8] CALL 0x001293b0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x30],RCX JMP 0x0011e756 LAB_0011e74a: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x30],0x0 LAB_0011e756: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x80 MOV qword ptr [RBP + -0x38],RAX JMP 0x0011e3ed LAB_0011e78b: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x24] SHL RDX,0x7 ADD RCX,RDX CMP RAX,RCX JNC 0x0011e7a4 JMP 0x0011e7b7 LAB_0011e7a4: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0011aaa0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX JMP 0x0011e7d3 LAB_0011e7b7: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0011aaa0 MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x001292a0 MOV qword ptr [RBP + -0x8],0x0 LAB_0011e7d3: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
ulong unpack_fields(int8 param_1,int8 *param_2,int8 param_3,uint param_4, char param_5) { long lVar1; long lVar2; byte *pbVar3; char cVar4; uint uVar5; int8 uVar6; long lVar7; uint local_54; ulong local_40; int8 *local_38; ulong local_10; local_10 = ma_alloc_root(param_3,(ulong)param_4 << 7); if (local_10 == 0) { local_10 = 0; } else { local_40 = local_10; for (local_38 = (int8 *)*param_2; local_38 != (int8 *)0x0; local_38 = (int8 *)*local_38) { if (local_10 + (ulong)param_4 * 0x80 <= local_40) goto LAB_0011e7b7; for (local_54 = 0; local_54 < 6; local_54 = local_54 + 1) { uVar5 = ((int)*(int8 *)(local_38[1] + (ulong)(local_54 + 1) * 8) - (int)*(int8 *)(local_38[1] + (ulong)local_54 * 8)) - 1; if ((*(long *)(local_38[1] + (ulong)local_54 * 8) == 0) && (*(char *)(*(long *)(local_38[1] + (ulong)local_54 * 8) + (ulong)uVar5) != '\0')) goto LAB_0011e7b7; uVar6 = ma_strdup_root(param_3,*(int8 *)(local_38[1] + (ulong)local_54 * 8)); *(int8 *)(local_40 + *(long *)(rset_field_offsets + (ulong)(local_54 << 1) * 8)) = uVar6; *(uint *)(local_40 + *(long *)(rset_field_offsets + (ulong)(local_54 * 2 + 1) * 8)) = uVar5; } *(int8 *)(local_40 + 0x78) = 0; cVar4 = ma_has_extended_type_info(param_1); if (cVar4 != '\0') { if (1 < *(long *)(local_38[1] + (ulong)(local_54 + 1) * 8) - *(long *)(local_38[1] + (ulong)local_54 * 8)) { lVar1 = *(long *)(local_38[1] + (ulong)(local_54 + 1) * 8); lVar2 = *(long *)(local_38[1] + (ulong)local_54 * 8); lVar7 = new_ma_field_extension(param_3); *(long *)(local_40 + 0x78) = lVar7; if (lVar7 != 0) { ma_field_extension_init_type_info (param_3,lVar7,*(int8 *)(local_38[1] + (ulong)local_54 * 8), (lVar1 - lVar2) + -1); } } local_54 = local_54 + 1; } pbVar3 = *(byte **)(local_38[1] + (ulong)local_54 * 8); *(uint *)(local_40 + 0x6c) = (uint)*pbVar3 + (uint)pbVar3[1] * 0x100 & 0xffff; *(ulong *)(local_40 + 0x38) = (ulong)((uint)pbVar3[2] + (uint)pbVar3[3] * 0x100 + (uint)pbVar3[4] * 0x10000 + (uint)pbVar3[5] * 0x1000000); *(uint *)(local_40 + 0x70) = (uint)pbVar3[6]; *(uint *)(local_40 + 100) = (uint)pbVar3[7] + (uint)pbVar3[8] * 0x100 & 0xffff; *(int *)(local_40 + 0x68) = (int)(char)pbVar3[9]; if (((*(uint *)(local_40 + 0x70) < 10) && (((*(int *)(local_40 + 0x70) != 7 || (*(long *)(local_40 + 0x38) == 0xe)) || (*(long *)(local_40 + 0x38) == 8)))) || (((*(int *)(local_40 + 0x70) == 0xd || (*(int *)(local_40 + 0x70) == 0xf6)) || (*(int *)(local_40 + 0x70) == 0)))) { *(uint *)(local_40 + 100) = *(uint *)(local_40 + 100) | 0x8000; } if ((param_5 == '\0') || (*(long *)(local_38[1] + (ulong)(local_54 + 1) * 8) == 0)) { *(int8 *)(local_40 + 0x30) = 0; } else { uVar6 = ma_strdup_root(param_3,*(int8 *)(local_38[1] + (ulong)(local_54 + 1) * 8)); *(int8 *)(local_40 + 0x30) = uVar6; } *(int4 *)(local_40 + 0x60) = 0; *(int8 *)(local_40 + 0x40) = 0; local_40 = local_40 + 0x80; } if (local_40 < local_10 + (ulong)param_4 * 0x80) { LAB_0011e7b7: free_rows(param_2); ma_free_root(param_3,0); local_10 = 0; } else { free_rows(param_2); } } return local_10; }
47,641
Tools::wide_ulen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
cosmotop/src/cosmotop_tools_shared.cpp
size_t wide_ulen(const string& str) { unsigned int chars = 0; try { std::wstring_convert<std::codecvt_utf8<wchar_t>> conv; auto w_str = conv.from_bytes((str.size() > 10000 ? str.substr(0, 10000).c_str() : str.c_str())); for (auto c : w_str) { chars += widechar_wcwidth(c); } } catch (...) { return ulen(str); } return chars; }
O0
cpp
Tools::wide_ulen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0xf8(%rsp) movl $0x0, 0xf4(%rsp) leaq 0x90(%rsp), %rdi callq 0xf6330 jmp 0xefad9 movq 0xf8(%rsp), %rdi callq 0x392f0 movb $0x0, 0x3f(%rsp) cmpq $0x2710, %rax # imm = 0x2710 jbe 0xefb26 movq 0xf8(%rsp), %rsi xorl %eax, %eax movl %eax, %edx leaq 0x40(%rsp), %rdi movl $0x2710, %ecx # imm = 0x2710 callq 0xc7230 jmp 0xefb10 movb $0x1, 0x3f(%rsp) leaq 0x40(%rsp), %rdi callq 0x392e0 movq %rax, 0x10(%rsp) jmp 0xefb38 movq 0xf8(%rsp), %rdi callq 0x392e0 movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdx leaq 0x60(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xf63f0 jmp 0xefb51 testb $0x1, 0x3f(%rsp) jne 0xefb5a jmp 0xefb64 leaq 0x40(%rsp), %rdi callq 0x332b0 leaq 0x60(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rdi callq 0xf6460 movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi callq 0xf64b0 movq %rax, 0x20(%rsp) leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0xf6510 xorb $-0x1, %al testb $0x1, %al jne 0xefba6 jmp 0xefc5b leaq 0x28(%rsp), %rdi callq 0xf6550 movl (%rax), %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %edi callq 0xefd10 movl %eax, 0xc(%rsp) jmp 0xefbc5 movl 0xc(%rsp), %eax addl 0xf4(%rsp), %eax movl %eax, 0xf4(%rsp) leaq 0x28(%rsp), %rdi callq 0xf6560 jmp 0xefb8c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xefc81 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xefc74 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) testb $0x1, 0x3f(%rsp) jne 0xefc2f jmp 0xefc39 leaq 0x40(%rsp), %rdi callq 0x332b0 jmp 0xefc74 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x60(%rsp), %rdi callq 0xf6580 jmp 0xefc74 leaq 0x60(%rsp), %rdi callq 0xf6580 leaq 0x90(%rsp), %rdi callq 0xf65c0 jmp 0xefcd3 leaq 0x90(%rsp), %rdi callq 0xf65c0 movq 0x88(%rsp), %rdi callq 0x160c0 movq 0xf8(%rsp), %rdi xorl %esi, %esi callq 0xf6600 movq %rax, (%rsp) jmp 0xefca3 movq (%rsp), %rax movq %rax, 0x100(%rsp) callq 0x16b90 jmp 0xefce2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) callq 0x16b90 jmp 0xefcd1 jmp 0xefcf2 movl 0xf4(%rsp), %eax movq %rax, 0x100(%rsp) movq 0x100(%rsp), %rax addq $0x108, %rsp # imm = 0x108 retq movq 0x88(%rsp), %rdi callq 0x16950 movq %rax, %rdi callq 0x37ff0 nopw (%rax,%rax)
_ZN5Tools9wide_ulenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 108h mov [rsp+108h+var_10], rdi mov [rsp+108h+var_14], 0 lea rdi, [rsp+108h+var_78]; int call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EEwSaIwESaIcEEC2Ev; std::wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>::wstring_convert(void) jmp short $+2 loc_EFAD9: mov rdi, [rsp+108h+var_10] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov [rsp+108h+var_C9], 0 cmp rax, 2710h jbe short loc_EFB26 mov rsi, [rsp+108h+var_10] xor eax, eax mov edx, eax lea rdi, [rsp+108h+var_C8] mov ecx, 2710h call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_EFB10: mov [rsp+108h+var_C9], 1 lea rdi, [rsp+108h+var_C8] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rsp+108h+var_F8], rax jmp short loc_EFB38 loc_EFB26: mov rdi, [rsp+108h+var_10] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rsp+108h+var_F8], rax loc_EFB38: mov rdx, [rsp+108h+var_F8] lea rdi, [rsp+108h+var_A8] lea rsi, [rsp+108h+var_78] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EEwSaIwESaIcEE10from_bytesEPKc; std::wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>::from_bytes(char const*) jmp short $+2 loc_EFB51: test [rsp+108h+var_C9], 1 jnz short loc_EFB5A jmp short loc_EFB64 loc_EFB5A: lea rdi, [rsp+108h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_EFB64: lea rax, [rsp+108h+var_A8] mov [rsp+108h+var_D8], rax mov rdi, [rsp+108h+var_D8] call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5beginEv; std::wstring::begin(void) mov [rsp+108h+var_E0], rax mov rdi, [rsp+108h+var_D8] call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE3endEv; std::wstring::end(void) mov [rsp+108h+var_EC+4], rax loc_EFB8C: lea rdi, [rsp+108h+var_E0] lea rsi, [rsp+108h+var_EC+4]; unsigned int call _ZN9__gnu_cxxeqIPwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE xor al, 0FFh test al, 1 jnz short loc_EFBA6 jmp loc_EFC5B loc_EFBA6: lea rdi, [rsp+108h+var_E0] call _ZNK9__gnu_cxx17__normal_iteratorIPwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEdeEv; __gnu_cxx::__normal_iterator<wchar_t *,std::wstring>::operator*(void) mov eax, [rax] mov dword ptr [rsp+108h+var_EC], eax mov edi, dword ptr [rsp+108h+var_EC]; this call _ZN12_GLOBAL__N_116widechar_wcwidthEj; `anonymous namespace'::widechar_wcwidth(uint) mov [rsp+108h+var_FC], eax jmp short $+2 loc_EFBC5: mov eax, [rsp+108h+var_FC] add eax, [rsp+108h+var_14] mov [rsp+108h+var_14], eax lea rdi, [rsp+108h+var_E0] call _ZN9__gnu_cxx17__normal_iteratorIPwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEppEv; __gnu_cxx::__normal_iterator<wchar_t *,std::wstring>::operator++(void) jmp short loc_EFB8C mov rcx, rax mov eax, edx mov [rsp+108h+var_80], rcx mov [rsp+108h+var_84], eax jmp loc_EFC81 mov rcx, rax mov eax, edx mov [rsp+108h+var_80], rcx mov [rsp+108h+var_84], eax jmp short loc_EFC74 mov rcx, rax mov eax, edx mov [rsp+108h+var_80], rcx mov [rsp+108h+var_84], eax test [rsp+108h+var_C9], 1 jnz short loc_EFC2F jmp short loc_EFC39 loc_EFC2F: lea rdi, [rsp+108h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_EFC39: jmp short loc_EFC74 mov rcx, rax mov eax, edx mov [rsp+108h+var_80], rcx mov [rsp+108h+var_84], eax lea rdi, [rsp+108h+var_A8] call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev; std::wstring::~wstring() jmp short loc_EFC74 loc_EFC5B: lea rdi, [rsp+108h+var_A8] call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev; std::wstring::~wstring() lea rdi, [rsp+108h+var_78] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EEwSaIwESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>::~wstring_convert() jmp short loc_EFCD3 loc_EFC74: lea rdi, [rsp+108h+var_78] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EEwSaIwESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>::~wstring_convert() loc_EFC81: mov rdi, [rsp+108h+var_80]; void * call ___cxa_begin_catch mov rdi, [rsp+108h+var_10] xor esi, esi call _ZN5Tools4ulenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; Tools::ulen(std::string const&,bool) mov [rsp+108h+var_108], rax jmp short $+2 loc_EFCA3: mov rax, [rsp+108h+var_108] mov [rsp+108h+var_8], rax call ___cxa_end_catch jmp short loc_EFCE2 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax call ___cxa_end_catch jmp short $+2 loc_EFCD1: jmp short loc_EFCF2 loc_EFCD3: mov eax, [rsp+108h+var_14] mov [rsp+108h+var_8], rax loc_EFCE2: mov rax, [rsp+108h+var_8] add rsp, 108h retn loc_EFCF2: mov rdi, [rsp+arg_80] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long Tools::wide_ulen(long long a1, int a2, int a3, int a4, int a5, int a6) { _anonymous_namespace_ *v6; // rdi int v8; // [rsp+0h] [rbp-108h] int v9; // [rsp+8h] [rbp-100h] int v10; // [rsp+Ch] [rbp-FCh] void *v11; // [rsp+10h] [rbp-F8h] long long v12; // [rsp+10h] [rbp-F8h] int v13; // [rsp+18h] [rbp-F0h] _DWORD v14[3]; // [rsp+1Ch] [rbp-ECh] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-E0h] BYREF char v16; // [rsp+3Fh] [rbp-C9h] _BYTE v17[32]; // [rsp+40h] [rbp-C8h] BYREF _BYTE v18[36]; // [rsp+60h] [rbp-A8h] BYREF int v19[25]; // [rsp+90h] [rbp-78h] BYREF unsigned int v20; // [rsp+F4h] [rbp-14h] long long v21; // [rsp+F8h] [rbp-10h] v21 = a1; v20 = 0; std::wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>::wstring_convert( (int)v19, a2, a3, a4, a5, a6, v8, v9, v11, v13, *(long long *)&v14[1]); v16 = 0; if ( (unsigned long long)std::string::size(v21) <= 0x2710 ) { v12 = std::string::c_str(v21); } else { std::string::substr(v17, v21, 0LL, 10000LL); v16 = 1; v12 = std::string::c_str((long long)v17); } std::wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>::from_bytes( v18, v19, v12); if ( (v16 & 1) != 0 ) std::string::~string(v17); v15[1] = v18; v15[0] = std::wstring::begin(v18); *(_QWORD *)&v14[1] = std::wstring::end(v18); while ( (__gnu_cxx::operator==<wchar_t *,std::wstring>(v15, &v14[1]) & 1) == 0 ) { v6 = (_anonymous_namespace_ *)*(unsigned int *)__gnu_cxx::__normal_iterator<wchar_t *,std::wstring>::operator*(v15); v10 = `anonymous namespace'::widechar_wcwidth(v6, (unsigned int)&v14[1]); v20 += v10; __gnu_cxx::__normal_iterator<wchar_t *,std::wstring>::operator++(v15); } std::wstring::~wstring(v18); std::wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>::~wstring_convert(v19); return v20; }
wide_ulen: SUB RSP,0x108 MOV qword ptr [RSP + 0xf8],RDI MOV dword ptr [RSP + 0xf4],0x0 LAB_001efaca: LEA RDI,[RSP + 0x90] CALL 0x001f6330 JMP 0x001efad9 LAB_001efad9: MOV RDI,qword ptr [RSP + 0xf8] CALL 0x001392f0 MOV byte ptr [RSP + 0x3f],0x0 CMP RAX,0x2710 JBE 0x001efb26 MOV RSI,qword ptr [RSP + 0xf8] LAB_001efafb: XOR EAX,EAX MOV EDX,EAX LEA RDI,[RSP + 0x40] MOV ECX,0x2710 CALL 0x001c7230 JMP 0x001efb10 LAB_001efb10: MOV byte ptr [RSP + 0x3f],0x1 LEA RDI,[RSP + 0x40] CALL 0x001392e0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001efb38 LAB_001efb26: MOV RDI,qword ptr [RSP + 0xf8] CALL 0x001392e0 MOV qword ptr [RSP + 0x10],RAX LAB_001efb38: MOV RDX,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0x90] CALL 0x001f63f0 JMP 0x001efb51 LAB_001efb51: TEST byte ptr [RSP + 0x3f],0x1 JNZ 0x001efb5a JMP 0x001efb64 LAB_001efb5a: LEA RDI,[RSP + 0x40] CALL 0x001332b0 LAB_001efb64: LEA RAX,[RSP + 0x60] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x001f6460 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x001f64b0 MOV qword ptr [RSP + 0x20],RAX LAB_001efb8c: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x20] CALL 0x001f6510 XOR AL,0xff TEST AL,0x1 JNZ 0x001efba6 JMP 0x001efc5b LAB_001efba6: LEA RDI,[RSP + 0x28] CALL 0x001f6550 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x1c],EAX MOV EDI,dword ptr [RSP + 0x1c] LAB_001efbba: CALL 0x001efd10 LAB_001efbbf: MOV dword ptr [RSP + 0xc],EAX JMP 0x001efbc5 LAB_001efbc5: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,dword ptr [RSP + 0xf4] MOV dword ptr [RSP + 0xf4],EAX LEA RDI,[RSP + 0x28] CALL 0x001f6560 JMP 0x001efb8c LAB_001efc5b: LEA RDI,[RSP + 0x60] CALL 0x001f6580 LEA RDI,[RSP + 0x90] CALL 0x001f65c0 JMP 0x001efcd3 LAB_001efcd3: MOV EAX,dword ptr [RSP + 0xf4] MOV qword ptr [RSP + 0x100],RAX LAB_001efce2: MOV RAX,qword ptr [RSP + 0x100] ADD RSP,0x108 RET
/* Tools::wide_ulen(std::__cxx11::string const&) */ int Tools::wide_ulen(string *param_1) { byte bVar1; int iVar2; ulong uVar3; uint *puVar4; int8 local_e8; int8 local_e0; wstring *local_d8; byte local_c9; string local_c8 [32]; wstring local_a8 [48]; wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>> local_78 [100]; int local_14; string *local_10; local_14 = 0; /* try { // try from 001efaca to 001efad6 has its CatchHandler @ 001efbe3 */ local_10 = param_1; std::__cxx11:: wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>> ::wstring_convert(local_78); uVar3 = std::__cxx11::string::size(local_10); local_c9 = 0; if (uVar3 < 0x2711) { std::__cxx11::string::c_str(local_10); } else { /* try { // try from 001efafb to 001efb0d has its CatchHandler @ 001efbfc */ std::__cxx11::string::substr((ulong)local_c8,(ulong)local_10); local_c9 = 1; std::__cxx11::string::c_str(local_c8); } /* try { // try from 001efb38 to 001efb4e has its CatchHandler @ 001efc12 */ std::__cxx11:: wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>> ::from_bytes((char *)local_a8); if ((local_c9 & 1) != 0) { std::__cxx11::string::~string(local_c8); } local_d8 = local_a8; local_e0 = std::__cxx11::wstring::begin(local_d8); local_e8 = std::__cxx11::wstring::end(local_d8); while (bVar1 = _ZN9__gnu_cxxeqIPwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE (&local_e0,&local_e8), ((bVar1 ^ 0xff) & 1) != 0) { puVar4 = (uint *)__gnu_cxx::__normal_iterator<wchar_t*,std::__cxx11::wstring>::operator* ((__normal_iterator<wchar_t*,std::__cxx11::wstring> *)&local_e0); /* try { // try from 001efbba to 001efbbe has its CatchHandler @ 001efc3b */ iVar2 = (anonymous_namespace)::widechar_wcwidth(*puVar4); local_14 = iVar2 + local_14; __gnu_cxx::__normal_iterator<wchar_t*,std::__cxx11::wstring>::operator++ ((__normal_iterator<wchar_t*,std::__cxx11::wstring> *)&local_e0); } std::__cxx11::wstring::~wstring(local_a8); std::__cxx11:: wstring_convert<std::codecvt_utf8<wchar_t,1114111ul,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>> ::~wstring_convert(local_78); return local_14; }
47,642
mysql_stmt_prepare_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_prepare_start(int *ret, MYSQL_STMT *stmt, const char *query, unsigned long length) { MK_ASYNC_START_BODY( mysql_stmt_prepare, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; parms.query= query; parms.length= length; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_prepare(stmt, query, length); return 0; }) }
O0
c
mysql_stmt_prepare_start: 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 -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x3d4a8 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x2b520 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x3d5c9 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x38(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x3d5e0 leaq -0x50(%rbp), %rdx callq 0x3ffc0 movl %eax, -0x2c(%rbp) movq -0x38(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x38(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x2c(%rbp) jle 0x3d526 movq -0x38(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x38(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x3d5c9 cmpl $0x0, -0x2c(%rbp) jge 0x3d5b5 jmp 0x3d532 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x23986(%rip), %rax # 0x60ee0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x23964(%rip), %rax # 0x60ef0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x3d5c2 movq -0x38(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_prepare_start: 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 rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_3D4A8 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call mysql_stmt_prepare mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_3D5C9 loc_3D4A8: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_20] mov [rbp+var_48], rax mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_38] add rdi, 38h ; '8' lea rsi, mysql_stmt_prepare_start_internal lea rdx, [rbp+var_50] call my_context_spawn mov [rbp+var_2C], eax mov rax, [rbp+var_38] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_38] mov byte ptr [rax+14h], 0 cmp [rbp+var_2C], 0 jle short loc_3D526 mov rax, [rbp+var_38] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_38] mov eax, [rax] mov [rbp+var_4], eax jmp loc_3D5C9 loc_3D526: cmp [rbp+var_2C], 0 jge loc_3D5B5 jmp short $+2 loc_3D532: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_3D5C2 loc_3D5B5: mov rax, [rbp+var_38] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_3D5C2: mov [rbp+var_4], 0 loc_3D5C9: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mysql_stmt_prepare_start(_DWORD *a1, long long a2, long long a3, long long a4) { _QWORD v5[3]; // [rsp+0h] [rbp-50h] BYREF unsigned int *v6; // [rsp+18h] [rbp-38h] int v7; // [rsp+24h] [rbp-2Ch] long long v8; // [rsp+28h] [rbp-28h] long long v9; // [rsp+30h] [rbp-20h] long long v10; // [rsp+38h] [rbp-18h] _DWORD *v11; // [rsp+40h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; if ( *(_QWORD *)(a2 + 56) ) { v6 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v10 + 56) + 1152LL) + 40LL); v5[0] = v10; v5[1] = v9; v5[2] = v8; *((_BYTE *)v6 + 20) = 1; v7 = my_context_spawn(v6 + 14, mysql_stmt_prepare_start_internal, v5); *((_BYTE *)v6 + 21) = 0; *((_BYTE *)v6 + 20) = 0; if ( v7 <= 0 ) { if ( v7 >= 0 ) { *v11 = v6[2]; } else { *(_DWORD *)(*(_QWORD *)(v10 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v10 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v10 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v10 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v10 + 56) + 662LL) = 0; *v11 = 1; } return 0; } else { *((_BYTE *)v6 + 21) = 1; return *v6; } } else { *v11 = mysql_stmt_prepare(v10, v9, v8); return 0; } }
mysql_stmt_prepare_start: 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 RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0013d4a8 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0012b520 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013d5c9 LAB_0013d4a8: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x38 LEA RSI,[0x13d5e0] LEA RDX,[RBP + -0x50] CALL 0x0013ffc0 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x2c],0x0 JLE 0x0013d526 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013d5c9 LAB_0013d526: CMP dword ptr [RBP + -0x2c],0x0 JGE 0x0013d5b5 JMP 0x0013d532 LAB_0013d532: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x160ee0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x160ef0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x0013d5c2 LAB_0013d5b5: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_0013d5c2: MOV dword ptr [RBP + -0x4],0x0 LAB_0013d5c9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 mysql_stmt_prepare_start(int4 *param_1,long param_2,int8 param_3,int8 param_4) { int4 uVar1; long local_58; int8 local_50; int8 local_48; int4 *local_40; int local_34; int8 local_30; int8 local_28; long local_20; int4 *local_18; int4 local_c; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_prepare(param_2,param_3,param_4); *local_18 = uVar1; local_c = 0; } else { local_40 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_40 + 5) = 1; local_58 = param_2; local_50 = param_3; local_48 = param_4; local_34 = my_context_spawn(local_40 + 0xe,mysql_stmt_prepare_start_internal,&local_58); *(int1 *)((long)local_40 + 0x15) = 0; *(int1 *)(local_40 + 5) = 0; if (local_34 < 1) { if (local_34 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00160f30, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_40[2]; } local_c = 0; } else { *(int1 *)((long)local_40 + 0x15) = 1; local_c = *local_40; } } return local_c; }
47,643
cs_enter
eloqsql/strings/ctype.c
static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; const struct my_cs_file_section_st *s= cs_file_sec(attr,len); int state= s ? s->state : 0; switch (state) { case 0: i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", len, attr); break; case _CS_CHARSET: my_charset_file_reset_charset(i); break; case _CS_COLLATION: my_charset_file_reset_collation(i); break; case _CS_RESET: return tailoring_append(st, " &", 0, NULL); default: break; } return MY_XML_OK; }
O0
c
cs_enter: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x6d100 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x6b696 movq -0x30(%rbp), %rax movl (%rax), %eax movl %eax, -0x38(%rbp) jmp 0x6b69d xorl %eax, %eax movl %eax, -0x38(%rbp) jmp 0x6b69d movl -0x38(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x3c(%rbp) testl %eax, %eax je 0x6b6cf jmp 0x6b6af movl -0x3c(%rbp), %eax subl $0x8, %eax je 0x6b6fc jmp 0x6b6b9 movl -0x3c(%rbp), %eax subl $0x9, %eax je 0x6b707 jmp 0x6b6c3 movl -0x3c(%rbp), %eax subl $0x12d, %eax # imm = 0x12D je 0x6b712 jmp 0x6b72e movq -0x28(%rbp), %rax movq 0x7a8(%rax), %rax movq 0xa0(%rax), %r8 movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rcx movl $0x1, %edi leaq 0x1075c(%rip), %rsi # 0x7be51 movb $0x0, %al callq *%r8 jmp 0x6b730 movq -0x28(%rbp), %rdi callq 0x6d0a0 jmp 0x6b730 movq -0x28(%rbp), %rdi callq 0x6d0d0 jmp 0x6b730 movq -0x10(%rbp), %rdi leaq 0x1074d(%rip), %rsi # 0x7be6a xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x6d190 movl %eax, -0x4(%rbp) jmp 0x6b737 jmp 0x6b730 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq
cs_enter: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+140h] mov [rbp+var_28], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call cs_file_sec mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_6B696 mov rax, [rbp+var_30] mov eax, [rax] mov [rbp+var_38], eax jmp short loc_6B69D loc_6B696: xor eax, eax mov [rbp+var_38], eax jmp short $+2 loc_6B69D: mov eax, [rbp+var_38] mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_3C], eax test eax, eax jz short loc_6B6CF jmp short $+2 loc_6B6AF: mov eax, [rbp+var_3C] sub eax, 8 jz short loc_6B6FC jmp short $+2 loc_6B6B9: mov eax, [rbp+var_3C] sub eax, 9 jz short loc_6B707 jmp short $+2 loc_6B6C3: mov eax, [rbp+var_3C] sub eax, 12Dh jz short loc_6B712 jmp short loc_6B72E loc_6B6CF: mov rax, [rbp+var_28] mov rax, [rax+7A8h] mov r8, [rax+0A0h] mov rdx, [rbp+var_20] mov rcx, [rbp+var_18] mov edi, 1 lea rsi, aUnknownLdmlTag; "Unknown LDML tag: '%.*s'" mov al, 0 call r8 jmp short loc_6B730 loc_6B6FC: mov rdi, [rbp+var_28] call my_charset_file_reset_charset jmp short loc_6B730 loc_6B707: mov rdi, [rbp+var_28] call my_charset_file_reset_collation jmp short loc_6B730 loc_6B712: mov rdi, [rbp+var_10] lea rsi, asc_7BE6A; " &" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_4], eax jmp short loc_6B737 loc_6B72E: jmp short $+2 loc_6B730: mov [rbp+var_4], 0 loc_6B737: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long cs_enter(long long a1, const char *a2, long long a3) { int v4; // [rsp+8h] [rbp-38h] int *v5; // [rsp+10h] [rbp-30h] long long v6; // [rsp+18h] [rbp-28h] int v7; // [rsp+20h] [rbp-20h] v7 = a3; v6 = *(_QWORD *)(a1 + 320); v5 = (int *)cs_file_sec(a2, a3); if ( v5 ) v4 = *v5; else v4 = 0; switch ( v4 ) { case 0: (*(void (**)(long long, const char *, ...))(*(_QWORD *)(v6 + 1960) + 160LL))( 1LL, "Unknown LDML tag: '%.*s'", v7, a2); return 0; case 8: my_charset_file_reset_charset(v6); return 0; case 9: my_charset_file_reset_collation(v6); return 0; } if ( v4 != 301 ) return 0; return (unsigned int)tailoring_append(a1, " &", 0LL); }
cs_enter: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0016d100 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0016b696 MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x38],EAX JMP 0x0016b69d LAB_0016b696: XOR EAX,EAX MOV dword ptr [RBP + -0x38],EAX JMP 0x0016b69d LAB_0016b69d: MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x3c],EAX TEST EAX,EAX JZ 0x0016b6cf JMP 0x0016b6af LAB_0016b6af: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x8 JZ 0x0016b6fc JMP 0x0016b6b9 LAB_0016b6b9: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x9 JZ 0x0016b707 JMP 0x0016b6c3 LAB_0016b6c3: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x12d JZ 0x0016b712 JMP 0x0016b72e LAB_0016b6cf: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x7a8] MOV R8,qword ptr [RAX + 0xa0] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV EDI,0x1 LEA RSI,[0x17be51] MOV AL,0x0 CALL R8 JMP 0x0016b730 LAB_0016b6fc: MOV RDI,qword ptr [RBP + -0x28] CALL 0x0016d0a0 JMP 0x0016b730 LAB_0016b707: MOV RDI,qword ptr [RBP + -0x28] CALL 0x0016d0d0 JMP 0x0016b730 LAB_0016b712: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x17be6a] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x0016d190 MOV dword ptr [RBP + -0x4],EAX JMP 0x0016b737 LAB_0016b72e: JMP 0x0016b730 LAB_0016b730: MOV dword ptr [RBP + -0x4],0x0 LAB_0016b737: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 cs_enter(long param_1,int8 param_2,int8 param_3) { long lVar1; int4 uVar2; int *piVar3; int local_40; lVar1 = *(long *)(param_1 + 0x140); piVar3 = (int *)cs_file_sec(param_2,param_3); if (piVar3 == (int *)0x0) { local_40 = 0; } else { local_40 = *piVar3; } if (local_40 == 0) { (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa0))(1,"Unknown LDML tag: \'%.*s\'",param_3,param_2); } else if (local_40 == 8) { my_charset_file_reset_charset(lVar1); } else if (local_40 == 9) { my_charset_file_reset_collation(lVar1); } else if (local_40 == 0x12d) { uVar2 = tailoring_append(param_1,&DAT_0017be6a,0); return uVar2; } return 0; }
47,644
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix(std::vector<float, std::allocator<float>>&, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp
static uint8_t permuteWinding(LocalIndex i) { static int const permuteWinding[4] = { 0, 1, 3, 2 }; return permuteWinding[i]; }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix(std::vector<float, std::allocator<float>>&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movslq 0x1f8(%rdi), %rax movq %rax, 0x20(%rsp) testq %rax, %rax jle 0xa9251 movq %rdi, %rbx movl 0x280(%rdi), %ebp movslq %ebp, %rax movq %rax, 0x18(%rsp) imull %ebp, %edx movq (%rsi), %rcx movslq %edx, %rax movq %rcx, 0x30(%rsp) leaq (%rcx,%rax,4), %rax movq %rax, 0x10(%rsp) leaq (,%rbp,4), %rax movq %rax, 0x8(%rsp) xorl %r14d, %r14d movq %r14, %rax movq 0x18(%rsp), %rcx imulq %rcx, %rax movq 0x10(%rsp), %rdx leaq (%rdx,%rax,4), %rdi movq %rdi, 0x38(%rsp) movl %ecx, 0x40(%rsp) testl %ecx, %ecx jle 0xa91af xorl %esi, %esi movq 0x8(%rsp), %rdx callq 0x391b0 movq 0x208(%rbx), %rax movslq (%rax,%r14,4), %r15 movq %r14, 0x28(%rsp) movl 0x4(%rax,%r14,4), %eax subl %r15d, %eax jle 0xa923e shlq $0x2, %r15 movq 0x220(%rbx), %r12 addq %r15, %r12 addq 0x238(%rbx), %r15 movl %eax, %r13d xorl %r14d, %r14d movss (%r15,%r14,4), %xmm0 movslq (%r12,%r14,4), %rax movq 0x250(%rbx), %rcx movslq (%rcx,%rax,4), %rax cmpl %ebp, %eax jge 0xa920e movq 0x38(%rsp), %rcx addss (%rcx,%rax,4), %xmm0 movss %xmm0, (%rcx,%rax,4) jmp 0xa9236 subl %ebp, %eax imull %ebp, %eax cltq movq 0x30(%rsp), %rcx leaq (%rcx,%rax,4), %rax movq %rax, 0x48(%rsp) movl %ebp, 0x50(%rsp) leaq 0x38(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x3c100 incq %r14 cmpq %r14, %r13 jne 0xa91e4 movq 0x28(%rsp), %r14 incq %r14 cmpq 0x20(%rsp), %r14 jne 0xa9181 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder32appendConversionStencilsToMatrixERSt6vectorIfSaIfEEi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h movsxd rax, dword ptr [rdi+1F8h] mov [rsp+88h+var_68], rax test rax, rax jle loc_A9251 mov rbx, rdi mov ebp, [rdi+280h] movsxd rax, ebp mov [rsp+88h+var_70], rax imul edx, ebp mov rcx, [rsi] movsxd rax, edx mov [rsp+88h+var_58], rcx lea rax, [rcx+rax*4] mov [rsp+88h+var_78], rax lea rax, ds:0[rbp*4] mov [rsp+88h+var_80], rax xor r14d, r14d loc_A9181: mov rax, r14 mov rcx, [rsp+88h+var_70] imul rax, rcx mov rdx, [rsp+88h+var_78] lea rdi, [rdx+rax*4] mov [rsp+88h+var_50], rdi mov [rsp+88h+var_48], ecx test ecx, ecx jle short loc_A91AF xor esi, esi mov rdx, [rsp+88h+var_80] call _memset loc_A91AF: mov rax, [rbx+208h] movsxd r15, dword ptr [rax+r14*4] mov [rsp+88h+var_60], r14 mov eax, [rax+r14*4+4] sub eax, r15d jle short loc_A923E shl r15, 2 mov r12, [rbx+220h] add r12, r15 add r15, [rbx+238h] mov r13d, eax xor r14d, r14d loc_A91E4: movss xmm0, dword ptr [r15+r14*4] movsxd rax, dword ptr [r12+r14*4] mov rcx, [rbx+250h] movsxd rax, dword ptr [rcx+rax*4] cmp eax, ebp jge short loc_A920E mov rcx, [rsp+88h+var_50] addss xmm0, dword ptr [rcx+rax*4] movss dword ptr [rcx+rax*4], xmm0 jmp short loc_A9236 loc_A920E: sub eax, ebp imul eax, ebp cdqe mov rcx, [rsp+88h+var_58] lea rax, [rcx+rax*4] mov [rsp+88h+var_40], rax mov [rsp+88h+var_38], ebp lea rdi, [rsp+88h+var_50] lea rsi, [rsp+88h+var_40] call __ZN10OpenSubdiv6v3_6_03Tmr10StencilRowIfE13AddWithWeightERKS3_f; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&,float) loc_A9236: inc r14 cmp r13, r14 jnz short loc_A91E4 loc_A923E: mov r14, [rsp+88h+var_60] inc r14 cmp r14, [rsp+88h+var_68] jnz loc_A9181 loc_A9251: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix( long long a1, long long *a2, int a3) { long long result; // rax long long v4; // rbp long long v5; // r14 long long v6; // rax long long v7; // r15 bool v8; // cc long long v9; // r15 long long v10; // r12 long long v11; // r15 long long v12; // r13 long long v13; // r14 float v14; // xmm0_4 long long v15; // [rsp+10h] [rbp-78h] long long v16; // [rsp+20h] [rbp-68h] long long v17; // [rsp+28h] [rbp-60h] long long v18; // [rsp+30h] [rbp-58h] long long v19; // [rsp+38h] [rbp-50h] BYREF int v20; // [rsp+40h] [rbp-48h] long long v21; // [rsp+48h] [rbp-40h] BYREF int v22; // [rsp+50h] [rbp-38h] result = *(int *)(a1 + 504); v16 = result; if ( result > 0 ) { v4 = *(unsigned int *)(a1 + 640); v18 = *a2; v15 = *a2 + 4LL * (int)v4 * a3; v5 = 0LL; do { v19 = v15 + 4 * (int)v4 * v5; v20 = v4; if ( (int)v4 > 0 ) memset(v15 + 4 * (int)v4 * v5, 0LL, 4 * v4); v6 = *(_QWORD *)(a1 + 520); v7 = *(int *)(v6 + 4 * v5); v17 = v5; LODWORD(v6) = *(_DWORD *)(v6 + 4 * v5 + 4); v8 = (int)v6 <= (int)v7; result = (unsigned int)(v6 - v7); if ( !v8 ) { v9 = 4 * v7; v10 = v9 + *(_QWORD *)(a1 + 544); v11 = *(_QWORD *)(a1 + 568) + v9; v12 = (unsigned int)result; v13 = 0LL; do { v14 = *(float *)(v11 + 4 * v13); result = *(int *)(*(_QWORD *)(a1 + 592) + 4LL * *(int *)(v10 + 4 * v13)); if ( (int)result >= (int)v4 ) { v21 = v18 + 4LL * (int)v4 * ((int)result - (int)v4); v22 = v4; result = OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(&v19, &v21, v14); } else { *(float *)(v19 + 4 * result) = v14 + *(float *)(v19 + 4 * result); } ++v13; } while ( v12 != v13 ); } v5 = v17 + 1; } while ( v17 + 1 != v16 ); } return result; }
appendConversionStencilsToMatrix: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOVSXD RAX,dword ptr [RDI + 0x1f8] MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX JLE 0x001a9251 MOV RBX,RDI MOV EBP,dword ptr [RDI + 0x280] MOVSXD RAX,EBP MOV qword ptr [RSP + 0x18],RAX IMUL EDX,EBP MOV RCX,qword ptr [RSI] MOVSXD RAX,EDX MOV qword ptr [RSP + 0x30],RCX LEA RAX,[RCX + RAX*0x4] MOV qword ptr [RSP + 0x10],RAX LEA RAX,[RBP*0x4] MOV qword ptr [RSP + 0x8],RAX XOR R14D,R14D LAB_001a9181: MOV RAX,R14 MOV RCX,qword ptr [RSP + 0x18] IMUL RAX,RCX MOV RDX,qword ptr [RSP + 0x10] LEA RDI,[RDX + RAX*0x4] MOV qword ptr [RSP + 0x38],RDI MOV dword ptr [RSP + 0x40],ECX TEST ECX,ECX JLE 0x001a91af XOR ESI,ESI MOV RDX,qword ptr [RSP + 0x8] CALL 0x001391b0 LAB_001a91af: MOV RAX,qword ptr [RBX + 0x208] MOVSXD R15,dword ptr [RAX + R14*0x4] MOV qword ptr [RSP + 0x28],R14 MOV EAX,dword ptr [RAX + R14*0x4 + 0x4] SUB EAX,R15D JLE 0x001a923e SHL R15,0x2 MOV R12,qword ptr [RBX + 0x220] ADD R12,R15 ADD R15,qword ptr [RBX + 0x238] MOV R13D,EAX XOR R14D,R14D LAB_001a91e4: MOVSS XMM0,dword ptr [R15 + R14*0x4] MOVSXD RAX,dword ptr [R12 + R14*0x4] MOV RCX,qword ptr [RBX + 0x250] MOVSXD RAX,dword ptr [RCX + RAX*0x4] CMP EAX,EBP JGE 0x001a920e MOV RCX,qword ptr [RSP + 0x38] ADDSS XMM0,dword ptr [RCX + RAX*0x4] MOVSS dword ptr [RCX + RAX*0x4],XMM0 JMP 0x001a9236 LAB_001a920e: SUB EAX,EBP IMUL EAX,EBP CDQE MOV RCX,qword ptr [RSP + 0x30] LEA RAX,[RCX + RAX*0x4] MOV qword ptr [RSP + 0x48],RAX MOV dword ptr [RSP + 0x50],EBP LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x48] CALL 0x0013c100 LAB_001a9236: INC R14 CMP R13,R14 JNZ 0x001a91e4 LAB_001a923e: MOV R14,qword ptr [RSP + 0x28] INC R14 CMP R14,qword ptr [RSP + 0x20] JNZ 0x001a9181 LAB_001a9251: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix(std::vector<float, std::allocator<float> >&, int) */ void __thiscall OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix (SubdivisionPlanBuilder *this,vector *param_1,int param_2) { float fVar1; int iVar2; uint uVar3; int iVar4; int iVar5; long lVar6; long lVar7; long lVar8; uint uVar9; ulong uVar10; long lVar11; void *local_50; uint local_48; long local_40; uint local_38; iVar2 = *(int *)(this + 0x1f8); if (0 < (long)iVar2) { uVar3 = *(uint *)(this + 0x280); lVar6 = *(long *)param_1; lVar11 = 0; do { local_50 = (void *)(lVar6 + (long)(int)(param_2 * uVar3) * 4 + lVar11 * (int)uVar3 * 4); local_48 = uVar3; if (0 < (int)uVar3) { memset(local_50,0,(ulong)uVar3 * 4); } iVar4 = *(int *)(*(long *)(this + 0x208) + lVar11 * 4); iVar5 = *(int *)(*(long *)(this + 0x208) + 4 + lVar11 * 4); uVar9 = iVar5 - iVar4; if (uVar9 != 0 && iVar4 <= iVar5) { lVar7 = *(long *)(this + 0x220); lVar8 = *(long *)(this + 0x238); uVar10 = 0; do { fVar1 = *(float *)((long)iVar4 * 4 + lVar8 + uVar10 * 4); iVar5 = *(int *)(*(long *)(this + 0x250) + (long)*(int *)(lVar7 + (long)iVar4 * 4 + uVar10 * 4) * 4); if (iVar5 < (int)uVar3) { *(float *)((long)local_50 + (long)iVar5 * 4) = fVar1 + *(float *)((long)local_50 + (long)iVar5 * 4); } else { local_40 = lVar6 + (long)(int)((iVar5 - uVar3) * uVar3) * 4; local_38 = uVar3; StencilRow<float>::AddWithWeight ((StencilRow<float> *)&local_50,(StencilRow *)&local_40,fVar1); } uVar10 = uVar10 + 1; } while (uVar9 != uVar10); } lVar11 = lVar11 + 1; } while (lVar11 != iVar2); } return; }
47,645
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix(std::vector<float, std::allocator<float>>&, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp
static uint8_t permuteWinding(LocalIndex i) { static int const permuteWinding[4] = { 0, 1, 3, 2 }; return permuteWinding[i]; }
O3
cpp
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix(std::vector<float, std::allocator<float>>&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movslq 0x1f8(%rdi), %rax movq %rax, 0x20(%rsp) testq %rax, %rax jle 0xaba71 movq %rdi, %rbx movl 0x280(%rdi), %ebp movslq %ebp, %rax movq %rax, 0x18(%rsp) imull %ebp, %edx movq (%rsi), %rcx movslq %edx, %rax movq %rcx, 0x30(%rsp) leaq (%rcx,%rax,4), %rax movq %rax, 0x10(%rsp) leaq (,%rbp,4), %rax movq %rax, 0x8(%rsp) xorl %r14d, %r14d movq %r14, %rax movq 0x18(%rsp), %rcx imulq %rcx, %rax movq 0x10(%rsp), %rdx leaq (%rdx,%rax,4), %rdi movq %rdi, 0x38(%rsp) movl %ecx, 0x40(%rsp) testl %ecx, %ecx jle 0xab9cf xorl %esi, %esi movq 0x8(%rsp), %rdx callq 0x391a0 movq 0x208(%rbx), %rax movslq (%rax,%r14,4), %r15 movq %r14, 0x28(%rsp) movl 0x4(%rax,%r14,4), %eax subl %r15d, %eax jle 0xaba5e shlq $0x2, %r15 movq 0x220(%rbx), %r12 addq %r15, %r12 addq 0x238(%rbx), %r15 movl %eax, %r13d xorl %r14d, %r14d movss (%r15,%r14,4), %xmm0 movslq (%r12,%r14,4), %rax movq 0x250(%rbx), %rcx movslq (%rcx,%rax,4), %rax cmpl %ebp, %eax jge 0xaba2e movq 0x38(%rsp), %rcx addss (%rcx,%rax,4), %xmm0 movss %xmm0, (%rcx,%rax,4) jmp 0xaba56 subl %ebp, %eax imull %ebp, %eax cltq movq 0x30(%rsp), %rcx leaq (%rcx,%rax,4), %rax movq %rax, 0x48(%rsp) movl %ebp, 0x50(%rsp) leaq 0x38(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x3c0b0 incq %r14 cmpq %r14, %r13 jne 0xaba04 movq 0x28(%rsp), %r14 incq %r14 cmpq 0x20(%rsp), %r14 jne 0xab9a1 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder32appendConversionStencilsToMatrixERSt6vectorIfSaIfEEi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h movsxd rax, dword ptr [rdi+1F8h] mov [rsp+88h+var_68], rax test rax, rax jle loc_ABA71 mov rbx, rdi mov ebp, [rdi+280h] movsxd rax, ebp mov [rsp+88h+var_70], rax imul edx, ebp mov rcx, [rsi] movsxd rax, edx mov [rsp+88h+var_58], rcx lea rax, [rcx+rax*4] mov [rsp+88h+var_78], rax lea rax, ds:0[rbp*4] mov [rsp+88h+var_80], rax xor r14d, r14d loc_AB9A1: mov rax, r14 mov rcx, [rsp+88h+var_70] imul rax, rcx mov rdx, [rsp+88h+var_78] lea rdi, [rdx+rax*4] mov [rsp+88h+var_50], rdi mov [rsp+88h+var_48], ecx test ecx, ecx jle short loc_AB9CF xor esi, esi mov rdx, [rsp+88h+var_80] call _memset loc_AB9CF: mov rax, [rbx+208h] movsxd r15, dword ptr [rax+r14*4] mov [rsp+88h+var_60], r14 mov eax, [rax+r14*4+4] sub eax, r15d jle short loc_ABA5E shl r15, 2 mov r12, [rbx+220h] add r12, r15 add r15, [rbx+238h] mov r13d, eax xor r14d, r14d loc_ABA04: movss xmm0, dword ptr [r15+r14*4] movsxd rax, dword ptr [r12+r14*4] mov rcx, [rbx+250h] movsxd rax, dword ptr [rcx+rax*4] cmp eax, ebp jge short loc_ABA2E mov rcx, [rsp+88h+var_50] addss xmm0, dword ptr [rcx+rax*4] movss dword ptr [rcx+rax*4], xmm0 jmp short loc_ABA56 loc_ABA2E: sub eax, ebp imul eax, ebp cdqe mov rcx, [rsp+88h+var_58] lea rax, [rcx+rax*4] mov [rsp+88h+var_40], rax mov [rsp+88h+var_38], ebp lea rdi, [rsp+88h+var_50] lea rsi, [rsp+88h+var_40] call __ZN10OpenSubdiv6v3_6_03Tmr10StencilRowIfE13AddWithWeightERKS3_f; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&,float) loc_ABA56: inc r14 cmp r13, r14 jnz short loc_ABA04 loc_ABA5E: mov r14, [rsp+88h+var_60] inc r14 cmp r14, [rsp+88h+var_68] jnz loc_AB9A1 loc_ABA71: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix( long long a1, long long *a2, int a3) { long long result; // rax long long v4; // rbp long long v5; // r14 long long v6; // rax long long v7; // r15 bool v8; // cc long long v9; // r15 long long v10; // r12 long long v11; // r15 long long v12; // r13 long long v13; // r14 float v14; // xmm0_4 long long v15; // [rsp+10h] [rbp-78h] long long v16; // [rsp+20h] [rbp-68h] long long v17; // [rsp+28h] [rbp-60h] long long v18; // [rsp+30h] [rbp-58h] long long v19; // [rsp+38h] [rbp-50h] BYREF int v20; // [rsp+40h] [rbp-48h] long long v21; // [rsp+48h] [rbp-40h] BYREF int v22; // [rsp+50h] [rbp-38h] result = *(int *)(a1 + 504); v16 = result; if ( result > 0 ) { v4 = *(unsigned int *)(a1 + 640); v18 = *a2; v15 = *a2 + 4LL * (int)v4 * a3; v5 = 0LL; do { v19 = v15 + 4 * (int)v4 * v5; v20 = v4; if ( (int)v4 > 0 ) memset(v15 + 4 * (int)v4 * v5, 0LL, 4 * v4); v6 = *(_QWORD *)(a1 + 520); v7 = *(int *)(v6 + 4 * v5); v17 = v5; LODWORD(v6) = *(_DWORD *)(v6 + 4 * v5 + 4); v8 = (int)v6 <= (int)v7; result = (unsigned int)(v6 - v7); if ( !v8 ) { v9 = 4 * v7; v10 = v9 + *(_QWORD *)(a1 + 544); v11 = *(_QWORD *)(a1 + 568) + v9; v12 = (unsigned int)result; v13 = 0LL; do { v14 = *(float *)(v11 + 4 * v13); result = *(int *)(*(_QWORD *)(a1 + 592) + 4LL * *(int *)(v10 + 4 * v13)); if ( (int)result >= (int)v4 ) { v21 = v18 + 4LL * (int)v4 * ((int)result - (int)v4); v22 = v4; result = OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(&v19, &v21, v14); } else { *(float *)(v19 + 4 * result) = v14 + *(float *)(v19 + 4 * result); } ++v13; } while ( v12 != v13 ); } v5 = v17 + 1; } while ( v17 + 1 != v16 ); } return result; }
appendConversionStencilsToMatrix: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOVSXD RAX,dword ptr [RDI + 0x1f8] MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX JLE 0x001aba71 MOV RBX,RDI MOV EBP,dword ptr [RDI + 0x280] MOVSXD RAX,EBP MOV qword ptr [RSP + 0x18],RAX IMUL EDX,EBP MOV RCX,qword ptr [RSI] MOVSXD RAX,EDX MOV qword ptr [RSP + 0x30],RCX LEA RAX,[RCX + RAX*0x4] MOV qword ptr [RSP + 0x10],RAX LEA RAX,[RBP*0x4] MOV qword ptr [RSP + 0x8],RAX XOR R14D,R14D LAB_001ab9a1: MOV RAX,R14 MOV RCX,qword ptr [RSP + 0x18] IMUL RAX,RCX MOV RDX,qword ptr [RSP + 0x10] LEA RDI,[RDX + RAX*0x4] MOV qword ptr [RSP + 0x38],RDI MOV dword ptr [RSP + 0x40],ECX TEST ECX,ECX JLE 0x001ab9cf XOR ESI,ESI MOV RDX,qword ptr [RSP + 0x8] CALL 0x001391a0 LAB_001ab9cf: MOV RAX,qword ptr [RBX + 0x208] MOVSXD R15,dword ptr [RAX + R14*0x4] MOV qword ptr [RSP + 0x28],R14 MOV EAX,dword ptr [RAX + R14*0x4 + 0x4] SUB EAX,R15D JLE 0x001aba5e SHL R15,0x2 MOV R12,qword ptr [RBX + 0x220] ADD R12,R15 ADD R15,qword ptr [RBX + 0x238] MOV R13D,EAX XOR R14D,R14D LAB_001aba04: MOVSS XMM0,dword ptr [R15 + R14*0x4] MOVSXD RAX,dword ptr [R12 + R14*0x4] MOV RCX,qword ptr [RBX + 0x250] MOVSXD RAX,dword ptr [RCX + RAX*0x4] CMP EAX,EBP JGE 0x001aba2e MOV RCX,qword ptr [RSP + 0x38] ADDSS XMM0,dword ptr [RCX + RAX*0x4] MOVSS dword ptr [RCX + RAX*0x4],XMM0 JMP 0x001aba56 LAB_001aba2e: SUB EAX,EBP IMUL EAX,EBP CDQE MOV RCX,qword ptr [RSP + 0x30] LEA RAX,[RCX + RAX*0x4] MOV qword ptr [RSP + 0x48],RAX MOV dword ptr [RSP + 0x50],EBP LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x48] CALL 0x0013c0b0 LAB_001aba56: INC R14 CMP R13,R14 JNZ 0x001aba04 LAB_001aba5e: MOV R14,qword ptr [RSP + 0x28] INC R14 CMP R14,qword ptr [RSP + 0x20] JNZ 0x001ab9a1 LAB_001aba71: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix(std::vector<float, std::allocator<float> >&, int) */ void __thiscall OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::appendConversionStencilsToMatrix (SubdivisionPlanBuilder *this,vector *param_1,int param_2) { float fVar1; int iVar2; uint uVar3; int iVar4; int iVar5; long lVar6; long lVar7; long lVar8; uint uVar9; ulong uVar10; long lVar11; void *local_50; uint local_48; long local_40; uint local_38; iVar2 = *(int *)(this + 0x1f8); if (0 < (long)iVar2) { uVar3 = *(uint *)(this + 0x280); lVar6 = *(long *)param_1; lVar11 = 0; do { local_50 = (void *)(lVar6 + (long)(int)(param_2 * uVar3) * 4 + lVar11 * (int)uVar3 * 4); local_48 = uVar3; if (0 < (int)uVar3) { memset(local_50,0,(ulong)uVar3 * 4); } iVar4 = *(int *)(*(long *)(this + 0x208) + lVar11 * 4); iVar5 = *(int *)(*(long *)(this + 0x208) + 4 + lVar11 * 4); uVar9 = iVar5 - iVar4; if (uVar9 != 0 && iVar4 <= iVar5) { lVar7 = *(long *)(this + 0x220); lVar8 = *(long *)(this + 0x238); uVar10 = 0; do { fVar1 = *(float *)((long)iVar4 * 4 + lVar8 + uVar10 * 4); iVar5 = *(int *)(*(long *)(this + 0x250) + (long)*(int *)(lVar7 + (long)iVar4 * 4 + uVar10 * 4) * 4); if (iVar5 < (int)uVar3) { *(float *)((long)local_50 + (long)iVar5 * 4) = fVar1 + *(float *)((long)local_50 + (long)iVar5 * 4); } else { local_40 = lVar6 + (long)(int)((iVar5 - uVar3) * uVar3) * 4; local_38 = uVar3; StencilRow<float>::AddWithWeight ((StencilRow<float> *)&local_50,(StencilRow *)&local_40,fVar1); } uVar10 = uVar10 + 1; } while (uVar9 != uVar10); } lVar11 = lVar11 + 1; } while (lVar11 != iVar2); } return; }
47,646
set_prealloc_root
eloqsql/mysys/my_alloc.c
void set_prealloc_root(MEM_ROOT *root, char *ptr) { USED_MEM *next; for (next=root->used; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } for (next=root->free ; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } }
O0
c
set_prealloc_root: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xedb88 movq -0x18(%rbp), %rax cmpq -0x10(%rbp), %rax ja 0xedb79 movq -0x18(%rbp), %rax movq -0x18(%rbp), %rcx addq 0x10(%rcx), %rax cmpq -0x10(%rbp), %rax jbe 0xedb79 movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) jmp 0xedbd3 jmp 0xedb7b movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0xedb48 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xedbd3 movq -0x18(%rbp), %rax cmpq -0x10(%rbp), %rax ja 0xedbc4 movq -0x18(%rbp), %rax movq -0x18(%rbp), %rcx addq 0x10(%rcx), %rax cmpq -0x10(%rbp), %rax jbe 0xedbc4 movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) jmp 0xedbd3 jmp 0xedbc6 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0xedb93 popq %rbp retq nopw %cs:(%rax,%rax)
set_prealloc_root: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax loc_EDB48: cmp [rbp+var_18], 0 jz short loc_EDB88 mov rax, [rbp+var_18] cmp rax, [rbp+var_10] ja short loc_EDB79 mov rax, [rbp+var_18] mov rcx, [rbp+var_18] add rax, [rcx+10h] cmp rax, [rbp+var_10] jbe short loc_EDB79 mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+10h], rcx jmp short loc_EDBD3 loc_EDB79: jmp short $+2 loc_EDB7B: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax jmp short loc_EDB48 loc_EDB88: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax loc_EDB93: cmp [rbp+var_18], 0 jz short loc_EDBD3 mov rax, [rbp+var_18] cmp rax, [rbp+var_10] ja short loc_EDBC4 mov rax, [rbp+var_18] mov rcx, [rbp+var_18] add rax, [rcx+10h] cmp rax, [rbp+var_10] jbe short loc_EDBC4 mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+10h], rcx jmp short loc_EDBD3 loc_EDBC4: jmp short $+2 loc_EDBC6: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax jmp short loc_EDB93 loc_EDBD3: pop rbp retn
_QWORD * set_prealloc_root(_QWORD *a1, unsigned long long a2) { _QWORD *result; // rax _QWORD *i; // [rsp+0h] [rbp-18h] _QWORD *j; // [rsp+0h] [rbp-18h] for ( i = (_QWORD *)a1[1]; i; i = (_QWORD *)*i ) { if ( (unsigned long long)i <= a2 && (unsigned long long)i + i[2] > a2 ) { result = a1; a1[2] = i; return result; } } result = (_QWORD *)*a1; for ( j = (_QWORD *)*a1; j; j = (_QWORD *)*j ) { if ( (unsigned long long)j <= a2 && (unsigned long long)j + j[2] > a2 ) { result = a1; a1[2] = j; return result; } result = (_QWORD *)*j; } return result; }
set_prealloc_root: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX LAB_001edb48: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001edb88 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x10] JA 0x001edb79 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RCX + 0x10] CMP RAX,qword ptr [RBP + -0x10] JBE 0x001edb79 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001edbd3 LAB_001edb79: JMP 0x001edb7b LAB_001edb7b: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x001edb48 LAB_001edb88: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_001edb93: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001edbd3 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x10] JA 0x001edbc4 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RCX + 0x10] CMP RAX,qword ptr [RBP + -0x10] JBE 0x001edbc4 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001edbd3 LAB_001edbc4: JMP 0x001edbc6 LAB_001edbc6: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x001edb93 LAB_001edbd3: POP RBP RET
void set_prealloc_root(int8 *param_1,int8 *param_2) { int8 *local_20; local_20 = (int8 *)param_1[1]; while( true ) { if (local_20 == (int8 *)0x0) { local_20 = (int8 *)*param_1; while( true ) { if (local_20 == (int8 *)0x0) { return; } if ((local_20 <= param_2) && (param_2 < (int8 *)((long)local_20 + local_20[2]))) break; local_20 = (int8 *)*local_20; } param_1[2] = local_20; return; } if ((local_20 <= param_2) && (param_2 < (int8 *)((long)local_20 + local_20[2]))) break; local_20 = (int8 *)*local_20; } param_1[2] = local_20; return; }
47,647
deadlock
eloqsql/mysys/waiting_threads.c
static int deadlock(WT_THD *thd, WT_THD *blocker, uint depth, uint max_depth) { struct deadlock_arg arg= {thd, max_depth, 0, 0}; int ret; DBUG_ENTER("deadlock"); DBUG_ASSERT(depth < 2); ret= deadlock_search(&arg, blocker, depth); if (ret == WT_DEPTH_EXCEEDED) { increment_cycle_stats(WT_CYCLE_STATS, max_depth == *thd->deadlock_search_depth_long); ret= WT_OK; } /* if we started with depth==1, blocker was never considered for a victim in deadlock_search(). Do it here. */ if (ret == WT_DEADLOCK && depth) change_victim(blocker, &arg); if (arg.last_locked_rc) { /* Special return code if there's nobody to wait for. depth == 0 means that we start the search from thd (thd == blocker). ret == WT_OK means that no cycle was found and arg.last_locked_rc == thd->waiting_for. and arg.last_locked_rc->owners.elements == 0 means that (applying the rule above) thd->waiting_for->owners.elements == 0, and thd doesn't have anybody to wait for. */ if (depth == 0 && ret == WT_OK && arg.last_locked_rc->owners.elements == 0) { DBUG_ASSERT(thd == blocker); DBUG_ASSERT(arg.last_locked_rc == thd->waiting_for); ret= WT_FREE_TO_GO; } rc_unlock(arg.last_locked_rc); } /* notify the victim, if appropriate */ if (ret == WT_DEADLOCK && arg.victim != thd) { DBUG_PRINT("wt", ("killing %s", arg.victim->name)); arg.victim->killed= 1; mysql_cond_broadcast(&arg.victim->waiting_for->cond); rc_unlock(arg.victim->waiting_for); ret= WT_OK; } DBUG_RETURN(ret); }
O0
c
deadlock: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x30(%rbp) movq $0x0, -0x28(%rbp) movq $0x0, -0x20(%rbp) jmp 0xffbb6 movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx leaq -0x38(%rbp), %rdi callq 0x100390 movl %eax, -0x3c(%rbp) cmpl $-0x2, -0x3c(%rbp) jne 0xffbf6 movl -0x18(%rbp), %eax movq -0x8(%rbp), %rcx movq 0x50(%rcx), %rcx cmpq (%rcx), %rax sete %al andb $0x1, %al movzbl %al, %esi movl $0x20, %edi callq 0x100630 movl $0x0, -0x3c(%rbp) cmpl $-0x1, -0x3c(%rbp) jne 0xffc0f cmpl $0x0, -0x14(%rbp) je 0xffc0f movq -0x10(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x100670 cmpq $0x0, -0x20(%rbp) je 0xffc47 cmpl $0x0, -0x14(%rbp) jne 0xffc3e cmpl $0x0, -0x3c(%rbp) jne 0xffc3e movq -0x20(%rbp), %rax cmpl $0x0, 0xe8(%rax) jne 0xffc3e jmp 0xffc31 jmp 0xffc33 jmp 0xffc35 jmp 0xffc37 movl $0xfffffffd, -0x3c(%rbp) # imm = 0xFFFFFFFD movq -0x20(%rbp), %rdi callq 0xffad0 cmpl $-0x1, -0x3c(%rbp) jne 0xffc8b movq -0x28(%rbp), %rax cmpq -0x8(%rbp), %rax je 0xffc8b jmp 0xffc59 jmp 0xffc5b movq -0x28(%rbp), %rax movb $0x1, 0x60(%rax) movq -0x28(%rbp), %rax movq 0x28(%rax), %rdi addq $0xa8, %rdi callq 0x100170 movq -0x28(%rbp), %rax movq 0x28(%rax), %rdi callq 0xffad0 movl $0x0, -0x3c(%rbp) jmp 0xffc8d movl -0x3c(%rbp), %eax movl %eax, -0x40(%rbp) movl -0x40(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
deadlock: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov rax, [rbp+var_8] mov [rbp+var_38], rax mov eax, [rbp+var_18] mov [rbp+var_30], eax mov [rbp+var_28], 0 mov [rbp+var_20], 0 jmp short $+2 loc_FFBB6: mov rsi, [rbp+var_10] mov edx, [rbp+var_14] lea rdi, [rbp+var_38] call deadlock_search mov [rbp+var_3C], eax cmp [rbp+var_3C], 0FFFFFFFEh jnz short loc_FFBF6 mov eax, [rbp+var_18] mov rcx, [rbp+var_8] mov rcx, [rcx+50h] cmp rax, [rcx] setz al and al, 1 movzx esi, al mov edi, 20h ; ' ' call increment_cycle_stats mov [rbp+var_3C], 0 loc_FFBF6: cmp [rbp+var_3C], 0FFFFFFFFh jnz short loc_FFC0F cmp [rbp+var_14], 0 jz short loc_FFC0F mov rdi, [rbp+var_10] lea rsi, [rbp+var_38] call change_victim loc_FFC0F: cmp [rbp+var_20], 0 jz short loc_FFC47 cmp [rbp+var_14], 0 jnz short loc_FFC3E cmp [rbp+var_3C], 0 jnz short loc_FFC3E mov rax, [rbp+var_20] cmp dword ptr [rax+0E8h], 0 jnz short loc_FFC3E jmp short $+2 loc_FFC31: jmp short $+2 loc_FFC33: jmp short $+2 loc_FFC35: jmp short $+2 loc_FFC37: mov [rbp+var_3C], 0FFFFFFFDh loc_FFC3E: mov rdi, [rbp+var_20] call rc_unlock loc_FFC47: cmp [rbp+var_3C], 0FFFFFFFFh jnz short loc_FFC8B mov rax, [rbp+var_28] cmp rax, [rbp+var_8] jz short loc_FFC8B jmp short $+2 loc_FFC59: jmp short $+2 loc_FFC5B: mov rax, [rbp+var_28] mov byte ptr [rax+60h], 1 mov rax, [rbp+var_28] mov rdi, [rax+28h] add rdi, 0A8h call inline_mysql_cond_broadcast_3 mov rax, [rbp+var_28] mov rdi, [rax+28h] call rc_unlock mov [rbp+var_3C], 0 loc_FFC8B: jmp short $+2 loc_FFC8D: mov eax, [rbp+var_3C] mov [rbp+var_40], eax mov eax, [rbp+var_40] add rsp, 40h pop rbp retn
long long deadlock(long long a1, long long a2, unsigned int a3, int a4) { unsigned int v5; // [rsp+4h] [rbp-3Ch] long long v6; // [rsp+8h] [rbp-38h] BYREF int v7; // [rsp+10h] [rbp-30h] long long v8; // [rsp+18h] [rbp-28h] long long v9; // [rsp+20h] [rbp-20h] int v10; // [rsp+28h] [rbp-18h] unsigned int v11; // [rsp+2Ch] [rbp-14h] long long v12; // [rsp+30h] [rbp-10h] long long v13; // [rsp+38h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v6 = a1; v7 = a4; v8 = 0LL; v9 = 0LL; v5 = deadlock_search(&v6, a2, a3); if ( v5 == -2 ) { increment_cycle_stats(32LL, v10 == **(_QWORD **)(v13 + 80)); v5 = 0; } if ( v5 == -1 && v11 ) change_victim(v12, &v6); if ( v9 ) { if ( !v11 && !v5 && !*(_DWORD *)(v9 + 232) ) v5 = -3; rc_unlock(v9); } if ( v5 == -1 && v8 != v13 ) { *(_BYTE *)(v8 + 96) = 1; inline_mysql_cond_broadcast_3(*(_QWORD *)(v8 + 40) + 168LL); rc_unlock(*(_QWORD *)(v8 + 40)); return 0; } return v5; }
deadlock: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x30],EAX MOV qword ptr [RBP + -0x28],0x0 MOV qword ptr [RBP + -0x20],0x0 JMP 0x001ffbb6 LAB_001ffbb6: MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x38] CALL 0x00200390 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],-0x2 JNZ 0x001ffbf6 MOV EAX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x50] CMP RAX,qword ptr [RCX] SETZ AL AND AL,0x1 MOVZX ESI,AL MOV EDI,0x20 CALL 0x00200630 MOV dword ptr [RBP + -0x3c],0x0 LAB_001ffbf6: CMP dword ptr [RBP + -0x3c],-0x1 JNZ 0x001ffc0f CMP dword ptr [RBP + -0x14],0x0 JZ 0x001ffc0f MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x38] CALL 0x00200670 LAB_001ffc0f: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001ffc47 CMP dword ptr [RBP + -0x14],0x0 JNZ 0x001ffc3e CMP dword ptr [RBP + -0x3c],0x0 JNZ 0x001ffc3e MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0xe8],0x0 JNZ 0x001ffc3e JMP 0x001ffc31 LAB_001ffc31: JMP 0x001ffc33 LAB_001ffc33: JMP 0x001ffc35 LAB_001ffc35: JMP 0x001ffc37 LAB_001ffc37: MOV dword ptr [RBP + -0x3c],0xfffffffd LAB_001ffc3e: MOV RDI,qword ptr [RBP + -0x20] CALL 0x001ffad0 LAB_001ffc47: CMP dword ptr [RBP + -0x3c],-0x1 JNZ 0x001ffc8b MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x8] JZ 0x001ffc8b JMP 0x001ffc59 LAB_001ffc59: JMP 0x001ffc5b LAB_001ffc5b: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x60],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x28] ADD RDI,0xa8 CALL 0x00200170 MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x28] CALL 0x001ffad0 MOV dword ptr [RBP + -0x3c],0x0 LAB_001ffc8b: JMP 0x001ffc8d LAB_001ffc8d: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x40] ADD RSP,0x40 POP RBP RET
int deadlock(long param_1,int8 param_2,int param_3,uint param_4) { int local_44; long local_40; uint local_38; long local_30; long local_28; uint local_20; int local_1c; int8 local_18; long local_10; local_30 = 0; local_28 = 0; local_40 = param_1; local_38 = param_4; local_20 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_44 = deadlock_search(&local_40,param_2,param_3); if (local_44 == -2) { increment_cycle_stats(0x20,(ulong)local_20 == **(ulong **)(local_10 + 0x50)); local_44 = 0; } if ((local_44 == -1) && (local_1c != 0)) { change_victim(local_18,&local_40); } if (local_28 != 0) { if (((local_1c == 0) && (local_44 == 0)) && (*(int *)(local_28 + 0xe8) == 0)) { local_44 = -3; } rc_unlock(local_28); } if ((local_44 == -1) && (local_30 != local_10)) { *(int1 *)(local_30 + 0x60) = 1; inline_mysql_cond_broadcast(*(long *)(local_30 + 0x28) + 0xa8); rc_unlock(*(int8 *)(local_30 + 0x28)); local_44 = 0; } return local_44; }
47,648
deadlock
eloqsql/mysys/waiting_threads.c
static int deadlock(WT_THD *thd, WT_THD *blocker, uint depth, uint max_depth) { struct deadlock_arg arg= {thd, max_depth, 0, 0}; int ret; DBUG_ENTER("deadlock"); DBUG_ASSERT(depth < 2); ret= deadlock_search(&arg, blocker, depth); if (ret == WT_DEPTH_EXCEEDED) { increment_cycle_stats(WT_CYCLE_STATS, max_depth == *thd->deadlock_search_depth_long); ret= WT_OK; } /* if we started with depth==1, blocker was never considered for a victim in deadlock_search(). Do it here. */ if (ret == WT_DEADLOCK && depth) change_victim(blocker, &arg); if (arg.last_locked_rc) { /* Special return code if there's nobody to wait for. depth == 0 means that we start the search from thd (thd == blocker). ret == WT_OK means that no cycle was found and arg.last_locked_rc == thd->waiting_for. and arg.last_locked_rc->owners.elements == 0 means that (applying the rule above) thd->waiting_for->owners.elements == 0, and thd doesn't have anybody to wait for. */ if (depth == 0 && ret == WT_OK && arg.last_locked_rc->owners.elements == 0) { DBUG_ASSERT(thd == blocker); DBUG_ASSERT(arg.last_locked_rc == thd->waiting_for); ret= WT_FREE_TO_GO; } rc_unlock(arg.last_locked_rc); } /* notify the victim, if appropriate */ if (ret == WT_DEADLOCK && arg.victim != thd) { DBUG_PRINT("wt", ("killing %s", arg.victim->name)); arg.victim->killed= 1; mysql_cond_broadcast(&arg.victim->waiting_for->cond); rc_unlock(arg.victim->waiting_for); ret= WT_OK; } DBUG_RETURN(ret); }
O3
c
deadlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %ecx, %r13d movl %edx, %r15d movq %rsi, %r14 movq %rdi, %rbx leaq -0x48(%rbp), %rdi movq %rbx, (%rdi) movl %ecx, 0x8(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) callq 0xa6ea7 cmpl $-0x2, %eax jne 0xa69b4 movl %r13d, %eax movq 0x50(%rbx), %rcx xorl %edx, %edx cmpq %rax, (%rcx) sete %dl movl %edx, %eax shll $0x7, %eax leal (%rax,%rdx,4), %eax leaq 0xb62268(%rip), %rcx # 0xc08c10 incl 0x80(%rcx,%rax) xorl %r12d, %r12d jmp 0xa69f0 movl %eax, %r12d cmpl $-0x1, %eax setne %al testl %r15d, %r15d sete %cl orb %al, %cl jne 0xa69f0 movq 0x58(%r14), %rcx movq -0x38(%rbp), %rax movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpq 0x58(%rax), %rcx jae 0xa69f0 cmpq -0x48(%rbp), %rax je 0xa6a25 movq 0x28(%rax), %rdi addq $0x18, %rdi callq 0xa4036 jmp 0xa6a25 movq -0x30(%rbp), %rdi testq %rdi, %rdi je 0xa6a1b orl %r12d, %r15d jne 0xa6a12 xorl %eax, %eax cmpl $0x0, 0xe8(%rdi) setne %al leal (%rax,%rax,2), %r12d addl $-0x3, %r12d addq $0x18, %rdi callq 0xa4036 cmpl $-0x1, %r12d jne 0xa6a66 movq -0x38(%rbp), %r14 cmpq %rbx, %r14 je 0xa6a60 movb $0x1, 0x60(%r14) movq 0x28(%r14), %rbx movq 0xd8(%rbx), %rdi addq $0xa8, %rbx testq %rdi, %rdi jne 0xa6a78 movq %rbx, %rdi callq 0x296f0 movq 0x28(%r14), %rdi addq $0x18, %rdi callq 0xa4036 xorl %r12d, %r12d jmp 0xa6a66 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl %r12d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2df591(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x178(%rax) jmp 0xa6a46
deadlock: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r13d, ecx mov r15d, edx mov r14, rsi mov rbx, rdi lea rdi, [rbp+var_48] mov [rdi], rbx mov [rdi+8], ecx xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 call deadlock_search cmp eax, 0FFFFFFFEh jnz short loc_A69B4 mov eax, r13d mov rcx, [rbx+50h] xor edx, edx cmp [rcx], rax setz dl mov eax, edx shl eax, 7 lea eax, [rax+rdx*4] lea rcx, wt_cycle_stats inc dword ptr [rcx+rax+80h] xor r12d, r12d jmp short loc_A69F0 loc_A69B4: mov r12d, eax cmp eax, 0FFFFFFFFh setnz al test r15d, r15d setz cl or cl, al jnz short loc_A69F0 mov rcx, [r14+58h] mov rax, [rbp+var_38] mov r12d, 0FFFFFFFFh cmp rcx, [rax+58h] jnb short loc_A69F0 cmp rax, [rbp+var_48] jz short loc_A6A25 mov rdi, [rax+28h] add rdi, 18h call my_rw_unlock jmp short loc_A6A25 loc_A69F0: mov rdi, [rbp+var_30] test rdi, rdi jz short loc_A6A1B or r15d, r12d jnz short loc_A6A12 xor eax, eax cmp dword ptr [rdi+0E8h], 0 setnz al lea r12d, [rax+rax*2] add r12d, 0FFFFFFFDh loc_A6A12: add rdi, 18h call my_rw_unlock loc_A6A1B: cmp r12d, 0FFFFFFFFh jnz short loc_A6A66 mov r14, [rbp+var_38] loc_A6A25: cmp r14, rbx jz short loc_A6A60 mov byte ptr [r14+60h], 1 mov rbx, [r14+28h] mov rdi, [rbx+0D8h] add rbx, 0A8h test rdi, rdi jnz short loc_A6A78 loc_A6A46: mov rdi, rbx call _pthread_cond_broadcast mov rdi, [r14+28h] add rdi, 18h call my_rw_unlock xor r12d, r12d jmp short loc_A6A66 loc_A6A60: mov r12d, 0FFFFFFFFh loc_A6A66: mov eax, r12d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A6A78: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+178h] jmp short loc_A6A46
long long deadlock(long long a1, long long a2, int a3, int a4) { long long v6; // r14 unsigned int v7; // eax long long v8; // rax unsigned int v9; // r12d long long v10; // rbx long long v11; // rdi long long v12; // rbx v6 = a2; v7 = deadlock_search(); if ( v7 == -2 ) { v8 = 132 * (unsigned int)(**(_QWORD **)(a1 + 80) == a4); ++*(_DWORD *)((char *)&wt_cycle_stats + v8 + 128); v9 = 0; } else { v9 = v7; if ( v7 == -1 && a3 != 0 ) { v9 = -1; if ( *(_QWORD *)(a2 + 88) < 0x40uLL ) { if ( a1 ) my_rw_unlock(4375712LL); goto LABEL_9; } } } if ( v9 != -1 ) return v9; v6 = 0LL; LABEL_9: if ( v6 == a1 ) { return (unsigned int)-1; } else { *(_BYTE *)(v6 + 96) = 1; v10 = *(_QWORD *)(v6 + 40); v11 = *(_QWORD *)(v10 + 216); v12 = v10 + 168; if ( v11 ) PSI_server[47](); pthread_cond_broadcast(v12); my_rw_unlock(*(_QWORD *)(v6 + 40) + 24LL); return 0; } }
deadlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R13D,ECX MOV R15D,EDX MOV R14,RSI MOV RBX,RDI LEA RDI,[RBP + -0x48] MOV qword ptr [RDI],RBX MOV dword ptr [RDI + 0x8],ECX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 CALL 0x001a6ea7 CMP EAX,-0x2 JNZ 0x001a69b4 MOV EAX,R13D MOV RCX,qword ptr [RBX + 0x50] XOR EDX,EDX CMP qword ptr [RCX],RAX SETZ DL MOV EAX,EDX SHL EAX,0x7 LEA EAX,[RAX + RDX*0x4] LEA RCX,[0xd08c10] INC dword ptr [RCX + RAX*0x1 + 0x80] XOR R12D,R12D JMP 0x001a69f0 LAB_001a69b4: MOV R12D,EAX CMP EAX,-0x1 SETNZ AL TEST R15D,R15D SETZ CL OR CL,AL JNZ 0x001a69f0 MOV RCX,qword ptr [R14 + 0x58] MOV RAX,qword ptr [RBP + -0x38] MOV R12D,0xffffffff CMP RCX,qword ptr [RAX + 0x58] JNC 0x001a69f0 CMP RAX,qword ptr [RBP + -0x48] JZ 0x001a6a25 MOV RDI,qword ptr [RAX + 0x28] ADD RDI,0x18 CALL 0x001a4036 JMP 0x001a6a25 LAB_001a69f0: MOV RDI,qword ptr [RBP + -0x30] TEST RDI,RDI JZ 0x001a6a1b OR R15D,R12D JNZ 0x001a6a12 XOR EAX,EAX CMP dword ptr [RDI + 0xe8],0x0 SETNZ AL LEA R12D,[RAX + RAX*0x2] ADD R12D,-0x3 LAB_001a6a12: ADD RDI,0x18 CALL 0x001a4036 LAB_001a6a1b: CMP R12D,-0x1 JNZ 0x001a6a66 MOV R14,qword ptr [RBP + -0x38] LAB_001a6a25: CMP R14,RBX JZ 0x001a6a60 MOV byte ptr [R14 + 0x60],0x1 MOV RBX,qword ptr [R14 + 0x28] MOV RDI,qword ptr [RBX + 0xd8] ADD RBX,0xa8 TEST RDI,RDI JNZ 0x001a6a78 LAB_001a6a46: MOV RDI,RBX CALL 0x001296f0 MOV RDI,qword ptr [R14 + 0x28] ADD RDI,0x18 CALL 0x001a4036 XOR R12D,R12D JMP 0x001a6a66 LAB_001a6a60: MOV R12D,0xffffffff LAB_001a6a66: MOV EAX,R12D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a6a78: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x178] JMP 0x001a6a46
/* WARNING: Removing unreachable block (ram,0x001a69f9) */ /* WARNING: Removing unreachable block (ram,0x001a69fe) */ /* WARNING: Removing unreachable block (ram,0x001a6a12) */ int deadlock(long param_1,long param_2,int param_3,uint param_4) { long lVar1; int iVar2; bool bVar3; iVar2 = deadlock_search(); if (iVar2 == -2) { bVar3 = **(ulong **)(param_1 + 0x50) == (ulong)param_4; *(int *)(wt_cycle_stats + (ulong)((uint)bVar3 * 0x80 + (uint)bVar3 * 4) + 0x80) = *(int *)(wt_cycle_stats + (ulong)((uint)bVar3 * 0x80 + (uint)bVar3 * 4) + 0x80) + 1; iVar2 = 0; } else if ((param_3 != 0 && iVar2 == -1) && (iVar2 = -1, *(ulong *)(param_2 + 0x58) < uRam0000000000000058)) { if (param_1 != 0) { my_rw_unlock(lRam0000000000000028 + 0x18); } goto LAB_001a6a25; } if (iVar2 != -1) { return iVar2; } param_2 = 0; LAB_001a6a25: if (param_2 == param_1) { iVar2 = -1; } else { *(int1 *)(param_2 + 0x60) = 1; lVar1 = *(long *)(param_2 + 0x28); if (*(long *)(lVar1 + 0xd8) != 0) { (**(code **)(PSI_server + 0x178))(); } pthread_cond_broadcast((pthread_cond_t *)(lVar1 + 0xa8)); my_rw_unlock(*(long *)(param_2 + 0x28) + 0x18); iVar2 = 0; } return iVar2; }
47,649
testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite(char const*, int)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h
static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite(const char* filename, int line_num) { #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ SetUpTearDownSuiteFuncType test_case_fp = GetNotDefaultOrNull(&T::SetUpTestCase, &Test::SetUpTestCase); SetUpTearDownSuiteFuncType test_suite_fp = GetNotDefaultOrNull(&T::SetUpTestSuite, &Test::SetUpTestSuite); GTEST_CHECK_(!test_case_fp || !test_suite_fp) << "Test can not provide both SetUpTestSuite and SetUpTestCase, please " "make sure there is only one present at " << filename << ":" << line_num; return test_case_fp != nullptr ? test_case_fp : test_suite_fp; #else (void)(filename); (void)(line_num); return &T::SetUpTestSuite; #endif }
O3
c
testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite(char const*, int): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movl %esi, %ebx movq %rdi, %r14 movl $0x1, %edi callq 0x118c8 testb %al, %al jne 0xd39d leaq 0x331af(%rip), %rdx # 0x4049c leaq 0xc(%rsp), %rdi movl $0x3, %esi movl $0x201, %ecx # imm = 0x201 callq 0x16b08 movq 0x4bce0(%rip), %rdi # 0x58fe8 leaq 0x3321c(%rip), %rsi # 0x4052b movl $0x32, %edx callq 0x85b0 movq 0x4bcc8(%rip), %r15 # 0x58fe8 leaq 0x33237(%rip), %rsi # 0x4055e movl $0x6a, %edx movq %r15, %rdi callq 0x85b0 testq %r14, %r14 je 0xd355 movq %r14, %rdi callq 0x8200 movq 0x4bca0(%rip), %rdi # 0x58fe8 movq %r14, %rsi movq %rax, %rdx callq 0x85b0 jmp 0xd36d movq (%r15), %rax movq -0x18(%rax), %rax leaq (%r15,%rax), %rdi movl 0x20(%r15,%rax), %esi orl $0x1, %esi callq 0x8930 movq 0x4bc74(%rip), %rdi # 0x58fe8 leaq 0x364f6(%rip), %rsi # 0x43871 movl $0x1, %edx callq 0x85b0 movq 0x4bc5c(%rip), %rdi # 0x58fe8 movl %ebx, %esi callq 0x8950 leaq 0xc(%rsp), %rdi callq 0x16c4a xorl %eax, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0xc(%rsp), %rdi callq 0x16c4a movq %rbx, %rdi callq 0x8990
_ZN7testing8internal16SuiteApiResolverI16FindPeaksCppTestE19GetSetUpCaseOrSuiteEPKci: push r15 push r14 push rbx sub rsp, 10h mov ebx, esi mov r14, rdi mov edi, (offset dword_0+1); this call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool) test al, al jnz loc_D39D lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+28h+var_1C] mov esi, 3 mov ecx, 201h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aConditionTestC; "Condition !test_case_fp || !test_suite_"... mov edx, 32h ; '2' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r15, cs:_ZSt4cerr_ptr lea rsi, aTestCanNotProv; "Test can not provide both SetUpTestSuit"... mov edx, 6Ah ; 'j' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r14, r14 jz short loc_D355 mov rdi, r14 call _strlen mov rdi, cs:_ZSt4cerr_ptr mov rsi, r14 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_D36D loc_D355: mov rax, [r15] mov rax, [rax-18h] lea rdi, [r15+rax] mov esi, [r15+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_D36D: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aTrace+6; ":" mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, cs:_ZSt4cerr_ptr mov esi, ebx call __ZNSolsEi; std::ostream::operator<<(int) lea rdi, [rsp+28h+var_1C]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() loc_D39D: xor eax, eax add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_4]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() mov rdi, rbx call __Unwind_Resume
long long testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite(long long a1, BOOL a2) { long long v2; // rax _BYTE v4[28]; // [rsp+Ch] [rbp-1Ch] BYREF if ( !(unsigned __int8)testing::internal::IsTrue((testing::internal *)((char *)&dword_0 + 1), a2) ) { testing::internal::GTestLog::GTestLog( v4, 3LL, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gte" "st/internal/gtest-internal.h", 513LL); std::__ostream_insert<char,std::char_traits<char>>( &std::cerr, "Condition !test_case_fp || !test_suite_fp failed. ", 50LL); std::__ostream_insert<char,std::char_traits<char>>( &std::cerr, "Test can not provide both SetUpTestSuite and SetUpTestCase, please make sure there is only one present at ", 106LL); if ( a1 ) { v2 = strlen(a1); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, a1, v2); } else { std::ios::clear( (char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL), *(_DWORD *)((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL) + 32) | 1u); } std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, ":", 1LL); std::ostream::operator<<(&std::cerr, a2); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v4); } return 0LL; }
GetSetUpCaseOrSuite: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV EBX,ESI MOV R14,RDI MOV EDI,0x1 CALL 0x001118c8 TEST AL,AL JNZ 0x0010d39d LEA RDX,[0x14049c] LEA RDI,[RSP + 0xc] MOV ESI,0x3 MOV ECX,0x201 CALL 0x00116b08 LAB_0010d301: MOV RDI,qword ptr [0x00158fe8] LEA RSI,[0x14052b] MOV EDX,0x32 CALL 0x001085b0 MOV R15,qword ptr [0x00158fe8] LEA RSI,[0x14055e] MOV EDX,0x6a MOV RDI,R15 CALL 0x001085b0 TEST R14,R14 JZ 0x0010d355 MOV RDI,R14 CALL 0x00108200 MOV RDI,qword ptr [0x00158fe8] MOV RSI,R14 MOV RDX,RAX CALL 0x001085b0 JMP 0x0010d36d LAB_0010d355: MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[R15 + RAX*0x1] MOV ESI,dword ptr [R15 + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x00108930 LAB_0010d36d: MOV RDI,qword ptr [0x00158fe8] LEA RSI,[0x143871] MOV EDX,0x1 CALL 0x001085b0 MOV RDI,qword ptr [0x00158fe8] MOV ESI,EBX CALL 0x00108950 LAB_0010d393: LEA RDI,[RSP + 0xc] CALL 0x00116c4a LAB_0010d39d: XOR EAX,EAX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite(char const*, int) */ int8 testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite (char *param_1,int param_2) { int *puVar1; char cVar2; size_t sVar3; GTestLog local_1c [4]; cVar2 = IsTrue(true); if (cVar2 == '\0') { GTestLog::GTestLog(local_1c,3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h" ,0x201); /* try { // try from 0010d301 to 0010d392 has its CatchHandler @ 0010d3a9 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8,"Condition !test_case_fp || !test_suite_fp failed. ", 0x32); puVar1 = PTR_cerr_00158fe8; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8, "Test can not provide both SetUpTestSuite and SetUpTestCase, please make sure there is only one present at " ,0x6a); if (param_1 == (char *)0x0) { std::ios::clear(puVar1 + *(long *)(*(long *)puVar1 + -0x18), *(uint *)(puVar1 + *(long *)(*(long *)puVar1 + -0x18) + 0x20) | 1); } else { sVar3 = strlen(param_1); std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,param_1,sVar3) ; } std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,":",1); std::ostream::operator<<((ostream *)PTR_cerr_00158fe8,param_2); GTestLog::~GTestLog(local_1c); } return 0; }
47,650
mysql_session_track_get_first
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_session_track_get_first(MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length) { mysql->extension->session_state[type].current= mysql->extension->session_state[type].list; return mysql_session_track_get_next(mysql, type, data, length); }
O3
c
mysql_session_track_get_first: pushq %rbp movq %rsp, %rbp movq 0x4f0(%rdi), %r8 movl %esi, %eax shlq $0x4, %rax movq 0x8(%r8,%rax), %rsi movq %rsi, 0x10(%r8,%rax) movq 0x4f0(%rdi), %rdi movq 0x10(%rdi,%rax), %rsi testq %rsi, %rsi je 0x2216e addq %rdi, %rax addq $0x10, %rax movq 0x8(%rsi), %rdi movq 0x10(%rsi), %rsi movq %rdi, (%rax) movq (%rsi), %rdi movq %rdi, (%rdx) xorl %eax, %eax testq %rdi, %rdi je 0x22175 movq 0x8(%rsi), %rdx jmp 0x22177 movl $0x1, %eax jmp 0x2217a xorl %edx, %edx movq %rdx, (%rcx) popq %rbp retq
mysql_session_track_get_first: push rbp mov rbp, rsp mov r8, [rdi+4F0h] mov eax, esi shl rax, 4 mov rsi, [r8+rax+8] mov [r8+rax+10h], rsi mov rdi, [rdi+4F0h] mov rsi, [rdi+rax+10h] test rsi, rsi jz short loc_2216E add rax, rdi add rax, 10h mov rdi, [rsi+8] mov rsi, [rsi+10h] mov [rax], rdi mov rdi, [rsi] mov [rdx], rdi xor eax, eax test rdi, rdi jz short loc_22175 mov rdx, [rsi+8] jmp short loc_22177 loc_2216E: mov eax, 1 jmp short loc_2217A loc_22175: xor edx, edx loc_22177: mov [rcx], rdx loc_2217A: pop rbp retn
long long mysql_session_track_get_first(long long a1, unsigned int a2, long long *a3, _QWORD *a4) { long long v4; // rax long long v5; // rdi long long v6; // rsi _QWORD *v7; // rax long long v8; // rdi long long *v9; // rsi long long v10; // rdi long long result; // rax long long v12; // rdx v4 = 16LL * a2; *(_QWORD *)(*(_QWORD *)(a1 + 1264) + v4 + 16) = *(_QWORD *)(*(_QWORD *)(a1 + 1264) + v4 + 8); v5 = *(_QWORD *)(a1 + 1264); v6 = *(_QWORD *)(v5 + v4 + 16); if ( !v6 ) return 1LL; v7 = (_QWORD *)(v5 + v4 + 16); v8 = *(_QWORD *)(v6 + 8); v9 = *(long long **)(v6 + 16); *v7 = v8; v10 = *v9; *a3 = *v9; result = 0LL; if ( v10 ) v12 = v9[1]; else v12 = 0LL; *a4 = v12; return result; }
mysql_session_track_get_first: PUSH RBP MOV RBP,RSP MOV R8,qword ptr [RDI + 0x4f0] MOV EAX,ESI SHL RAX,0x4 MOV RSI,qword ptr [R8 + RAX*0x1 + 0x8] MOV qword ptr [R8 + RAX*0x1 + 0x10],RSI MOV RDI,qword ptr [RDI + 0x4f0] MOV RSI,qword ptr [RDI + RAX*0x1 + 0x10] TEST RSI,RSI JZ 0x0012216e ADD RAX,RDI ADD RAX,0x10 MOV RDI,qword ptr [RSI + 0x8] MOV RSI,qword ptr [RSI + 0x10] MOV qword ptr [RAX],RDI MOV RDI,qword ptr [RSI] MOV qword ptr [RDX],RDI XOR EAX,EAX TEST RDI,RDI JZ 0x00122175 MOV RDX,qword ptr [RSI + 0x8] JMP 0x00122177 LAB_0012216e: MOV EAX,0x1 JMP 0x0012217a LAB_00122175: XOR EDX,EDX LAB_00122177: MOV qword ptr [RCX],RDX LAB_0012217a: POP RBP RET
int8 mysql_session_track_get_first(long param_1,ulong param_2,long *param_3,long *param_4) { long *plVar1; long lVar2; int8 uVar3; long lVar4; lVar2 = (param_2 & 0xffffffff) * 0x10; *(int8 *)(*(long *)(param_1 + 0x4f0) + 0x10 + lVar2) = *(int8 *)(*(long *)(param_1 + 0x4f0) + 8 + lVar2); lVar4 = *(long *)(*(long *)(param_1 + 0x4f0) + 0x10 + lVar2); if (lVar4 == 0) { uVar3 = 1; } else { plVar1 = *(long **)(lVar4 + 0x10); *(int8 *)(lVar2 + *(long *)(param_1 + 0x4f0) + 0x10) = *(int8 *)(lVar4 + 8); lVar4 = *plVar1; *param_3 = lVar4; uVar3 = 0; if (lVar4 == 0) { lVar4 = 0; } else { lVar4 = plVar1[1]; } *param_4 = lVar4; } return uVar3; }
47,651
ma_scramble_41
eloqsql/libmariadb/libmariadb/ma_password.c
void ma_scramble_41(const unsigned char *buffer, const char *scramble, const char *password) { _MA_SHA1_CTX context; unsigned char sha1[SHA1_MAX_LENGTH]; unsigned char sha2[SHA1_MAX_LENGTH]; /* Phase 1: hash password */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char *)password, strlen((char *)password)); ma_SHA1Final(sha1, &context); /* Phase 2: hash sha1 */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char*)sha1, SHA1_MAX_LENGTH); ma_SHA1Final(sha2, &context); /* Phase 3: hash scramble + sha2 */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char *)scramble, SCRAMBLE_LENGTH); ma_SHA1Update(&context, (unsigned char*)sha2, SHA1_MAX_LENGTH); ma_SHA1Final((unsigned char *)buffer, &context); /* let's crypt buffer now */ my_crypt((uchar *)buffer, (const unsigned char *)buffer, (const unsigned char *)sha1, SHA1_MAX_LENGTH); }
O3
c
ma_scramble_41: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa0, %rsp movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq -0x84(%rbp), %r14 movq %r14, %rdi callq 0x3285c movq %r12, %rdi callq 0x131c0 movq %r14, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x3287c leaq -0xa0(%rbp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x33a04 movq %r14, %rdi callq 0x3285c movl $0x14, %edx movq %r14, %rdi movq %r12, %rsi callq 0x3287c leaq -0xc0(%rbp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x33a04 movq %r14, %rdi callq 0x3285c movl $0x14, %edx movq %r14, %rdi movq %r15, %rsi callq 0x3287c movl $0x14, %edx movq %r14, %rdi movq %r12, %rsi callq 0x3287c movq %rbx, %rdi movq %r14, %rsi callq 0x33a04 xorl %eax, %eax movb -0xa0(%rbp,%rax), %cl xorb %cl, (%rbx,%rax) leaq 0x1(%rax), %rcx movq %rcx, %rax cmpq $0x14, %rcx jne 0x3252c movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x32562 addq $0xa0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x13500
ma_scramble_41: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 0A0h mov r12, rdx mov r15, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax lea r14, [rbp+var_84] mov rdi, r14 call ma_SHA1Init mov rdi, r12 call _strlen mov rdi, r14 mov rsi, r12 mov rdx, rax call ma_SHA1Update lea r12, [rbp+var_A0] mov rdi, r12 mov rsi, r14 call ma_SHA1Final mov rdi, r14 call ma_SHA1Init mov edx, 14h mov rdi, r14 mov rsi, r12 call ma_SHA1Update lea r12, [rbp+var_C0] mov rdi, r12 mov rsi, r14 call ma_SHA1Final mov rdi, r14 call ma_SHA1Init mov edx, 14h mov rdi, r14 mov rsi, r15 call ma_SHA1Update mov edx, 14h mov rdi, r14 mov rsi, r12 call ma_SHA1Update mov rdi, rbx mov rsi, r14 call ma_SHA1Final xor eax, eax loc_3252C: mov cl, [rbp+rax+var_A0] xor [rbx+rax], cl lea rcx, [rax+1] mov rax, rcx cmp rcx, 14h jnz short loc_3252C mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_32562 add rsp, 0A0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_32562: call ___stack_chk_fail
unsigned long long ma_scramble_41(long long a1, long long a2, long long a3) { long long v4; // rax long long i; // rax _BYTE v7[32]; // [rsp+0h] [rbp-C0h] BYREF _BYTE v8[28]; // [rsp+20h] [rbp-A0h] BYREF _BYTE v9[92]; // [rsp+3Ch] [rbp-84h] BYREF unsigned long long v10; // [rsp+98h] [rbp-28h] v10 = __readfsqword(0x28u); ma_SHA1Init(v9); v4 = strlen(a3); ma_SHA1Update(v9, a3, v4); ma_SHA1Final(v8, v9); ma_SHA1Init(v9); ma_SHA1Update(v9, v8, 20LL); ma_SHA1Final(v7, v9); ma_SHA1Init(v9); ma_SHA1Update(v9, a2, 20LL); ma_SHA1Update(v9, v7, 20LL); ma_SHA1Final(a1, v9); for ( i = 0LL; i != 20; ++i ) *(_BYTE *)(a1 + i) ^= v8[i]; return __readfsqword(0x28u); }
ma_scramble_41: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA R14,[RBP + -0x84] MOV RDI,R14 CALL 0x0013285c MOV RDI,R12 CALL 0x001131c0 MOV RDI,R14 MOV RSI,R12 MOV RDX,RAX CALL 0x0013287c LEA R12,[RBP + -0xa0] MOV RDI,R12 MOV RSI,R14 CALL 0x00133a04 MOV RDI,R14 CALL 0x0013285c MOV EDX,0x14 MOV RDI,R14 MOV RSI,R12 CALL 0x0013287c LEA R12,[RBP + -0xc0] MOV RDI,R12 MOV RSI,R14 CALL 0x00133a04 MOV RDI,R14 CALL 0x0013285c MOV EDX,0x14 MOV RDI,R14 MOV RSI,R15 CALL 0x0013287c MOV EDX,0x14 MOV RDI,R14 MOV RSI,R12 CALL 0x0013287c MOV RDI,RBX MOV RSI,R14 CALL 0x00133a04 XOR EAX,EAX LAB_0013252c: MOV CL,byte ptr [RBP + RAX*0x1 + -0xa0] XOR byte ptr [RBX + RAX*0x1],CL LEA RCX,[RAX + 0x1] MOV RAX,RCX CMP RCX,0x14 JNZ 0x0013252c MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x00132562 ADD RSP,0xa0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00132562: CALL 0x00113500
void ma_scramble_41(long param_1,int8 param_2,char *param_3) { size_t sVar1; long lVar2; long in_FS_OFFSET; int1 local_c8 [32]; byte local_a8 [28]; int1 local_8c [92]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); ma_SHA1Init(local_8c); sVar1 = strlen(param_3); ma_SHA1Update(local_8c,param_3,sVar1); ma_SHA1Final(local_a8,local_8c); ma_SHA1Init(local_8c); ma_SHA1Update(local_8c,local_a8,0x14); ma_SHA1Final(local_c8,local_8c); ma_SHA1Init(local_8c); ma_SHA1Update(local_8c,param_2,0x14); ma_SHA1Update(local_8c,local_c8,0x14); ma_SHA1Final(param_1,local_8c); lVar2 = 0; do { *(byte *)(param_1 + lVar2) = *(byte *)(param_1 + lVar2) ^ local_a8[lVar2]; lVar2 = lVar2 + 1; } while (lVar2 != 0x14); if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,652
GGMLModule::free_params_buffer()
7CodeWizard[P]stablediffusion/ggml_extend.hpp
void free_params_buffer() { if (params_ctx != NULL) { ggml_free(params_ctx); params_ctx = NULL; } if (params_buffer != NULL) { ggml_backend_buffer_free(params_buffer); params_buffer = NULL; } }
O0
cpp
GGMLModule::free_params_buffer(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x28(%rax) je 0x3b0d5 movq 0x8(%rsp), %rax movq 0x28(%rax), %rdi callq 0x11bfa0 movq 0x8(%rsp), %rax movq $0x0, 0x28(%rax) movq 0x8(%rsp), %rax cmpq $0x0, 0x40(%rax) je 0x3b0fc movq 0x8(%rsp), %rax movq 0x40(%rax), %rdi callq 0x166970 movq 0x8(%rsp), %rax movq $0x0, 0x40(%rax) addq $0x18, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN10GGMLModule18free_params_bufferEv: 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+28h], 0 jz short loc_3B0D5 mov rax, [rsp+18h+var_10] mov rdi, [rax+28h] call ggml_free mov rax, [rsp+18h+var_10] mov qword ptr [rax+28h], 0 loc_3B0D5: mov rax, [rsp+18h+var_10] cmp qword ptr [rax+40h], 0 jz short loc_3B0FC mov rax, [rsp+18h+var_10] mov rdi, [rax+40h] call ggml_backend_buffer_free mov rax, [rsp+18h+var_10] mov qword ptr [rax+40h], 0 loc_3B0FC: add rsp, 18h retn
GGMLModule * GGMLModule::free_params_buffer(GGMLModule *this) { GGMLModule *result; // rax if ( *((_QWORD *)this + 5) ) { ggml_free(*((_QWORD *)this + 5)); *((_QWORD *)this + 5) = 0LL; } result = this; if ( *((_QWORD *)this + 8) ) { ggml_backend_buffer_free(*((_QWORD *)this + 8)); result = this; *((_QWORD *)this + 8) = 0LL; } return result; }
free_params_buffer: 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 + 0x28],0x0 JZ 0x0013b0d5 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x28] CALL 0x0021bfa0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x28],0x0 LAB_0013b0d5: MOV RAX,qword ptr [RSP + 0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0013b0fc MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x40] CALL 0x00266970 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x40],0x0 LAB_0013b0fc: ADD RSP,0x18 RET
/* GGMLModule::free_params_buffer() */ void __thiscall GGMLModule::free_params_buffer(GGMLModule *this) { if (*(long *)(this + 0x28) != 0) { ggml_free(*(int8 *)(this + 0x28)); *(int8 *)(this + 0x28) = 0; } if (*(long *)(this + 0x40) != 0) { ggml_backend_buffer_free(*(int8 *)(this + 0x40)); *(int8 *)(this + 0x40) = 0; } return; }
47,653
GGMLModule::free_params_buffer()
7CodeWizard[P]stablediffusion/ggml_extend.hpp
void free_params_buffer() { if (params_ctx != NULL) { ggml_free(params_ctx); params_ctx = NULL; } if (params_buffer != NULL) { ggml_backend_buffer_free(params_buffer); params_buffer = NULL; } }
O1
cpp
GGMLModule::free_params_buffer(): pushq %rbx movq %rdi, %rbx movq 0x28(%rdi), %rdi testq %rdi, %rdi je 0x3534a callq 0x8e752 movq $0x0, 0x28(%rbx) movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x35360 callq 0xb3e3c movq $0x0, 0x40(%rbx) popq %rbx retq
_ZN10GGMLModule18free_params_bufferEv: push rbx mov rbx, rdi mov rdi, [rdi+28h] test rdi, rdi jz short loc_3534A call ggml_free mov qword ptr [rbx+28h], 0 loc_3534A: mov rdi, [rbx+40h] test rdi, rdi jz short loc_35360 call ggml_backend_buffer_free mov qword ptr [rbx+40h], 0 loc_35360: pop rbx retn
long long GGMLModule::free_params_buffer(GGMLModule *this) { long long v2; // rdi long long result; // rax long long v4; // rdi v2 = *((_QWORD *)this + 5); if ( v2 ) { result = ggml_free(v2); *((_QWORD *)this + 5) = 0LL; } v4 = *((_QWORD *)this + 8); if ( v4 ) { result = ggml_backend_buffer_free(v4); *((_QWORD *)this + 8) = 0LL; } return result; }
47,654
js_fmax
bluesky950520[P]quickjs/quickjs.c
static double js_fmax(double a, double b) { if (a == 0 && b == 0) { JSFloat64Union a1, b1; a1.d = a; b1.d = b; a1.u64 &= b1.u64; return a1.d; } else { return fmax(a, b); } }
O0
c
js_fmax: movsd %xmm0, -0x10(%rsp) movsd %xmm1, -0x18(%rsp) movsd -0x10(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0xdf363 jp 0xdf363 movsd -0x18(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0xdf363 jp 0xdf363 movsd -0x10(%rsp), %xmm0 movsd %xmm0, -0x20(%rsp) movsd -0x18(%rsp), %xmm0 movsd %xmm0, -0x28(%rsp) movq -0x28(%rsp), %rax andq -0x20(%rsp), %rax movq %rax, -0x20(%rsp) movsd -0x20(%rsp), %xmm0 movsd %xmm0, -0x8(%rsp) jmp 0xdf393 movsd -0x10(%rsp), %xmm3 movsd -0x18(%rsp), %xmm2 movaps %xmm2, %xmm4 movaps %xmm3, %xmm0 cmpunordsd %xmm0, %xmm0 movaps %xmm0, %xmm1 pand %xmm4, %xmm1 maxsd %xmm3, %xmm2 pandn %xmm2, %xmm0 por %xmm1, %xmm0 movsd %xmm0, -0x8(%rsp) movsd -0x8(%rsp), %xmm0 retq nopw (%rax,%rax)
js_fmax: movsd [rsp+var_10], xmm0 movsd [rsp+var_18], xmm1 movsd xmm0, [rsp+var_10] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_DF363 jp short loc_DF363 movsd xmm0, [rsp+var_18] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_DF363 jp short loc_DF363 movsd xmm0, [rsp+var_10] movsd [rsp+var_20], xmm0 movsd xmm0, [rsp+var_18] movsd [rsp+var_28], xmm0 mov rax, [rsp+var_28] and rax, [rsp+var_20] mov [rsp+var_20], rax movsd xmm0, [rsp+var_20] movsd [rsp+var_8], xmm0 jmp short loc_DF393 loc_DF363: movsd xmm3, [rsp+var_10] movsd xmm2, [rsp+var_18] movaps xmm4, xmm2 movaps xmm0, xmm3 cmpunordsd xmm0, xmm0 movaps xmm1, xmm0 pand xmm1, xmm4 maxsd xmm2, xmm3 pandn xmm0, xmm2 por xmm0, xmm1 movsd [rsp+var_8], xmm0 loc_DF393: movsd xmm0, [rsp+var_8] retn
double js_fmax(double a1, double a2) { __m128i v2; // xmm2 __m128i v3; // xmm0 double v6; // [rsp+20h] [rbp-8h] if ( a1 == 0.0 && a2 == 0.0 ) { *(_QWORD *)&v6 = *(_QWORD *)&a1 & *(_QWORD *)&a2; } else { v2 = (__m128i)*(unsigned long long *)&a2; v3 = (__m128i)_mm_cmpunord_sd((__m128d)*(unsigned long long *)&a1, (__m128d)*(unsigned long long *)&a1); *(double *)v2.m128i_i64 = fmax(a2, a1); *(_QWORD *)&v6 = _mm_or_si128(_mm_andnot_si128(v3, v2), _mm_and_si128(v3, (__m128i)*(unsigned long long *)&a2)).m128i_u64[0]; } return v6; }
js_fmax: MOVSD qword ptr [RSP + -0x10],XMM0 MOVSD qword ptr [RSP + -0x18],XMM1 MOVSD XMM0,qword ptr [RSP + -0x10] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x001df363 JP 0x001df363 MOVSD XMM0,qword ptr [RSP + -0x18] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x001df363 JP 0x001df363 MOVSD XMM0,qword ptr [RSP + -0x10] MOVSD qword ptr [RSP + -0x20],XMM0 MOVSD XMM0,qword ptr [RSP + -0x18] MOVSD qword ptr [RSP + -0x28],XMM0 MOV RAX,qword ptr [RSP + -0x28] AND RAX,qword ptr [RSP + -0x20] MOV qword ptr [RSP + -0x20],RAX MOVSD XMM0,qword ptr [RSP + -0x20] MOVSD qword ptr [RSP + -0x8],XMM0 JMP 0x001df393 LAB_001df363: MOVSD XMM3,qword ptr [RSP + -0x10] MOVSD XMM2,qword ptr [RSP + -0x18] MOVAPS XMM4,XMM2 MOVAPS XMM0,XMM3 CMPUNORDSD XMM0,XMM0 MOVAPS XMM1,XMM0 PAND XMM1,XMM4 MAXSD XMM2,XMM3 PANDN XMM0,XMM2 POR XMM0,XMM1 MOVSD qword ptr [RSP + -0x8],XMM0 LAB_001df393: MOVSD XMM0,qword ptr [RSP + -0x8] RET
ulong js_fmax(double param_1,double param_2) { int4 uVar1; int4 uVar2; int8 local_8; if ((((param_1 != 0.0) || (NAN(param_1))) || (param_2 != 0.0)) || (NAN(param_2))) { uVar1 = SUB84(param_2,0); uVar2 = (int)((ulong)param_2 >> 0x20); if (param_2 <= param_1) { uVar1 = SUB84(param_1,0); uVar2 = (int)((ulong)param_1 >> 0x20); } local_8 = ~-(ulong)NAN(param_1) & CONCAT44(uVar2,uVar1) | -(ulong)NAN(param_1) & (ulong)param_2; } else { local_8 = (ulong)param_2 & (ulong)param_1; } return local_8; }
47,655
parseParameters(int, char**)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainSinCache.cpp
bool parseParameters(int argc, char **argv) { // Read Parameters for (int i = 1; i < argc; ++i) { if (argv[i][0] == '-') { switch (argv[i][1]) { case 'v': verbose = 1; break; case 's': isSingleStep = 1; break; default: return false; } } else { if (traceFilePath == nullptr) { traceFilePath = argv[i]; } else { return false; } } } if (traceFilePath == nullptr) { return false; } return true; }
O0
cpp
parseParameters(int, char**): movl %edi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movl $0x1, -0x14(%rsp) movl -0x14(%rsp), %eax cmpl -0x8(%rsp), %eax jge 0x2904 movq -0x10(%rsp), %rax movslq -0x14(%rsp), %rcx movq (%rax,%rcx,8), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x28c8 movq -0x10(%rsp), %rax movslq -0x14(%rsp), %rcx movq (%rax,%rcx,8), %rax movsbl 0x1(%rax), %eax movl %eax, -0x18(%rsp) subl $0x73, %eax je 0x28b6 jmp 0x28a2 movl -0x18(%rsp), %eax subl $0x76, %eax jne 0x28bf jmp 0x28ad movb $0x1, 0x98f5(%rip) # 0xc1a9 jmp 0x28c6 movb $0x1, 0x98ed(%rip) # 0xc1aa jmp 0x28c6 movb $0x0, -0x1(%rsp) jmp 0x291a jmp 0x28f2 cmpq $0x0, 0x98e0(%rip) # 0xc1b0 jne 0x28e9 movq -0x10(%rsp), %rax movslq -0x14(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x98c9(%rip) # 0xc1b0 jmp 0x28f0 movb $0x0, -0x1(%rsp) jmp 0x291a jmp 0x28f2 jmp 0x28f4 movl -0x14(%rsp), %eax addl $0x1, %eax movl %eax, -0x14(%rsp) jmp 0x2861 cmpq $0x0, 0x98a4(%rip) # 0xc1b0 jne 0x2915 movb $0x0, -0x1(%rsp) jmp 0x291a movb $0x1, -0x1(%rsp) movb -0x1(%rsp), %al andb $0x1, %al retq nopw %cs:(%rax,%rax)
_Z15parseParametersiPPc: mov [rsp+var_8], edi mov [rsp+var_10], rsi mov [rsp+var_14], 1 loc_2861: mov eax, [rsp+var_14] cmp eax, [rsp+var_8] jge loc_2904 mov rax, [rsp+var_10] movsxd rcx, [rsp+var_14] mov rax, [rax+rcx*8] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_28C8 mov rax, [rsp+var_10] movsxd rcx, [rsp+var_14] mov rax, [rax+rcx*8] movsx eax, byte ptr [rax+1] mov [rsp+var_18], eax sub eax, 73h ; 's' jz short loc_28B6 jmp short $+2 loc_28A2: mov eax, [rsp+var_18] sub eax, 76h ; 'v' jnz short loc_28BF jmp short $+2 loc_28AD: mov cs:verbose, 1 jmp short loc_28C6 loc_28B6: mov cs:isSingleStep, 1 jmp short loc_28C6 loc_28BF: mov [rsp+var_1], 0 jmp short loc_291A loc_28C6: jmp short loc_28F2 loc_28C8: cmp cs:traceFilePath, 0 jnz short loc_28E9 mov rax, [rsp+var_10] movsxd rcx, [rsp+var_14] mov rax, [rax+rcx*8] mov cs:traceFilePath, rax jmp short loc_28F0 loc_28E9: mov [rsp+var_1], 0 jmp short loc_291A loc_28F0: jmp short $+2 loc_28F2: jmp short $+2 loc_28F4: mov eax, [rsp+var_14] add eax, 1 mov [rsp+var_14], eax jmp loc_2861 loc_2904: cmp cs:traceFilePath, 0 jnz short loc_2915 mov [rsp+var_1], 0 jmp short loc_291A loc_2915: mov [rsp+var_1], 1 loc_291A: mov al, [rsp+var_1] and al, 1 retn
bool parseParameters(int a1, char **a2) { int v3; // [rsp+0h] [rbp-18h] int i; // [rsp+4h] [rbp-14h] for ( i = 1; i < a1; ++i ) { if ( *a2[i] == 45 ) { v3 = a2[i][1]; if ( v3 == 115 ) { isSingleStep = 1; } else { if ( v3 != 118 ) return 0; verbose = 1; } } else { if ( traceFilePath ) return 0; traceFilePath = (long long)a2[i]; } } return traceFilePath != 0; }
parseParameters: MOV dword ptr [RSP + -0x8],EDI MOV qword ptr [RSP + -0x10],RSI MOV dword ptr [RSP + -0x14],0x1 LAB_00102861: MOV EAX,dword ptr [RSP + -0x14] CMP EAX,dword ptr [RSP + -0x8] JGE 0x00102904 MOV RAX,qword ptr [RSP + -0x10] MOVSXD RCX,dword ptr [RSP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x001028c8 MOV RAX,qword ptr [RSP + -0x10] MOVSXD RCX,dword ptr [RSP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOVSX EAX,byte ptr [RAX + 0x1] MOV dword ptr [RSP + -0x18],EAX SUB EAX,0x73 JZ 0x001028b6 JMP 0x001028a2 LAB_001028a2: MOV EAX,dword ptr [RSP + -0x18] SUB EAX,0x76 JNZ 0x001028bf JMP 0x001028ad LAB_001028ad: MOV byte ptr [0x0010c1a9],0x1 JMP 0x001028c6 LAB_001028b6: MOV byte ptr [0x0010c1aa],0x1 JMP 0x001028c6 LAB_001028bf: MOV byte ptr [RSP + -0x1],0x0 JMP 0x0010291a LAB_001028c6: JMP 0x001028f2 LAB_001028c8: CMP qword ptr [0x0010c1b0],0x0 JNZ 0x001028e9 MOV RAX,qword ptr [RSP + -0x10] MOVSXD RCX,dword ptr [RSP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [0x0010c1b0],RAX JMP 0x001028f0 LAB_001028e9: MOV byte ptr [RSP + -0x1],0x0 JMP 0x0010291a LAB_001028f0: JMP 0x001028f2 LAB_001028f2: JMP 0x001028f4 LAB_001028f4: MOV EAX,dword ptr [RSP + -0x14] ADD EAX,0x1 MOV dword ptr [RSP + -0x14],EAX JMP 0x00102861 LAB_00102904: CMP qword ptr [0x0010c1b0],0x0 JNZ 0x00102915 MOV byte ptr [RSP + -0x1],0x0 JMP 0x0010291a LAB_00102915: MOV byte ptr [RSP + -0x1],0x1 LAB_0010291a: MOV AL,byte ptr [RSP + -0x1] AND AL,0x1 RET
/* parseParameters(int, char**) */ int8 parseParameters(int param_1,char **param_2) { uint uVar1; ulong uVar2; uint local_14; int1 local_1; local_14 = 1; do { uVar2 = (ulong)local_14; if (param_1 <= (int)local_14) { if (traceFilePath == (char *)0x0) { local_1 = 0; } else { local_1 = 1; } LAB_0010291a: return CONCAT71((int7)(uVar2 >> 8),local_1); } uVar2 = (ulong)(uint)(int)*param_2[(int)local_14]; if ((int)*param_2[(int)local_14] == 0x2d) { if (param_2[(int)local_14][1] == 0x73) { isSingleStep = 1; } else { uVar1 = (int)param_2[(int)local_14][1] - 0x76; uVar2 = (ulong)uVar1; if (uVar1 != 0) { local_1 = 0; goto LAB_0010291a; } verbose = 1; } } else { if (traceFilePath != (char *)0x0) { local_1 = 0; goto LAB_0010291a; } traceFilePath = param_2[(int)local_14]; } local_14 = local_14 + 1; } while( true ); }
47,656
parseParameters(int, char**)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainSinCache.cpp
bool parseParameters(int argc, char **argv) { // Read Parameters for (int i = 1; i < argc; ++i) { if (argv[i][0] == '-') { switch (argv[i][1]) { case 'v': verbose = 1; break; case 's': isSingleStep = 1; break; default: return false; } } else { if (traceFilePath == nullptr) { traceFilePath = argv[i]; } else { return false; } } } if (traceFilePath == nullptr) { return false; } return true; }
O1
cpp
parseParameters(int, char**): cmpl $0x2, %edi setge %r8b jl 0x28e1 movq 0x590d(%rip), %rdx # 0x8180 movl %edi, %eax movl $0x1, %ecx subq %rax, %rcx movl $0x2, %edi movq -0x8(%rsi,%rdi,8), %r9 cmpb $0x2d, (%r9) jne 0x28a7 movzbl 0x1(%r9), %r9d cmpl $0x73, %r9d je 0x28b8 cmpl $0x76, %r9d jne 0x28d8 movb $0x1, 0x58d4(%rip) # 0x8179 jmp 0x28bf testq %rdx, %rdx jne 0x28d8 movq %r9, 0x58cd(%rip) # 0x8180 movq %r9, %rdx jmp 0x28bf movb $0x1, 0x58bb(%rip) # 0x817a cmpq %rax, %rdi setb %r8b leaq (%rcx,%rdi), %r9 incq %r9 incq %rdi cmpq $0x2, %r9 jne 0x2882 jmp 0x28e1 testb $0x1, %r8b je 0x28e1 xorl %eax, %eax retq cmpq $0x0, 0x5897(%rip) # 0x8180 setne %al retq
_Z15parseParametersiPPc: cmp edi, 2 setnl r8b jl short loc_28E1 mov rdx, cs:traceFilePath mov eax, edi mov ecx, 1 sub rcx, rax mov edi, 2 loc_2882: mov r9, [rsi+rdi*8-8] cmp byte ptr [r9], 2Dh ; '-' jnz short loc_28A7 movzx r9d, byte ptr [r9+1] cmp r9d, 73h ; 's' jz short loc_28B8 cmp r9d, 76h ; 'v' jnz short loc_28D8 mov cs:verbose, 1 jmp short loc_28BF loc_28A7: test rdx, rdx jnz short loc_28D8 mov cs:traceFilePath, r9 mov rdx, r9 jmp short loc_28BF loc_28B8: mov cs:isSingleStep, 1 loc_28BF: cmp rdi, rax setb r8b lea r9, [rcx+rdi] inc r9 inc rdi cmp r9, 2 jnz short loc_2882 jmp short loc_28E1 loc_28D8: test r8b, 1 jz short loc_28E1 xor eax, eax retn loc_28E1: cmp cs:traceFilePath, 0 setnz al retn
bool parseParameters(int a1, char **a2) { bool v2; // r8 long long v3; // rdx unsigned long long v4; // rax long long v5; // rcx unsigned long long v6; // rdi char *v7; // r9 int v8; // r9d long long v9; // r9 v2 = a1 >= 2; if ( a1 < 2 ) return traceFilePath != 0; v3 = traceFilePath; v4 = (unsigned int)a1; v5 = 1LL - (unsigned int)a1; v6 = 2LL; while ( 1 ) { v7 = a2[v6 - 1]; if ( *v7 != 45 ) break; v8 = (unsigned __int8)v7[1]; if ( v8 == 115 ) { isSingleStep = 1; } else { if ( v8 != 118 ) goto LABEL_12; verbose = 1; } LABEL_10: v2 = v6 < v4; v9 = v5 + v6++ + 1; if ( v9 == 2 ) return traceFilePath != 0; } if ( !v3 ) { traceFilePath = (long long)a2[v6 - 1]; v3 = (long long)v7; goto LABEL_10; } LABEL_12: if ( v2 ) return 0; return traceFilePath != 0; }
parseParameters: CMP EDI,0x2 SETGE R8B JL 0x001028e1 MOV RDX,qword ptr [0x00108180] MOV EAX,EDI MOV ECX,0x1 SUB RCX,RAX MOV EDI,0x2 LAB_00102882: MOV R9,qword ptr [RSI + RDI*0x8 + -0x8] CMP byte ptr [R9],0x2d JNZ 0x001028a7 MOVZX R9D,byte ptr [R9 + 0x1] CMP R9D,0x73 JZ 0x001028b8 CMP R9D,0x76 JNZ 0x001028d8 MOV byte ptr [0x00108179],0x1 JMP 0x001028bf LAB_001028a7: TEST RDX,RDX JNZ 0x001028d8 MOV qword ptr [0x00108180],R9 MOV RDX,R9 JMP 0x001028bf LAB_001028b8: MOV byte ptr [0x0010817a],0x1 LAB_001028bf: CMP RDI,RAX SETC R8B LEA R9,[RCX + RDI*0x1] INC R9 INC RDI CMP R9,0x2 JNZ 0x00102882 JMP 0x001028e1 LAB_001028d8: TEST R8B,0x1 JZ 0x001028e1 XOR EAX,EAX RET LAB_001028e1: CMP qword ptr [0x00108180],0x0 SETNZ AL RET
/* parseParameters(int, char**) */ bool parseParameters(int param_1,char **param_2) { char *pcVar1; char *pcVar2; char *pcVar3; ulong uVar4; bool bVar5; bool bVar6; bVar5 = 1 < param_1; if (1 < param_1) { pcVar2 = traceFilePath; uVar4 = 2; do { pcVar3 = param_2[uVar4 - 1]; if (*pcVar3 == '-') { pcVar1 = traceFilePath; if (pcVar3[1] == 's') { isSingleStep = 1; pcVar3 = pcVar2; } else { if (pcVar3[1] != 'v') goto LAB_001028d8; verbose = 1; pcVar3 = pcVar2; } } else { pcVar1 = pcVar3; if (pcVar2 != (char *)0x0) { LAB_001028d8: if (bVar5) { return false; } break; } } traceFilePath = pcVar1; bVar5 = uVar4 < (uint)param_1; bVar6 = uVar4 != (uint)param_1; pcVar2 = pcVar3; uVar4 = uVar4 + 1; } while (bVar6); } return traceFilePath != (char *)0x0; }
47,657
parseParameters(int, char**)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainSinCache.cpp
bool parseParameters(int argc, char **argv) { // Read Parameters for (int i = 1; i < argc; ++i) { if (argv[i][0] == '-') { switch (argv[i][1]) { case 'v': verbose = 1; break; case 's': isSingleStep = 1; break; default: return false; } } else { if (traceFilePath == nullptr) { traceFilePath = argv[i]; } else { return false; } } } if (traceFilePath == nullptr) { return false; } return true; }
O2
cpp
parseParameters(int, char**): movq 0x5bac(%rip), %rdx # 0x8178 movslq %edi, %rax pushq $0x1 popq %rcx cmpq %rax, %rcx jge 0x2614 movq (%rsi,%rcx,8), %rdi cmpb $0x2d, (%rdi) jne 0x25f7 movzbl 0x1(%rdi), %edi cmpl $0x73, %edi je 0x2608 cmpl $0x76, %edi jne 0x261b movb $0x1, 0x5b7c(%rip) # 0x8171 jmp 0x260f testq %rdx, %rdx jne 0x261b movq %rdi, 0x5b75(%rip) # 0x8178 movq %rdi, %rdx jmp 0x260f movb $0x1, 0x5b63(%rip) # 0x8172 incq %rcx jmp 0x25d2 testq %rdx, %rdx setne %al retq xorl %eax, %eax retq
_Z15parseParametersiPPc: mov rdx, cs:traceFilePath movsxd rax, edi push 1 pop rcx loc_25D2: cmp rcx, rax jge short loc_2614 mov rdi, [rsi+rcx*8] cmp byte ptr [rdi], 2Dh ; '-' jnz short loc_25F7 movzx edi, byte ptr [rdi+1] cmp edi, 73h ; 's' jz short loc_2608 cmp edi, 76h ; 'v' jnz short loc_261B mov cs:verbose, 1 jmp short loc_260F loc_25F7: test rdx, rdx jnz short loc_261B mov cs:traceFilePath, rdi mov rdx, rdi jmp short loc_260F loc_2608: mov cs:isSingleStep, 1 loc_260F: inc rcx jmp short loc_25D2 loc_2614: test rdx, rdx setnz al retn loc_261B: xor eax, eax retn
bool parseParameters(int a1, char **a2) { long long v2; // rdx long long v3; // rax long long i; // rcx char *v5; // rdi int v6; // edi v2 = traceFilePath; v3 = a1; for ( i = 1LL; ; ++i ) { if ( i >= v3 ) return v2 != 0; v5 = a2[i]; if ( *v5 != 45 ) break; v6 = (unsigned __int8)v5[1]; if ( v6 == 115 ) { isSingleStep = 1; } else { if ( v6 != 118 ) return 0; verbose = 1; } LABEL_10: ; } if ( !v2 ) { traceFilePath = (long long)a2[i]; v2 = (long long)v5; goto LABEL_10; } return 0; }
parseParameters: MOV RDX,qword ptr [0x00108178] MOVSXD RAX,EDI PUSH 0x1 POP RCX LAB_001025d2: CMP RCX,RAX JGE 0x00102614 MOV RDI,qword ptr [RSI + RCX*0x8] CMP byte ptr [RDI],0x2d JNZ 0x001025f7 MOVZX EDI,byte ptr [RDI + 0x1] CMP EDI,0x73 JZ 0x00102608 CMP EDI,0x76 JNZ 0x0010261b MOV byte ptr [0x00108171],0x1 JMP 0x0010260f LAB_001025f7: TEST RDX,RDX JNZ 0x0010261b MOV qword ptr [0x00108178],RDI MOV RDX,RDI JMP 0x0010260f LAB_00102608: MOV byte ptr [0x00108172],0x1 LAB_0010260f: INC RCX JMP 0x001025d2 LAB_00102614: TEST RDX,RDX SETNZ AL RET LAB_0010261b: XOR EAX,EAX RET
/* parseParameters(int, char**) */ int8 parseParameters(int param_1,char **param_2) { char *pcVar1; long lVar2; char *pcVar3; char *pcVar4; lVar2 = 1; pcVar3 = traceFilePath; do { if (param_1 <= lVar2) { return CONCAT71((int7)(int3)((uint)param_1 >> 8),pcVar3 != (char *)0x0); } pcVar4 = param_2[lVar2]; if (*pcVar4 == '-') { pcVar1 = traceFilePath; if (pcVar4[1] == 's') { isSingleStep = 1; pcVar4 = pcVar3; } else { if (pcVar4[1] != 'v') { return 0; } verbose = 1; pcVar4 = pcVar3; } } else { pcVar1 = pcVar4; if (pcVar3 != (char *)0x0) { return 0; } } traceFilePath = pcVar1; lVar2 = lVar2 + 1; pcVar3 = pcVar4; } while( true ); }
47,658
parseParameters(int, char**)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainSinCache.cpp
bool parseParameters(int argc, char **argv) { // Read Parameters for (int i = 1; i < argc; ++i) { if (argv[i][0] == '-') { switch (argv[i][1]) { case 'v': verbose = 1; break; case 's': isSingleStep = 1; break; default: return false; } } else { if (traceFilePath == nullptr) { traceFilePath = argv[i]; } else { return false; } } } if (traceFilePath == nullptr) { return false; } return true; }
O3
cpp
parseParameters(int, char**): movq 0x5918(%rip), %rax # 0x8180 cmpl $0x2, %edi jl 0x28b4 movl %edi, %ecx movl $0x1, %edx movq (%rsi,%rdx,8), %rdi cmpb $0x2d, (%rdi) jne 0x2894 movzbl 0x1(%rdi), %edi cmpl $0x73, %edi je 0x28a5 cmpl $0x76, %edi jne 0x28bb movb $0x1, 0x58e7(%rip) # 0x8179 jmp 0x28ac testq %rax, %rax jne 0x28bb movq %rdi, 0x58e0(%rip) # 0x8180 movq %rdi, %rax jmp 0x28ac movb $0x1, 0x58ce(%rip) # 0x817a incq %rdx cmpq %rdx, %rcx jne 0x2874 testq %rax, %rax setne %al retq xorl %eax, %eax retq
_Z15parseParametersiPPc: mov rax, cs:traceFilePath cmp edi, 2 jl short loc_28B4 mov ecx, edi mov edx, 1 loc_2874: mov rdi, [rsi+rdx*8] cmp byte ptr [rdi], 2Dh ; '-' jnz short loc_2894 movzx edi, byte ptr [rdi+1] cmp edi, 73h ; 's' jz short loc_28A5 cmp edi, 76h ; 'v' jnz short loc_28BB mov cs:verbose, 1 jmp short loc_28AC loc_2894: test rax, rax jnz short loc_28BB mov cs:traceFilePath, rdi mov rax, rdi jmp short loc_28AC loc_28A5: mov cs:isSingleStep, 1 loc_28AC: inc rdx cmp rcx, rdx jnz short loc_2874 loc_28B4: test rax, rax setnz al retn loc_28BB: xor eax, eax retn
bool parseParameters(int a1, char **a2) { long long v2; // rax long long v3; // rcx long long v4; // rdx char *v5; // rdi int v6; // edi v2 = traceFilePath; if ( a1 < 2 ) return v2 != 0; v3 = (unsigned int)a1; v4 = 1LL; while ( 1 ) { v5 = a2[v4]; if ( *v5 != 45 ) break; v6 = (unsigned __int8)v5[1]; if ( v6 == 115 ) { isSingleStep = 1; } else { if ( v6 != 118 ) return 0; verbose = 1; } LABEL_10: if ( v3 == ++v4 ) return v2 != 0; } if ( !v2 ) { traceFilePath = (long long)a2[v4]; v2 = (long long)v5; goto LABEL_10; } return 0; }
parseParameters: MOV RAX,qword ptr [0x00108180] CMP EDI,0x2 JL 0x001028b4 MOV ECX,EDI MOV EDX,0x1 LAB_00102874: MOV RDI,qword ptr [RSI + RDX*0x8] CMP byte ptr [RDI],0x2d JNZ 0x00102894 MOVZX EDI,byte ptr [RDI + 0x1] CMP EDI,0x73 JZ 0x001028a5 CMP EDI,0x76 JNZ 0x001028bb MOV byte ptr [0x00108179],0x1 JMP 0x001028ac LAB_00102894: TEST RAX,RAX JNZ 0x001028bb MOV qword ptr [0x00108180],RDI MOV RAX,RDI JMP 0x001028ac LAB_001028a5: MOV byte ptr [0x0010817a],0x1 LAB_001028ac: INC RDX CMP RCX,RDX JNZ 0x00102874 LAB_001028b4: TEST RAX,RAX SETNZ AL RET LAB_001028bb: XOR EAX,EAX RET
/* parseParameters(int, char**) */ int8 parseParameters(int param_1,char **param_2) { char *pcVar1; char *pcVar2; char *pcVar3; ulong uVar4; pcVar3 = traceFilePath; if (1 < param_1) { uVar4 = 1; pcVar2 = traceFilePath; do { pcVar3 = param_2[uVar4]; if (*pcVar3 == '-') { pcVar1 = traceFilePath; if (pcVar3[1] == 's') { isSingleStep = 1; pcVar3 = pcVar2; } else { if (pcVar3[1] != 'v') { return 0; } verbose = 1; pcVar3 = pcVar2; } } else { pcVar1 = pcVar3; if (pcVar2 != (char *)0x0) { return 0; } } traceFilePath = pcVar1; uVar4 = uVar4 + 1; pcVar2 = pcVar3; } while ((uint)param_1 != uVar4); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != (char *)0x0); }
47,659
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O3
c
str2int: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rdx, %r9 movq $0x0, (%r8) movq %rdx, %rax negq %rax cmovsq %rdx, %rax movq %rcx, %rdx negq %rdx cmovnsq %rcx, %rdx leaq 0x2ba9f9(%rip), %r10 # 0x314770 movq 0x40(%r10), %r11 movzbl (%rdi), %r10d incq %rdi testb $0x8, 0x1(%r11,%r10) jne 0x59d7b negq %rax cmpq %rax, %rdx cmovlq %rdx, %rax cmpl $0x2b, %r10d je 0x59da8 cmpl $0x2d, %r10d jne 0x59da5 xorl %r10d, %r10d jmp 0x59dab decq %rdi movb $0x1, %r10b leaq -0x1(%rdi), %rbx movb 0x1(%rbx), %r14b incq %rbx cmpb $0x30, %r14b je 0x59daf xorl %r11d, %r11d xorl %edx, %edx leal -0x30(%r14), %r15d cmpb $0x9, %r15b ja 0x59dd1 movzbl %r15b, %r15d jmp 0x59dfd leal -0x41(%r14), %r15d cmpb $0x19, %r15b ja 0x59de5 movzbl %r14b, %r15d addl $-0x37, %r15d jmp 0x59dfd leal -0x61(%r14), %r12d movl $0x7f, %r15d cmpb $0x19, %r12b ja 0x59dfd movzbl %r14b, %r15d addl $-0x57, %r15d movl %r15d, -0xa0(%rbp,%rdx,4) cmpl %esi, %r15d jge 0x59e1f cmpq $0x13, %rdx ja 0x59e1f incq %rdx movb 0x1(%rbx), %r14b incq %rbx incl %r11d jmp 0x59dc1 cmpq %rdi, %rbx je 0x59e67 cmpq $0x2, %rdx jb 0x59e6f movslq %esi, %r14 movq $-0x1, %rdi xorl %esi, %esi decl %r11d movslq -0xa0(%rbp,%r11,4), %r15 movq %r15, %rdx negq %rdx cmpq %rdx, %rax jg 0x59eaa addq %r15, %rax cqto idivq %r14 imulq %rdi, %r15 addq %r15, %rsi imulq %r14, %rdi cmpl $0x1, %r11d jg 0x59e36 jmp 0x59e7c movl $0x21, %r14d jmp 0x59eb0 xorl %esi, %esi decl %edx jne 0x59e95 movq $-0x1, %rdi movslq -0xa0(%rbp), %rdx movq %rdx, %r11 negq %r11 cmpq %r11, %rax jg 0x59eaa imulq %rdx, %rdi addq %rdi, %rsi testb %r10b, %r10b je 0x59ecd negq %rsi seto %al cmpq %rcx, %rsi setg %cl orb %al, %cl je 0x59ed2 movl $0x22, %r14d xorl %ebx, %ebx callq 0x24060 movl %r14d, (%rax) movq %rbx, %rax addq $0x80, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpq %r9, %rsi jl 0x59eaa movq %rsi, (%r8) xorl %r14d, %r14d jmp 0x59eb2 nop
str2int: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 80h mov r9, rdx mov qword ptr [r8], 0 mov rax, rdx neg rax cmovs rax, rdx mov rdx, rcx neg rdx cmovns rdx, rcx lea r10, my_charset_latin1 mov r11, [r10+40h] loc_59D7B: movzx r10d, byte ptr [rdi] inc rdi test byte ptr [r11+r10+1], 8 jnz short loc_59D7B neg rax cmp rdx, rax cmovl rax, rdx cmp r10d, 2Bh ; '+' jz short loc_59DA8 cmp r10d, 2Dh ; '-' jnz short loc_59DA5 xor r10d, r10d jmp short loc_59DAB loc_59DA5: dec rdi loc_59DA8: mov r10b, 1 loc_59DAB: lea rbx, [rdi-1] loc_59DAF: mov r14b, [rbx+1] inc rbx cmp r14b, 30h ; '0' jz short loc_59DAF xor r11d, r11d xor edx, edx loc_59DC1: lea r15d, [r14-30h] cmp r15b, 9 ja short loc_59DD1 movzx r15d, r15b jmp short loc_59DFD loc_59DD1: lea r15d, [r14-41h] cmp r15b, 19h ja short loc_59DE5 movzx r15d, r14b add r15d, 0FFFFFFC9h jmp short loc_59DFD loc_59DE5: lea r12d, [r14-61h] mov r15d, 7Fh cmp r12b, 19h ja short loc_59DFD movzx r15d, r14b add r15d, 0FFFFFFA9h loc_59DFD: mov [rbp+rdx*4+var_A0], r15d cmp r15d, esi jge short loc_59E1F cmp rdx, 13h ja short loc_59E1F inc rdx mov r14b, [rbx+1] inc rbx inc r11d jmp short loc_59DC1 loc_59E1F: cmp rbx, rdi jz short loc_59E67 cmp rdx, 2 jb short loc_59E6F movsxd r14, esi mov rdi, 0FFFFFFFFFFFFFFFFh xor esi, esi loc_59E36: dec r11d movsxd r15, [rbp+r11*4+var_A0] mov rdx, r15 neg rdx cmp rax, rdx jg short loc_59EAA add rax, r15 cqo idiv r14 imul r15, rdi add rsi, r15 imul rdi, r14 cmp r11d, 1 jg short loc_59E36 jmp short loc_59E7C loc_59E67: mov r14d, 21h ; '!' jmp short loc_59EB0 loc_59E6F: xor esi, esi dec edx jnz short loc_59E95 mov rdi, 0FFFFFFFFFFFFFFFFh loc_59E7C: movsxd rdx, [rbp+var_A0] mov r11, rdx neg r11 cmp rax, r11 jg short loc_59EAA imul rdi, rdx add rsi, rdi loc_59E95: test r10b, r10b jz short loc_59ECD neg rsi seto al cmp rsi, rcx setnle cl or cl, al jz short loc_59ED2 loc_59EAA: mov r14d, 22h ; '"' loc_59EB0: xor ebx, ebx loc_59EB2: call ___errno_location mov [rax], r14d mov rax, rbx add rsp, 80h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_59ECD: cmp rsi, r9 jl short loc_59EAA loc_59ED2: mov [r8], rsi xor r14d, r14d jmp short loc_59EB2
long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // rdx long long v8; // r10 long long v9; // rax char v10; // r10 long long v11; // rbx unsigned __int8 v12; // r14 long long v13; // r11 unsigned long long i; // rdx int v15; // r15d long long v16; // r14 long long v17; // rsi long long v18; // r15 int v19; // r14d _DWORD v21[40]; // [rsp+0h] [rbp-A0h] *a5 = 0LL; v6 = -a3; if ( a3 > 0 ) v6 = a3; v7 = -a4; if ( a4 <= 0 ) v7 = a4; do v8 = *(unsigned __int8 *)a1++; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 ); v9 = -v6; if ( v7 < v9 ) v9 = v7; if ( (_DWORD)v8 != 43 ) { if ( (_DWORD)v8 == 45 ) { v10 = 0; goto LABEL_13; } --a1; } v10 = 1; LABEL_13: v11 = a1 - 1; do v12 = *(_BYTE *)++v11; while ( v12 == 48 ); LODWORD(v13) = 0; for ( i = 0LL; ; ++i ) { LOBYTE(v15) = v12 - 48; if ( (unsigned __int8)(v12 - 48) > 9u ) { if ( (unsigned __int8)(v12 - 65) > 0x19u ) { v15 = 127; if ( (unsigned __int8)(v12 - 97) <= 0x19u ) v15 = v12 - 87; } else { v15 = v12 - 55; } } else { v15 = (unsigned __int8)v15; } v21[i] = v15; if ( v15 >= a2 || i > 0x13 ) break; v12 = *(_BYTE *)++v11; LODWORD(v13) = v13 + 1; } if ( v11 != a1 ) { if ( i >= 2 ) { v16 = a2; a1 = -1LL; v17 = 0LL; while ( 1 ) { v13 = (unsigned int)(v13 - 1); v18 = (int)v21[v13]; if ( v9 > -v18 ) goto LABEL_38; v9 = (v18 + v9) / v16; v17 += a1 * v18; a1 *= v16; if ( (int)v13 <= 1 ) goto LABEL_34; } } v17 = 0LL; if ( (_DWORD)i == 1 ) { a1 = -1LL; LABEL_34: if ( v9 > -(long long)v21[0] ) goto LABEL_38; a1 *= v21[0]; v17 += a1; } if ( v10 ) { v17 = -v17; if ( __OFSUB__(v17, 1LL) || v17 > a4 ) { LABEL_38: v19 = 34; goto LABEL_39; } } else if ( v17 < a3 ) { goto LABEL_38; } *a5 = v17; v19 = 0; goto LABEL_40; } v19 = 33; LABEL_39: v11 = 0LL; LABEL_40: *(_DWORD *)__errno_location(a1) = v19; return v11; }
str2int: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x80 MOV R9,RDX MOV qword ptr [R8],0x0 MOV RAX,RDX NEG RAX CMOVS RAX,RDX MOV RDX,RCX NEG RDX CMOVNS RDX,RCX LEA R10,[0x414770] MOV R11,qword ptr [R10 + 0x40] LAB_00159d7b: MOVZX R10D,byte ptr [RDI] INC RDI TEST byte ptr [R11 + R10*0x1 + 0x1],0x8 JNZ 0x00159d7b NEG RAX CMP RDX,RAX CMOVL RAX,RDX CMP R10D,0x2b JZ 0x00159da8 CMP R10D,0x2d JNZ 0x00159da5 XOR R10D,R10D JMP 0x00159dab LAB_00159da5: DEC RDI LAB_00159da8: MOV R10B,0x1 LAB_00159dab: LEA RBX,[RDI + -0x1] LAB_00159daf: MOV R14B,byte ptr [RBX + 0x1] INC RBX CMP R14B,0x30 JZ 0x00159daf XOR R11D,R11D XOR EDX,EDX LAB_00159dc1: LEA R15D,[R14 + -0x30] CMP R15B,0x9 JA 0x00159dd1 MOVZX R15D,R15B JMP 0x00159dfd LAB_00159dd1: LEA R15D,[R14 + -0x41] CMP R15B,0x19 JA 0x00159de5 MOVZX R15D,R14B ADD R15D,-0x37 JMP 0x00159dfd LAB_00159de5: LEA R12D,[R14 + -0x61] MOV R15D,0x7f CMP R12B,0x19 JA 0x00159dfd MOVZX R15D,R14B ADD R15D,-0x57 LAB_00159dfd: MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D CMP R15D,ESI JGE 0x00159e1f CMP RDX,0x13 JA 0x00159e1f INC RDX MOV R14B,byte ptr [RBX + 0x1] INC RBX INC R11D JMP 0x00159dc1 LAB_00159e1f: CMP RBX,RDI JZ 0x00159e67 CMP RDX,0x2 JC 0x00159e6f MOVSXD R14,ESI MOV RDI,-0x1 XOR ESI,ESI LAB_00159e36: DEC R11D MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0] MOV RDX,R15 NEG RDX CMP RAX,RDX JG 0x00159eaa ADD RAX,R15 CQO IDIV R14 IMUL R15,RDI ADD RSI,R15 IMUL RDI,R14 CMP R11D,0x1 JG 0x00159e36 JMP 0x00159e7c LAB_00159e67: MOV R14D,0x21 JMP 0x00159eb0 LAB_00159e6f: XOR ESI,ESI DEC EDX JNZ 0x00159e95 MOV RDI,-0x1 LAB_00159e7c: MOVSXD RDX,dword ptr [RBP + -0xa0] MOV R11,RDX NEG R11 CMP RAX,R11 JG 0x00159eaa IMUL RDI,RDX ADD RSI,RDI LAB_00159e95: TEST R10B,R10B JZ 0x00159ecd NEG RSI SETO AL CMP RSI,RCX SETG CL OR CL,AL JZ 0x00159ed2 LAB_00159eaa: MOV R14D,0x22 LAB_00159eb0: XOR EBX,EBX LAB_00159eb2: CALL 0x00124060 MOV dword ptr [RAX],R14D MOV RAX,RBX ADD RSP,0x80 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00159ecd: CMP RSI,R9 JL 0x00159eaa LAB_00159ed2: MOV qword ptr [R8],RSI XOR R14D,R14D JMP 0x00159eb2
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5) { long lVar1; int *piVar2; ulong uVar3; byte *pbVar4; long lVar5; byte *pbVar6; long lVar7; ulong uVar8; byte bVar9; int iVar10; uint uVar11; long lVar12; bool bVar13; uint local_a8 [32]; *param_5 = 0; lVar5 = -param_3; if (0 < param_3) { lVar5 = param_3; } lVar7 = -param_4; if (param_4 < 1) { lVar7 = param_4; } do { pbVar4 = param_1; bVar9 = *pbVar4; param_1 = pbVar4 + 1; } while ((PTR_ctype_latin1_004147b0[(ulong)bVar9 + 1] & 8) != 0); lVar1 = -lVar5; if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) { lVar1 = lVar7; } pbVar6 = param_1; if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) { bVar13 = true; } else { bVar13 = false; pbVar6 = param_1; } pbVar4 = pbVar6 + -1; do { bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; } while (bVar9 == 0x30); uVar8 = 0; uVar3 = 0; while( true ) { if ((byte)(bVar9 - 0x30) < 10) { uVar11 = (uint)(byte)(bVar9 - 0x30); } else if ((byte)(bVar9 + 0xbf) < 0x1a) { uVar11 = bVar9 - 0x37; } else { uVar11 = 0x7f; if ((byte)(bVar9 + 0x9f) < 0x1a) { uVar11 = bVar9 - 0x57; } } local_a8[uVar3] = uVar11; if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break; uVar3 = uVar3 + 1; bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; uVar8 = (ulong)((int)uVar8 + 1); } if (pbVar4 == pbVar6) { iVar10 = 0x21; } else { if (uVar3 < 2) { lVar5 = 0; if ((int)uVar3 == 1) { lVar7 = -1; goto LAB_00159e7c; } LAB_00159e95: if (bVar13) { lVar7 = -lVar5; bVar13 = -param_4 == lVar5; lVar5 = lVar7; if (bVar13 || lVar7 < param_4) { LAB_00159ed2: *param_5 = lVar5; iVar10 = 0; goto LAB_00159eb2; } } else if (param_3 <= lVar5) goto LAB_00159ed2; } else { lVar7 = -1; lVar5 = 0; do { uVar11 = (int)uVar8 - 1; uVar8 = (ulong)uVar11; lVar12 = (long)(int)local_a8[uVar8]; if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_00159eaa; lVar1 = (lVar1 + lVar12) / (long)param_2; lVar5 = lVar5 + lVar12 * lVar7; lVar7 = lVar7 * param_2; } while (1 < (int)uVar11); LAB_00159e7c: lVar12 = (long)(int)local_a8[0]; if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) { lVar5 = lVar5 + lVar7 * lVar12; goto LAB_00159e95; } } LAB_00159eaa: iVar10 = 0x22; } pbVar4 = (byte *)0x0; LAB_00159eb2: piVar2 = __errno_location(); *piVar2 = iVar10; return pbVar4; }
47,660
OpenSubdiv::v3_6_0::Far::PatchTable::setFVarPatchChannelLinearInterpolation(OpenSubdiv::v3_6_0::Sdc::Options::FVarLinearInterpolation, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
inline PatchTable::FVarPatchChannel & PatchTable::getFVarPatchChannel(int channel) { assert(channel>=0 && channel<(int)_fvarChannels.size()); return _fvarChannels[channel]; }
O1
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::setFVarPatchChannelLinearInterpolation(OpenSubdiv::v3_6_0::Sdc::Options::FVarLinearInterpolation, int): testl %edx, %edx js 0x695cb movq 0xb0(%rdi), %rax movq 0xb8(%rdi), %rcx subq %rax, %rcx shrq $0x6, %rcx cmpl %edx, %ecx jle 0x695cb movl %edx, %ecx shlq $0x6, %rcx movl %esi, (%rax,%rcx) retq pushq %rax leaq 0x4f69e(%rip), %rdi # 0xb8c71 leaq 0x4f1f8(%rip), %rsi # 0xb87d2 leaq 0x4f6c0(%rip), %rcx # 0xb8ca1 movl $0xa1, %edx callq 0x39560 nop
_ZN10OpenSubdiv6v3_6_03Far10PatchTable38setFVarPatchChannelLinearInterpolationENS0_3Sdc7Options23FVarLinearInterpolationEi: test edx, edx js short loc_695CB mov rax, [rdi+0B0h] mov rcx, [rdi+0B8h] sub rcx, rax shr rcx, 6 cmp ecx, edx jle short loc_695CB mov ecx, edx shl rcx, 6 mov [rax+rcx], esi retn loc_695CB: push rax lea rdi, aChannel0Channe; "channel>=0 && channel<(int)_fvarChannel"... lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"... lea rcx, aPatchtableFvar; "PatchTable::FVarPatchChannel &OpenSubdi"... mov edx, 0A1h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::PatchTable::setFVarPatchChannelLinearInterpolation( long long a1, int a2, int a3) { long long result; // rax if ( a3 < 0 || (result = *(_QWORD *)(a1 + 176), (int)((unsigned long long)(*(_QWORD *)(a1 + 184) - result) >> 6) <= a3) ) __assert_fail( "channel>=0 && channel<(int)_fvarChannels.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 161LL, "PatchTable::FVarPatchChannel &OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int)"); *(_DWORD *)(result + ((unsigned long long)(unsigned int)a3 << 6)) = a2; return result; }
setFVarPatchChannelLinearInterpolation: TEST EDX,EDX JS 0x001695cb MOV RAX,qword ptr [RDI + 0xb0] MOV RCX,qword ptr [RDI + 0xb8] SUB RCX,RAX SHR RCX,0x6 CMP ECX,EDX JLE 0x001695cb MOV ECX,EDX SHL RCX,0x6 MOV dword ptr [RAX + RCX*0x1],ESI RET LAB_001695cb: PUSH RAX LEA RDI,[0x1b8c71] LEA RSI,[0x1b87d2] LEA RCX,[0x1b8ca1] MOV EDX,0xa1 CALL 0x00139560
/* OpenSubdiv::v3_6_0::Far::PatchTable::setFVarPatchChannelLinearInterpolation(OpenSubdiv::v3_6_0::Sdc::Options::FVarLinearInterpolation, int) */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::setFVarPatchChannelLinearInterpolation (PatchTable *this,int4 param_2,uint param_3) { if ((-1 < (int)param_3) && ((int)param_3 < (int)((ulong)(*(long *)(this + 0xb8) - *(long *)(this + 0xb0)) >> 6))) { *(int4 *)(*(long *)(this + 0xb0) + (ulong)param_3 * 0x40) = param_2; return; } /* WARNING: Subroutine does not return */ __assert_fail("channel>=0 && channel<(int)_fvarChannels.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp" ,0xa1, "PatchTable::FVarPatchChannel &OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int)" ); }
47,661
OpenSubdiv::v3_6_0::Far::PatchTable::setFVarPatchChannelLinearInterpolation(OpenSubdiv::v3_6_0::Sdc::Options::FVarLinearInterpolation, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
inline PatchTable::FVarPatchChannel & PatchTable::getFVarPatchChannel(int channel) { assert(channel>=0 && channel<(int)_fvarChannels.size()); return _fvarChannels[channel]; }
O3
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::setFVarPatchChannelLinearInterpolation(OpenSubdiv::v3_6_0::Sdc::Options::FVarLinearInterpolation, int): testl %esi, %esi js 0x6b8e9 movq 0xb0(%rdi), %rcx movq 0xb8(%rdi), %rax subq %rcx, %rax shrq $0x6, %rax cmpl %esi, %eax jle 0x6b8e9 movl %esi, %edx shlq $0x6, %rdx movq 0x10(%rcx,%rdx), %rax movq 0x18(%rcx,%rdx), %rdx subq %rax, %rdx shrq $0x2, %rdx retq pushq %rax leaq 0x50ac0(%rip), %rdi # 0xbc3b1 leaq 0x5061a(%rip), %rsi # 0xbbf12 leaq 0x50ae2(%rip), %rcx # 0xbc3e1 movl $0xa1, %edx callq 0x39540 nop
_ZN10OpenSubdiv6v3_6_03Far10PatchTable13getFVarValuesEi: test esi, esi js short loc_6B8E9 mov rcx, [rdi+0B0h] mov rax, [rdi+0B8h] sub rax, rcx shr rax, 6 cmp eax, esi jle short loc_6B8E9 mov edx, esi shl rdx, 6 mov rax, [rcx+rdx+10h] mov rdx, [rcx+rdx+18h] sub rdx, rax shr rdx, 2 retn loc_6B8E9: push rax lea rdi, aChannel0Channe; "channel>=0 && channel<(int)_fvarChannel"... lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"... lea rcx, aPatchtableFvar; "PatchTable::FVarPatchChannel &OpenSubdi"... mov edx, 0A1h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::PatchTable::getFVarValues( OpenSubdiv::v3_6_0::Far::PatchTable *this, int a2) { long long v2; // rcx if ( a2 < 0 || (v2 = *((_QWORD *)this + 22), (int)((unsigned long long)(*((_QWORD *)this + 23) - v2) >> 6) <= a2) ) __assert_fail( "channel>=0 && channel<(int)_fvarChannels.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 161LL, "PatchTable::FVarPatchChannel &OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int)"); return *(_QWORD *)(v2 + ((unsigned long long)(unsigned int)a2 << 6) + 16); }
getFVarValues: TEST ESI,ESI JS 0x0016b8e9 MOV RCX,qword ptr [RDI + 0xb0] MOV RAX,qword ptr [RDI + 0xb8] SUB RAX,RCX SHR RAX,0x6 CMP EAX,ESI JLE 0x0016b8e9 MOV EDX,ESI SHL RDX,0x6 MOV RAX,qword ptr [RCX + RDX*0x1 + 0x10] MOV RDX,qword ptr [RCX + RDX*0x1 + 0x18] SUB RDX,RAX SHR RDX,0x2 RET LAB_0016b8e9: PUSH RAX LEA RDI,[0x1bc3b1] LEA RSI,[0x1bbf12] LEA RCX,[0x1bc3e1] MOV EDX,0xa1 CALL 0x00139540
/* OpenSubdiv::v3_6_0::Far::PatchTable::getFVarValues(int) */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::getFVarValues(PatchTable *this,int param_1) { if ((-1 < param_1) && (param_1 < (int)((ulong)(*(long *)(this + 0xb8) - *(long *)(this + 0xb0)) >> 6))) { return; } /* WARNING: Subroutine does not return */ __assert_fail("channel>=0 && channel<(int)_fvarChannels.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp" ,0xa1, "PatchTable::FVarPatchChannel &OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int)" ); }
47,662
CLI::Range::Range<double>(double, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/Validators.hpp
Range(T min_val, T max_val, const std::string &validator_name = std::string{}) : Validator(validator_name) { if(validator_name.empty()) { std::stringstream out; out << detail::type_name<T>() << " in [" << min_val << " - " << max_val << "]"; description(out.str()); } func_ = [min_val, max_val](std::string &input) { using CLI::detail::lexical_cast; T val; bool converted = lexical_cast(input, val); if((!converted) || (val < min_val || val > max_val)) { std::stringstream out; out << "Value " << input << " not in range ["; out << min_val << " - " << max_val << "]"; return out.str(); } return std::string{}; }; }
O2
cpp
CLI::Range::Range<double>(double, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x1e0, %rsp # imm = 0x1E0 movq %rsi, %r14 movsd %xmm1, 0x8(%rsp) movsd %xmm0, 0x10(%rsp) movq %rdi, %rbx leaq 0x38(%rsp), %r15 movq %r15, %rdi callq 0x75e0 movq %rbx, %rdi movq %r15, %rsi callq 0xd512 leaq 0x38(%rsp), %rdi callq 0x7860 cmpq $0x0, 0x8(%r14) jne 0x8901 leaq 0x58(%rsp), %rdi callq 0x7320 leaq 0x68(%rsp), %rdi leaq 0x216c2(%rip), %rsi # 0x29f45 callq 0x7460 leaq 0x216bc(%rip), %rsi # 0x29f4b movq %rax, %rdi callq 0x7460 movq %rax, %rdi movsd 0x10(%rsp), %xmm0 callq 0x76c0 leaq 0x216a5(%rip), %rsi # 0x29f51 movq %rax, %rdi callq 0x7460 movq %rax, %rdi movsd 0x8(%rsp), %xmm0 callq 0x76c0 leaq 0x21613(%rip), %rsi # 0x29edc movq %rax, %rdi callq 0x7460 leaq 0x70(%rsp), %rsi leaq 0x18(%rsp), %rdi callq 0x7690 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x209a0 leaq 0x18(%rsp), %rdi callq 0x7860 leaq 0x58(%rsp), %rdi callq 0x7380 leaq 0x58(%rsp), %rsi movsd 0x10(%rsp), %xmm0 movsd %xmm0, (%rsi) movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0x8(%rsi) addq $0x20, %rbx movq %rbx, %rdi callq 0x209ec addq $0x1e0, %rsp # imm = 0x1E0 popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x7860 jmp 0x895a movq %rax, %r14 jmp 0x8964 movq %rax, %r14 leaq 0x38(%rsp), %rdi callq 0x7860 jmp 0x896c movq %rax, %r14 leaq 0x58(%rsp), %rdi callq 0x7380 movq %rbx, %rdi callq 0x130a0 movq %r14, %rdi callq 0x7770
_ZN3CLI5RangeC2IdEET_S2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx sub rsp, 1E0h mov r14, rsi movsd [rsp+1F8h+var_1F0], xmm1 movsd [rsp+1F8h+var_1E8], xmm0 mov rbx, rdi lea r15, [rsp+1F8h+var_1C0] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rdi, rbx mov rsi, r15 call _ZN3CLI9ValidatorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Validator::Validator(std::string) lea rdi, [rsp+1F8h+var_1C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp qword ptr [r14+8], 0 jnz loc_8901 lea rdi, [rsp+1F8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+1F8h+var_190] lea rsi, aFloat; "FLOAT" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aIn; " in [" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax movsd xmm0, [rsp+1F8h+var_1E8] call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double) lea rsi, asc_29F51; " - " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax movsd xmm0, [rsp+1F8h+var_1F0] call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double) lea rsi, aOfTheFollowing+26h; "]" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+1F8h+var_188] lea rdi, [rsp+1F8h+var_1E0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rsi, [rsp+1F8h+var_1E0] mov rdi, rbx call _ZN3CLI9Validator11descriptionENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Validator::description(std::string) lea rdi, [rsp+1F8h+var_1E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1F8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() loc_8901: lea rsi, [rsp+1F8h+var_1A0] movsd xmm0, [rsp+1F8h+var_1E8] movsd qword ptr [rsi], xmm0 movsd xmm0, [rsp+1F8h+var_1F0] movsd qword ptr [rsi+8], xmm0 add rbx, 20h ; ' ' mov rdi, rbx call _ZNSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS5_EEaSIZN3CLI5RangeC1IdEET_SD_RKS5_EUlS6_E_EENSt9enable_ifIXsrNS8_9_CallableISD_NSH_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISD_E4typeEE4typeES8_EE5valueESt5decayISD_EE4type4typeESt15__invoke_resultIRST_JS6_EEEE5valueERS8_E4typeEOSD_ add rsp, 1E0h pop rbx pop r14 pop r15 retn mov r14, rax lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_895A mov r14, rax jmp short loc_8964 mov r14, rax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_896C mov r14, rax loc_895A: lea rdi, [rsp+arg_50] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() loc_8964: mov rdi, rbx; void * call _ZN3CLI9ValidatorD2Ev; CLI::Validator::~Validator() loc_896C: mov rdi, r14 call __Unwind_Resume
long long CLI::Range::Range<double>(long long a1, long long a2, double a3, double a4) { int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // rax long long v12; // rax int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d _BYTE v18[32]; // [rsp+18h] [rbp-1E0h] BYREF _BYTE v19[32]; // [rsp+38h] [rbp-1C0h] BYREF double v20[2]; // [rsp+58h] [rbp-1A0h] BYREF _BYTE v21[8]; // [rsp+68h] [rbp-190h] BYREF _BYTE v22[392]; // [rsp+70h] [rbp-188h] BYREF std::string::basic_string(v19); CLI::Validator::Validator(a1, (unsigned int)v19, v4, v5, v6, v7); std::string::~string(v19); if ( !*(_QWORD *)(a2 + 8) ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v20); v8 = std::operator<<<std::char_traits<char>>(v21, "FLOAT"); v9 = std::operator<<<std::char_traits<char>>(v8, " in ["); v10 = std::ostream::_M_insert<double>(v9, a3); v11 = std::operator<<<std::char_traits<char>>(v10, " - "); v12 = std::ostream::_M_insert<double>(v11, a4); std::operator<<<std::char_traits<char>>(v12, "]"); std::stringbuf::str(v18, v22); CLI::Validator::description(a1, (unsigned int)v18, v13, v14, v15, v16); std::string::~string(v18); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v20); } v20[0] = a3; v20[1] = a4; return std::function<std::string ()(std::string&)>::operator=<CLI::Range::Range<double>(double,double,std::string const&)::{lambda(std::string&)#1}>(a1 + 32); }
Range<double>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x1e0 MOV R14,RSI MOVSD qword ptr [RSP + 0x8],XMM1 MOVSD qword ptr [RSP + 0x10],XMM0 MOV RBX,RDI LEA R15,[RSP + 0x38] MOV RDI,R15 CALL 0x001075e0 LAB_0010884d: MOV RDI,RBX MOV RSI,R15 CALL 0x0010d512 LEA RDI,[RSP + 0x38] CALL 0x00107860 CMP qword ptr [R14 + 0x8],0x0 JNZ 0x00108901 LAB_0010886d: LEA RDI,[RSP + 0x58] CALL 0x00107320 LEA RDI,[RSP + 0x68] LAB_0010887c: LEA RSI,[0x129f45] CALL 0x00107460 LEA RSI,[0x129f4b] MOV RDI,RAX CALL 0x00107460 MOV RDI,RAX MOVSD XMM0,qword ptr [RSP + 0x10] CALL 0x001076c0 LEA RSI,[0x129f51] MOV RDI,RAX CALL 0x00107460 MOV RDI,RAX MOVSD XMM0,qword ptr [RSP + 0x8] CALL 0x001076c0 LEA RSI,[0x129edc] MOV RDI,RAX CALL 0x00107460 LEA RSI,[RSP + 0x70] LEA RDI,[RSP + 0x18] CALL 0x00107690 LAB_001088e0: LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x001209a0 LAB_001088ed: LEA RDI,[RSP + 0x18] CALL 0x00107860 LEA RDI,[RSP + 0x58] CALL 0x00107380 LAB_00108901: LEA RSI,[RSP + 0x58] MOVSD XMM0,qword ptr [RSP + 0x10] MOVSD qword ptr [RSI],XMM0 MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD qword ptr [RSI + 0x8],XMM0 ADD RBX,0x20 MOV RDI,RBX CALL 0x001209ec ADD RSP,0x1e0 POP RBX POP R14 POP R15 RET
/* CLI::Range::Range<double>(double, double, std::__cxx11::string const&) */ void __thiscall CLI::Range::Range<double>(Range *this,double param_1,double param_2,string *param_3) { ostream *poVar1; string local_1e0 [32]; string local_1c0 [32]; double local_1a0; double local_198; ostream local_190 [376]; std::__cxx11::string::string(local_1c0,param_3); /* try { // try from 0010884d to 00108857 has its CatchHandler @ 00108948 */ Validator::Validator((Validator *)this,local_1c0); std::__cxx11::string::~string(local_1c0); if (*(long *)(param_3 + 8) == 0) { /* try { // try from 0010886d to 00108876 has its CatchHandler @ 00108943 */ std::__cxx11::stringstream::stringstream((stringstream *)&local_1a0); /* try { // try from 0010887c to 001088df has its CatchHandler @ 00108957 */ poVar1 = std::operator<<(local_190,"FLOAT"); std::operator<<(poVar1," in ["); poVar1 = std::ostream::_M_insert<double>(param_1); std::operator<<(poVar1," - "); poVar1 = std::ostream::_M_insert<double>(param_2); std::operator<<(poVar1,"]"); std::__cxx11::stringbuf::str(); /* try { // try from 001088e0 to 001088ec has its CatchHandler @ 00108934 */ Validator::description((Validator *)this,local_1e0); std::__cxx11::string::~string(local_1e0); std::__cxx11::stringstream::~stringstream((stringstream *)&local_1a0); } local_1a0 = param_1; local_198 = param_2; std::function<std::__cxx11::string(std::__cxx11::string&)>::operator= ((function<std::__cxx11::string(std::__cxx11::string&)> *)(this + 0x20), (_lambda_std____cxx11__string___1_ *)&local_1a0); return; }
47,663
my_printf_error
eloqsql/mysys/my_error.c
void my_printf_error(uint error, const char *format, myf MyFlags, ...) { va_list args; char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printf_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); va_start(args,MyFlags); (void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff, sizeof(ebuff), format, args); va_end(args); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O3
c
my_printf_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x2d8, %rsp # imm = 0x2D8 movq %rdx, %rbx movq %rsi, %r10 movl %edi, %r14d leaq -0x2f0(%rbp), %rdx movq %rcx, 0x18(%rdx) movq %r8, 0x20(%rdx) movq %r9, 0x28(%rdx) testb %al, %al je 0x4b615 movaps %xmm0, -0x2c0(%rbp) movaps %xmm1, -0x2b0(%rbp) movaps %xmm2, -0x2a0(%rbp) movaps %xmm3, -0x290(%rbp) movaps %xmm4, -0x280(%rbp) movaps %xmm5, -0x270(%rbp) movaps %xmm6, -0x260(%rbp) movaps %xmm7, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x20(%rbp) movabsq $0x3000000018, %rax # imm = 0x3000000018 leaq -0x240(%rbp), %r8 movq %rax, (%r8) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r8) movq %rdx, 0x10(%r8) leaq 0x33f937(%rip), %rdi # 0x38af80 leaq -0x220(%rbp), %r15 movl $0x200, %edx # imm = 0x200 movq %r15, %rsi movq %r10, %rcx callq 0x78a00 leaq 0x2cc3e9(%rip), %rax # 0x317a50 movl %r14d, %edi movq %r15, %rsi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x4b68f addq $0x2d8, %rsp # imm = 0x2D8 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x263a0
my_printf_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 2D8h mov rbx, rdx mov r10, rsi mov r14d, edi lea rdx, [rbp+var_2F0] mov [rdx+18h], rcx mov [rdx+20h], r8 mov [rdx+28h], r9 test al, al jz short loc_4B615 movaps [rbp+var_2C0], xmm0 movaps [rbp+var_2B0], xmm1 movaps [rbp+var_2A0], xmm2 movaps [rbp+var_290], xmm3 movaps [rbp+var_280], xmm4 movaps [rbp+var_270], xmm5 movaps [rbp+var_260], xmm6 movaps [rbp+var_250], xmm7 loc_4B615: mov rax, fs:28h mov [rbp+var_20], rax mov rax, 3000000018h lea r8, [rbp+var_240] mov [r8], rax lea rax, [rbp+arg_0] mov [r8+8], rax mov [r8+10h], rdx lea rdi, my_charset_utf8mb3_general_ci lea r15, [rbp+var_220] mov edx, 200h mov rsi, r15 mov rcx, r10 call my_vsnprintf_ex lea rax, error_handler_hook mov edi, r14d mov rsi, r15 mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_4B68F add rsp, 2D8h pop rbx pop r14 pop r15 pop rbp retn loc_4B68F: call ___stack_chk_fail
unsigned long long my_printf_error( unsigned int a1, long long a2, __int16 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 v17; // [rsp+0h] [rbp-2F0h] BYREF long long v18; // [rsp+18h] [rbp-2D8h] long long v19; // [rsp+20h] [rbp-2D0h] long long v20; // [rsp+28h] [rbp-2C8h] __m128 v21; // [rsp+30h] [rbp-2C0h] __m128 v22; // [rsp+40h] [rbp-2B0h] __m128 v23; // [rsp+50h] [rbp-2A0h] __m128 v24; // [rsp+60h] [rbp-290h] __m128 v25; // [rsp+70h] [rbp-280h] __m128 v26; // [rsp+80h] [rbp-270h] __m128 v27; // [rsp+90h] [rbp-260h] __m128 v28; // [rsp+A0h] [rbp-250h] _QWORD v29[4]; // [rsp+B0h] [rbp-240h] BYREF _BYTE v30[512]; // [rsp+D0h] [rbp-220h] BYREF unsigned long long v31; // [rsp+2D0h] [rbp-20h] v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v18 = a4; v19 = a5; v20 = a6; v31 = __readfsqword(0x28u); v29[0] = 0x3000000018LL; v29[1] = &a15; v29[2] = &v17; my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v30, 512LL, a2, v29); ((void ( *)(long long, long long, __int16))error_handler_hook[0])(a1, (long long)v30, a3); return __readfsqword(0x28u); }
my_printf_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x2d8 MOV RBX,RDX MOV R10,RSI MOV R14D,EDI LEA RDX,[RBP + -0x2f0] MOV qword ptr [RDX + 0x18],RCX MOV qword ptr [RDX + 0x20],R8 MOV qword ptr [RDX + 0x28],R9 TEST AL,AL JZ 0x0014b615 MOVAPS xmmword ptr [RBP + -0x2c0],XMM0 MOVAPS xmmword ptr [RBP + -0x2b0],XMM1 MOVAPS xmmword ptr [RBP + -0x2a0],XMM2 MOVAPS xmmword ptr [RBP + -0x290],XMM3 MOVAPS xmmword ptr [RBP + -0x280],XMM4 MOVAPS xmmword ptr [RBP + -0x270],XMM5 MOVAPS xmmword ptr [RBP + -0x260],XMM6 MOVAPS xmmword ptr [RBP + -0x250],XMM7 LAB_0014b615: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,0x3000000018 LEA R8,[RBP + -0x240] MOV qword ptr [R8],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R8 + 0x8],RAX MOV qword ptr [R8 + 0x10],RDX LEA RDI,[0x48af80] LEA R15,[RBP + -0x220] MOV EDX,0x200 MOV RSI,R15 MOV RCX,R10 CALL 0x00178a00 LEA RAX,[0x417a50] MOV EDI,R14D MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0014b68f ADD RSP,0x2d8 POP RBX POP R14 POP R15 POP RBP RET LAB_0014b68f: CALL 0x001263a0
void my_printf_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long in_FS_OFFSET; int1 local_2f8 [24]; int8 local_2e0; int8 local_2d8; int8 local_2d0; int8 local_2c8; int8 local_2b8; int8 local_2a8; int8 local_298; int8 local_288; int8 local_278; int8 local_268; int8 local_258; int8 local_248; int1 *local_240; int1 *local_238; int1 local_228 [512]; long local_28; local_238 = local_2f8; if (in_AL != '\0') { local_2c8 = param_1; local_2b8 = param_2; local_2a8 = param_3; local_298 = param_4; local_288 = param_5; local_278 = param_6; local_268 = param_7; local_258 = param_8; } local_28 = *(long *)(in_FS_OFFSET + 0x28); local_248 = 0x3000000018; local_240 = &stack0x00000008; local_2e0 = param_12; local_2d8 = param_13; local_2d0 = param_14; my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_228,0x200,param_10); (*(code *)error_handler_hook)(param_9,local_228,param_11); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,664
my_xml_leave
eloqsql/strings/xml.c
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen) { char *e, *tag; size_t glen; char s[32]; char g[32]; int rc; /* Find previous '/' or beginning */ for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--); glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e); tag= e[0] == '/' ? e + 1 : e; if (str && (slen != glen || memcmp(str, tag, slen))) { mstr(s,str,sizeof(s)-1,slen); if (glen) { mstr(g, tag, sizeof(g)-1, glen); sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g); } else sprintf(p->errstr,"'</%s>' unexpected (END-OF-INPUT wanted)", s); return MY_XML_ERROR; } if (p->flags & MY_XML_FLAG_RELATIVE_NAMES) rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK; else rc= (p->leave_xml ? p->leave_xml(p, p->attr.start, p->attr.end - p->attr.start) : MY_XML_OK); *e='\0'; p->attr.end= e; return rc; }
O3
c
my_xml_leave: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x118(%rdi), %r13 movq 0x120(%rdi), %rax movq %rax, %rdx movq %rax, %r12 subq %r13, %rdx movq %rdi, -0x78(%rbp) jbe 0x61030 movq %rax, %r12 cmpb $0x2f, (%r12) je 0x61037 decq %r12 cmpq %r13, %r12 ja 0x6101e movq %r13, %r12 cmpb $0x2f, (%r12) jne 0x61048 movq %r12, %rbx notq %rbx addq %rax, %rbx movl $0x1, %r15d jmp 0x61051 subq %r12, %rax xorl %r15d, %r15d movq %rax, %rbx testq %rsi, %rsi je 0x61110 addq %r12, %r15 cmpq %r14, %rbx jne 0x6108e movq %rsi, %rdi movq %rsi, -0x88(%rbp) movq %r15, %rsi movq %rdx, -0x80(%rbp) movq %r14, %rdx callq 0x242b0 movq -0x80(%rbp), %rdx movq -0x88(%rbp), %rsi testl %eax, %eax je 0x61110 cmpq $0x1f, %r14 movl $0x1f, %r12d cmovaeq %r12, %r14 leaq -0x50(%rbp), %rdi movl $0x20, %ecx movq %r14, %rdx callq 0x24530 movb $0x0, -0x50(%rbp,%r14) testq %rbx, %rbx je 0x6113f cmpq $0x1f, %rbx cmovbq %rbx, %r12 leaq -0x70(%rbp), %r13 movl $0x20, %ecx movq %r13, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x24530 movb $0x0, -0x70(%rbp,%r12) movq -0x78(%rbp), %rdi addq $0x8, %rdi leaq 0x5c4e(%rip), %rcx # 0x66d3e movl $0x1, %r14d leaq -0x50(%rbp), %r8 movl $0x80, %edx movl $0x1, %esi movq %r13, %r9 xorl %eax, %eax callq 0x241b0 jmp 0x6117a movq -0x78(%rbp), %rbx testb $0x1, (%rbx) movq 0x158(%rbx), %rax jne 0x6112d testq %rax, %rax je 0x6116b movq %rbx, %rdi movq %r13, %rsi jmp 0x61138 testq %rax, %rax je 0x6116b movq %rbx, %rdi movq %r14, %rdx callq *%rax movl %eax, %r14d jmp 0x6116e movq -0x78(%rbp), %rdi addq $0x8, %rdi leaq 0x5c14(%rip), %rcx # 0x66d62 movl $0x1, %r14d leaq -0x50(%rbp), %r8 movl $0x80, %edx movl $0x1, %esi xorl %eax, %eax callq 0x241b0 jmp 0x6117a xorl %r14d, %r14d movb $0x0, (%r12) movq %r12, 0x120(%rbx) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x6119b movl %r14d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24300
my_xml_leave: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov rax, fs:28h mov [rbp+var_30], rax mov r13, [rdi+118h] mov rax, [rdi+120h] mov rdx, rax mov r12, rax sub rdx, r13 mov [rbp+var_78], rdi jbe short loc_61030 mov r12, rax loc_6101E: cmp byte ptr [r12], 2Fh ; '/' jz short loc_61037 dec r12 cmp r12, r13 ja short loc_6101E mov r12, r13 loc_61030: cmp byte ptr [r12], 2Fh ; '/' jnz short loc_61048 loc_61037: mov rbx, r12 not rbx add rbx, rax mov r15d, 1 jmp short loc_61051 loc_61048: sub rax, r12 xor r15d, r15d mov rbx, rax loc_61051: test rsi, rsi jz loc_61110 add r15, r12 cmp rbx, r14 jnz short loc_6108E mov rdi, rsi mov [rbp+var_88], rsi mov rsi, r15 mov [rbp+var_80], rdx mov rdx, r14 call _bcmp mov rdx, [rbp+var_80] mov rsi, [rbp+var_88] test eax, eax jz loc_61110 loc_6108E: cmp r14, 1Fh mov r12d, 1Fh cmovnb r14, r12 lea rdi, [rbp+var_50] mov ecx, 20h ; ' ' mov rdx, r14 call ___memcpy_chk mov [rbp+r14+var_50], 0 test rbx, rbx jz loc_6113F cmp rbx, 1Fh cmovb r12, rbx lea r13, [rbp+var_70] mov ecx, 20h ; ' ' mov rdi, r13 mov rsi, r15 mov rdx, r12 call ___memcpy_chk mov [rbp+r12+var_70], 0 mov rdi, [rbp+var_78] add rdi, 8 lea rcx, aSUnexpectedSWa; "'</%s>' unexpected ('</%s>' wanted)" mov r14d, 1 lea r8, [rbp+var_50] mov edx, 80h mov esi, 1 mov r9, r13 xor eax, eax call ___sprintf_chk jmp short loc_6117A loc_61110: mov rbx, [rbp+var_78] test byte ptr [rbx], 1 mov rax, [rbx+158h] jnz short loc_6112D test rax, rax jz short loc_6116B mov rdi, rbx mov rsi, r13 jmp short loc_61138 loc_6112D: test rax, rax jz short loc_6116B mov rdi, rbx mov rdx, r14 loc_61138: call rax mov r14d, eax jmp short loc_6116E loc_6113F: mov rdi, [rbp+var_78] add rdi, 8 lea rcx, aSUnexpectedEnd; "'</%s>' unexpected (END-OF-INPUT wanted"... mov r14d, 1 lea r8, [rbp+var_50] mov edx, 80h mov esi, 1 xor eax, eax call ___sprintf_chk jmp short loc_6117A loc_6116B: xor r14d, r14d loc_6116E: mov byte ptr [r12], 0 mov [rbx+120h], r12 loc_6117A: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_6119B mov eax, r14d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6119B: call ___stack_chk_fail
long long my_xml_leave(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // r13 _BYTE *v5; // rax unsigned long long v6; // r12 unsigned long long v7; // rdx unsigned long long v8; // rbx long long v9; // r15 _BYTE *v10; // r15 int v11; // eax long long v12; // r12 unsigned int v13; // r14d long long ( *v14)(long long, unsigned long long, unsigned long long); // rax _BYTE *v16; // [rsp+10h] [rbp-80h] char v17[32]; // [rsp+20h] [rbp-70h] BYREF char v18[32]; // [rsp+40h] [rbp-50h] BYREF unsigned long long v19; // [rsp+60h] [rbp-30h] v19 = __readfsqword(0x28u); v4 = *(_QWORD *)(a1 + 280); v5 = *(_BYTE **)(a1 + 288); v6 = (unsigned long long)v5; v7 = (unsigned long long)&v5[-v4]; if ( (unsigned long long)v5 <= v4 ) { LABEL_6: if ( *(_BYTE *)v6 != 47 ) { v9 = 0LL; v8 = (unsigned long long)&v5[-v6]; goto LABEL_9; } } else { v6 = *(_QWORD *)(a1 + 288); while ( *(_BYTE *)v6 != 47 ) { if ( --v6 <= v4 ) { v6 = *(_QWORD *)(a1 + 280); goto LABEL_6; } } } v8 = (unsigned long long)&v5[~v6]; v9 = 1LL; LABEL_9: if ( !a2 || (v10 = (_BYTE *)(v6 + v9), v8 == a3) && (v16 = &v5[-v4], v11 = bcmp(a2, v10, a3), v7 = (unsigned long long)v16, !v11) ) { v14 = *(long long ( **)(long long, unsigned long long, unsigned long long))(a1 + 344); if ( (*(_BYTE *)a1 & 1) != 0 ) { if ( v14 ) { v7 = a3; goto LABEL_23; } } else if ( v14 ) { a2 = v4; LABEL_23: v13 = v14(a1, a2, v7); LABEL_26: *(_BYTE *)v6 = 0; *(_QWORD *)(a1 + 288) = v6; return v13; } v13 = 0; goto LABEL_26; } v12 = 31LL; if ( a3 >= 0x1F ) a3 = 31LL; __memcpy_chk(v18, a2, a3, 32LL); v18[a3] = 0; if ( v8 ) { if ( v8 < 0x1F ) v12 = v8; __memcpy_chk(v17, v10, v12, 32LL); v17[v12] = 0; v13 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "'</%s>' unexpected ('</%s>' wanted)", v18, v17); } else { v13 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "'</%s>' unexpected (END-OF-INPUT wanted)", v18); } return v13; }
my_xml_leave: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13,qword ptr [RDI + 0x118] MOV RAX,qword ptr [RDI + 0x120] MOV RDX,RAX MOV R12,RAX SUB RDX,R13 MOV qword ptr [RBP + -0x78],RDI JBE 0x00161030 MOV R12,RAX LAB_0016101e: CMP byte ptr [R12],0x2f JZ 0x00161037 DEC R12 CMP R12,R13 JA 0x0016101e MOV R12,R13 LAB_00161030: CMP byte ptr [R12],0x2f JNZ 0x00161048 LAB_00161037: MOV RBX,R12 NOT RBX ADD RBX,RAX MOV R15D,0x1 JMP 0x00161051 LAB_00161048: SUB RAX,R12 XOR R15D,R15D MOV RBX,RAX LAB_00161051: TEST RSI,RSI JZ 0x00161110 ADD R15,R12 CMP RBX,R14 JNZ 0x0016108e MOV RDI,RSI MOV qword ptr [RBP + -0x88],RSI MOV RSI,R15 MOV qword ptr [RBP + -0x80],RDX MOV RDX,R14 CALL 0x001242b0 MOV RDX,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x88] TEST EAX,EAX JZ 0x00161110 LAB_0016108e: CMP R14,0x1f MOV R12D,0x1f CMOVNC R14,R12 LEA RDI,[RBP + -0x50] MOV ECX,0x20 MOV RDX,R14 CALL 0x00124530 MOV byte ptr [RBP + R14*0x1 + -0x50],0x0 TEST RBX,RBX JZ 0x0016113f CMP RBX,0x1f CMOVC R12,RBX LEA R13,[RBP + -0x70] MOV ECX,0x20 MOV RDI,R13 MOV RSI,R15 MOV RDX,R12 CALL 0x00124530 MOV byte ptr [RBP + R12*0x1 + -0x70],0x0 MOV RDI,qword ptr [RBP + -0x78] ADD RDI,0x8 LEA RCX,[0x166d3e] MOV R14D,0x1 LEA R8,[RBP + -0x50] MOV EDX,0x80 MOV ESI,0x1 MOV R9,R13 XOR EAX,EAX CALL 0x001241b0 JMP 0x0016117a LAB_00161110: MOV RBX,qword ptr [RBP + -0x78] TEST byte ptr [RBX],0x1 MOV RAX,qword ptr [RBX + 0x158] JNZ 0x0016112d TEST RAX,RAX JZ 0x0016116b MOV RDI,RBX MOV RSI,R13 JMP 0x00161138 LAB_0016112d: TEST RAX,RAX JZ 0x0016116b MOV RDI,RBX MOV RDX,R14 LAB_00161138: CALL RAX MOV R14D,EAX JMP 0x0016116e LAB_0016113f: MOV RDI,qword ptr [RBP + -0x78] ADD RDI,0x8 LEA RCX,[0x166d62] MOV R14D,0x1 LEA R8,[RBP + -0x50] MOV EDX,0x80 MOV ESI,0x1 XOR EAX,EAX CALL 0x001241b0 JMP 0x0016117a LAB_0016116b: XOR R14D,R14D LAB_0016116e: MOV byte ptr [R12],0x0 MOV qword ptr [RBX + 0x120],R12 LAB_0016117a: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0016119b MOV EAX,R14D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016119b: CALL 0x00124300
int4 my_xml_leave(byte *param_1,char *param_2,char *param_3) { code *pcVar1; int iVar2; int4 uVar3; char *pcVar4; ulong uVar5; char *pcVar6; char *pcVar7; char *pcVar8; char *pcVar9; long lVar10; long in_FS_OFFSET; char local_78 [32]; char local_58 [32]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar7 = *(char **)(param_1 + 0x118); pcVar6 = *(char **)(param_1 + 0x120); pcVar4 = pcVar6 + -(long)pcVar7; pcVar9 = pcVar6; pcVar8 = pcVar6; if (pcVar7 <= pcVar6 && pcVar4 != (char *)0x0) { do { pcVar9 = pcVar8; if (*pcVar8 == '/') goto LAB_00161037; pcVar8 = pcVar8 + -1; pcVar9 = pcVar7; } while (pcVar7 < pcVar8); } if (*pcVar9 == '/') { LAB_00161037: uVar5 = ~(ulong)pcVar9; lVar10 = 1; } else { uVar5 = -(long)pcVar9; lVar10 = 0; } pcVar6 = pcVar6 + uVar5; if ((param_2 != (char *)0x0) && ((pcVar6 != param_3 || (iVar2 = bcmp(param_2,pcVar9 + lVar10,(size_t)param_3), iVar2 != 0)))) { if ((char *)0x1e < param_3) { param_3 = (char *)0x1f; } __memcpy_chk(local_58,param_2,param_3,0x20); local_58[(long)param_3] = '\0'; if (pcVar6 == (char *)0x0) { uVar3 = 1; __sprintf_chk(param_1 + 8,1,0x80,"\'</%s>\' unexpected (END-OF-INPUT wanted)",local_58); } else { pcVar7 = (char *)0x1f; if (pcVar6 < (char *)0x1f) { pcVar7 = pcVar6; } __memcpy_chk(local_78,pcVar9 + lVar10,pcVar7,0x20); local_78[(long)pcVar7] = '\0'; uVar3 = 1; __sprintf_chk(param_1 + 8,1,0x80,"\'</%s>\' unexpected (\'</%s>\' wanted)",local_58,local_78); } goto LAB_0016117a; } pcVar1 = *(code **)(param_1 + 0x158); if ((*param_1 & 1) == 0) { if (pcVar1 == (code *)0x0) goto LAB_0016116b; LAB_00161138: uVar3 = (*pcVar1)(param_1,pcVar7,pcVar4); } else { pcVar4 = param_3; pcVar7 = param_2; if (pcVar1 != (code *)0x0) goto LAB_00161138; LAB_0016116b: uVar3 = 0; } *pcVar9 = '\0'; *(char **)(param_1 + 0x120) = pcVar9; LAB_0016117a: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar3; }
47,665
my_wc_mb_eucjpms
eloqsql/strings/ctype-eucjpms.c
static int my_wc_mb_eucjpms(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int jp; if ((int) wc < 0x80) /* ASCII [00-7F] */ { if (s >= e) return MY_CS_TOOSMALL; *s= (uchar) wc; return 1; } if (wc > 0xFFFF) return MY_CS_ILUNI; if ((jp= unicode_to_jisx0208_eucjpms[wc])) /* JIS-X-0208 MS */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjpms[wc])) /* JIS-X-0212 MS */ { if (s + 3 > e) return MY_CS_TOOSMALL3; s[0]= 0x8F; MY_PUT_MB2(s + 1, jp); return 3; } if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */ { if (s + 2 > e) return MY_CS_TOOSMALL2; s[0]= 0x8E; s[1]= (uchar) (wc - 0xFEC0); return 2; } return MY_CS_ILUNI; }
O3
c
my_wc_mb_eucjpms: cmpl $0x7f, %esi jg 0xaf561 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xaf596 movb %sil, (%rdx) movl $0x1, %eax retq xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0xaf596 leaq 0xecd0d(%rip), %rdi # 0x19c280 movzwl (%rdi,%rsi,2), %edi testw %di, %di je 0xaf597 leaq 0x2(%rdx), %rsi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rsi ja 0xaf596 rolw $0x8, %di movw %di, (%rdx) movl $0x2, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx leaq 0x10ccdd(%rip), %rdi # 0x1bc280 movzwl (%rdi,%rsi,2), %ebx testw %bx, %bx je 0xaf5ca leaq 0x3(%rdx), %rsi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rsi ja 0xaf5f5 movb $-0x71, (%rdx) movb %bh, 0x1(%rdx) movb %bl, 0x2(%rdx) movl $0x3, %eax jmp 0xaf5f5 leaq -0xff61(%rsi), %rdi cmpq $0x3e, %rdi ja 0xaf5f5 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xaf5f5 movb $-0x72, (%rdx) addb $0x40, %sil movb %sil, 0x1(%rdx) movl $0x2, %eax popq %rbx popq %rbp retq
my_wc_mb_eucjpms: cmp esi, 7Fh jg short loc_AF561 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_AF596 mov [rdx], sil mov eax, 1 retn loc_AF561: xor eax, eax cmp rsi, 0FFFFh ja short locret_AF596 lea rdi, unicode_to_jisx0208_eucjpms movzx edi, word ptr [rdi+rsi*2] test di, di jz short loc_AF597 lea rsi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rsi, rcx ja short locret_AF596 rol di, 8 mov [rdx], di mov eax, 2 locret_AF596: retn loc_AF597: push rbp mov rbp, rsp push rbx lea rdi, unicode_to_jisx0212_eucjpms movzx ebx, word ptr [rdi+rsi*2] test bx, bx jz short loc_AF5CA lea rsi, [rdx+3] mov eax, 0FFFFFF99h cmp rsi, rcx ja short loc_AF5F5 mov byte ptr [rdx], 8Fh mov [rdx+1], bh mov [rdx+2], bl mov eax, 3 jmp short loc_AF5F5 loc_AF5CA: lea rdi, [rsi-0FF61h] cmp rdi, 3Eh ; '>' ja short loc_AF5F5 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_AF5F5 mov byte ptr [rdx], 8Eh add sil, 40h ; '@' mov [rdx+1], sil mov eax, 2 loc_AF5F5: pop rbx pop rbp retn
long long my_wc_mb_eucjpms(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4) { long long result; // rax __int16 v5; // di __int16 v6; // bx if ( (int)a2 > 127 ) { result = 0LL; if ( a2 <= 0xFFFF ) { v5 = unicode_to_jisx0208_eucjpms[a2]; if ( v5 ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_WORD *)a3 = __ROL2__(v5, 8); return 2LL; } } else { v6 = unicode_to_jisx0212_eucjpms[a2]; if ( v6 ) { result = 4294967193LL; if ( a3 + 3 <= a4 ) { *(_BYTE *)a3 = -113; *(_BYTE *)(a3 + 1) = HIBYTE(v6); *(_BYTE *)(a3 + 2) = v6; return 3LL; } } else if ( a2 - 65377 <= 0x3E ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_BYTE *)a3 = -114; *(_BYTE *)(a3 + 1) = a2 + 64; return 2LL; } } } } } else { result = 4294967195LL; if ( a3 < a4 ) { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_eucjpms: CMP ESI,0x7f JG 0x001af561 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001af596 MOV byte ptr [RDX],SIL MOV EAX,0x1 RET LAB_001af561: XOR EAX,EAX CMP RSI,0xffff JA 0x001af596 LEA RDI,[0x29c280] MOVZX EDI,word ptr [RDI + RSI*0x2] TEST DI,DI JZ 0x001af597 LEA RSI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RSI,RCX JA 0x001af596 ROL DI,0x8 MOV word ptr [RDX],DI MOV EAX,0x2 LAB_001af596: RET LAB_001af597: PUSH RBP MOV RBP,RSP PUSH RBX LEA RDI,[0x2bc280] MOVZX EBX,word ptr [RDI + RSI*0x2] TEST BX,BX JZ 0x001af5ca LEA RSI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RSI,RCX JA 0x001af5f5 MOV byte ptr [RDX],0x8f MOV byte ptr [RDX + 0x1],BH MOV byte ptr [RDX + 0x2],BL MOV EAX,0x3 JMP 0x001af5f5 LAB_001af5ca: LEA RDI,[RSI + -0xff61] CMP RDI,0x3e JA 0x001af5f5 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001af5f5 MOV byte ptr [RDX],0x8e ADD SIL,0x40 MOV byte ptr [RDX + 0x1],SIL MOV EAX,0x2 LAB_001af5f5: POP RBX POP RBP RET
int8 my_wc_mb_eucjpms(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; short sVar2; int8 uVar3; if ((int)param_2 < 0x80) { uVar3 = 0xffffff9b; if (param_3 < param_4) { *(char *)param_3 = (char)param_2; return 1; } } else { uVar3 = 0; if (param_2 < 0x10000) { uVar1 = *(ushort *)(unicode_to_jisx0208_eucjpms + param_2 * 2); if (uVar1 == 0) { sVar2 = *(short *)(unicode_to_jisx0212_eucjpms + param_2 * 2); if (sVar2 == 0) { if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) { *(char *)param_3 = -0x72; *(char *)((long)param_3 + 1) = (char)param_2 + '@'; uVar3 = 2; } } else { uVar3 = 0xffffff99; if ((ushort *)((long)param_3 + 3) <= param_4) { *(char *)param_3 = -0x71; *(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8); *(char *)(param_3 + 1) = (char)sVar2; uVar3 = 3; } } return uVar3; } uVar3 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar3 = 2; } } } return uVar3; }
47,666
my_hash_sort_utf8mb4_nopad
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0) { my_tosort_unicode(uni_plane, &wc, cs->state); MY_HASH_ADD_16(m1, m2, (uint) (wc & 0xFFFF)); if (wc > 0xFFFF) { /* Put the highest byte only if it is non-zero, to make hash functions for utf8mb3 and utf8mb4 compatible for BMP characters. This is useful to keep order of records in test results, e.g. for "SHOW GRANTS". */ MY_HASH_ADD(m1, m2, (uint) ((wc >> 16) & 0xFF)); } s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf8mb4_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x74660 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x796da movq -0x48(%rbp), %rdi movq -0x8(%rbp), %rax movl 0xc(%rax), %edx leaq -0x30(%rbp), %rsi callq 0x74d80 jmp 0x795f1 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x79635 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF shrl $0x8, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x79676 cmpq $0xffff, -0x30(%rbp) # imm = 0xFFFF jbe 0x796c4 jmp 0x79682 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x10, %rcx andq $0xff, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x796c4 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x795ba movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf8mb4_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_795BA: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4 mov [rbp+var_34], eax cmp eax, 0 jle loc_796DA mov rdi, [rbp+var_48] mov rax, [rbp+var_8] mov edx, [rax+0Ch] lea rsi, [rbp+var_30] call my_tosort_unicode jmp short $+2 loc_795F1: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_79635: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh shr ecx, 8 mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_79676: cmp [rbp+var_30], 0FFFFh jbe short loc_796C4 jmp short $+2 loc_79682: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 10h and rcx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_796C4: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_795BA loc_796DA: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_utf8mb4_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax long long v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+10h] [rbp-50h] long long v10; // [rsp+10h] [rbp-50h] _QWORD *v11; // [rsp+18h] [rbp-48h] long long v12; // [rsp+20h] [rbp-40h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14; // [rsp+30h] [rbp-30h] BYREF _QWORD *v15; // [rsp+38h] [rbp-28h] long long *v16; // [rsp+40h] [rbp-20h] long long v17; // [rsp+48h] [rbp-18h] long long v18; // [rsp+50h] [rbp-10h] long long v19; // [rsp+58h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v12 = a3 + a2; v11 = *(_QWORD **)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v13 = my_mb_wc_utf8mb4(v19, (long long)&v14, v18, v12, (long long)a5, a6); if ( v13 <= 0 ) break; my_tosort_unicode(v11, &v14, *(_DWORD *)(v19 + 12)); v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v14 * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v9 = v10 ^ ((v10 << 8) + BYTE1(v14) * (v8 + (v10 & 0x3F))); v7 = v8 + 3; if ( v14 > 0xFFFF ) { v9 ^= (v9 << 8) + BYTE2(v14) * (v7 + (v9 & 0x3F)); v7 += 3LL; } v18 += v13; } *v16 = v9; result = v15; *v15 = v7; return result; }
my_hash_sort_utf8mb4_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_001795ba: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x00174660 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x001796da MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xc] LEA RSI,[RBP + -0x30] CALL 0x00174d80 JMP 0x001795f1 LAB_001795f1: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00179635 LAB_00179635: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff SHR ECX,0x8 MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00179676 LAB_00179676: CMP qword ptr [RBP + -0x30],0xffff JBE 0x001796c4 JMP 0x00179682 LAB_00179682: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x10 AND RCX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001796c4 LAB_001796c4: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001795ba LAB_001796da: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; long lVar2; int iVar3; long local_60; ulong local_58; ulong local_38; long *local_30; ulong *local_28; long local_20; long local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { iVar3 = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3); if (iVar3 < 1) break; my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc)); local_58 = ((local_58 & 0x3f) + local_60) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)(((uint)local_38 & 0xffff) >> 8) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 6; if (0xffff < local_38) { local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 0x10) & 0xff) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 9; } local_60 = lVar2; local_18 = local_18 + iVar3; } *local_28 = local_58; *local_30 = local_60; return; }
47,667
minja::Value::operator-(minja::Value const&) const
llama.cpp/common/minja/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 0xec0a5 movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x1, %al ja 0xec0a5 movq %rsi, %rdi callq 0xc0812 movq %rax, %r15 movq %r14, %rdi callq 0xc0812 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 0x8a8d6 jmp 0xec0f1 movq %rsi, %rdi callq 0xbd9cc movsd %xmm0, 0x8(%rsp) movq %r14, %rdi callq 0xbd9cc 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 0x89e9e movq %r14, %rdi movl $0x1, %esi callq 0x83b2c 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_EC0A5 mov al, [r14+40h] add al, 0FBh cmp al, 1 ja short loc_EC0A5 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_EC0F1 loc_EC0A5: 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_EC0F1: 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; // xmm0_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>((_QWORD *)a2); v7 = minja::Value::get<double>((_QWORD *)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), v9 - v7); } else { v4 = minja::Value::get<long>((_QWORD *)a2); v5 = minja::Value::get<long>((_QWORD *)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>>( (unsigned __int8 *)(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 0x001ec0a5 MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x001ec0a5 MOV RDI,RSI CALL 0x001c0812 MOV R15,RAX MOV RDI,R14 CALL 0x001c0812 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 0x0018a8d6 JMP 0x001ec0f1 LAB_001ec0a5: MOV RDI,RSI CALL 0x001bd9cc MOVSD qword ptr [RSP + 0x8],XMM0 MOV RDI,R14 CALL 0x001bd9cc 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 0x00189e9e LAB_001ec0f1: MOV RDI,R14 MOV ESI,0x1 CALL 0x00183b2c 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; }
47,668
walk_and_copy
eloqsql/storage/myisam/ft_nlq_search.c
static int walk_and_copy(FT_SUPERDOC *from, uint32 count __attribute__((unused)), FT_DOC **to) { DBUG_ENTER("walk_and_copy"); from->doc.weight+=from->tmp_weight*from->word_ptr->weight; (*to)->dpos=from->doc.dpos; (*to)->weight=from->doc.weight; (*to)++; DBUG_RETURN(0); }
O3
c
walk_and_copy: pushq %rbp movq %rsp, %rbp movsd 0x18(%rdi), %xmm0 movq (%rdi), %rax movq 0x10(%rdi), %rcx mulsd 0x8(%rcx), %xmm0 addsd 0x8(%rdi), %xmm0 movsd %xmm0, 0x8(%rdi) movq (%rdx), %rcx movq %rax, (%rcx) movsd 0x8(%rdi), %xmm0 movq (%rdx), %rax movsd %xmm0, 0x8(%rax) addq $0x10, (%rdx) xorl %eax, %eax popq %rbp retq
walk_and_copy_0: push rbp mov rbp, rsp movsd xmm0, qword ptr [rdi+18h] mov rax, [rdi] mov rcx, [rdi+10h] mulsd xmm0, qword ptr [rcx+8] addsd xmm0, qword ptr [rdi+8] movsd qword ptr [rdi+8], xmm0 mov rcx, [rdx] mov [rcx], rax movsd xmm0, qword ptr [rdi+8] mov rax, [rdx] movsd qword ptr [rax+8], xmm0 add qword ptr [rdx], 10h xor eax, eax pop rbp retn
long long walk_and_copy_0(double *a1, long long a2, long long a3) { long long v3; // rax v3 = *(_QWORD *)a1; a1[1] = a1[3] * *(double *)(*((_QWORD *)a1 + 2) + 8LL) + a1[1]; **(_QWORD **)a3 = v3; *(double *)(*(_QWORD *)a3 + 8LL) = a1[1]; *(_QWORD *)a3 += 16LL; return 0LL; }
walk_and_copy: PUSH RBP MOV RBP,RSP MOVSD XMM0,qword ptr [RDI + 0x18] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x10] MULSD XMM0,qword ptr [RCX + 0x8] ADDSD XMM0,qword ptr [RDI + 0x8] MOVSD qword ptr [RDI + 0x8],XMM0 MOV RCX,qword ptr [RDX] MOV qword ptr [RCX],RAX MOVSD XMM0,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDX] MOVSD qword ptr [RAX + 0x8],XMM0 ADD qword ptr [RDX],0x10 XOR EAX,EAX POP RBP RET
int8 walk_and_copy(int8 *param_1,int8 param_2,long *param_3) { param_1[1] = (double)param_1[3] * *(double *)(param_1[2] + 8) + (double)param_1[1]; *(int8 *)*param_3 = *param_1; *(int8 *)(*param_3 + 8) = param_1[1]; *param_3 = *param_3 + 0x10; return 0; }
47,669
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long)
hkr04[P]cpp-mcp/common/json.hpp
inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta, std::uint64_t rest, std::uint64_t ten_k) { JSON_ASSERT(len >= 1); JSON_ASSERT(dist <= delta); JSON_ASSERT(rest <= delta); JSON_ASSERT(ten_k > 0); // <--------------------------- delta ----> // <---- dist ---------> // --------------[------------------+-------------------]-------------- // M- w M+ // // ten_k // <------> // <---- rest ----> // --------------[------------------+----+--------------]-------------- // w V // = buf * 10^k // // ten_k represents a unit-in-the-last-place in the decimal representation // stored in buf. // Decrement buf by ten_k while this takes buf closer to w. // The tests are written in this order to avoid overflow in unsigned // integer arithmetic. while (rest < dist && delta - rest >= ten_k && (rest + ten_k < dist || dist - rest > rest + ten_k - dist)) { JSON_ASSERT(buf[len - 1] != '0'); buf[len - 1]--; rest += ten_k; } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long): movslq %esi, %rax subq %r8, %rcx movq %r9, %rsi subq %rdx, %rsi movq %rdx, %r10 subq %r8, %r10 cmpq %rdx, %r8 jae 0x4458c subq %r9, %rcx jb 0x4458c leaq (%r8,%r9), %r11 cmpq %rdx, %r11 jb 0x44580 addq %rsi, %r8 cmpq %r8, %r10 jbe 0x4458c decb -0x1(%rdi,%rax) subq %r9, %r10 movq %r11, %r8 jmp 0x44565 retq
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm: movsxd rax, esi sub rcx, r8 mov rsi, r9 sub rsi, rdx mov r10, rdx sub r10, r8 loc_44565: cmp r8, rdx jnb short locret_4458C sub rcx, r9 jb short locret_4458C lea r11, [r8+r9] cmp r11, rdx jb short loc_44580 add r8, rsi cmp r10, r8 jbe short locret_4458C loc_44580: dec byte ptr [rdi+rax-1] sub r10, r9 mov r8, r11 jmp short loc_44565 locret_4458C: retn
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, char *a2, unsigned long long a3, long long a4, unsigned long long a5, unsigned long long a6) { long long result; // rax unsigned long long v7; // rcx unsigned long long v8; // r10 bool v9; // cf result = (int)a2; v7 = a4 - a5; v8 = a3 - a5; while ( a5 < a3 ) { v9 = v7 < a6; v7 -= a6; if ( v9 || a5 + a6 >= a3 && v8 <= a6 - a3 + a5 ) break; --*((_BYTE *)this + (int)a2 - 1); v8 -= a6; a5 += a6; } return result; }
grisu2_round: MOVSXD RAX,ESI SUB RCX,R8 MOV RSI,R9 SUB RSI,RDX MOV R10,RDX SUB R10,R8 LAB_00144565: CMP R8,RDX JNC 0x0014458c SUB RCX,R9 JC 0x0014458c LEA R11,[R8 + R9*0x1] CMP R11,RDX JC 0x00144580 ADD R8,RSI CMP R10,R8 JBE 0x0014458c LAB_00144580: DEC byte ptr [RDI + RAX*0x1 + -0x1] SUB R10,R9 MOV R8,R11 JMP 0x00144565 LAB_0014458c: RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round (char *param_1,int param_2,ulong param_3,ulong param_4,ulong param_5,ulong param_6) { ulong uVar1; ulong uVar2; bool bVar3; uVar1 = param_4 - param_5; uVar2 = param_3 - param_5; for (; ((param_5 < param_3 && (bVar3 = param_6 <= uVar1, uVar1 = uVar1 - param_6, bVar3)) && ((param_5 + param_6 < param_3 || (param_5 + (param_6 - param_3) < uVar2)))); uVar2 = uVar2 - param_6) { param_1[(long)param_2 + -1] = param_1[(long)param_2 + -1] + -1; param_5 = param_5 + param_6; } return; }
47,670
bc_idx_to_atom
bluesky950520[P]quickjs/quickjs.c
static int bc_idx_to_atom(BCReaderState *s, JSAtom *patom, uint32_t idx) { JSAtom atom; if (__JS_AtomIsTaggedInt(idx)) { atom = idx; } else if (idx < s->first_atom) { atom = JS_DupAtom(s->ctx, idx); } else { idx -= s->first_atom; if (idx >= s->idx_to_atom_count) { JS_ThrowSyntaxError(s->ctx, "invalid atom index (pos=%u)", (unsigned int)(s->ptr - s->buf_start)); *patom = JS_ATOM_NULL; return s->error_state = -1; } atom = JS_DupAtom(s->ctx, s->idx_to_atom[idx]); } *patom = atom; return 0; }
O0
c
bc_idx_to_atom: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movl %edx, 0x1c(%rsp) movl 0x1c(%rsp), %edi callq 0x360c0 cmpl $0x0, %eax je 0x7d35d movl 0x1c(%rsp), %eax movl %eax, 0x18(%rsp) jmp 0x7d420 movl 0x1c(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x20(%rcx), %eax jae 0x7d385 movq 0x28(%rsp), %rax movq (%rax), %rdi movl 0x1c(%rsp), %esi callq 0x27fa0 movl %eax, 0x18(%rsp) jmp 0x7d41e movq 0x28(%rsp), %rax movl 0x20(%rax), %ecx movl 0x1c(%rsp), %eax subl %ecx, %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x24(%rcx), %eax jb 0x7d3fd movq 0x28(%rsp), %rax movq (%rax), %rdi movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movq 0x28(%rsp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax movl %eax, %edx leaq 0x91671(%rip), %rsi # 0x10ea3c movb $0x0, %al callq 0x2d210 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x20(%rsp), %rax movl $0x0, (%rax) movq 0x28(%rsp), %rax movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0x7d433 movq 0x28(%rsp), %rax movq (%rax), %rdi movq 0x28(%rsp), %rax movq 0x28(%rax), %rax movl 0x1c(%rsp), %ecx movl (%rax,%rcx,4), %esi callq 0x27fa0 movl %eax, 0x18(%rsp) jmp 0x7d420 movl 0x18(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, (%rax) movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopl (%rax)
bc_idx_to_atom: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_1C], edx mov edi, [rsp+38h+var_1C] call __JS_AtomIsTaggedInt cmp eax, 0 jz short loc_7D35D mov eax, [rsp+38h+var_1C] mov [rsp+38h+var_20], eax jmp loc_7D420 loc_7D35D: mov eax, [rsp+38h+var_1C] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+20h] jnb short loc_7D385 mov rax, [rsp+38h+var_10] mov rdi, [rax] mov esi, [rsp+38h+var_1C] call JS_DupAtom mov [rsp+38h+var_20], eax jmp loc_7D41E loc_7D385: mov rax, [rsp+38h+var_10] mov ecx, [rax+20h] mov eax, [rsp+38h+var_1C] sub eax, ecx mov [rsp+38h+var_1C], eax mov eax, [rsp+38h+var_1C] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+24h] jb short loc_7D3FD mov rax, [rsp+38h+var_10] mov rdi, [rax] mov rax, [rsp+38h+var_10] mov rax, [rax+10h] mov rcx, [rsp+38h+var_10] mov rcx, [rcx+8] sub rax, rcx mov edx, eax lea rsi, aInvalidAtomInd; "invalid atom index (pos=%u)" mov al, 0 call JS_ThrowSyntaxError mov [rsp+38h+var_30], rax mov [rsp+38h+var_28], rdx mov rax, [rsp+38h+var_18] mov dword ptr [rax], 0 mov rax, [rsp+38h+var_10] mov dword ptr [rax+30h], 0FFFFFFFFh mov [rsp+38h+var_4], 0FFFFFFFFh jmp short loc_7D433 loc_7D3FD: mov rax, [rsp+38h+var_10] mov rdi, [rax] mov rax, [rsp+38h+var_10] mov rax, [rax+28h] mov ecx, [rsp+38h+var_1C] mov esi, [rax+rcx*4] call JS_DupAtom mov [rsp+38h+var_20], eax loc_7D41E: jmp short $+2 loc_7D420: mov ecx, [rsp+38h+var_20] mov rax, [rsp+38h+var_18] mov [rax], ecx mov [rsp+38h+var_4], 0 loc_7D433: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long bc_idx_to_atom( long long a1, _DWORD *a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // r8 long long v12; // r9 __m128 v13; // xmm4 __m128 v14; // xmm5 char v16; // [rsp+0h] [rbp-38h] int v17; // [rsp+18h] [rbp-20h] unsigned int v19; // [rsp+1Ch] [rbp-1Ch] if ( _JS_AtomIsTaggedInt(a3) ) { v17 = a3; LABEL_8: *a2 = v17; return 0; } if ( a3 < *(_DWORD *)(a1 + 32) ) { v17 = JS_DupAtom(*(_QWORD *)a1, a3); goto LABEL_8; } v19 = a3 - *(_DWORD *)(a1 + 32); if ( v19 < *(_DWORD *)(a1 + 36) ) { v17 = JS_DupAtom(*(_QWORD *)a1, *(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL * v19)); goto LABEL_8; } JS_ThrowSyntaxError( *(_QWORD *)a1, (long long)"invalid atom index (pos=%u)", (unsigned int)*(_QWORD *)(a1 + 16) - (unsigned int)*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8), v11, v12, a4, a5, a6, a7, v13, v14, a10, a11, v16); *a2 = 0; *(_DWORD *)(a1 + 48) = -1; return (unsigned int)-1; }
bc_idx_to_atom: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0x1c],EDX MOV EDI,dword ptr [RSP + 0x1c] CALL 0x001360c0 CMP EAX,0x0 JZ 0x0017d35d MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x18],EAX JMP 0x0017d420 LAB_0017d35d: MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x20] JNC 0x0017d385 MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV ESI,dword ptr [RSP + 0x1c] CALL 0x00127fa0 MOV dword ptr [RSP + 0x18],EAX JMP 0x0017d41e LAB_0017d385: MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RAX + 0x20] MOV EAX,dword ptr [RSP + 0x1c] SUB EAX,ECX MOV dword ptr [RSP + 0x1c],EAX MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x24] JC 0x0017d3fd MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX MOV EDX,EAX LEA RSI,[0x20ea3c] MOV AL,0x0 CALL 0x0012d210 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x30],0xffffffff MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x0017d433 LAB_0017d3fd: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x28] MOV ECX,dword ptr [RSP + 0x1c] MOV ESI,dword ptr [RAX + RCX*0x4] CALL 0x00127fa0 MOV dword ptr [RSP + 0x18],EAX LAB_0017d41e: JMP 0x0017d420 LAB_0017d420: MOV ECX,dword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x34],0x0 LAB_0017d433: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 bc_idx_to_atom(int8 *param_1,uint *param_2,uint param_3) { int iVar1; uint local_20; iVar1 = __JS_AtomIsTaggedInt(param_3); local_20 = param_3; if (iVar1 == 0) { if (param_3 < *(uint *)(param_1 + 4)) { local_20 = JS_DupAtom(*param_1,param_3); } else { if (*(uint *)((long)param_1 + 0x24) <= param_3 - *(int *)(param_1 + 4)) { JS_ThrowSyntaxError(*param_1,"invalid atom index (pos=%u)",(int)param_1[2] - (int)param_1[1] ); *param_2 = 0; *(int4 *)(param_1 + 6) = 0xffffffff; return 0xffffffff; } local_20 = JS_DupAtom(*param_1,*(int4 *) (param_1[5] + (ulong)(param_3 - *(int *)(param_1 + 4)) * 4)); } } *param_2 = local_20; return 0; }
47,671
bc_idx_to_atom
bluesky950520[P]quickjs/quickjs.c
static int bc_idx_to_atom(BCReaderState *s, JSAtom *patom, uint32_t idx) { JSAtom atom; if (__JS_AtomIsTaggedInt(idx)) { atom = idx; } else if (idx < s->first_atom) { atom = JS_DupAtom(s->ctx, idx); } else { idx -= s->first_atom; if (idx >= s->idx_to_atom_count) { JS_ThrowSyntaxError(s->ctx, "invalid atom index (pos=%u)", (unsigned int)(s->ptr - s->buf_start)); *patom = JS_ATOM_NULL; return s->error_state = -1; } atom = JS_DupAtom(s->ctx, s->idx_to_atom[idx]); } *patom = atom; return 0; }
O2
c
bc_idx_to_atom: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx testl %edx, %edx js 0x3d400 movq %rdi, %r14 movl %edx, %eax subl 0x20(%rdi), %eax jae 0x3d40c cmpl $0xdf, %edx jbe 0x3d400 movq (%r14), %rax movq 0x18(%rax), %rax movq 0x68(%rax), %rax movl %edx, %ecx movq (%rax,%rcx,8), %rax incl (%rax) movl %edx, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq cmpl 0x24(%r14), %eax jae 0x3d425 movq 0x28(%r14), %rcx movl %eax, %eax movl (%rcx,%rax,4), %edx cmpl $0xe0, %edx jge 0x3d3ed jmp 0x3d400 movq (%r14), %rdi movl 0x10(%r14), %edx subl 0x8(%r14), %edx leaq 0x494f1(%rip), %rsi # 0x86928 xorl %eax, %eax callq 0x1c5bb andl $0x0, (%rbx) orl $-0x1, 0x30(%r14) pushq $-0x1 popq %rax jmp 0x3d404
bc_idx_to_atom: push r14 push rbx push rax mov rbx, rsi test edx, edx js short loc_3D400 mov r14, rdi mov eax, edx sub eax, [rdi+20h] jnb short loc_3D40C cmp edx, 0DFh jbe short loc_3D400 loc_3D3ED: mov rax, [r14] mov rax, [rax+18h] mov rax, [rax+68h] mov ecx, edx mov rax, [rax+rcx*8] inc dword ptr [rax] loc_3D400: mov [rbx], edx xor eax, eax loc_3D404: add rsp, 8 pop rbx pop r14 retn loc_3D40C: cmp eax, [r14+24h] jnb short loc_3D425 mov rcx, [r14+28h] mov eax, eax mov edx, [rcx+rax*4] cmp edx, 0E0h jge short loc_3D3ED jmp short loc_3D400 loc_3D425: mov rdi, [r14] mov edx, [r14+10h] sub edx, [r14+8] lea rsi, aInvalidAtomInd; "invalid atom index (pos=%u)" xor eax, eax call JS_ThrowSyntaxError and dword ptr [rbx], 0 or dword ptr [r14+30h], 0FFFFFFFFh push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_3D404
long long bc_idx_to_atom( long long a1, int *a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al unsigned int v15; // eax _DWORD *v16; // rax char v18; // [rsp-8h] [rbp-18h] v18 = v14; if ( a3 < 0 ) goto LABEL_5; v15 = a3 - *(_DWORD *)(a1 + 32); if ( (unsigned int)a3 >= *(_DWORD *)(a1 + 32) ) { if ( v15 >= *(_DWORD *)(a1 + 36) ) { JS_ThrowSyntaxError( *(_QWORD *)a1, (long long)"invalid atom index (pos=%u)", (unsigned int)(*(_DWORD *)(a1 + 16) - *(_DWORD *)(a1 + 8)), a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v18); *a2 = 0; *(_DWORD *)(a1 + 48) = -1; return -1LL; } a3 = *(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL * v15); if ( a3 >= 224 ) goto LABEL_4; } else if ( (unsigned int)a3 > 0xDF ) { LABEL_4: v16 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8LL * (unsigned int)a3); ++*v16; } LABEL_5: *a2 = a3; return 0LL; }
bc_idx_to_atom: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI TEST EDX,EDX JS 0x0013d400 MOV R14,RDI MOV EAX,EDX SUB EAX,dword ptr [RDI + 0x20] JNC 0x0013d40c CMP EDX,0xdf JBE 0x0013d400 LAB_0013d3ed: MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,EDX MOV RAX,qword ptr [RAX + RCX*0x8] INC dword ptr [RAX] LAB_0013d400: MOV dword ptr [RBX],EDX XOR EAX,EAX LAB_0013d404: ADD RSP,0x8 POP RBX POP R14 RET LAB_0013d40c: CMP EAX,dword ptr [R14 + 0x24] JNC 0x0013d425 MOV RCX,qword ptr [R14 + 0x28] MOV EAX,EAX MOV EDX,dword ptr [RCX + RAX*0x4] CMP EDX,0xe0 JGE 0x0013d3ed JMP 0x0013d400 LAB_0013d425: MOV RDI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x10] SUB EDX,dword ptr [R14 + 0x8] LEA RSI,[0x186928] XOR EAX,EAX CALL 0x0011c5bb AND dword ptr [RBX],0x0 OR dword ptr [R14 + 0x30],0xffffffff PUSH -0x1 POP RAX JMP 0x0013d404
int8 bc_idx_to_atom(long *param_1,uint *param_2,uint param_3) { int *piVar1; uint uVar2; if (-1 < (int)param_3) { uVar2 = param_3 - *(uint *)(param_1 + 4); if (param_3 < *(uint *)(param_1 + 4)) { if (param_3 < 0xe0) goto LAB_0013d400; } else { if (*(uint *)((long)param_1 + 0x24) <= uVar2) { JS_ThrowSyntaxError(*param_1,"invalid atom index (pos=%u)",(int)param_1[2] - (int)param_1[1] ); *param_2 = 0; *(int4 *)(param_1 + 6) = 0xffffffff; return 0xffffffffffffffff; } param_3 = *(uint *)(param_1[5] + (ulong)uVar2 * 4); if ((int)param_3 < 0xe0) goto LAB_0013d400; } piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (ulong)param_3 * 8); *piVar1 = *piVar1 + 1; } LAB_0013d400: *param_2 = param_3; return 0; }
47,672
google::protobuf::Descriptor::FindFieldByLowercaseName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
const FieldDescriptor* Descriptor::FindFieldByLowercaseName( ConstStringParam key) const { const FieldDescriptor* result = file()->tables_->FindFieldByLowercaseName(this, key); if (result == nullptr || result->is_extension()) { return nullptr; } else { return result; } }
O0
cpp
google::protobuf::Descriptor::FindFieldByLowercaseName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq 0x38(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x1c1590 movq 0x80(%rax), %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rsi leaq 0x18(%rsp), %rdi callq 0x158e50 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0x2829a0 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) je 0x24427e movq 0x28(%rsp), %rdi callq 0x1bab10 testb $0x1, %al jne 0x24427e jmp 0x244289 movq $0x0, 0x40(%rsp) jmp 0x244293 movq 0x28(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nopl (%rax)
_ZNK6google8protobuf10Descriptor24FindFieldByLowercaseNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov rdi, [rsp+48h+var_10]; this mov [rsp+48h+var_38], rdi call _ZNK6google8protobuf10Descriptor4fileEv; google::protobuf::Descriptor::file(void) mov rax, [rax+80h] mov [rsp+48h+var_40], rax mov rsi, [rsp+48h+var_18] lea rdi, [rsp+48h+var_30] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) mov rdi, [rsp+48h+var_40] mov rsi, [rsp+48h+var_38] mov rdx, [rsp+48h+var_30] mov rcx, [rsp+48h+var_28] call _ZNK6google8protobuf20FileDescriptorTables24FindFieldByLowercaseNameEPKvNS0_20stringpiece_internal11StringPieceE; google::protobuf::FileDescriptorTables::FindFieldByLowercaseName(void const*,google::protobuf::stringpiece_internal::StringPiece) mov [rsp+48h+var_20], rax cmp [rsp+48h+var_20], 0 jz short loc_24427E mov rdi, [rsp+48h+var_20]; this call _ZNK6google8protobuf15FieldDescriptor12is_extensionEv; google::protobuf::FieldDescriptor::is_extension(void) test al, 1 jnz short loc_24427E jmp short loc_244289 loc_24427E: mov [rsp+48h+var_8], 0 jmp short loc_244293 loc_244289: mov rax, [rsp+48h+var_20] mov [rsp+48h+var_8], rax loc_244293: mov rax, [rsp+48h+var_8] add rsp, 48h retn
google::protobuf::FieldDescriptor * google::protobuf::Descriptor::FindFieldByLowercaseName( google::protobuf::Descriptor *a1, long long a2) { long long v3; // [rsp+8h] [rbp-40h] google::protobuf::FieldDescriptor *v4[2]; // [rsp+18h] [rbp-30h] BYREF google::protobuf::FieldDescriptor *FieldByLowercaseName; // [rsp+28h] [rbp-20h] long long v6; // [rsp+30h] [rbp-18h] google::protobuf::Descriptor *v7; // [rsp+38h] [rbp-10h] v7 = a1; v6 = a2; v3 = *(_QWORD *)(google::protobuf::Descriptor::file(a1) + 128); google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v4, a2); FieldByLowercaseName = (google::protobuf::FieldDescriptor *)google::protobuf::FileDescriptorTables::FindFieldByLowercaseName( v3, a1, v4[0], v4[1]); if ( FieldByLowercaseName && !google::protobuf::FieldDescriptor::is_extension(FieldByLowercaseName) ) return FieldByLowercaseName; else return 0LL; }
47,673
google::protobuf::Descriptor::FindFieldByLowercaseName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
const FieldDescriptor* Descriptor::FindFieldByLowercaseName( ConstStringParam key) const { const FieldDescriptor* result = file()->tables_->FindFieldByLowercaseName(this, key); if (result == nullptr || result->is_extension()) { return nullptr; } else { return result; } }
O3
cpp
google::protobuf::Descriptor::FindFieldByLowercaseName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rax movq 0x80(%rax), %r15 movups (%rsi), %xmm0 movaps %xmm0, (%rsp) leaq 0x38(%r15), %rdi leaq -0x1e03(%rip), %rax # 0xbf1e8 leaq 0x18(%rsp), %r14 movq %rax, (%r14) leaq 0x10(%rsp), %rdx movq %r15, (%rdx) movq %r14, %rsi callq 0xe2163 movq 0x40(%r15), %rdi movq %rbx, (%r14) movaps (%rsp), %xmm0 movups %xmm0, 0x8(%r14) leaq 0x18(%rsp), %rsi callq 0xdd5e0 testq %rax, %rax je 0xc1031 movq %rax, %rcx xorl %eax, %eax testb $0x8, 0x1(%rcx) cmoveq %rcx, %rax jmp 0xc1033 xorl %eax, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZNK6google8protobuf10Descriptor24FindFieldByLowercaseNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdi mov rax, [rdi+10h] mov r15, [rax+80h] movups xmm0, xmmword ptr [rsi] movaps [rsp+48h+var_48], xmm0 lea rdi, [r15+38h] lea rax, _ZN6google8protobuf20FileDescriptorTables36FieldsByLowercaseNamesLazyInitStaticEPKS1_; google::protobuf::FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic(google::protobuf::FileDescriptorTables const*) lea r14, [rsp+48h+var_30] mov [r14], rax lea rdx, [rsp+48h+var_38] mov [rdx], r15 mov rsi, r14 call _ZSt9call_onceIPFvPKN6google8protobuf20FileDescriptorTablesEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FileDescriptorTables const*),google::protobuf::FileDescriptorTables const*>(std::once_flag &,void (*)(google::protobuf::FileDescriptorTables const*) &&,google::protobuf::FileDescriptorTables const* &&) mov rdi, [r15+40h] mov [r14], rbx movaps xmm0, [rsp+48h+var_48] movups xmmword ptr [r14+8], xmm0 lea rsi, [rsp+48h+var_30] call _ZN6google8protobuf13FindPtrOrNullISt13unordered_mapISt4pairIPKvNS0_20stringpiece_internal11StringPieceEEPKNS0_15FieldDescriptorENS0_12_GLOBAL__N_121PointerStringPairHashESt8equal_toIS8_ESaIS3_IKS8_SB_EEEEENT_10value_type11second_typeERKSK_RKNSL_10first_typeE; google::protobuf::FindPtrOrNull<std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>>(std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>::value_type const&,std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>::value_type::second_type::first_type const&) test rax, rax jz short loc_C1031 mov rcx, rax xor eax, eax test byte ptr [rcx+1], 8 cmovz rax, rcx jmp short loc_C1033 loc_C1031: xor eax, eax loc_C1033: add rsp, 30h pop rbx pop r14 pop r15 retn
long long google::protobuf::Descriptor::FindFieldByLowercaseName(long long a1, __int128 *a2) { long long v3; // r15 long long v4; // rdi long long v5; // rax long long v6; // rcx long long result; // rax __int128 v8; // [rsp+0h] [rbp-48h] long long ( *v9)(google::protobuf::FileDescriptorTables *, const google::protobuf::FileDescriptorTables *); // [rsp+18h] [rbp-30h] BYREF __int128 v10; // [rsp+20h] [rbp-28h] v3 = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 128LL); v8 = *a2; v9 = google::protobuf::FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic; std::call_once<void (*)(google::protobuf::FileDescriptorTables const*),google::protobuf::FileDescriptorTables const*>( v3 + 56, &v9); v4 = *(_QWORD *)(v3 + 64); v9 = (long long ( *)(google::protobuf::FileDescriptorTables *, const google::protobuf::FileDescriptorTables *))a1; v10 = v8; v5 = google::protobuf::FindPtrOrNull<std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>>( v4, &v9); if ( !v5 ) return 0LL; v6 = v5; result = 0LL; if ( (*(_BYTE *)(v6 + 1) & 8) == 0 ) return v6; return result; }
FindFieldByLowercaseName: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x10] MOV R15,qword ptr [RAX + 0x80] MOVUPS XMM0,xmmword ptr [RSI] MOVAPS xmmword ptr [RSP],XMM0 LEA RDI,[R15 + 0x38] LEA RAX,[0x1bf1e8] LEA R14,[RSP + 0x18] MOV qword ptr [R14],RAX LEA RDX,[RSP + 0x10] MOV qword ptr [RDX],R15 MOV RSI,R14 CALL 0x001e2163 MOV RDI,qword ptr [R15 + 0x40] MOV qword ptr [R14],RBX MOVAPS XMM0,xmmword ptr [RSP] MOVUPS xmmword ptr [R14 + 0x8],XMM0 LEA RSI,[RSP + 0x18] CALL 0x001dd5e0 TEST RAX,RAX JZ 0x001c1031 MOV RCX,RAX XOR EAX,EAX TEST byte ptr [RCX + 0x1],0x8 CMOVZ RAX,RCX JMP 0x001c1033 LAB_001c1031: XOR EAX,EAX LAB_001c1033: ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* google::protobuf::Descriptor::FindFieldByLowercaseName(std::__cxx11::string const&) const */ long __thiscall google::protobuf::Descriptor::FindFieldByLowercaseName(Descriptor *this,string *param_1) { FileDescriptorTables *pFVar1; int8 uVar2; int8 uVar3; long lVar4; long lVar5; FileDescriptorTables *local_38; Descriptor *local_30; int8 local_28; int8 uStack_20; pFVar1 = *(FileDescriptorTables **)(*(long *)(this + 0x10) + 0x80); uVar2 = *(int8 *)param_1; uVar3 = *(int8 *)(param_1 + 8); local_30 = (Descriptor *)FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic; local_38 = pFVar1; std:: call_once<void(*)(google::protobuf::FileDescriptorTables_const*),google::protobuf::FileDescriptorTables_const*> ((once_flag *)(pFVar1 + 0x38),(_func_void_FileDescriptorTables_ptr *)&local_30,&local_38 ); local_30 = this; local_28 = uVar2; uStack_20 = uVar3; lVar4 = FindPtrOrNull<std::unordered_map<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor_const*,google::protobuf::(anonymous_namespace)::PointerStringPairHash,std::equal_to<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>>>> (*(unordered_map **)(pFVar1 + 0x40),(first_type *)&local_30); if (lVar4 == 0) { lVar5 = 0; } else { lVar5 = 0; if ((*(byte *)(lVar4 + 1) & 8) == 0) { lVar5 = lVar4; } } return lVar5; }
47,674
my_wc_mb_bin
eloqsql/strings/ctype-bin.c
int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (s >= e) return MY_CS_TOOSMALL; if (wc < 256) { s[0]= (char) wc; return 1; } return MY_CS_ILUNI; }
O0
c
my_wc_mb_bin: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x367a7 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x367cd cmpq $0x100, -0x18(%rbp) # imm = 0x100 jae 0x367c6 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x367cd movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_wc_mb_bin: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_367A7 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_367CD loc_367A7: cmp [rbp+var_18], 100h jnb short loc_367C6 mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_367CD loc_367C6: mov [rbp+var_4], 0 loc_367CD: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_bin(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( (unsigned long long)a3 < a4 ) { if ( a2 >= 0x100 ) { return 0; } else { *a3 = a2; return 1; } } else { return (unsigned int)-101; } }
my_wc_mb_bin: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001367a7 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001367cd LAB_001367a7: CMP qword ptr [RBP + -0x18],0x100 JNC 0x001367c6 MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x001367cd LAB_001367c6: MOV dword ptr [RBP + -0x4],0x0 LAB_001367cd: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_bin(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { int4 local_c; if (param_3 < param_4) { if (param_2 < 0x100) { *param_3 = (char)param_2; local_c = 1; } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
47,675
SlaveCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&)
666mxvbee[P]BattleShip/lib/Commands/SlaveCommandHandler.cpp
void SlaveCommandHandler::handleShotCommand(std::istringstream& iss) { uint64_t x, y; if (!(iss >> x >> y)) { std::cout << "Slave: Invalid shot command. Use 'shot X Y'.\n"; return; } if (!settings_.getStart()) { std::cout << "Slave: Game not started yet.\n"; return; } int currentQueue = manager_.readQueueFromFile("../game_data/queue.txt"); if (currentQueue != 2) { std::cout << "Slave: Not your turn.\n"; return; } std::string result = slaveLogic_.handleShot(x, y); slaveLogic_.processShotResult(result, x, y); manager_.writeShotToFile("../game_data/shots.txt", 2, x, y, result); if (result == "miss") { manager_.writeQueueToFile("../game_data/queue.txt", 1); } else if (result == "hit" || result == "hit_and_sunk") { if (slaveLogic_.allShipsSunk()) { std::cout << "Slave: All Master ships are sunk. Slave wins!\n"; settings_.exitGame(); saveSettingsToFile("../game_data/settings.txt", settings_); } } saveSettingsToFile("../game_data/settings.txt", settings_); }
O0
cpp
SlaveCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp movq %rsp, %rbp subq $0x1b0, %rsp # imm = 0x1B0 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x148(%rbp) movq -0x10(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x74b0 movq %rax, %rdi leaq -0x20(%rbp), %rsi callq 0x74b0 movq %rax, %rdi movq (%rdi), %rax addq -0x18(%rax), %rdi callq 0x71a0 testb $0x1, %al jne 0x3d39c jmp 0x3d3b4 movq 0x1fbed(%rip), %rdi # 0x5cf90 leaq 0x44e5(%rip), %rsi # 0x4188f callq 0x7370 jmp 0x3d82c movq -0x148(%rbp), %rax movq (%rax), %rdi callq 0xa9b0 testb $0x1, %al jne 0x3d3df movq 0x1fbc2(%rip), %rdi # 0x5cf90 leaq 0x44e8(%rip), %rsi # 0x418bd callq 0x7370 jmp 0x3d82c movq -0x148(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x158(%rbp) leaq -0x49(%rbp), %rdi movq %rdi, -0x150(%rbp) callq 0x7640 movq -0x150(%rbp), %rdx leaq 0x44cc(%rip), %rsi # 0x418db leaq -0x48(%rbp), %rdi callq 0xb600 jmp 0x3d41a movq -0x158(%rbp), %rdi leaq -0x48(%rbp), %rsi callq 0x37f00 movl %eax, -0x15c(%rbp) jmp 0x3d432 leaq -0x48(%rbp), %rdi callq 0x8070 leaq -0x49(%rbp), %rdi callq 0x73c0 movl -0x15c(%rbp), %eax movl %eax, -0x24(%rbp) cmpl $0x2, -0x24(%rbp) je 0x3d49c movq 0x1fb36(%rip), %rdi # 0x5cf90 leaq 0x4491(%rip), %rsi # 0x418f2 callq 0x7370 jmp 0x3d82c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x3d48e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x48(%rbp), %rdi callq 0x8070 leaq -0x49(%rbp), %rdi callq 0x73c0 jmp 0x3d870 movq -0x148(%rbp), %rax movq 0x10(%rax), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x80(%rbp), %rdi movq %rdi, -0x168(%rbp) callq 0x38b00 movq -0x148(%rbp), %rax movq -0x168(%rbp), %rsi movq 0x10(%rax), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x38cd0 jmp 0x3d4e0 movq -0x148(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x178(%rbp) leaq -0xa1(%rbp), %rdi movq %rdi, -0x170(%rbp) callq 0x7640 movq -0x170(%rbp), %rdx leaq 0x43f6(%rip), %rsi # 0x41909 leaq -0xa0(%rbp), %rdi callq 0xb600 jmp 0x3d521 movq -0x178(%rbp), %rdi movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 leaq -0xa0(%rbp), %rsi movl $0x2, %edx leaq -0x80(%rbp), %r9 callq 0x381f0 jmp 0x3d547 leaq -0xa0(%rbp), %rdi callq 0x8070 leaq -0xa1(%rbp), %rdi callq 0x73c0 leaq 0x3ea9(%rip), %rsi # 0x4140f leaq -0x80(%rbp), %rdi callq 0xb720 movb %al, -0x179(%rbp) jmp 0x3d577 movb -0x179(%rbp), %al testb $0x1, %al jne 0x3d586 jmp 0x3d67d movq -0x148(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x190(%rbp) leaq -0xc9(%rbp), %rdi movq %rdi, -0x188(%rbp) callq 0x7640 movq -0x188(%rbp), %rdx leaq 0x4322(%rip), %rsi # 0x418db leaq -0xc8(%rbp), %rdi callq 0xb600 jmp 0x3d5c7 movq -0x190(%rbp), %rdi leaq -0xc8(%rbp), %rsi movl $0x1, %edx callq 0x38090 jmp 0x3d5e1 leaq -0xc8(%rbp), %rdi callq 0x8070 leaq -0xc9(%rbp), %rdi callq 0x73c0 jmp 0x3d7c4 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x3d867 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x3d635 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0xa0(%rbp), %rdi callq 0x8070 leaq -0xa1(%rbp), %rdi callq 0x73c0 jmp 0x3d867 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x3d66c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0xc8(%rbp), %rdi callq 0x8070 leaq -0xc9(%rbp), %rdi callq 0x73c0 jmp 0x3d867 leaq 0x3d87(%rip), %rsi # 0x4140b leaq -0x80(%rbp), %rdi callq 0xb720 movb %al, -0x191(%rbp) jmp 0x3d695 movb -0x191(%rbp), %al testb $0x1, %al jne 0x3d6c8 jmp 0x3d6a1 leaq 0x3d56(%rip), %rsi # 0x413fe leaq -0x80(%rbp), %rdi callq 0xb720 movb %al, -0x192(%rbp) jmp 0x3d6b9 movb -0x192(%rbp), %al testb $0x1, %al jne 0x3d6c8 jmp 0x3d7c2 movq -0x148(%rbp), %rax movq 0x10(%rax), %rdi callq 0x39880 movb %al, -0x193(%rbp) jmp 0x3d6e0 movb -0x193(%rbp), %al testb $0x1, %al jne 0x3d6ef jmp 0x3d7c0 movq 0x1f89a(%rip), %rdi # 0x5cf90 leaq 0x4223(%rip), %rsi # 0x41920 callq 0x7370 jmp 0x3d704 movq -0x148(%rbp), %rax movq (%rax), %rsi leaq -0xf0(%rbp), %rdi callq 0xab30 jmp 0x3d71c leaq -0xf0(%rbp), %rdi callq 0x8070 leaq -0x111(%rbp), %rdi movq %rdi, -0x1a0(%rbp) callq 0x7640 movq -0x1a0(%rbp), %rdx leaq 0x3faf(%rip), %rsi # 0x416f8 leaq -0x110(%rbp), %rdi callq 0xb600 jmp 0x3d757 movq -0x148(%rbp), %rax movq (%rax), %rsi leaq -0x110(%rbp), %rdi callq 0x3d880 jmp 0x3d76f leaq -0x110(%rbp), %rdi callq 0x8070 leaq -0x111(%rbp), %rdi callq 0x73c0 jmp 0x3d7c0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x3d7af movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x110(%rbp), %rdi callq 0x8070 leaq -0x111(%rbp), %rdi callq 0x73c0 jmp 0x3d867 jmp 0x3d7c2 jmp 0x3d7c4 leaq -0x139(%rbp), %rdi movq %rdi, -0x1a8(%rbp) callq 0x7640 movq -0x1a8(%rbp), %rdx leaq 0x3f13(%rip), %rsi # 0x416f8 leaq -0x138(%rbp), %rdi callq 0xb600 jmp 0x3d7f3 movq -0x148(%rbp), %rax movq (%rax), %rsi leaq -0x138(%rbp), %rdi callq 0x3d880 jmp 0x3d80b leaq -0x138(%rbp), %rdi callq 0x8070 leaq -0x139(%rbp), %rdi callq 0x73c0 leaq -0x80(%rbp), %rdi callq 0x8070 addq $0x1b0, %rsp # imm = 0x1B0 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x3d85b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x138(%rbp), %rdi callq 0x8070 leaq -0x139(%rbp), %rdi callq 0x73c0 leaq -0x80(%rbp), %rdi callq 0x8070 movq -0x58(%rbp), %rdi callq 0x7630 nopl (%rax)
_ZN19SlaveCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 1B0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_148], rax mov rdi, [rbp+var_10] lea rsi, [rbp+var_18] call __ZNSirsERm; std::istream::operator>>(ulong &) mov rdi, rax lea rsi, [rbp+var_20] call __ZNSirsERm; std::istream::operator>>(ulong &) mov rdi, rax mov rax, [rdi] add rdi, [rax-18h] call __ZNKSt9basic_iosIcSt11char_traitsIcEEntEv; std::ios::operator!(void) test al, 1 jnz short loc_3D39C jmp short loc_3D3B4 loc_3D39C: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveInvalidSh; "Slave: Invalid shot command. Use 'shot "... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp loc_3D82C loc_3D3B4: mov rax, [rbp+var_148] mov rdi, [rax]; this call _ZNK8Settings8getStartEv; Settings::getStart(void) test al, 1 jnz short loc_3D3DF mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveGameNotSt; "Slave: Game not started yet.\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp loc_3D82C loc_3D3DF: mov rax, [rbp+var_148] mov rax, [rax+8] mov [rbp+var_158], rax lea rdi, [rbp+var_49] mov [rbp+var_150], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_150] lea rsi, aGameDataQueueT; "../game_data/queue.txt" lea rdi, [rbp+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3D41A: mov rdi, [rbp+var_158] lea rsi, [rbp+var_48] call _ZN14ReadWriteQueue17readQueueFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ReadWriteQueue::readQueueFromFile(std::string const&) mov [rbp+var_15C], eax jmp short $+2 loc_3D432: lea rdi, [rbp+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_49] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rbp+var_15C] mov [rbp+var_24], eax cmp [rbp+var_24], 2 jz short loc_3D49C mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveNotYourTu; "Slave: Not your turn.\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp loc_3D82C mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_3D48E mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D48E: lea rdi, [rbp+var_49] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_3D870 loc_3D49C: mov rax, [rbp+var_148] mov rsi, [rax+10h] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] lea rdi, [rbp+var_80] mov [rbp+var_168], rdi call _ZN5Slave10handleShotB5cxx11Emm; Slave::handleShot(ulong,ulong) mov rax, [rbp+var_148] mov rsi, [rbp+var_168] mov rdi, [rax+10h] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call _ZN5Slave17processShotResultERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmm; Slave::processShotResult(std::string const&,ulong,ulong) jmp short $+2 loc_3D4E0: mov rax, [rbp+var_148] mov rax, [rax+8] mov [rbp+var_178], rax lea rdi, [rbp+var_A1] mov [rbp+var_170], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_170] lea rsi, aGameDataShotsT; "../game_data/shots.txt" lea rdi, [rbp+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3D521: mov rdi, [rbp+var_178] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] lea rsi, [rbp+var_A0] mov edx, 2 lea r9, [rbp+var_80] call _ZN14ReadWriteQueue15writeShotToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEimmS7_; ReadWriteQueue::writeShotToFile(std::string const&,int,ulong,ulong,std::string const&) jmp short $+2 loc_3D547: lea rdi, [rbp+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_A1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rsi, aMiss; "miss" lea rdi, [rbp+var_80] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_179], al jmp short $+2 loc_3D577: mov al, [rbp+var_179] test al, 1 jnz short loc_3D586 jmp loc_3D67D loc_3D586: mov rax, [rbp+var_148] mov rax, [rax+8] mov [rbp+var_190], rax lea rdi, [rbp+var_C9] mov [rbp+var_188], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_188] lea rsi, aGameDataQueueT; "../game_data/queue.txt" lea rdi, [rbp+var_C8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3D5C7: mov rdi, [rbp+var_190] lea rsi, [rbp+var_C8] mov edx, 1 call _ZN14ReadWriteQueue16writeQueueToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; ReadWriteQueue::writeQueueToFile(std::string const&,int) jmp short $+2 loc_3D5E1: lea rdi, [rbp+var_C8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_C9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_3D7C4 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_3D867 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_3D635 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D635: lea rdi, [rbp+var_A1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_3D867 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_3D66C mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_C8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D66C: lea rdi, [rbp+var_C9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_3D867 loc_3D67D: lea rsi, aHit; "hit" lea rdi, [rbp+var_80] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_191], al jmp short $+2 loc_3D695: mov al, [rbp+var_191] test al, 1 jnz short loc_3D6C8 jmp short $+2 loc_3D6A1: lea rsi, aHitAndSunk; "hit_and_sunk" lea rdi, [rbp+var_80] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_192], al jmp short $+2 loc_3D6B9: mov al, [rbp+var_192] test al, 1 jnz short loc_3D6C8 jmp loc_3D7C2 loc_3D6C8: mov rax, [rbp+var_148] mov rdi, [rax+10h]; this call _ZNK5Slave12allShipsSunkEv; Slave::allShipsSunk(void) mov [rbp+var_193], al jmp short $+2 loc_3D6E0: mov al, [rbp+var_193] test al, 1 jnz short loc_3D6EF jmp loc_3D7C0 loc_3D6EF: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveAllMaster; "Slave: All Master ships are sunk. Slave"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_3D704: mov rax, [rbp+var_148] mov rsi, [rax] lea rdi, [rbp+var_F0] call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void) jmp short $+2 loc_3D71C: lea rdi, [rbp+var_F0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_111] mov [rbp+var_1A0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_1A0] lea rsi, aGameDataSettin; "../game_data/settings.txt" 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_3D757: mov rax, [rbp+var_148] mov rsi, [rax] lea rdi, [rbp+var_110] call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&) jmp short $+2 loc_3D76F: lea rdi, [rbp+var_110] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_111] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_3D7C0 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_3D7AF mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_110] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D7AF: lea rdi, [rbp+var_111] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_3D867 loc_3D7C0: jmp short $+2 loc_3D7C2: jmp short $+2 loc_3D7C4: lea rdi, [rbp+var_139] mov [rbp+var_1A8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_1A8] lea rsi, aGameDataSettin; "../game_data/settings.txt" lea rdi, [rbp+var_138] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3D7F3: mov rax, [rbp+var_148] mov rsi, [rax] lea rdi, [rbp+var_138] call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&) jmp short $+2 loc_3D80B: lea rdi, [rbp+var_138] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_139] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rbp+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D82C: add rsp, 1B0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_3D85B mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_138] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D85B: lea rdi, [rbp+var_139] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_3D867: lea rdi, [rbp+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D870: mov rdi, [rbp+var_58] call __Unwind_Resume
long long SlaveCommandHandler::handleShotCommand(long long *a1, long long a2) { long long v2; // rax _QWORD *v3; // rax std::mutex *v5; // [rsp+20h] [rbp-190h] std::mutex *v6; // [rsp+38h] [rbp-178h] int QueueFromFile; // [rsp+54h] [rbp-15Ch] std::mutex *v8; // [rsp+58h] [rbp-158h] char v9; // [rsp+77h] [rbp-139h] BYREF _QWORD v10[4]; // [rsp+78h] [rbp-138h] BYREF char v11; // [rsp+9Fh] [rbp-111h] BYREF _QWORD v12[4]; // [rsp+A0h] [rbp-110h] BYREF _BYTE v13[39]; // [rsp+C0h] [rbp-F0h] BYREF char v14; // [rsp+E7h] [rbp-C9h] BYREF _QWORD v15[4]; // [rsp+E8h] [rbp-C8h] BYREF char v16; // [rsp+10Fh] [rbp-A1h] BYREF _QWORD v17[4]; // [rsp+110h] [rbp-A0h] BYREF _QWORD v18[4]; // [rsp+130h] [rbp-80h] BYREF char v19; // [rsp+167h] [rbp-49h] BYREF _QWORD v20[4]; // [rsp+168h] [rbp-48h] BYREF int v21; // [rsp+18Ch] [rbp-24h] unsigned long long v22; // [rsp+190h] [rbp-20h] BYREF long long v23[3]; // [rsp+198h] [rbp-18h] BYREF v23[2] = (long long)a1; v23[1] = a2; v2 = std::istream::operator>>(a2, v23); v3 = (_QWORD *)std::istream::operator>>(v2, &v22); if ( (std::ios::operator!((char *)v3 + *(_QWORD *)(*v3 - 24LL)) & 1) != 0 ) return std::operator<<<std::char_traits<char>>(&std::cout, "Slave: Invalid shot command. Use 'shot X Y'.\n"); if ( (Settings::getStart((Settings *)*a1) & 1) == 0 ) return std::operator<<<std::char_traits<char>>(&std::cout, "Slave: Game not started yet.\n"); v8 = (std::mutex *)a1[1]; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(v20, (long long)"../game_data/queue.txt", (long long)&v19); QueueFromFile = ReadWriteQueue::readQueueFromFile(v8, (long long)v20); std::string::~string((long long)v20); std::allocator<char>::~allocator(&v19); v21 = QueueFromFile; if ( QueueFromFile != 2 ) return std::operator<<<std::char_traits<char>>(&std::cout, "Slave: Not your turn.\n"); Slave::handleShot[abi:cxx11](v18, (Settings **)a1[2], v23[0], v22); Slave::processShotResult(a1[2], (long long)v18, v23[0], v22); v6 = (std::mutex *)a1[1]; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(v17, (long long)"../game_data/shots.txt", (long long)&v16); ReadWriteQueue::writeShotToFile(v6, (long long)v17, 2u, v23[0], v22, (long long)v18); std::string::~string((long long)v17); std::allocator<char>::~allocator(&v16); if ( std::operator==<char>((long long)v18, (long long)"miss") ) { v5 = (std::mutex *)a1[1]; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(v15, (long long)"../game_data/queue.txt", (long long)&v14); ReadWriteQueue::writeQueueToFile(v5, (long long)v15, 1u); std::string::~string((long long)v15); std::allocator<char>::~allocator(&v14); } else if ( (std::operator==<char>((long long)v18, (long long)"hit") || std::operator==<char>((long long)v18, (long long)"hit_and_sunk")) && (Slave::allShipsSunk((Settings **)a1[2]) & 1) != 0 ) { std::operator<<<std::char_traits<char>>(&std::cout, "Slave: All Master ships are sunk. Slave wins!\n"); Settings::exitGame[abi:cxx11]((long long)v13, *a1); std::string::~string((long long)v13); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(v12, (long long)"../game_data/settings.txt", (long long)&v11); saveSettingsToFile(v12, *a1); std::string::~string((long long)v12); std::allocator<char>::~allocator(&v11); } std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(v10, (long long)"../game_data/settings.txt", (long long)&v9); saveSettingsToFile(v10, *a1); std::string::~string((long long)v10); std::allocator<char>::~allocator(&v9); return std::string::~string((long long)v18); }
handleShotCommand: PUSH RBP MOV RBP,RSP SUB RSP,0x1b0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x148],RAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x18] CALL 0x001074b0 MOV RDI,RAX LEA RSI,[RBP + -0x20] CALL 0x001074b0 MOV RDI,RAX MOV RAX,qword ptr [RDI] ADD RDI,qword ptr [RAX + -0x18] CALL 0x001071a0 TEST AL,0x1 JNZ 0x0013d39c JMP 0x0013d3b4 LAB_0013d39c: MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x14188f] CALL 0x00107370 JMP 0x0013d82c LAB_0013d3b4: MOV RAX,qword ptr [RBP + -0x148] MOV RDI,qword ptr [RAX] CALL 0x0010a9b0 TEST AL,0x1 JNZ 0x0013d3df MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x1418bd] CALL 0x00107370 JMP 0x0013d82c LAB_0013d3df: MOV RAX,qword ptr [RBP + -0x148] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x158],RAX LEA RDI,[RBP + -0x49] MOV qword ptr [RBP + -0x150],RDI CALL 0x00107640 MOV RDX,qword ptr [RBP + -0x150] LAB_0013d408: LEA RSI,[0x1418db] LEA RDI,[RBP + -0x48] CALL 0x0010b600 JMP 0x0013d41a LAB_0013d41a: MOV RDI,qword ptr [RBP + -0x158] LEA RSI,[RBP + -0x48] CALL 0x00137f00 LAB_0013d42a: MOV dword ptr [RBP + -0x15c],EAX JMP 0x0013d432 LAB_0013d432: LEA RDI,[RBP + -0x48] CALL 0x00108070 LEA RDI,[RBP + -0x49] CALL 0x001073c0 MOV EAX,dword ptr [RBP + -0x15c] MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x2 JZ 0x0013d49c MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x1418f2] CALL 0x00107370 JMP 0x0013d82c LAB_0013d49c: MOV RAX,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x80] MOV qword ptr [RBP + -0x168],RDI CALL 0x00138b00 MOV RAX,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RBP + -0x168] MOV RDI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LAB_0013d4d9: CALL 0x00138cd0 JMP 0x0013d4e0 LAB_0013d4e0: MOV RAX,qword ptr [RBP + -0x148] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x178],RAX LEA RDI,[RBP + -0xa1] MOV qword ptr [RBP + -0x170],RDI CALL 0x00107640 MOV RDX,qword ptr [RBP + -0x170] LAB_0013d50c: LEA RSI,[0x141909] LEA RDI,[RBP + -0xa0] CALL 0x0010b600 JMP 0x0013d521 LAB_0013d521: MOV RDI,qword ptr [RBP + -0x178] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] LAB_0013d530: LEA RSI,[RBP + -0xa0] MOV EDX,0x2 LEA R9,[RBP + -0x80] CALL 0x001381f0 JMP 0x0013d547 LAB_0013d547: LEA RDI,[RBP + -0xa0] CALL 0x00108070 LEA RDI,[RBP + -0xa1] CALL 0x001073c0 LAB_0013d55f: LEA RSI,[0x14140f] LEA RDI,[RBP + -0x80] CALL 0x0010b720 MOV byte ptr [RBP + -0x179],AL JMP 0x0013d577 LAB_0013d577: MOV AL,byte ptr [RBP + -0x179] TEST AL,0x1 JNZ 0x0013d586 JMP 0x0013d67d LAB_0013d586: MOV RAX,qword ptr [RBP + -0x148] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x190],RAX LEA RDI,[RBP + -0xc9] MOV qword ptr [RBP + -0x188],RDI CALL 0x00107640 MOV RDX,qword ptr [RBP + -0x188] LAB_0013d5b2: LEA RSI,[0x1418db] LEA RDI,[RBP + -0xc8] CALL 0x0010b600 JMP 0x0013d5c7 LAB_0013d5c7: MOV RDI,qword ptr [RBP + -0x190] LEA RSI,[RBP + -0xc8] MOV EDX,0x1 CALL 0x00138090 JMP 0x0013d5e1 LAB_0013d5e1: LEA RDI,[RBP + -0xc8] CALL 0x00108070 LEA RDI,[RBP + -0xc9] CALL 0x001073c0 JMP 0x0013d7c4 LAB_0013d67d: LEA RSI,[0x14140b] LEA RDI,[RBP + -0x80] CALL 0x0010b720 MOV byte ptr [RBP + -0x191],AL JMP 0x0013d695 LAB_0013d695: MOV AL,byte ptr [RBP + -0x191] TEST AL,0x1 JNZ 0x0013d6c8 JMP 0x0013d6a1 LAB_0013d6a1: LEA RSI,[0x1413fe] LEA RDI,[RBP + -0x80] CALL 0x0010b720 MOV byte ptr [RBP + -0x192],AL JMP 0x0013d6b9 LAB_0013d6b9: MOV AL,byte ptr [RBP + -0x192] TEST AL,0x1 JNZ 0x0013d6c8 JMP 0x0013d7c2 LAB_0013d6c8: MOV RAX,qword ptr [RBP + -0x148] MOV RDI,qword ptr [RAX + 0x10] CALL 0x00139880 MOV byte ptr [RBP + -0x193],AL JMP 0x0013d6e0 LAB_0013d6e0: MOV AL,byte ptr [RBP + -0x193] TEST AL,0x1 JNZ 0x0013d6ef JMP 0x0013d7c0 LAB_0013d6ef: MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x141920] CALL 0x00107370 JMP 0x0013d704 LAB_0013d704: MOV RAX,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0xf0] CALL 0x0010ab30 JMP 0x0013d71c LAB_0013d71c: LEA RDI,[RBP + -0xf0] CALL 0x00108070 LEA RDI,[RBP + -0x111] MOV qword ptr [RBP + -0x1a0],RDI CALL 0x00107640 MOV RDX,qword ptr [RBP + -0x1a0] LAB_0013d742: LEA RSI,[0x1416f8] LEA RDI,[RBP + -0x110] CALL 0x0010b600 JMP 0x0013d757 LAB_0013d757: MOV RAX,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RAX] LAB_0013d761: LEA RDI,[RBP + -0x110] CALL 0x0013d880 JMP 0x0013d76f LAB_0013d76f: LEA RDI,[RBP + -0x110] CALL 0x00108070 LEA RDI,[RBP + -0x111] CALL 0x001073c0 JMP 0x0013d7c0 LAB_0013d7c0: JMP 0x0013d7c2 LAB_0013d7c2: JMP 0x0013d7c4 LAB_0013d7c4: LEA RDI,[RBP + -0x139] MOV qword ptr [RBP + -0x1a8],RDI CALL 0x00107640 MOV RDX,qword ptr [RBP + -0x1a8] LAB_0013d7de: LEA RSI,[0x1416f8] LEA RDI,[RBP + -0x138] CALL 0x0010b600 JMP 0x0013d7f3 LAB_0013d7f3: MOV RAX,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RAX] LAB_0013d7fd: LEA RDI,[RBP + -0x138] CALL 0x0013d880 LAB_0013d809: JMP 0x0013d80b LAB_0013d80b: LEA RDI,[RBP + -0x138] CALL 0x00108070 LEA RDI,[RBP + -0x139] CALL 0x001073c0 LEA RDI,[RBP + -0x80] CALL 0x00108070 LAB_0013d82c: ADD RSP,0x1b0 POP RBP RET
/* SlaveCommandHandler::handleShotCommand(std::__cxx11::istringstream&) */ void __thiscall SlaveCommandHandler::handleShotCommand(SlaveCommandHandler *this,istringstream *param_1) { ReadWriteQueue *pRVar1; bool bVar2; byte bVar3; int iVar4; istream *this_00; long *plVar5; ulong uVar6; allocator local_141; string local_140 [39]; allocator local_119; string local_118 [32]; string local_f8 [39]; allocator local_d1; string local_d0 [39]; allocator local_a9; string local_a8 [32]; string local_88 [55]; allocator local_51; string local_50 [36]; int local_2c; ulong local_28; ulong local_20; istringstream *local_18; SlaveCommandHandler *local_10; local_18 = param_1; local_10 = this; this_00 = (istream *)std::istream::operator>>((istream *)param_1,&local_20); plVar5 = (long *)std::istream::operator>>(this_00,&local_28); uVar6 = std::ios::operator!((ios *)((long)plVar5 + *(long *)(*plVar5 + -0x18))); if ((uVar6 & 1) == 0) { uVar6 = Settings::getStart(*(Settings **)this); if ((uVar6 & 1) == 0) { std::operator<<((ostream *)PTR_cout_0015cf90,"Slave: Game not started yet.\n"); } else { pRVar1 = *(ReadWriteQueue **)(this + 8); std::allocator<char>::allocator(); /* try { // try from 0013d408 to 0013d417 has its CatchHandler @ 0013d46b */ std::__cxx11::string::string<std::allocator<char>> (local_50,"../game_data/queue.txt",&local_51); /* try { // try from 0013d41a to 0013d429 has its CatchHandler @ 0013d479 */ iVar4 = ReadWriteQueue::readQueueFromFile(pRVar1,local_50); std::__cxx11::string::~string(local_50); std::allocator<char>::~allocator((allocator<char> *)&local_51); local_2c = iVar4; if (iVar4 == 2) { Slave::handleShot_abi_cxx11_((ulong)local_88,*(ulong *)(this + 0x10)); /* try { // try from 0013d4d9 to 0013d4dd has its CatchHandler @ 0013d5fe */ Slave::processShotResult(*(Slave **)(this + 0x10),local_88,local_20,local_28); pRVar1 = *(ReadWriteQueue **)(this + 8); std::allocator<char>::allocator(); /* try { // try from 0013d50c to 0013d51e has its CatchHandler @ 0013d60f */ std::__cxx11::string::string<std::allocator<char>> (local_a8,"../game_data/shots.txt",&local_a9); /* try { // try from 0013d530 to 0013d544 has its CatchHandler @ 0013d61d */ ReadWriteQueue::writeShotToFile(pRVar1,local_a8,2,local_20,local_28,local_88); std::__cxx11::string::~string(local_a8); std::allocator<char>::~allocator((allocator<char> *)&local_a9); /* try { // try from 0013d55f to 0013d56e has its CatchHandler @ 0013d5fe */ bVar2 = std::operator==(local_88,"miss"); if (bVar2) { pRVar1 = *(ReadWriteQueue **)(this + 8); std::allocator<char>::allocator(); /* try { // try from 0013d5b2 to 0013d5c4 has its CatchHandler @ 0013d646 */ std::__cxx11::string::string<std::allocator<char>> (local_d0,"../game_data/queue.txt",&local_d1); /* try { // try from 0013d5c7 to 0013d5de has its CatchHandler @ 0013d654 */ ReadWriteQueue::writeQueueToFile(pRVar1,local_d0,1); std::__cxx11::string::~string(local_d0); std::allocator<char>::~allocator((allocator<char> *)&local_d1); } else { /* try { // try from 0013d67d to 0013d719 has its CatchHandler @ 0013d5fe */ bVar2 = std::operator==(local_88,"hit"); if (((bVar2) || (bVar2 = std::operator==(local_88,"hit_and_sunk"), bVar2)) && (bVar3 = Slave::allShipsSunk(*(Slave **)(this + 0x10)), (bVar3 & 1) != 0)) { std::operator<<((ostream *)PTR_cout_0015cf90, "Slave: All Master ships are sunk. Slave wins!\n"); Settings::exitGame_abi_cxx11_(); std::__cxx11::string::~string(local_f8); std::allocator<char>::allocator(); /* try { // try from 0013d742 to 0013d754 has its CatchHandler @ 0013d789 */ std::__cxx11::string::string<std::allocator<char>> (local_118,"../game_data/settings.txt",&local_119); /* try { // try from 0013d761 to 0013d76c has its CatchHandler @ 0013d797 */ saveSettingsToFile(local_118,*(Settings **)this); std::__cxx11::string::~string(local_118); std::allocator<char>::~allocator((allocator<char> *)&local_119); } } std::allocator<char>::allocator(); /* try { // try from 0013d7de to 0013d7f0 has its CatchHandler @ 0013d835 */ std::__cxx11::string::string<std::allocator<char>> (local_140,"../game_data/settings.txt",&local_141); /* try { // try from 0013d7fd to 0013d808 has its CatchHandler @ 0013d843 */ saveSettingsToFile(local_140,*(Settings **)this); std::__cxx11::string::~string(local_140); std::allocator<char>::~allocator((allocator<char> *)&local_141); std::__cxx11::string::~string(local_88); } else { std::operator<<((ostream *)PTR_cout_0015cf90,"Slave: Not your turn.\n"); } } } else { std::operator<<((ostream *)PTR_cout_0015cf90,"Slave: Invalid shot command. Use \'shot X Y\'.\n") ; } return; }
47,676
SlaveCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&)
666mxvbee[P]BattleShip/lib/Commands/SlaveCommandHandler.cpp
void SlaveCommandHandler::handleShotCommand(std::istringstream& iss) { uint64_t x, y; if (!(iss >> x >> y)) { std::cout << "Slave: Invalid shot command. Use 'shot X Y'.\n"; return; } if (!settings_.getStart()) { std::cout << "Slave: Game not started yet.\n"; return; } int currentQueue = manager_.readQueueFromFile("../game_data/queue.txt"); if (currentQueue != 2) { std::cout << "Slave: Not your turn.\n"; return; } std::string result = slaveLogic_.handleShot(x, y); slaveLogic_.processShotResult(result, x, y); manager_.writeShotToFile("../game_data/shots.txt", 2, x, y, result); if (result == "miss") { manager_.writeQueueToFile("../game_data/queue.txt", 1); } else if (result == "hit" || result == "hit_and_sunk") { if (slaveLogic_.allShipsSunk()) { std::cout << "Slave: All Master ships are sunk. Slave wins!\n"; settings_.exitGame(); saveSettingsToFile("../game_data/settings.txt", settings_); } } saveSettingsToFile("../game_data/settings.txt", settings_); }
O2
cpp
SlaveCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x80, %rsp movq %rsi, %rax movq %rdi, %rbx leaq 0x38(%rsp), %rsi movq %rax, %rdi callq 0x51d0 leaq 0x30(%rsp), %rsi movq %rax, %rdi callq 0x51d0 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) je 0x15632 movq 0xf972(%rip), %rdi # 0x24f98 leaq 0x31d8(%rip), %rsi # 0x18805 jmp 0x15754 movq (%rbx), %rdi callq 0x65d0 testb %al, %al je 0x15736 movq 0x8(%rbx), %r14 leaq 0x3204(%rip), %rsi # 0x18851 leaq 0x40(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x6b2a leaq 0x40(%rsp), %rsi movq %r14, %rdi callq 0x132e8 movl %eax, %ebp leaq 0x40(%rsp), %rdi callq 0x5bc0 cmpl $0x2, %ebp jne 0x15746 movq 0x10(%rbx), %rsi movq 0x38(%rsp), %rdx movq 0x30(%rsp), %rcx leaq 0x40(%rsp), %r14 movq %r14, %rdi callq 0x13810 movq 0x10(%rbx), %rdi movq 0x38(%rsp), %rdx movq 0x30(%rsp), %rcx movq %r14, %rsi callq 0x138b2 movq 0x8(%rbx), %r14 leaq 0x31c5(%rip), %rsi # 0x1887f leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x6b2a movq 0x38(%rsp), %rcx movq 0x30(%rsp), %r8 leaq 0x10(%rsp), %rsi pushq $0x2 popq %rdx leaq 0x40(%rsp), %r9 movq %r14, %rdi callq 0x13478 leaq 0x10(%rsp), %rdi callq 0x5bc0 leaq 0x2c8c(%rip), %rsi # 0x18385 leaq 0x40(%rsp), %rdi callq 0x6b65 testb %al, %al je 0x15765 movq 0x8(%rbx), %r14 leaq 0x313f(%rip), %rsi # 0x18851 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x6b2a leaq 0x10(%rsp), %rsi pushq $0x1 popq %rdx movq %r14, %rdi callq 0x133be jmp 0x157e9 movq 0xf85b(%rip), %rdi # 0x24f98 leaq 0x30ef(%rip), %rsi # 0x18833 jmp 0x15754 movq 0xf84b(%rip), %rdi # 0x24f98 leaq 0x3114(%rip), %rsi # 0x18868 callq 0x5340 addq $0x80, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x2c15(%rip), %rsi # 0x18381 leaq 0x40(%rsp), %rdi callq 0x6b65 testb %al, %al jne 0x1578f leaq 0x2bf3(%rip), %rsi # 0x18374 leaq 0x40(%rsp), %rdi callq 0x6b65 testb %al, %al je 0x157f3 movq 0x10(%rbx), %rdi callq 0x13efc testb %al, %al je 0x157f3 movq 0xf7f5(%rip), %rdi # 0x24f98 leaq 0x30ec(%rip), %rsi # 0x18896 callq 0x5340 movq (%rbx), %rsi leaq 0x60(%rsp), %rdi callq 0x667e leaq 0x60(%rsp), %rdi callq 0x5bc0 leaq 0x2ea1(%rip), %rsi # 0x1866e leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x6b2a movq (%rbx), %rsi leaq 0x10(%rsp), %rdi callq 0x15868 leaq 0x10(%rsp), %rdi callq 0x5bc0 leaq 0x2e74(%rip), %rsi # 0x1866e leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x6b2a movq (%rbx), %rsi leaq 0x10(%rsp), %rdi callq 0x15868 leaq 0x10(%rsp), %rdi callq 0x5bc0 leaq 0x40(%rsp), %rdi callq 0x5bc0 jmp 0x15759 jmp 0x1583b jmp 0x1584e jmp 0x1583b jmp 0x1584e jmp 0x1583b jmp 0x1584e movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x5bc0 jmp 0x15851 jmp 0x1584e jmp 0x1584e movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x5bc0 movq %rbx, %rdi callq 0x5590 movq %rax, %rbx jmp 0x1585b
_ZN19SlaveCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE: push rbp push r14 push rbx sub rsp, 80h mov rax, rsi mov rbx, rdi lea rsi, [rsp+98h+var_60] mov rdi, rax call __ZNSi10_M_extractImEERSiRT_; std::istream::_M_extract<ulong>(ulong &) lea rsi, [rsp+98h+var_68] mov rdi, rax call __ZNSi10_M_extractImEERSiRT_; std::istream::_M_extract<ulong>(ulong &) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jz short loc_15632 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveInvalidSh; "Slave: Invalid shot command. Use 'shot "... jmp loc_15754 loc_15632: mov rdi, [rbx]; this call _ZNK8Settings8getStartEv; Settings::getStart(void) test al, al jz loc_15736 mov r14, [rbx+8] lea rsi, aGameDataQueueT; "../game_data/queue.txt" lea rdi, [rsp+98h+var_58] lea rdx, [rsp+98h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+98h+var_58] mov rdi, r14 call _ZN14ReadWriteQueue17readQueueFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ReadWriteQueue::readQueueFromFile(std::string const&) mov ebp, eax lea rdi, [rsp+98h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp ebp, 2 jnz loc_15746 mov rsi, [rbx+10h] mov rdx, [rsp+98h+var_60] mov rcx, [rsp+98h+var_68] lea r14, [rsp+98h+var_58] mov rdi, r14 call _ZN5Slave10handleShotB5cxx11Emm; Slave::handleShot(ulong,ulong) mov rdi, [rbx+10h] mov rdx, [rsp+98h+var_60] mov rcx, [rsp+98h+var_68] mov rsi, r14 call _ZN5Slave17processShotResultERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmm; Slave::processShotResult(std::string const&,ulong,ulong) mov r14, [rbx+8] lea rsi, aGameDataShotsT; "../game_data/shots.txt" lea rdi, [rsp+98h+var_88] lea rdx, [rsp+98h+var_89] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rcx, [rsp+98h+var_60] mov r8, [rsp+98h+var_68] lea rsi, [rsp+98h+var_88] push 2 pop rdx lea r9, [rsp+98h+var_58] mov rdi, r14 call _ZN14ReadWriteQueue15writeShotToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEimmS7_; ReadWriteQueue::writeShotToFile(std::string const&,int,ulong,ulong,std::string const&) lea rdi, [rsp+98h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, aMiss; "miss" lea rdi, [rsp+98h+var_58] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_15765 mov r14, [rbx+8] lea rsi, aGameDataQueueT; "../game_data/queue.txt" lea rdi, [rsp+98h+var_88] lea rdx, [rsp+98h+var_89] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+98h+var_88] push 1 pop rdx mov rdi, r14 call _ZN14ReadWriteQueue16writeQueueToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; ReadWriteQueue::writeQueueToFile(std::string const&,int) jmp loc_157E9 loc_15736: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveGameNotSt; "Slave: Game not started yet.\n" jmp short loc_15754 loc_15746: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveNotYourTu; "Slave: Not your turn.\n" loc_15754: call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_15759: add rsp, 80h pop rbx pop r14 pop rbp retn loc_15765: lea rsi, aHit; "hit" lea rdi, [rsp+98h+var_58] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_1578F lea rsi, aHitAndSunk; "hit_and_sunk" lea rdi, [rsp+98h+var_58] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_157F3 loc_1578F: mov rdi, [rbx+10h]; this call _ZNK5Slave12allShipsSunkEv; Slave::allShipsSunk(void) test al, al jz short loc_157F3 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveAllMaster; "Slave: All Master ships are sunk. Slave"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [rbx] lea rdi, [rsp+98h+var_38] call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void) lea rdi, [rsp+98h+var_38] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, aGameDataSettin; "../game_data/settings.txt" lea rdi, [rsp+98h+var_88] lea rdx, [rsp+98h+var_89] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rsi, [rbx] lea rdi, [rsp+98h+var_88] call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&) loc_157E9: lea rdi, [rsp+98h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_157F3: lea rsi, aGameDataSettin; "../game_data/settings.txt" lea rdi, [rsp+98h+var_88] lea rdx, [rsp+98h+var_89] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rsi, [rbx] lea rdi, [rsp+98h+var_88] call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&) lea rdi, [rsp+98h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+98h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_15759 jmp short loc_1583B jmp short loc_1584E jmp short loc_1583B jmp short loc_1584E jmp short loc_1583B jmp short loc_1584E loc_1583B: mov rbx, rax lea rdi, [rsp+arg_8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_15851 jmp short loc_1584E jmp short $+2 loc_1584E: mov rbx, rax loc_15851: lea rdi, [rsp+arg_38] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1585B: mov rdi, rbx call __Unwind_Resume mov rbx, rax jmp short loc_1585B
long long SlaveCommandHandler::handleShotCommand(long long a1, long long a2) { long long v2; // rax _QWORD *v3; // rax const char *v4; // rsi std::mutex *v5; // r14 int QueueFromFile; // ebp std::mutex *v7; // r14 std::mutex *v8; // r14 long long result; // rax int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d int v14; // edx int v15; // ecx int v16; // r8d int v17; // r9d _QWORD v18[4]; // [rsp+10h] [rbp-88h] BYREF unsigned long long v19; // [rsp+30h] [rbp-68h] BYREF unsigned long long v20; // [rsp+38h] [rbp-60h] BYREF _QWORD v21[4]; // [rsp+40h] [rbp-58h] BYREF _BYTE v22[56]; // [rsp+60h] [rbp-38h] BYREF v2 = std::istream::_M_extract<unsigned long>(a2, &v20); v3 = (_QWORD *)std::istream::_M_extract<unsigned long>(v2, &v19); if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 ) { v4 = "Slave: Invalid shot command. Use 'shot X Y'.\n"; return std::operator<<<std::char_traits<char>>(&std::cout, v4); } if ( !(unsigned __int8)Settings::getStart(*(Settings **)a1) ) { v4 = "Slave: Game not started yet.\n"; return std::operator<<<std::char_traits<char>>(&std::cout, v4); } v5 = *(std::mutex **)(a1 + 8); std::string::basic_string<std::allocator<char>>(v21, "../game_data/queue.txt"); QueueFromFile = ReadWriteQueue::readQueueFromFile(v5, (long long)v21); std::string::~string(); if ( QueueFromFile != 2 ) { v4 = "Slave: Not your turn.\n"; return std::operator<<<std::char_traits<char>>(&std::cout, v4); } Slave::handleShot[abi:cxx11](v21, *(Settings ***)(a1 + 16), v20, v19); Slave::processShotResult(*(_QWORD *)(a1 + 16), (long long)v21, v20, v19); v7 = *(std::mutex **)(a1 + 8); std::string::basic_string<std::allocator<char>>(v18, "../game_data/shots.txt"); ReadWriteQueue::writeShotToFile(v7, (long long)v18, 2u, v20, v19, (long long)v21); std::string::~string(); if ( std::operator==<char>((long long)v21) ) { v8 = *(std::mutex **)(a1 + 8); std::string::basic_string<std::allocator<char>>(v18, "../game_data/queue.txt"); ReadWriteQueue::writeQueueToFile(v8, (long long)v18, 1u); } else { if ( !std::operator==<char>((long long)v21) && !std::operator==<char>((long long)v21) || !(unsigned __int8)Slave::allShipsSunk(*(Ship ****)(a1 + 16)) ) { goto LABEL_15; } std::operator<<<std::char_traits<char>>(&std::cout, "Slave: All Master ships are sunk. Slave wins!\n"); Settings::exitGame[abi:cxx11]((long long)v22, *(std::mutex **)a1); std::string::~string(); std::string::basic_string<std::allocator<char>>(v18, "../game_data/settings.txt"); saveSettingsToFile((unsigned int)v18, *(_QWORD *)a1, v10, v11, v12, v13); } std::string::~string(); LABEL_15: std::string::basic_string<std::allocator<char>>(v18, "../game_data/settings.txt"); result = saveSettingsToFile((unsigned int)v18, *(_QWORD *)a1, v14, v15, v16, v17); std::string::~string(); std::string::~string(); return result; }
handleShotCommand: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x80 MOV RAX,RSI MOV RBX,RDI LEA RSI,[RSP + 0x38] MOV RDI,RAX CALL 0x001051d0 LEA RSI,[RSP + 0x30] MOV RDI,RAX CALL 0x001051d0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JZ 0x00115632 MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x118805] JMP 0x00115754 LAB_00115632: MOV RDI,qword ptr [RBX] CALL 0x001065d0 TEST AL,AL JZ 0x00115736 MOV R14,qword ptr [RBX + 0x8] LAB_00115646: LEA RSI,[0x118851] LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x10] CALL 0x00106b2a LAB_0011565c: LEA RSI,[RSP + 0x40] MOV RDI,R14 CALL 0x001132e8 LAB_00115669: MOV EBP,EAX LEA RDI,[RSP + 0x40] CALL 0x00105bc0 CMP EBP,0x2 JNZ 0x00115746 MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x30] LEA R14,[RSP + 0x40] MOV RDI,R14 CALL 0x00113810 MOV RDI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x30] LAB_001156a7: MOV RSI,R14 CALL 0x001138b2 MOV R14,qword ptr [RBX + 0x8] LAB_001156b3: LEA RSI,[0x11887f] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00106b2a MOV RCX,qword ptr [RSP + 0x38] MOV R8,qword ptr [RSP + 0x30] LAB_001156d3: LEA RSI,[RSP + 0x10] PUSH 0x2 POP RDX LEA R9,[RSP + 0x40] MOV RDI,R14 CALL 0x00113478 LEA RDI,[RSP + 0x10] CALL 0x00105bc0 LEA RSI,[0x118385] LEA RDI,[RSP + 0x40] CALL 0x00106b65 TEST AL,AL JZ 0x00115765 MOV R14,qword ptr [RBX + 0x8] LAB_0011570b: LEA RSI,[0x118851] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00106b2a LAB_00115721: LEA RSI,[RSP + 0x10] PUSH 0x1 POP RDX MOV RDI,R14 CALL 0x001133be LAB_00115731: JMP 0x001157e9 LAB_00115736: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x118833] JMP 0x00115754 LAB_00115746: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x118868] LAB_00115754: CALL 0x00105340 LAB_00115759: ADD RSP,0x80 POP RBX POP R14 POP RBP RET LAB_00115765: LEA RSI,[0x118381] LEA RDI,[RSP + 0x40] CALL 0x00106b65 TEST AL,AL JNZ 0x0011578f LEA RSI,[0x118374] LEA RDI,[RSP + 0x40] CALL 0x00106b65 TEST AL,AL JZ 0x001157f3 LAB_0011578f: MOV RDI,qword ptr [RBX + 0x10] LAB_00115793: CALL 0x00113efc TEST AL,AL JZ 0x001157f3 MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x118896] CALL 0x00105340 MOV RSI,qword ptr [RBX] LEA RDI,[RSP + 0x60] CALL 0x0010667e LEA RDI,[RSP + 0x60] CALL 0x00105bc0 LAB_001157c6: LEA RSI,[0x11866e] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00106b2a MOV RSI,qword ptr [RBX] LAB_001157df: LEA RDI,[RSP + 0x10] CALL 0x00115868 LAB_001157e9: LEA RDI,[RSP + 0x10] CALL 0x00105bc0 LAB_001157f3: LEA RSI,[0x11866e] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00106b2a MOV RSI,qword ptr [RBX] LAB_0011580c: LEA RDI,[RSP + 0x10] CALL 0x00115868 LAB_00115816: LEA RDI,[RSP + 0x10] CALL 0x00105bc0 LEA RDI,[RSP + 0x40] CALL 0x00105bc0 JMP 0x00115759
/* SlaveCommandHandler::handleShotCommand(std::__cxx11::istringstream&) */ void __thiscall SlaveCommandHandler::handleShotCommand(SlaveCommandHandler *this,istringstream *param_1) { ReadWriteQueue *pRVar1; char cVar2; bool bVar3; int iVar4; istream *piVar5; char *pcVar6; allocator local_89; allocator local_88 [32]; ulong local_68; ulong local_60; string local_58 [32]; string local_38 [32]; piVar5 = std::istream::_M_extract<unsigned_long>((ulong *)param_1); piVar5 = std::istream::_M_extract<unsigned_long>((ulong *)piVar5); if (((byte)piVar5[*(long *)(*(long *)piVar5 + -0x18) + 0x20] & 5) != 0) { pcVar6 = "Slave: Invalid shot command. Use \'shot X Y\'.\n"; LAB_00115754: std::operator<<((ostream *)PTR_cout_00124f98,pcVar6); return; } cVar2 = Settings::getStart(*(Settings **)this); if (cVar2 == '\0') { pcVar6 = "Slave: Game not started yet.\n"; goto LAB_00115754; } pRVar1 = *(ReadWriteQueue **)(this + 8); /* try { // try from 00115646 to 0011565b has its CatchHandler @ 00115863 */ std::__cxx11::string::string<std::allocator<char>>(local_58,"../game_data/queue.txt",local_88); /* try { // try from 0011565c to 00115668 has its CatchHandler @ 0011584e */ iVar4 = ReadWriteQueue::readQueueFromFile(pRVar1,local_58); std::__cxx11::string::~string(local_58); if (iVar4 != 2) { pcVar6 = "Slave: Not your turn.\n"; goto LAB_00115754; } Slave::handleShot_abi_cxx11_((ulong)local_58,*(ulong *)(this + 0x10)); /* try { // try from 001156a7 to 001156ae has its CatchHandler @ 0011584c */ Slave::processShotResult(*(string **)(this + 0x10),(ulong)local_58,local_60); pRVar1 = *(ReadWriteQueue **)(this + 8); /* try { // try from 001156b3 to 001156c8 has its CatchHandler @ 0011584a */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_88,"../game_data/shots.txt",&local_89); /* try { // try from 001156d3 to 001156e7 has its CatchHandler @ 0011583b */ ReadWriteQueue::writeShotToFile(pRVar1,(string *)local_88,2,local_60,local_68,local_58); std::__cxx11::string::~string((string *)local_88); bVar3 = std::operator==(local_58,"miss"); if (bVar3) { pRVar1 = *(ReadWriteQueue **)(this + 8); /* try { // try from 0011570b to 00115720 has its CatchHandler @ 00115835 */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_88,"../game_data/queue.txt",&local_89); /* try { // try from 00115721 to 00115730 has its CatchHandler @ 00115833 */ ReadWriteQueue::writeQueueToFile(pRVar1,(string *)local_88,1); } else { bVar3 = std::operator==(local_58,"hit"); /* try { // try from 00115793 to 001157bb has its CatchHandler @ 0011584c */ if (((!bVar3) && (bVar3 = std::operator==(local_58,"hit_and_sunk"), !bVar3)) || (cVar2 = Slave::allShipsSunk(*(Slave **)(this + 0x10)), cVar2 == '\0')) goto LAB_001157f3; std::operator<<((ostream *)PTR_cout_00124f98,"Slave: All Master ships are sunk. Slave wins!\n"); Settings::exitGame_abi_cxx11_(); std::__cxx11::string::~string(local_38); /* try { // try from 001157c6 to 001157db has its CatchHandler @ 00115831 */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_88,"../game_data/settings.txt",&local_89); /* try { // try from 001157df to 001157e8 has its CatchHandler @ 0011582f */ saveSettingsToFile((string *)local_88,*(Settings **)this); } std::__cxx11::string::~string((string *)local_88); LAB_001157f3: /* try { // try from 001157f3 to 00115808 has its CatchHandler @ 00115839 */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_88,"../game_data/settings.txt",&local_89); /* try { // try from 0011580c to 00115815 has its CatchHandler @ 00115837 */ saveSettingsToFile((string *)local_88,*(Settings **)this); std::__cxx11::string::~string((string *)local_88); std::__cxx11::string::~string(local_58); return; }
47,677
LefDefParser::defiProp::setPropType(char const*, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiProp.cpp
void defiProp::setPropType(const char* typ, const char* string) { int len; propType_ = (char*)typ; if ((len = strlen(string)+1) > nameSize_) bumpName(len); strcpy(propName_, defData->DEFCASE(string)); }
O3
cpp
LefDefParser::defiProp::setPropType(char const*, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 movq %rsi, (%rdi) movq %rdx, %rdi callq 0x70d0 movq %rax, %r12 incl %r12d movq 0x8(%r14), %r15 cmpl 0x10(%r14), %r12d jle 0x2caa3 movq %r15, %rdi callq 0x7220 movslq %r12d, %rdi callq 0x7270 movq %rax, %r15 movq %rax, 0x8(%r14) movl %r12d, 0x10(%r14) movb $0x0, (%rax) movq 0x40(%r14), %rdi movq %rbx, %rsi callq 0x1b638 movq %r15, %rdi movq %rax, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x7190 nop
_ZN12LefDefParser8defiProp11setPropTypeEPKcS2_: push r15 push r14 push r12 push rbx push rax mov rbx, rdx mov r14, rdi mov [rdi], rsi mov rdi, rdx call _strlen mov r12, rax inc r12d mov r15, [r14+8] cmp r12d, [r14+10h] jle short loc_2CAA3 mov rdi, r15 call _free movsxd rdi, r12d call _malloc mov r15, rax mov [r14+8], rax mov [r14+10h], r12d mov byte ptr [rax], 0 loc_2CAA3: mov rdi, [r14+40h]; this mov rsi, rbx; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, r15 mov rsi, rax add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _strcpy
long long LefDefParser::defiProp::setPropType(LefDefParser::defiProp *this, const char *a2, const char *a3) { int v4; // r12d _BYTE *v5; // r15 const char *v6; // rax *(_QWORD *)this = a2; v4 = strlen(a3) + 1; v5 = (_BYTE *)*((_QWORD *)this + 1); if ( v4 > *((_DWORD *)this + 4) ) { free(*((void **)this + 1)); v5 = (_BYTE *)malloc(v4); *((_QWORD *)this + 1) = v5; *((_DWORD *)this + 4) = v4; *v5 = 0; } v6 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 8), a3); return strcpy(v5, v6); }
setPropType: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RDI MOV qword ptr [RDI],RSI MOV RDI,RDX CALL 0x001070d0 MOV R12,RAX INC R12D MOV R15,qword ptr [R14 + 0x8] CMP R12D,dword ptr [R14 + 0x10] JLE 0x0012caa3 MOV RDI,R15 CALL 0x00107220 MOVSXD RDI,R12D CALL 0x00107270 MOV R15,RAX MOV qword ptr [R14 + 0x8],RAX MOV dword ptr [R14 + 0x10],R12D MOV byte ptr [RAX],0x0 LAB_0012caa3: MOV RDI,qword ptr [R14 + 0x40] MOV RSI,RBX CALL 0x0011b638 MOV RDI,R15 MOV RSI,RAX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00107190
/* LefDefParser::defiProp::setPropType(char const*, char const*) */ void __thiscall LefDefParser::defiProp::setPropType(defiProp *this,char *param_1,char *param_2) { size_t sVar1; char *__dest; char *__src; int iVar2; *(char **)this = param_1; sVar1 = strlen(param_2); iVar2 = (int)sVar1 + 1; __dest = *(char **)(this + 8); if (*(int *)(this + 0x10) < iVar2) { free(__dest); __dest = (char *)malloc((long)iVar2); *(char **)(this + 8) = __dest; *(int *)(this + 0x10) = iVar2; *__dest = '\0'; } __src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x40),param_2); strcpy(__dest,__src); return; }
47,678
common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_mistral_nemo(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; schemas.push_back({ {"type", "object"}, {"properties", { // Important note: the model is probably trained to take a JSON stringified arguments value. // It's hard to constrain that for now (while reusing the JSON schema conversion), so we're just expecting a plain object. {"name", { {"type", "string"}, {"const", function["name"]}, }}, {"arguments", function["parameters"]}, {"id", { {"type", "string"}, // Nemo's template expects a 9-character alphanumeric ID. {"pattern", "^[a-zA-Z0-9]{9}$"}, }}, }}, {"required", json::array({"name", "arguments", "id"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"[TOOL_CALLS]\" " + builder.add_schema("tool_calls", schema)); }, grammar_options); data.grammar_triggers.push_back({"[TOOL_CALLS]", /* .at_start = */ true}); data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_MISTRAL_NEMO; return data; }
O3
cpp
common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl $0x0, (%rdi) xorl %r12d, %r12d movb %r12b, 0x8(%rdi) movq %r12, 0x10(%rdi) leaq 0x28(%rdi), %rax movq %rax, 0x18(%rdi) movq %r12, 0x20(%rdi) movb %r12b, 0x28(%rdi) movb %r12b, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %r12, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x1da40(%rip), %rsi # 0xf15e5 callq 0xa5811 movb %al, 0x38(%rbx) leaq 0x38(%rsp), %rsi movq %r12, 0x8(%rsi) movq %r14, (%rsi) leaq 0xd25e(%rip), %rax # 0xe0e1e movq %rax, 0x18(%rsi) leaq 0xda2d(%rip), %rax # 0xe15f8 movq %rax, 0x10(%rsi) leaq 0x23b32(%rip), %rdx # 0xf7708 leaq 0x10(%rsp), %rdi callq 0xbb980 leaq 0x18(%rbx), %rdi leaq 0x10(%rsp), %r12 movq %r12, %rsi callq 0x1ba80 movq (%r12), %rdi leaq 0x20(%rsp), %r12 cmpq %r12, %rdi je 0xd3c0c movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8c0 movq 0x48(%rsp), %rax testq %rax, %rax je 0xd3c25 leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x10(%rsp), %rdi movq %r12, (%rdi) leaq 0x24ba3(%rip), %rsi # 0xf87d7 leaq 0x24ba8(%rip), %rdx # 0xf87e3 callq 0x225b4 leaq 0x40(%rbx), %rdi leaq 0x10(%rsp), %rsi movb $0x1, 0x20(%rsi) callq 0xe68c8 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd3c69 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8c0 movzbl 0x10(%r14), %eax testl %eax, %eax je 0xd3c99 cmpl $0x2, %eax je 0xd3c7c cmpl $0x1, %eax jne 0xd3c89 movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0xd3c99 leaq 0x10(%r14), %rsi leaq 0x38(%rsp), %rdi callq 0x5e0d6 jmp 0xd3ca7 movb $0x0, 0x38(%rsp) movq $0x0, 0x40(%rsp) movzbl 0x68(%r14), %r8d leaq 0x58(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rcx movq %r15, %rsi movq %r14, %rdx callq 0xa1f30 leaq 0x68(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x80212 movb 0x8(%rbx), %al leaq 0x68(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x5e5a2 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd3d23 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8c0 leaq 0x58(%rsp), %rdi callq 0x5e5a2 leaq 0x38(%rsp), %rdi callq 0x5e5a2 movl $0x2, (%rbx) addq $0x78, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xd3da1 jmp 0xd3dd2 movq %rax, %r14 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd3d6f movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0xd3d6f movq %rax, %r14 leaq 0x58(%rsp), %rdi callq 0x5e5a2 leaq 0x38(%rsp), %rdi callq 0x5e5a2 jmp 0xd3dc2 movq %rax, %r14 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd3dc2 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0xd3dc2 movq %rax, %r14 jmp 0xd3dc2 movq %rax, %r14 movq 0x48(%rsp), %rax testq %rax, %rax je 0xd3dc2 leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x7edd0 movq %r14, %rdi callq 0x1bf90 movq %rax, %rdi callq 0x21535
_ZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputs: push r15 push r14 push r12 push rbx sub rsp, 78h mov r14, rdx mov r15, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor r12d, r12d mov [rdi+8], r12b mov [rdi+10h], r12 lea rax, [rdi+28h] mov [rdi+18h], rax mov [rdi+20h], r12 mov [rdi+28h], r12b mov [rdi+38h], r12b xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], r12 lea rdi, [rdx+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al lea rsi, [rsp+98h+var_60] mov [rsi+8], r12 mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+98h+var_88] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r12, [rsp+98h+var_88] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r12, [rsp+98h+var_78] cmp rdi, r12 jz short loc_D3C0C mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D3C0C: mov rax, [rsp+98h+var_50] test rax, rax jz short loc_D3C25 lea rdi, [rsp+98h+var_60] mov rsi, rdi mov edx, 3 call rax loc_D3C25: lea rdi, [rsp+98h+var_88] mov [rdi], r12 lea rsi, aToolCalls_0; "[TOOL_CALLS]" lea rdx, aToolCalls_0+0Ch; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rbx+40h] lea rsi, [rsp+98h+var_88] mov byte ptr [rsi+20h], 1 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&) mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D3C69 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D3C69: movzx eax, byte ptr [r14+10h] test eax, eax jz short loc_D3C99 cmp eax, 2 jz short loc_D3C7C cmp eax, 1 jnz short loc_D3C89 loc_D3C7C: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_D3C99 loc_D3C89: lea rsi, [r14+10h] lea rdi, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_D3CA7 loc_D3C99: mov [rsp+98h+var_60], 0 mov [rsp+98h+var_58], 0 loc_D3CA7: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+98h+var_40] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+98h+var_98], 1 lea rdi, [rsp+98h+var_88] lea rcx, [rsp+98h+var_60] mov rsi, r15 mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool) lea rdi, [rsp+98h+var_30] lea rsi, [rsp+98h+var_88] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+98h+var_30] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D3D23 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D3D23: lea rdi, [rsp+98h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 2 add rsp, 78h pop rbx pop r12 pop r14 pop r15 retn jmp short loc_D3DA1 jmp loc_D3DD2 mov r14, rax mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D3D6F mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D3D6F mov r14, rax loc_D3D6F: lea rdi, [rsp+98h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_D3DC2 mov r14, rax mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D3DC2 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D3DC2 loc_D3DA1: mov r14, rax jmp short loc_D3DC2 mov r14, rax mov rax, [rsp+98h+var_50] test rax, rax jz short loc_D3DC2 lea rdi, [rsp+98h+var_60] mov rsi, rdi mov edx, 3 call rax loc_D3DC2: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume loc_D3DD2: mov rdi, rax call __clang_call_terminate
long long common_chat_params_init_mistral_nemo( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { long long v4; // rcx int v5; // r8d int v6; // r9d int v7; // eax int v8; // r8d char v9; // al long long v10; // rax long long result; // rax void *v12[2]; // [rsp+10h] [rbp-88h] BYREF _QWORD v13[2]; // [rsp+20h] [rbp-78h] BYREF char v14; // [rsp+30h] [rbp-68h] long long v15; // [rsp+38h] [rbp-60h] BYREF long long v16; // [rsp+40h] [rbp-58h] long long ( *v17)(); // [rsp+48h] [rbp-50h] long long ( *v18)(); // [rsp+50h] [rbp-48h] _BYTE v19[8]; // [rsp+58h] [rbp-40h] BYREF long long v20; // [rsp+60h] [rbp-38h] char v21[8]; // [rsp+68h] [rbp-30h] BYREF long long v22; // [rsp+70h] [rbp-28h] *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( a3 + 32, (long long)"required"); v16 = 0LL; v15 = a3; v18 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v17 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v12, (long long)&v15, grammar_options, v4, v5, v6); std::string::operator=((char *)a1 + 24, v12); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); if ( v17 ) ((void ( *)(long long *, long long *, long long))v17)(&v15, &v15, 3LL); v12[0] = v13; std::string::_M_construct<char const*>((long long)v12, "[TOOL_CALLS]", (long long)""); v14 = 1; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); v7 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v7 == 2 || v7 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v15) = 0; v16 = 0LL; } else { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (unsigned __int8 *)&v15, (unsigned __int8 *)(a3 + 16)); } v8 = *(unsigned __int8 *)(a3 + 104); v19[0] = 0; v20 = 0LL; minja::chat_template::apply((long long)v12, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v15, v8, v19, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v21); v9 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v21[0]; v21[0] = v9; v10 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v22; v22 = v10; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v15); *(_DWORD *)a1 = 2; return result; }
common_chat_params_init_mistral_nemo: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR R12D,R12D MOV byte ptr [RDI + 0x8],R12B MOV qword ptr [RDI + 0x10],R12 LEA RAX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x20],R12 MOV byte ptr [RDI + 0x28],R12B MOV byte ptr [RDI + 0x38],R12B XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],R12 LEA RDI,[RDX + 0x20] LEA RSI,[0x1f15e5] CALL 0x001a5811 MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x38] MOV qword ptr [RSI + 0x8],R12 MOV qword ptr [RSI],R14 LEA RAX,[0x1e0e1e] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1e15f8] MOV qword ptr [RSI + 0x10],RAX LAB_001d3bcf: LEA RDX,[0x1f7708] LEA RDI,[RSP + 0x10] CALL 0x001bb980 LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x10] MOV RSI,R12 CALL 0x0011ba80 MOV RDI,qword ptr [R12] LEA R12,[RSP + 0x20] CMP RDI,R12 JZ 0x001d3c0c MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b8c0 LAB_001d3c0c: MOV RAX,qword ptr [RSP + 0x48] TEST RAX,RAX JZ 0x001d3c25 LAB_001d3c16: LEA RDI,[RSP + 0x38] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001d3c25: LEA RDI,[RSP + 0x10] MOV qword ptr [RDI],R12 LAB_001d3c2d: LEA RSI,[0x1f87d7] LEA RDX,[0x1f87e3] CALL 0x001225b4 LEA RDI,[RBX + 0x40] LEA RSI,[RSP + 0x10] MOV byte ptr [RSI + 0x20],0x1 LAB_001d3c4d: CALL 0x001e68c8 MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x001d3c69 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b8c0 LAB_001d3c69: MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX JZ 0x001d3c99 CMP EAX,0x2 JZ 0x001d3c7c CMP EAX,0x1 JNZ 0x001d3c89 LAB_001d3c7c: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x001d3c99 LAB_001d3c89: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x38] CALL 0x0015e0d6 JMP 0x001d3ca7 LAB_001d3c99: MOV byte ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x0 LAB_001d3ca7: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x58] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_001d3cbd: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x10] LEA RCX,[RSP + 0x38] MOV RSI,R15 MOV RDX,R14 CALL 0x001a1f30 LAB_001d3cd9: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x10] CALL 0x00180212 MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0x68] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x0015e5a2 MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x001d3d23 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b8c0 LAB_001d3d23: LEA RDI,[RSP + 0x58] CALL 0x0015e5a2 LEA RDI,[RSP + 0x38] CALL 0x0015e5a2 MOV dword ptr [RBX],0x2 ADD RSP,0x78 POP RBX POP R12 POP R14 POP R15 RET
/* common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_mistral_nemo(chat_template *param_1,common_chat_inputs *param_2) { char cVar1; int8 uVar2; chat_template cVar3; ulong in_RDX; long *local_88 [2]; long local_78 [2]; int1 local_68; ulong local_60 [2]; code *local_50; code *local_48; data local_40 [8]; int8 local_38; chat_template local_30 [8]; int8 local_28; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; cVar3 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar3; local_60[1] = 0; local_48 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_50 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 001d3bcf to 001d3bdf has its CatchHandler @ 001d3da6 */ local_60[0] = in_RDX; build_grammar_abi_cxx11_((function *)local_88,(common_grammar_options *)local_60); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_88); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_50 != (code *)0x0) { /* try { // try from 001d3c16 to 001d3c24 has its CatchHandler @ 001d3d4b */ (*local_50)(local_60,local_60,3); } local_88[0] = local_78; /* try { // try from 001d3c2d to 001d3c3f has its CatchHandler @ 001d3da1 */ std::__cxx11::string::_M_construct<char_const*>(local_88,"[TOOL_CALLS]",""); local_68 = 1; /* try { // try from 001d3c4d to 001d3c51 has its CatchHandler @ 001d3d85 */ std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>:: emplace_back<common_grammar_trigger> ((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *) (param_1 + 0x40),(common_grammar_trigger *)local_88); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } cVar1 = *(char *)(in_RDX + 0x10); if ((cVar1 == '\0') || (((cVar1 == '\x02' || (cVar1 == '\x01')) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_60[0] = local_60[0] & 0xffffffffffffff00; local_60[1] = 0; } else { /* try { // try from 001d3c89 to 001d3c96 has its CatchHandler @ 001d3d49 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_60,(basic_json *)(in_RDX + 0x10)); } local_40[0] = (data)0x0; local_38 = 0; /* try { // try from 001d3cbd to 001d3cd8 has its CatchHandler @ 001d3d6c */ minja::chat_template::apply ((basic_json *)local_88,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_60, *(bool *)(in_RDX + 0x68)); /* try { // try from 001d3cd9 to 001d3ce7 has its CatchHandler @ 001d3d50 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_30,local_88); cVar3 = param_1[8]; param_1[8] = local_30[0]; uVar2 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_28; local_30[0] = cVar3; local_28 = uVar2; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_30); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_60); *(int4 *)param_1 = 2; return; }
47,679
ma_get_prev_key
eloqsql/storage/maria/ma_search.c
static my_bool _ma_get_prev_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos) { uint page_flag, nod_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; DBUG_ENTER("_ma_get_prev_key"); page_flag= ma_page->flag; nod_flag= ma_page->node; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && ! (page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { bmove(key->data, keypos - keyinfo->keylength - nod_flag, keyinfo->keylength); key->ref_length= keyinfo->share->rec_reflength; key->data_length= keyinfo->keylength - key->ref_length; key->flag= 0; DBUG_RETURN(0); } else { uchar *page; page= ma_page->buff + keyinfo->share->keypage_header + nod_flag; key->data[0]= 0; /* safety */ DBUG_ASSERT(page != keypos); while (page < keypos) { if (! (*keyinfo->get_key)(key, page_flag, nod_flag, &page)) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); DBUG_RETURN(1); } } } DBUG_RETURN(0); }
O3
c
ma_get_prev_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r9 movq %rdi, %rbx movq 0x8(%rdi), %r14 movl 0x28(%rsi), %r8d movl 0x2c(%rsi), %ecx testb $0x28, 0xa2(%r14) sete %al movl %ecx, -0x2c(%rbp) testb $0x2, %cl sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x3f8f1 movq (%rbx), %rdi movzwl 0xaa(%r14), %edx subq %rdx, %r9 subq %r8, %r9 movq %r9, %rsi callq 0x2a140 movq (%r14), %rax movl 0x740(%rax), %eax movl %eax, 0x14(%rbx) movzwl 0xaa(%r14), %ecx subl %eax, %ecx movl %ecx, 0x10(%rbx) movl $0x0, 0x18(%rbx) xorl %eax, %eax jmp 0x3f956 movq %r14, %r12 movq (%r14), %rax movl 0x744(%rax), %eax addq 0x10(%rsi), %rax movq %r8, %r14 addq %r8, %rax leaq -0x38(%rbp), %rcx movq %rax, (%rcx) movq %rbx, %r13 movq (%rbx), %rax movb $0x0, (%rax) movq -0x38(%rbp), %r15 cmpq %r9, %r15 jae 0x3f950 movq %r13, %rdi movl -0x2c(%rbp), %esi movl %r14d, %edx leaq -0x38(%rbp), %rcx movq %r9, %rbx callq *0xe0(%r12) movq %rbx, %r9 testl %eax, %eax jne 0x3f917 movq (%r12), %rdi movl $0x7e, %esi callq 0x3c8a2 movq %rbx, %r9 cmpq %r9, %r15 setb %al addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
_ma_get_prev_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r9, rdx mov rbx, rdi mov r14, [rdi+8] mov r8d, [rsi+28h] mov ecx, [rsi+2Ch] test byte ptr [r14+0A2h], 28h setz al mov [rbp+var_2C], ecx test cl, 2 setz cl and cl, al cmp cl, 1 jnz short loc_3F8F1 mov rdi, [rbx] movzx edx, word ptr [r14+0AAh] sub r9, rdx sub r9, r8 mov rsi, r9 call _memmove mov rax, [r14] mov eax, [rax+740h] mov [rbx+14h], eax movzx ecx, word ptr [r14+0AAh] sub ecx, eax mov [rbx+10h], ecx mov dword ptr [rbx+18h], 0 xor eax, eax jmp short loc_3F956 loc_3F8F1: mov r12, r14 mov rax, [r14] mov eax, [rax+744h] add rax, [rsi+10h] mov r14, r8 add rax, r8 lea rcx, [rbp+var_38] mov [rcx], rax mov r13, rbx mov rax, [rbx] mov byte ptr [rax], 0 loc_3F917: mov r15, [rbp+var_38] cmp r15, r9 jnb short loc_3F950 mov rdi, r13 mov esi, [rbp+var_2C] mov edx, r14d lea rcx, [rbp+var_38] mov rbx, r9 call qword ptr [r12+0E0h] mov r9, rbx test eax, eax jnz short loc_3F917 mov rdi, [r12] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share mov r9, rbx loc_3F950: cmp r15, r9 setb al loc_3F956: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool ma_get_prev_key(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // r9 long long v4; // r14 long long v5; // r8 bool v6; // al int v7; // eax long long v9; // r12 long long v10; // rax unsigned int v11; // r14d unsigned long long v12; // r15 unsigned long long v13; // rbx int v14; // eax long long v15; // rdx long long v16; // rcx long long v17; // r8 unsigned long long v18; // [rsp+8h] [rbp-38h] BYREF unsigned int v19; // [rsp+14h] [rbp-2Ch] v3 = a3; v4 = *(_QWORD *)(a1 + 8); v5 = *(unsigned int *)(a2 + 40); v6 = (*(_BYTE *)(v4 + 162) & 0x28) == 0; v19 = *(_DWORD *)(a2 + 44); if ( v6 && (v19 & 2) == 0 ) { memmove(*(_QWORD *)a1, a3 - *(unsigned __int16 *)(v4 + 170) - v5, *(unsigned __int16 *)(v4 + 170)); v7 = *(_DWORD *)(*(_QWORD *)v4 + 1856LL); *(_DWORD *)(a1 + 20) = v7; *(_DWORD *)(a1 + 16) = *(unsigned __int16 *)(v4 + 170) - v7; *(_DWORD *)(a1 + 24) = 0; return 0; } else { v9 = v4; v10 = *(_QWORD *)(a2 + 16) + *(unsigned int *)(*(_QWORD *)v4 + 1860LL); v11 = v5; v18 = v5 + v10; **(_BYTE **)a1 = 0; while ( 1 ) { v12 = v18; if ( v18 >= v3 ) break; v13 = v3; v14 = (*(long long ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(a1, v19, v11, &v18); v3 = v13; if ( !v14 ) { ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v15, v16, v17, v13); v3 = v13; return v12 < v3; } } return v12 < v3; } }
_ma_get_prev_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R9,RDX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x8] MOV R8D,dword ptr [RSI + 0x28] MOV ECX,dword ptr [RSI + 0x2c] TEST byte ptr [R14 + 0xa2],0x28 SETZ AL MOV dword ptr [RBP + -0x2c],ECX TEST CL,0x2 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x0013f8f1 MOV RDI,qword ptr [RBX] MOVZX EDX,word ptr [R14 + 0xaa] SUB R9,RDX SUB R9,R8 MOV RSI,R9 CALL 0x0012a140 MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0x740] MOV dword ptr [RBX + 0x14],EAX MOVZX ECX,word ptr [R14 + 0xaa] SUB ECX,EAX MOV dword ptr [RBX + 0x10],ECX MOV dword ptr [RBX + 0x18],0x0 XOR EAX,EAX JMP 0x0013f956 LAB_0013f8f1: MOV R12,R14 MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0x744] ADD RAX,qword ptr [RSI + 0x10] MOV R14,R8 ADD RAX,R8 LEA RCX,[RBP + -0x38] MOV qword ptr [RCX],RAX MOV R13,RBX MOV RAX,qword ptr [RBX] MOV byte ptr [RAX],0x0 LAB_0013f917: MOV R15,qword ptr [RBP + -0x38] CMP R15,R9 JNC 0x0013f950 MOV RDI,R13 MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,R14D LEA RCX,[RBP + -0x38] MOV RBX,R9 CALL qword ptr [R12 + 0xe0] MOV R9,RBX TEST EAX,EAX JNZ 0x0013f917 MOV RDI,qword ptr [R12] MOV ESI,0x7e CALL 0x0013c8a2 MOV R9,RBX LAB_0013f950: CMP R15,R9 SETC AL LAB_0013f956: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool _ma_get_prev_key(int8 *param_1,long param_2,ulong param_3) { long *plVar1; ulong uVar2; int iVar3; ulong uVar4; bool bVar5; ulong local_40; uint local_34; plVar1 = (long *)param_1[1]; uVar4 = (ulong)*(uint *)(param_2 + 0x28); local_34 = *(uint *)(param_2 + 0x2c); if ((local_34 & 2) == 0 && (*(byte *)((long)plVar1 + 0xa2) & 0x28) == 0) { memmove((void *)*param_1,(void *)((param_3 - *(ushort *)((long)plVar1 + 0xaa)) - uVar4), (ulong)*(ushort *)((long)plVar1 + 0xaa)); iVar3 = *(int *)(*plVar1 + 0x740); *(int *)((long)param_1 + 0x14) = iVar3; *(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar1 + 0xaa) - iVar3; *(int4 *)(param_1 + 3) = 0; bVar5 = false; } else { local_40 = (ulong)*(uint *)(*plVar1 + 0x744) + *(long *)(param_2 + 0x10) + uVar4; *(int1 *)*param_1 = 0; do { uVar2 = local_40; if (param_3 <= local_40) goto LAB_0013f950; iVar3 = (*(code *)plVar1[0x1c])(param_1,local_34,uVar4,&local_40); } while (iVar3 != 0); _ma_set_fatal_error_with_share(*plVar1,0x7e); LAB_0013f950: bVar5 = uVar2 < param_3; } return bVar5; }
47,680
ma_insert
eloqsql/storage/maria/ma_write.c
int _ma_insert(register MARIA_HA *info, MARIA_KEY *key, MARIA_PAGE *anc_page, uchar *key_pos, uchar *key_buff, MARIA_PAGE *father_page, uchar *father_key_pos, my_bool insert_last) { uint a_length, nod_flag, org_anc_length; int t_length; uchar *endpos, *prev_key, *anc_buff; MARIA_KEY_PARAM s_temp; MARIA_SHARE *share= info->s; MARIA_KEYDEF *keyinfo= key->keyinfo; DBUG_ENTER("_ma_insert"); DBUG_PRINT("enter",("key_pos:%p", key_pos)); DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, key);); /* Note that anc_page->size can be bigger then block_size in case of delete key that caused increase of page length */ org_anc_length= a_length= anc_page->size; nod_flag= anc_page->node; anc_buff= anc_page->buff; endpos= anc_buff+ a_length; prev_key= (key_pos == anc_buff + share->keypage_header + nod_flag ? (uchar*) 0 : key_buff); t_length= (*keyinfo->pack_key)(key, nod_flag, (key_pos == endpos ? (uchar*) 0 : key_pos), prev_key, prev_key, &s_temp); #ifndef DBUG_OFF if (prev_key && (keyinfo->flag & (HA_BINARY_PACK_KEY | HA_PACK_KEY))) { DBUG_DUMP("prev_key", prev_key, _ma_keylength(keyinfo,prev_key)); } if (keyinfo->flag & HA_PACK_KEY) { DBUG_PRINT("test",("t_length: %d ref_len: %d", t_length,s_temp.ref_length)); DBUG_PRINT("test",("n_ref_len: %d n_length: %d key_pos: %p", s_temp.n_ref_length, s_temp.n_length, s_temp.key)); } #endif if (t_length > 0) { if (t_length >= keyinfo->maxlength*2+MARIA_INDEX_OVERHEAD_SIZE) { _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(-1); } bmove_upp(endpos+t_length, endpos, (uint) (endpos-key_pos)); } else { if (-t_length >= keyinfo->maxlength*2+MARIA_INDEX_OVERHEAD_SIZE) { _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(-1); } bmove(key_pos,key_pos-t_length,(uint) (endpos-key_pos)+t_length); } (*keyinfo->store_key)(keyinfo,key_pos,&s_temp); a_length+=t_length; if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID)) _ma_mark_page_with_transid(share, anc_page); anc_page->size= a_length; page_store_size(share, anc_page); /* Check if the new key fits totally into the the page (anc_buff is big enough to contain a full page + one key) */ if (a_length <= share->max_index_block_size) { if (share->max_index_block_size - a_length < 32 && (keyinfo->flag & HA_FULLTEXT) && key_pos == endpos && share->base.key_reflength <= share->rec_reflength && share->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) { /* Normal word. One-level tree. Page is almost full. Let's consider converting. We'll compare 'key' and the first key at anc_buff */ const uchar *a= key->data; const uchar *b= anc_buff + share->keypage_header + nod_flag; uint alen, blen, ft2len= share->ft2_keyinfo.keylength; /* the very first key on the page is always unpacked */ DBUG_ASSERT((*b & 128) == 0); #if HA_FT_MAXLEN >= 127 blen= mi_uint2korr(b); b+=2; When you enable this code, as part of the MyISAM->Maria merge of ChangeSet@1.2562, 2008-04-09 07:41:40+02:00, serg@janus.mylan +9 -0 restore ft2 functionality, fix bugs. Then this will enable two-level fulltext index, which is not totally recoverable yet. So remove this text and inform Guilhem so that he fixes the issue. #else blen= *b++; #endif get_key_length(alen,a); DBUG_ASSERT(info->ft1_to_ft2==0); if (alen == blen && ha_compare_text(keyinfo->seg->charset, a, alen, b, blen, 0) == 0) { /* Yup. converting */ info->ft1_to_ft2=(DYNAMIC_ARRAY *) my_malloc(PSI_INSTRUMENT_ME, sizeof(DYNAMIC_ARRAY), MYF(MY_WME)); my_init_dynamic_array(PSI_INSTRUMENT_ME, info->ft1_to_ft2, ft2len, 300, 50, MYF(0)); /* Now, adding all keys from the page to dynarray if the page is a leaf (if not keys will be deleted later) */ if (!nod_flag) { /* Let's leave the first key on the page, though, because we cannot easily dispatch an empty page here */ b+=blen+ft2len+2; for (a=anc_buff+a_length ; b < a ; b+=ft2len+2) insert_dynamic(info->ft1_to_ft2, b); /* fixing the page's length - it contains only one key now */ anc_page->size= share->keypage_header + blen + ft2len + 2; page_store_size(share, anc_page); } /* the rest will be done when we're back from recursion */ } } else { if (share->now_transactional && _ma_log_add(anc_page, org_anc_length, key_pos, s_temp.changed_length, t_length, 1, KEY_OP_DEBUG_LOG_ADD_1)) DBUG_RETURN(-1); } DBUG_RETURN(0); /* There is room on page */ } /* Page is full */ if (nod_flag) insert_last=0; /* TODO: Remove 'born_transactional' here. The only reason for having it here is that the current _ma_balance_page_ can't handle variable length keys. */ if (!(keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && father_page && !insert_last && !info->quick_mode && !info->s->base.born_transactional) { s_temp.key_pos= key_pos; page_mark_changed(info, father_page); DBUG_RETURN(_ma_balance_page(info, keyinfo, key, anc_page, father_page, father_key_pos, &s_temp)); } DBUG_RETURN(_ma_split_page(info, key, anc_page, MY_MIN(org_anc_length, info->s->max_index_block_size), key_pos, s_temp.changed_length, t_length, key_buff, insert_last)); }
O3
c
ma_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %r9, -0x58(%rbp) movq %rcx, %r12 movq %rdx, %rbx movq %rsi, %r10 movq %rdi, -0x30(%rbp) movq (%rdi), %rax movl 0x20(%rdx), %edx movl 0x28(%rbx), %esi movq 0x10(%rbx), %rcx movq %rdx, -0x48(%rbp) leaq (%rcx,%rdx), %r13 movq %rax, -0x60(%rbp) movl 0x744(%rax), %eax movq %rcx, -0x50(%rbp) addq %rsi, %rcx addq %rcx, %rax xorl %edx, %edx cmpq %r12, %rax movq %r8, -0x68(%rbp) movq %r8, %rcx cmoveq %rdx, %rcx cmpq %r12, %r13 cmovneq %r12, %rdx movq 0x8(%r10), %r14 leaq -0xb8(%rbp), %r9 movq %r10, -0x40(%rbp) movq %r10, %rdi movq %rsi, -0x38(%rbp) movq %rcx, %r8 callq *0xf0(%r14) movl %eax, %r15d testl %eax, %eax jle 0x64e5d movzwl 0xae(%r14), %eax leal 0x15(,%rax,2), %eax cmpl %eax, %r15d jae 0x64f9e movl %r15d, %edi addq %r13, %rdi movl %r13d, %edx subl %r12d, %edx movq %r13, %rsi callq 0xaa8a4 jmp 0x64e93 movl %r15d, %eax negl %eax movzwl 0xae(%r14), %ecx leal 0x15(,%rcx,2), %ecx cmpl %eax, %ecx jbe 0x64f9e movslq %r15d, %rax movq %r12, %rsi subq %rax, %rsi movl %r13d, %edx subl %r12d, %edx addl %r15d, %edx movq %r12, %rdi callq 0x29120 leaq -0xb8(%rbp), %rdx movq %r14, %rdi movq %r12, %rsi callq *0xf8(%r14) movq -0x48(%rbp), %rsi leal (%r15,%rsi), %edx movq -0x40(%rbp), %r10 testb $0x18, 0x1a(%r10) movq -0x60(%rbp), %rdi je 0x64edd movl 0x2c(%rbx), %eax orl $0x2, %eax movl %eax, 0x2c(%rbx) movq 0x10(%rbx), %rcx movl %edx, %r8d movl 0x744(%rdi), %edx addl $-0x3, %edx movb %al, (%rcx,%rdx) movl %r8d, %edx movl %edx, 0x20(%rbx) movq 0x10(%rbx), %rax movl 0x744(%rdi), %ecx movb %dl, -0x1(%rax,%rcx) movq 0x10(%rbx), %rax movl 0x744(%rdi), %ecx movb %dh, -0x2(%rax,%rcx) movl 0x7c0(%rdi), %eax subl %edx, %eax jae 0x64fb6 xorl %ecx, %ecx cmpq $0x0, -0x38(%rbp) movzbl 0x18(%rbp), %eax cmovnel %ecx, %eax testb %al, %al jne 0x65051 cmpq $0x0, -0x58(%rbp) je 0x65051 movzwl 0xa2(%r14), %ecx andl $0x28, %ecx jne 0x65051 movq -0x30(%rbp), %rdi cmpb $0x0, 0x682(%rdi) movq (%rdi), %rcx jne 0x65058 cmpb $0x0, 0x44c(%rcx) jne 0x65058 movq 0x10(%rbp), %r9 movq %r12, -0xa0(%rbp) movq 0x2e8(%rdi), %rax movq -0x58(%rbp), %r8 movl 0x30(%r8), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) leaq -0xb8(%rbp), %rax movq %rax, (%rsp) movq %r14, %rsi movq %r10, %rdx movq %rbx, %rcx callq 0x651a8 jmp 0x65089 movq -0x30(%rbp), %rdi movl $0x7e, %esi callq 0x36618 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x65089 cmpl $0x1f, %eax ja 0x6501b cmpq %r12, %r13 jne 0x6501b movzwl 0xa2(%r14), %eax andl $0x80, %eax je 0x6501b movl 0x3e4(%rdi), %eax cmpl 0x740(%rdi), %eax ja 0x6501b testb $0x5, 0x720(%rdi) je 0x6501b movl %edx, -0x48(%rbp) movq (%r10), %rsi movl 0x744(%rdi), %eax addq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx movzbl (%rcx,%rax), %ecx movq %rcx, -0x40(%rbp) movzbl (%rsi), %edx cmpl $0xff, %edx je 0x6509b movl $0x1, %ecx jmp 0x650ab cmpb $0x0, 0x7e7(%rdi) je 0x6504d movl -0x78(%rbp), %ecx movl $0x6, (%rsp) movq %rbx, %rdi movq %r12, %rdx movl %r15d, %r8d movl $0x1, %r9d callq 0x59a16 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl jne 0x65089 xorl %eax, %eax jmp 0x65089 movq -0x30(%rbp), %rdi movq (%rdi), %rcx movl 0x7c0(%rcx), %ecx cmpl %ecx, %esi cmovbl %esi, %ecx movl -0x78(%rbp), %r9d movsbl %al, %eax movl %eax, 0x10(%rsp) movq -0x68(%rbp), %rax movq %rax, 0x8(%rsp) movl %r15d, (%rsp) movq %r10, %rsi movq %rbx, %rdx movq %r12, %r8 callq 0x65e69 addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movzwl 0x1(%rsi), %ecx rolw $0x8, %cx movzwl %cx, %edx movl $0x3, %ecx movq -0x30(%rbp), %r13 movq -0x40(%rbp), %r15 cmpl %r15d, %edx jne 0x6504d movzwl 0x502(%rdi), %edx movq %rdx, -0x30(%rbp) movq -0x38(%rbp), %rdx leaq (%rdx,%rax), %r12 incq %r12 addq %rcx, %rsi movq 0xc0(%r14), %rax movq (%rax), %rdi movl %r15d, %edx movq %r12, %rcx movq %r15, %r8 xorl %r9d, %r9d callq 0x9e3cc testl %eax, %eax jne 0x6504d movl $0x28, %esi movl $0x10, %edx xorl %edi, %edi callq 0x9f97d movq %rax, 0x320(%r13) movq $0x0, (%rsp) xorl %edi, %edi movq %rax, %rsi movq -0x30(%rbp), %rdx xorl %ecx, %ecx movl $0x12c, %r8d # imm = 0x12C movl $0x32, %r9d callq 0x916f4 cmpq $0x0, -0x38(%rbp) jne 0x6504d movq -0x30(%rbp), %rcx movl %ecx, %eax addl %r15d, %eax leaq (%r12,%rax), %r14 addq $0x2, %r14 movl -0x48(%rbp), %eax movq -0x50(%rbp), %r12 addq %rax, %r12 leaq 0x2(%rcx), %r15 cmpq %r12, %r14 jae 0x65173 movq 0x320(%r13), %rdi movq %r14, %rsi callq 0x91792 addq %r15, %r14 jmp 0x6515a movq -0x40(%rbp), %rax addl %r15d, %eax movq -0x60(%rbp), %rdx addl 0x744(%rdx), %eax movl %eax, 0x20(%rbx) movq 0x10(%rbx), %rsi movl 0x744(%rdx), %ecx movb %al, -0x1(%rsi,%rcx) movq 0x10(%rbx), %rsi movl 0x744(%rdx), %ecx movb %ah, -0x2(%rsi,%rcx) jmp 0x6504d
_ma_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov [rbp+var_58], r9 mov r12, rcx mov rbx, rdx mov r10, rsi mov [rbp+var_30], rdi mov rax, [rdi] mov edx, [rdx+20h] mov esi, [rbx+28h] mov rcx, [rbx+10h] mov [rbp+var_48], rdx lea r13, [rcx+rdx] mov [rbp+var_60], rax mov eax, [rax+744h] mov [rbp+var_50], rcx add rcx, rsi add rax, rcx xor edx, edx cmp rax, r12 mov [rbp+var_68], r8 mov rcx, r8 cmovz rcx, rdx cmp r13, r12 cmovnz rdx, r12 mov r14, [r10+8] lea r9, [rbp+var_B8] mov [rbp+var_40], r10 mov rdi, r10 mov [rbp+var_38], rsi mov r8, rcx call qword ptr [r14+0F0h] mov r15d, eax test eax, eax jle short loc_64E5D movzx eax, word ptr [r14+0AEh] lea eax, ds:15h[rax*2] cmp r15d, eax jnb loc_64F9E mov edi, r15d add rdi, r13 mov edx, r13d sub edx, r12d mov rsi, r13 call bmove_upp jmp short loc_64E93 loc_64E5D: mov eax, r15d neg eax movzx ecx, word ptr [r14+0AEh] lea ecx, ds:15h[rcx*2] cmp ecx, eax jbe loc_64F9E movsxd rax, r15d mov rsi, r12 sub rsi, rax mov edx, r13d sub edx, r12d add edx, r15d mov rdi, r12 call _memmove loc_64E93: lea rdx, [rbp+var_B8] mov rdi, r14 mov rsi, r12 call qword ptr [r14+0F8h] mov rsi, [rbp+var_48] lea edx, [r15+rsi] mov r10, [rbp+var_40] test byte ptr [r10+1Ah], 18h mov rdi, [rbp+var_60] jz short loc_64EDD mov eax, [rbx+2Ch] or eax, 2 mov [rbx+2Ch], eax mov rcx, [rbx+10h] mov r8d, edx mov edx, [rdi+744h] add edx, 0FFFFFFFDh mov [rcx+rdx], al mov edx, r8d loc_64EDD: mov [rbx+20h], edx mov rax, [rbx+10h] mov ecx, [rdi+744h] mov [rax+rcx-1], dl mov rax, [rbx+10h] mov ecx, [rdi+744h] mov [rax+rcx-2], dh mov eax, [rdi+7C0h] sub eax, edx jnb loc_64FB6 xor ecx, ecx cmp [rbp+var_38], 0 movzx eax, [rbp+arg_8] cmovnz eax, ecx test al, al jnz loc_65051 cmp [rbp+var_58], 0 jz loc_65051 movzx ecx, word ptr [r14+0A2h] and ecx, 28h jnz loc_65051 mov rdi, [rbp+var_30] cmp byte ptr [rdi+682h], 0 mov rcx, [rdi] jnz loc_65058 cmp byte ptr [rcx+44Ch], 0 jnz loc_65058 mov r9, [rbp+arg_0] mov [rbp+var_A0], r12 mov rax, [rdi+2E8h] mov r8, [rbp+var_58] mov ecx, [r8+30h] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 lea rax, [rbp+var_B8] mov [rsp+0D0h+var_D0], rax mov rsi, r14 mov rdx, r10 mov rcx, rbx call _ma_balance_page jmp loc_65089 loc_64F9E: mov rdi, [rbp+var_30] mov esi, 7Eh ; '~' call _ma_set_fatal_error mov eax, 0FFFFFFFFh jmp loc_65089 loc_64FB6: cmp eax, 1Fh ja short loc_6501B cmp r13, r12 jnz short loc_6501B movzx eax, word ptr [r14+0A2h] and eax, 80h jz short loc_6501B mov eax, [rdi+3E4h] cmp eax, [rdi+740h] ja short loc_6501B test byte ptr [rdi+720h], 5 jz short loc_6501B mov dword ptr [rbp+var_48], edx mov rsi, [r10] mov eax, [rdi+744h] add rax, [rbp+var_50] mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+rax] mov [rbp+var_40], rcx movzx edx, byte ptr [rsi] cmp edx, 0FFh jz loc_6509B mov ecx, 1 jmp loc_650AB loc_6501B: cmp byte ptr [rdi+7E7h], 0 jz short loc_6504D mov ecx, [rbp+var_78] mov dword ptr [rsp+0D0h+var_D0], 6 mov rdi, rbx mov rdx, r12 mov r8d, r15d mov r9d, 1 call _ma_log_add mov ecx, eax mov eax, 0FFFFFFFFh test cl, cl jnz short loc_65089 loc_6504D: xor eax, eax jmp short loc_65089 loc_65051: mov rdi, [rbp+var_30] mov rcx, [rdi] loc_65058: mov ecx, [rcx+7C0h] cmp esi, ecx cmovb ecx, esi mov r9d, [rbp+var_78] movsx eax, al mov [rsp+0D0h+var_C0], eax mov rax, [rbp+var_68] mov [rsp+0D0h+var_C8], rax mov dword ptr [rsp+0D0h+var_D0], r15d mov rsi, r10 mov rdx, rbx mov r8, r12 call _ma_split_page loc_65089: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6509B: movzx ecx, word ptr [rsi+1] rol cx, 8 movzx edx, cx mov ecx, 3 loc_650AB: mov r13, [rbp+var_30] mov r15, [rbp+var_40] cmp edx, r15d jnz short loc_6504D movzx edx, word ptr [rdi+502h] mov [rbp+var_30], rdx mov rdx, [rbp+var_38] lea r12, [rdx+rax] inc r12 add rsi, rcx mov rax, [r14+0C0h] mov rdi, [rax] mov edx, r15d mov rcx, r12 mov r8, r15 xor r9d, r9d call ha_compare_text test eax, eax jnz loc_6504D mov esi, 28h ; '(' mov edx, 10h xor edi, edi call my_malloc mov [r13+320h], rax mov [rsp+0D0h+var_D0], 0 xor edi, edi mov rsi, rax mov rdx, [rbp+var_30] xor ecx, ecx mov r8d, 12Ch mov r9d, 32h ; '2' call init_dynamic_array2 cmp [rbp+var_38], 0 jnz loc_6504D mov rcx, [rbp+var_30] mov eax, ecx add eax, r15d lea r14, [r12+rax] add r14, 2 mov eax, dword ptr [rbp+var_48] mov r12, [rbp+var_50] add r12, rax lea r15, [rcx+2] loc_6515A: cmp r14, r12 jnb short loc_65173 mov rdi, [r13+320h] mov rsi, r14 call insert_dynamic add r14, r15 jmp short loc_6515A loc_65173: mov rax, [rbp+var_40] add eax, r15d mov rdx, [rbp+var_60] add eax, [rdx+744h] mov [rbx+20h], eax mov rsi, [rbx+10h] mov ecx, [rdx+744h] mov [rsi+rcx-1], al mov rsi, [rbx+10h] mov ecx, [rdx+744h] mov [rsi+rcx-2], ah jmp loc_6504D
long long ma_insert( _DWORD *a1, unsigned __int8 **a2, long long a3, long long a4, long long a5, long long a6, long long a7, char a8) { long long v11; // rax long long v12; // rsi long long v13; // rcx long long v14; // r13 long long v15; // rax long long v16; // rax long long v17; // rdx long long v18; // rcx unsigned __int8 *v19; // r14 long long v20; // rdx long long v21; // rcx long long v22; // r8 int v23; // r9d int v24; // r15d long long v25; // rsi unsigned int v26; // edx unsigned __int8 **v27; // r10 long long v28; // rdi int v29; // eax unsigned int v30; // eax bool v31; // cf unsigned int v32; // eax int v34; // edi long long v35; // rcx int v36; // r8d long long result; // rax unsigned __int8 *v38; // rsi long long v39; // rax int v40; // edx long long v41; // rcx char v42; // cl unsigned int v43; // ecx _DWORD *v44; // r13 int v45; // r15d long long v46; // r12 long long v47; // rax unsigned long long v48; // r14 unsigned long long v49; // r12 char *v50; // r15 long long v51; // rdx int v52; // eax _BYTE v53[24]; // [rsp+18h] [rbp-B8h] BYREF long long v54; // [rsp+30h] [rbp-A0h] unsigned int v55; // [rsp+58h] [rbp-78h] long long v56; // [rsp+68h] [rbp-68h] long long v57; // [rsp+70h] [rbp-60h] long long v58; // [rsp+78h] [rbp-58h] long long v59; // [rsp+80h] [rbp-50h] long long v60; // [rsp+88h] [rbp-48h] unsigned __int8 **v61; // [rsp+90h] [rbp-40h] long long v62; // [rsp+98h] [rbp-38h] _DWORD *v63; // [rsp+A0h] [rbp-30h] v58 = a6; v63 = a1; v11 = *(_QWORD *)a1; v12 = *(unsigned int *)(a3 + 40); v13 = *(_QWORD *)(a3 + 16); v60 = *(unsigned int *)(a3 + 32); v14 = v13 + v60; v57 = v11; v15 = *(unsigned int *)(v11 + 1860); v59 = v13; v16 = v12 + v13 + v15; v17 = 0LL; v56 = a5; v18 = a5; if ( v16 == a4 ) v18 = 0LL; if ( v14 != a4 ) v17 = a4; v19 = a2[1]; v61 = a2; v62 = v12; v24 = (*((long long ( **)(unsigned __int8 **, long long, long long, long long, long long, _BYTE *))v19 + 30))( a2, v12, v17, v18, v18, v53); if ( v24 > 0 ) { if ( v24 < 2 * (unsigned int)*((unsigned __int16 *)v19 + 87) + 21 ) { bmove_upp(v14 + (unsigned int)v24, v14); goto LABEL_10; } LABEL_21: ma_set_fatal_error(v63, 126LL, v20, v21, v22, v23); return 0xFFFFFFFFLL; } v21 = 2 * (unsigned int)*((unsigned __int16 *)v19 + 87) + 21; if ( (unsigned int)v21 <= -v24 ) goto LABEL_21; memmove(a4, a4 - v24, (unsigned int)(v24 + v14 - a4)); LABEL_10: (*((void ( **)(unsigned __int8 *, long long, _BYTE *))v19 + 31))(v19, a4, v53); v25 = v60; v26 = v24 + v60; v27 = v61; v28 = v57; if ( (*((_BYTE *)v61 + 26) & 0x18) != 0 ) { v29 = *(_DWORD *)(a3 + 44) | 2; *(_DWORD *)(a3 + 44) = v29; *(_BYTE *)(*(_QWORD *)(a3 + 16) + (unsigned int)(*(_DWORD *)(v28 + 1860) - 3)) = v29; } *(_DWORD *)(a3 + 32) = v26; *(_BYTE *)(*(_QWORD *)(a3 + 16) + *(unsigned int *)(v28 + 1860) - 1LL) = v26; *(_BYTE *)(*(_QWORD *)(a3 + 16) + *(unsigned int *)(v28 + 1860) - 2LL) = BYTE1(v26); v30 = *(_DWORD *)(v28 + 1984); v31 = v30 < v26; v32 = v30 - v26; if ( !v31 ) { if ( v32 <= 0x1F && v14 == a4 && (*((_WORD *)v19 + 81) & 0x80) != 0 && *(_DWORD *)(v28 + 996) <= *(_DWORD *)(v28 + 1856) && (*(_BYTE *)(v28 + 1824) & 5) != 0 ) { LODWORD(v60) = v26; v38 = *v27; v39 = v59 + *(unsigned int *)(v28 + 1860); v61 = (unsigned __int8 **)*(unsigned __int8 *)(v62 + v39); v40 = *v38; if ( v40 == 255 ) { v40 = (unsigned __int16)__ROL2__(*(_WORD *)(v38 + 1), 8); v41 = 3LL; } else { v41 = 1LL; } v44 = v63; v45 = (int)v61; if ( v40 == (_DWORD)v61 ) { v63 = (_DWORD *)*(unsigned __int16 *)(v28 + 1282); v46 = v62 + v39 + 1; if ( !(unsigned int)ha_compare_text(**((_QWORD **)v19 + 24), &v38[v41], (unsigned int)v61, v46, v61, 0LL) ) { v47 = my_malloc(0LL, 40LL, 16LL); *((_QWORD *)v44 + 100) = v47; init_dynamic_array2(0, v47, (_DWORD)v63, 0, 300, 50, 0LL); if ( !v62 ) { v48 = v46 + (unsigned int)(v45 + (_DWORD)v63) + 2; v49 = (unsigned int)v60 + v59; v50 = (char *)v63 + 2; while ( v48 < v49 ) { insert_dynamic(*((_QWORD *)v44 + 100), v48); v48 += (unsigned long long)v50; } v51 = v57; v52 = *(_DWORD *)(v57 + 1860) + (_DWORD)v50 + (_DWORD)v61; *(_DWORD *)(a3 + 32) = v52; *(_BYTE *)(*(_QWORD *)(a3 + 16) + *(unsigned int *)(v51 + 1860) - 1LL) = v52; *(_BYTE *)(*(_QWORD *)(a3 + 16) + *(unsigned int *)(v51 + 1860) - 2LL) = BYTE1(v52); } } } } else if ( *(_BYTE *)(v28 + 2023) ) { v42 = ma_log_add(a3, v25, a4, v55, v24); result = 0xFFFFFFFFLL; if ( v42 ) return result; } return 0LL; } if ( v62 ) a8 = 0; if ( a8 || !v58 || (*((_WORD *)v19 + 81) & 0x28) != 0 ) { v34 = (int)v63; v35 = *(_QWORD *)v63; } else { v34 = (int)v63; v35 = *(_QWORD *)v63; if ( !*((_BYTE *)v63 + 1666) && !*(_BYTE *)(v35 + 1100) ) { v54 = a4; v36 = v58; *(_BYTE *)(*((_QWORD *)v63 + 93) + 24LL * *(unsigned int *)(v58 + 48) + 16) = 1; return ma_balance_page(v34, (_DWORD)v19, (_DWORD)v27, a3, v36, a7, (long long)v53); } } v43 = *(_DWORD *)(v35 + 1984); if ( (unsigned int)v25 < v43 ) v43 = v25; return ma_split_page(v34, (_DWORD)v27, a3, v43, a4, v55, v24, v56, a8); }
_ma_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV qword ptr [RBP + -0x58],R9 MOV R12,RCX MOV RBX,RDX MOV R10,RSI MOV qword ptr [RBP + -0x30],RDI MOV RAX,qword ptr [RDI] MOV EDX,dword ptr [RDX + 0x20] MOV ESI,dword ptr [RBX + 0x28] MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RBP + -0x48],RDX LEA R13,[RCX + RDX*0x1] MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [RAX + 0x744] MOV qword ptr [RBP + -0x50],RCX ADD RCX,RSI ADD RAX,RCX XOR EDX,EDX CMP RAX,R12 MOV qword ptr [RBP + -0x68],R8 MOV RCX,R8 CMOVZ RCX,RDX CMP R13,R12 CMOVNZ RDX,R12 MOV R14,qword ptr [R10 + 0x8] LEA R9,[RBP + -0xb8] MOV qword ptr [RBP + -0x40],R10 MOV RDI,R10 MOV qword ptr [RBP + -0x38],RSI MOV R8,RCX CALL qword ptr [R14 + 0xf0] MOV R15D,EAX TEST EAX,EAX JLE 0x00164e5d MOVZX EAX,word ptr [R14 + 0xae] LEA EAX,[0x15 + RAX*0x2] CMP R15D,EAX JNC 0x00164f9e MOV EDI,R15D ADD RDI,R13 MOV EDX,R13D SUB EDX,R12D MOV RSI,R13 CALL 0x001aa8a4 JMP 0x00164e93 LAB_00164e5d: MOV EAX,R15D NEG EAX MOVZX ECX,word ptr [R14 + 0xae] LEA ECX,[0x15 + RCX*0x2] CMP ECX,EAX JBE 0x00164f9e MOVSXD RAX,R15D MOV RSI,R12 SUB RSI,RAX MOV EDX,R13D SUB EDX,R12D ADD EDX,R15D MOV RDI,R12 CALL 0x00129120 LAB_00164e93: LEA RDX,[RBP + -0xb8] MOV RDI,R14 MOV RSI,R12 CALL qword ptr [R14 + 0xf8] MOV RSI,qword ptr [RBP + -0x48] LEA EDX,[R15 + RSI*0x1] MOV R10,qword ptr [RBP + -0x40] TEST byte ptr [R10 + 0x1a],0x18 MOV RDI,qword ptr [RBP + -0x60] JZ 0x00164edd MOV EAX,dword ptr [RBX + 0x2c] OR EAX,0x2 MOV dword ptr [RBX + 0x2c],EAX MOV RCX,qword ptr [RBX + 0x10] MOV R8D,EDX MOV EDX,dword ptr [RDI + 0x744] ADD EDX,-0x3 MOV byte ptr [RCX + RDX*0x1],AL MOV EDX,R8D LAB_00164edd: MOV dword ptr [RBX + 0x20],EDX MOV RAX,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RDI + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x1],DL MOV RAX,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RDI + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x2],DH MOV EAX,dword ptr [RDI + 0x7c0] SUB EAX,EDX JNC 0x00164fb6 XOR ECX,ECX CMP qword ptr [RBP + -0x38],0x0 MOVZX EAX,byte ptr [RBP + 0x18] CMOVNZ EAX,ECX TEST AL,AL JNZ 0x00165051 CMP qword ptr [RBP + -0x58],0x0 JZ 0x00165051 MOVZX ECX,word ptr [R14 + 0xa2] AND ECX,0x28 JNZ 0x00165051 MOV RDI,qword ptr [RBP + -0x30] CMP byte ptr [RDI + 0x682],0x0 MOV RCX,qword ptr [RDI] JNZ 0x00165058 CMP byte ptr [RCX + 0x44c],0x0 JNZ 0x00165058 MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0xa0],R12 MOV RAX,qword ptr [RDI + 0x2e8] MOV R8,qword ptr [RBP + -0x58] MOV ECX,dword ptr [R8 + 0x30] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 LEA RAX,[RBP + -0xb8] MOV qword ptr [RSP],RAX MOV RSI,R14 MOV RDX,R10 MOV RCX,RBX CALL 0x001651a8 JMP 0x00165089 LAB_00164f9e: MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x7e CALL 0x00136618 MOV EAX,0xffffffff JMP 0x00165089 LAB_00164fb6: CMP EAX,0x1f JA 0x0016501b CMP R13,R12 JNZ 0x0016501b MOVZX EAX,word ptr [R14 + 0xa2] AND EAX,0x80 JZ 0x0016501b MOV EAX,dword ptr [RDI + 0x3e4] CMP EAX,dword ptr [RDI + 0x740] JA 0x0016501b TEST byte ptr [RDI + 0x720],0x5 JZ 0x0016501b MOV dword ptr [RBP + -0x48],EDX MOV RSI,qword ptr [R10] MOV EAX,dword ptr [RDI + 0x744] ADD RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + RAX*0x1] MOV qword ptr [RBP + -0x40],RCX MOVZX EDX,byte ptr [RSI] CMP EDX,0xff JZ 0x0016509b MOV ECX,0x1 JMP 0x001650ab LAB_0016501b: CMP byte ptr [RDI + 0x7e7],0x0 JZ 0x0016504d MOV ECX,dword ptr [RBP + -0x78] MOV dword ptr [RSP],0x6 MOV RDI,RBX MOV RDX,R12 MOV R8D,R15D MOV R9D,0x1 CALL 0x00159a16 MOV ECX,EAX MOV EAX,0xffffffff TEST CL,CL JNZ 0x00165089 LAB_0016504d: XOR EAX,EAX JMP 0x00165089 LAB_00165051: MOV RDI,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RDI] LAB_00165058: MOV ECX,dword ptr [RCX + 0x7c0] CMP ESI,ECX CMOVC ECX,ESI MOV R9D,dword ptr [RBP + -0x78] MOVSX EAX,AL MOV dword ptr [RSP + 0x10],EAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP],R15D MOV RSI,R10 MOV RDX,RBX MOV R8,R12 CALL 0x00165e69 LAB_00165089: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016509b: MOVZX ECX,word ptr [RSI + 0x1] ROL CX,0x8 MOVZX EDX,CX MOV ECX,0x3 LAB_001650ab: MOV R13,qword ptr [RBP + -0x30] MOV R15,qword ptr [RBP + -0x40] CMP EDX,R15D JNZ 0x0016504d MOVZX EDX,word ptr [RDI + 0x502] MOV qword ptr [RBP + -0x30],RDX MOV RDX,qword ptr [RBP + -0x38] LEA R12,[RDX + RAX*0x1] INC R12 ADD RSI,RCX MOV RAX,qword ptr [R14 + 0xc0] MOV RDI,qword ptr [RAX] MOV EDX,R15D MOV RCX,R12 MOV R8,R15 XOR R9D,R9D CALL 0x0019e3cc TEST EAX,EAX JNZ 0x0016504d MOV ESI,0x28 MOV EDX,0x10 XOR EDI,EDI CALL 0x0019f97d MOV qword ptr [R13 + 0x320],RAX MOV qword ptr [RSP],0x0 XOR EDI,EDI MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x30] XOR ECX,ECX MOV R8D,0x12c MOV R9D,0x32 CALL 0x001916f4 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0016504d MOV RCX,qword ptr [RBP + -0x30] MOV EAX,ECX ADD EAX,R15D LEA R14,[R12 + RAX*0x1] ADD R14,0x2 MOV EAX,dword ptr [RBP + -0x48] MOV R12,qword ptr [RBP + -0x50] ADD R12,RAX LEA R15,[RCX + 0x2] LAB_0016515a: CMP R14,R12 JNC 0x00165173 MOV RDI,qword ptr [R13 + 0x320] MOV RSI,R14 CALL 0x00191792 ADD R14,R15 JMP 0x0016515a LAB_00165173: MOV RAX,qword ptr [RBP + -0x40] ADD EAX,R15D MOV RDX,qword ptr [RBP + -0x60] ADD EAX,dword ptr [RDX + 0x744] MOV dword ptr [RBX + 0x20],EAX MOV RSI,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RDX + 0x744] MOV byte ptr [RSI + RCX*0x1 + -0x1],AL MOV RSI,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RDX + 0x744] MOV byte ptr [RSI + RCX*0x1 + -0x2],AH JMP 0x0016504d
int8 _ma_insert(long *param_1,int8 *param_2,long param_3,void *param_4,void *param_5,long param_6, int8 param_7,char param_8) { void *pvVar1; byte bVar2; byte *pbVar3; long *plVar4; char cVar5; uint uVar6; uint uVar7; int iVar8; int8 uVar9; long lVar10; long lVar11; void *pvVar12; long lVar13; ulong uVar14; uint uVar15; void *pvVar16; ulong uVar17; int8 in_stack_ffffffffffffff28; int4 uVar18; int1 local_c0 [24]; void *local_a8; int4 local_80; void *local_70; long local_68; long local_60; long local_58; ulong local_50; int8 *local_48; ulong local_40; long *local_38; uVar18 = (int4)((ulong)in_stack_ffffffffffffff28 >> 0x20); local_68 = *param_1; local_50 = (ulong)*(uint *)(param_3 + 0x20); local_40 = (ulong)*(uint *)(param_3 + 0x28); local_58 = *(long *)(param_3 + 0x10); pvVar1 = (void *)(local_58 + local_50); pvVar12 = param_5; if ((void *)((ulong)*(uint *)(local_68 + 0x744) + local_58 + local_40) == param_4) { pvVar12 = (void *)0x0; } pvVar16 = (void *)0x0; if (pvVar1 != param_4) { pvVar16 = param_4; } lVar11 = param_2[1]; local_70 = param_5; local_60 = param_6; local_48 = param_2; local_38 = param_1; uVar6 = (**(code **)(lVar11 + 0xf0))(param_2,local_40,pvVar16,pvVar12,pvVar12,local_c0); if ((int)uVar6 < 1) { if ((uint)*(ushort *)(lVar11 + 0xae) * 2 + 0x15 <= -uVar6) goto LAB_00164f9e; memmove(param_4,(void *)((long)param_4 - (long)(int)uVar6), (ulong)(((int)pvVar1 - (int)param_4) + uVar6)); } else { if ((uint)*(ushort *)(lVar11 + 0xae) * 2 + 0x15 <= uVar6) { LAB_00164f9e: _ma_set_fatal_error(local_38,0x7e); return 0xffffffff; } bmove_upp((ulong)uVar6 + (long)pvVar1,pvVar1,(int)pvVar1 - (int)param_4); } (**(code **)(lVar11 + 0xf8))(lVar11,param_4,local_c0); plVar4 = local_38; uVar15 = uVar6 + (uint)local_50; if ((*(byte *)((long)local_48 + 0x1a) & 0x18) != 0) { uVar7 = *(uint *)(param_3 + 0x2c) | 2; *(uint *)(param_3 + 0x2c) = uVar7; *(char *)(*(long *)(param_3 + 0x10) + (ulong)(*(int *)(local_68 + 0x744) - 3)) = (char)uVar7; } *(uint *)(param_3 + 0x20) = uVar15; *(char *)(*(long *)(param_3 + 0x10) + -1 + (ulong)*(uint *)(local_68 + 0x744)) = (char)uVar15; *(char *)(*(long *)(param_3 + 0x10) + -2 + (ulong)*(uint *)(local_68 + 0x744)) = (char)(uVar15 >> 8); if (*(uint *)(local_68 + 0x7c0) < uVar15) { if (local_40 != 0) { param_8 = '\0'; } if (((param_8 == '\0') && (local_60 != 0)) && ((*(ushort *)(lVar11 + 0xa2) & 0x28) == 0)) { lVar10 = *local_38; if ((*(char *)((long)local_38 + 0x682) == '\0') && (*(char *)(lVar10 + 0x44c) == '\0')) { *(int1 *)(local_38[0x5d] + 0x10 + (ulong)*(uint *)(local_60 + 0x30) * 0x18) = 1; local_a8 = param_4; uVar9 = _ma_balance_page(local_38,lVar11,local_48,param_3,local_60,param_7,local_c0); return uVar9; } } else { lVar10 = *local_38; } uVar14 = (ulong)*(uint *)(lVar10 + 0x7c0); if ((uint)local_50 < *(uint *)(lVar10 + 0x7c0)) { uVar14 = local_50 & 0xffffffff; } uVar9 = _ma_split_page(local_38,local_48,param_3,uVar14,param_4,local_80,CONCAT44(uVar18,uVar6), local_70,(int)param_8); } else { if ((((*(uint *)(local_68 + 0x7c0) - uVar15 < 0x20) && (pvVar1 == param_4)) && ((*(ushort *)(lVar11 + 0xa2) & 0x80) != 0)) && ((*(uint *)(local_68 + 0x3e4) <= *(uint *)(local_68 + 0x740) && ((*(byte *)(local_68 + 0x720) & 5) != 0)))) { local_50 = CONCAT44(local_50._4_4_,uVar15); pbVar3 = (byte *)*local_48; lVar10 = (ulong)*(uint *)(local_68 + 0x744) + local_58; bVar2 = *(byte *)(local_40 + lVar10); local_48 = (int8 *)(ulong)bVar2; uVar6 = (uint)*pbVar3; if (*pbVar3 == 0xff) { uVar6 = (uint)(ushort)(*(ushort *)(pbVar3 + 1) << 8 | *(ushort *)(pbVar3 + 1) >> 8); lVar13 = 3; } else { lVar13 = 1; } if (uVar6 == bVar2) { local_38 = (long *)(ulong)*(ushort *)(local_68 + 0x502); lVar10 = local_40 + lVar10 + 1; iVar8 = ha_compare_text(**(int8 **)(lVar11 + 0xc0),pbVar3 + lVar13,local_48,lVar10, local_48,0); if (iVar8 == 0) { lVar11 = my_malloc(0,0x28,0x10); plVar4[100] = lVar11; init_dynamic_array2(0,lVar11,local_38,0,300,0x32,0); if (local_40 == 0) { uVar14 = local_58 + (local_50 & 0xffffffff); lVar11 = (long)local_38 + 2; for (uVar17 = lVar10 + (ulong)((int)local_38 + (uint)bVar2) + 2; uVar17 < uVar14; uVar17 = uVar17 + lVar11) { insert_dynamic(plVar4[100],uVar17); } iVar8 = (int)local_48 + (int)lVar11 + *(int *)(local_68 + 0x744); *(int *)(param_3 + 0x20) = iVar8; *(char *)(*(long *)(param_3 + 0x10) + -1 + (ulong)*(uint *)(local_68 + 0x744)) = (char)iVar8; *(char *)(*(long *)(param_3 + 0x10) + -2 + (ulong)*(uint *)(local_68 + 0x744)) = (char)((uint)iVar8 >> 8); } } } } else if ((*(char *)(local_68 + 0x7e7) != '\0') && (cVar5 = _ma_log_add(param_3,local_50,param_4,local_80,(ulong)uVar6,1,CONCAT44(uVar18,6) ), cVar5 != '\0')) { return 0xffffffff; } uVar9 = 0; } return uVar9; }
47,681
fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char>(fmt::v10::appender, char const*, int, int, char)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto write_significand(OutputIt out, const char* significand, int significand_size, int integral_size, Char decimal_point) -> OutputIt { out = detail::copy_str_noinline<Char>(significand, significand + integral_size, out); if (!decimal_point) return out; *out++ = decimal_point; return detail::copy_str_noinline<Char>(significand + integral_size, significand + significand_size, out); }
O3
c
fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char>(fmt::v10::appender, char const*, int, int, char): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %r8d, %ebp movl %edx, %r14d movq %rsi, %rbx movq %rdi, %rdx movslq %ecx, %r15 addq %rsi, %r15 movq %rsi, %rdi movq %r15, %rsi callq 0x2e43b movq %rax, %r12 testb %bpl, %bpl je 0x2e42f movq 0x10(%r12), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%r12) jae 0x2e405 movq (%r12), %rax movq %r12, %rdi callq *(%rax) movq 0x10(%r12), %rax leaq 0x1(%rax), %rsi movq 0x8(%r12), %rcx movq %rsi, 0x10(%r12) movb %bpl, (%rcx,%rax) movslq %r14d, %rax addq %rax, %rbx movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x2e43b movq %r12, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN3fmt3v106detail17write_significandINS0_8appenderEcEET_S4_PKciiT0_: push rbp push r15 push r14 push r12 push rbx mov ebp, r8d mov r14d, edx mov rbx, rsi mov rdx, rdi movsxd r15, ecx add r15, rsi mov rdi, rsi mov rsi, r15 call _ZN3fmt3v106detail17copy_str_noinlineIcPKcNS0_8appenderEEET1_T0_S7_S6_; fmt::v10::detail::copy_str_noinline<char,char const*,fmt::v10::appender>(char const*,char const*,fmt::v10::appender) mov r12, rax test bpl, bpl jz short loc_2E42F mov rax, [r12+10h] lea rsi, [rax+1] cmp [r12+18h], rsi jnb short loc_2E405 mov rax, [r12] mov rdi, r12 call qword ptr [rax] mov rax, [r12+10h] lea rsi, [rax+1] loc_2E405: mov rcx, [r12+8] mov [r12+10h], rsi mov [rcx+rax], bpl movsxd rax, r14d add rbx, rax mov rdi, r15 mov rsi, rbx mov rdx, r12 pop rbx pop r12 pop r14 pop r15 pop rbp jmp _ZN3fmt3v106detail17copy_str_noinlineIcPKcNS0_8appenderEEET1_T0_S7_S6_; fmt::v10::detail::copy_str_noinline<char,char const*,fmt::v10::appender>(char const*,char const*,fmt::v10::appender) loc_2E42F: mov rax, r12 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long fmt::v10::detail::write_significand<fmt::v10::appender,char>( long long a1, long long a2, int a3, int a4, char a5) { long long v8; // r15 long long result; // rax long long v10; // r12 long long v11; // rax long long v12; // rsi long long v13; // rcx v8 = a2 + a4; result = fmt::v10::detail::copy_str_noinline<char,char const*,fmt::v10::appender>(a2, v8, a1); v10 = result; if ( a5 ) { v11 = *(_QWORD *)(result + 16); v12 = v11 + 1; if ( *(_QWORD *)(v10 + 24) < (unsigned long long)(v11 + 1) ) { (**(void ( ***)(long long))v10)(v10); v11 = *(_QWORD *)(v10 + 16); v12 = v11 + 1; } v13 = *(_QWORD *)(v10 + 8); *(_QWORD *)(v10 + 16) = v12; *(_BYTE *)(v13 + v11) = a5; return fmt::v10::detail::copy_str_noinline<char,char const*,fmt::v10::appender>(v8, a3 + a2, v10); } return result; }
write_significand<fmt::v10::appender,char>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,R8D MOV R14D,EDX MOV RBX,RSI MOV RDX,RDI MOVSXD R15,ECX ADD R15,RSI MOV RDI,RSI MOV RSI,R15 CALL 0x0012e43b MOV R12,RAX TEST BPL,BPL JZ 0x0012e42f MOV RAX,qword ptr [R12 + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [R12 + 0x18],RSI JNC 0x0012e405 MOV RAX,qword ptr [R12] MOV RDI,R12 CALL qword ptr [RAX] MOV RAX,qword ptr [R12 + 0x10] LEA RSI,[RAX + 0x1] LAB_0012e405: MOV RCX,qword ptr [R12 + 0x8] MOV qword ptr [R12 + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],BPL MOVSXD RAX,R14D ADD RBX,RAX MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0012e43b LAB_0012e42f: MOV RAX,R12 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char>(fmt::v10::appender, char const*, int, int, char) */ int8 * fmt::v10::detail::write_significand<fmt::v10::appender,char> (int8 param_1,long param_2,int param_3,int param_4,char param_5) { int8 *puVar1; long lVar2; ulong uVar3; puVar1 = (int8 *) copy_str_noinline<char,char_const*,fmt::v10::appender>(param_2,param_4 + param_2,param_1) ; if (param_5 != '\0') { lVar2 = puVar1[2]; uVar3 = lVar2 + 1; if ((ulong)puVar1[3] < uVar3) { (**(code **)*puVar1)(puVar1); lVar2 = puVar1[2]; uVar3 = lVar2 + 1; } puVar1[2] = uVar3; *(char *)(puVar1[1] + lVar2) = param_5; puVar1 = (int8 *) copy_str_noinline<char,char_const*,fmt::v10::appender> (param_4 + param_2,param_2 + param_3,puVar1); return puVar1; } return puVar1; }
47,682
testing::UnitTest::current_test_suite() const
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
GTEST_LOCK_EXCLUDED_(mutex_) { internal::MutexLock lock(&mutex_); return impl_->current_test_suite(); }
O1
cpp
testing::UnitTest::current_test_suite() const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x8(%rdi), %r14 movq %r14, %rdi callq 0x370dc movq 0x40(%rbx), %rax movq 0x1d8(%rax), %rbx movq %r14, %rdi callq 0x3717a movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rdi callq 0x326a4 nop
_ZNK7testing8UnitTest18current_test_suiteEv: push r14 push rbx push rax mov rbx, rdi lea r14, [rdi+8] mov rdi, r14; this call _ZN7testing8internal9MutexBase4LockEv; testing::internal::MutexBase::Lock(void) mov rax, [rbx+40h] mov rbx, [rax+1D8h] mov rdi, r14; this call _ZN7testing8internal9MutexBase6UnlockEv; testing::internal::MutexBase::Unlock(void) mov rax, rbx add rsp, 8 pop rbx pop r14 retn mov rdi, rax call __clang_call_terminate
long long testing::UnitTest::current_test_suite(testing::UnitTest *this) { long long v1; // rbx testing::internal::MutexBase::Lock((testing::UnitTest *)((char *)this + 8)); v1 = *(_QWORD *)(*((_QWORD *)this + 8) + 472LL); testing::internal::MutexBase::Unlock((testing::UnitTest *)((char *)this + 8)); return v1; }
current_test_suite: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RDI + 0x8] MOV RDI,R14 CALL 0x001370dc MOV RAX,qword ptr [RBX + 0x40] MOV RBX,qword ptr [RAX + 0x1d8] LAB_0012dd3e: MOV RDI,R14 CALL 0x0013717a MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* testing::UnitTest::current_test_suite() const */ int8 __thiscall testing::UnitTest::current_test_suite(UnitTest *this) { int8 uVar1; internal::MutexBase::Lock((MutexBase *)(this + 8)); uVar1 = *(int8 *)(*(long *)(this + 0x40) + 0x1d8); /* try { // try from 0012dd3e to 0012dd45 has its CatchHandler @ 0012dd51 */ internal::MutexBase::Unlock((MutexBase *)(this + 8)); return uVar1; }
47,683
my_hash_update
eloqsql/mysys/hash.c
my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, size_t old_key_length) { uint new_index, new_pos_index, org_index, records, idx; size_t length, empty, blength; my_hash_value_type hash_nr; HASH_LINK org_link,*data,*previous,*pos; uchar *new_key; DBUG_ENTER("my_hash_update"); new_key= (uchar*) my_hash_key(hash, record, &length, 1); hash_nr= hash->hash_function(hash->charset, new_key, length); if (HASH_UNIQUE & hash->flags) { HASH_SEARCH_STATE state; uchar *found; if ((found= my_hash_first_from_hash_value(hash, hash_nr, new_key, length, &state))) { do { if (found != record) DBUG_RETURN(1); /* Duplicate entry */ } while ((found= my_hash_next(hash, new_key, length, &state))); } } data=dynamic_element(&hash->array,0,HASH_LINK*); blength=hash->blength; records=hash->records; /* Search after record with key */ idx= my_hash_mask(hash->hash_function(hash->charset, old_key, (old_key_length ? old_key_length : hash->key_length)), blength, records); org_index= idx; new_index= my_hash_mask(hash_nr, blength, records); previous=0; for (;;) { if ((pos= data+idx)->data == record) break; previous=pos; if ((idx=pos->next) == NO_RECORD) DBUG_RETURN(1); /* Not found in links */ } if (org_index == new_index) { data[idx].hash_nr= hash_nr; /* Hash number may have changed */ DBUG_RETURN(0); /* Record is in right position */ } org_link= *pos; empty=idx; /* Relink record from current chain */ if (!previous) { if (pos->next != NO_RECORD) { empty=pos->next; *pos= data[pos->next]; } } else previous->next=pos->next; /* unlink pos */ /* Move data to correct position */ if (new_index == empty) { /* At this point record is unlinked from the old chain, thus it holds random position. By the chance this position is equal to position for the first element in the new chain. That means updated record is the only record in the new chain. */ if (empty != idx) { /* Record was moved while unlinking it from the old chain. Copy data to a new position. */ data[empty]= org_link; } data[empty].next= NO_RECORD; data[empty].hash_nr= hash_nr; DBUG_RETURN(0); } pos=data+new_index; new_pos_index= my_hash_rec_mask(pos, blength, records); if (new_index != new_pos_index) { /* Other record in wrong position */ data[empty]= *pos; movelink(data,new_index,new_pos_index, (uint) empty); org_link.next=NO_RECORD; data[new_index]= org_link; data[new_index].hash_nr= hash_nr; } else { /* Link in chain at right position */ org_link.next=data[new_index].next; data[empty]=org_link; data[empty].hash_nr= hash_nr; data[new_index].next= (uint) empty; } DBUG_RETURN(0); }
O3
c
my_hash_update: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, -0x60(%rbp) movq %rsi, %r14 movq %rdi, %r13 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x50(%rdi), %rax testq %rax, %rax movq %rdx, -0x58(%rbp) je 0x3081b leaq -0x48(%rbp), %r12 movq %r14, %rdi movq %r12, %rsi movl $0x1, %edx callq *%rax movq %rax, %rbx movq (%r12), %rdx jmp 0x3082a movq 0x8(%r13), %rdx movq %rdx, -0x48(%rbp) movq (%r13), %rbx addq %r14, %rbx movq 0x68(%r13), %rdi movq %rbx, %rsi callq *0x58(%r13) testb $0x1, 0x20(%r13) je 0x30880 movq -0x48(%rbp), %rcx leaq -0x40(%rbp), %r8 movq %r13, %rdi movl %eax, %r15d movl %eax, %esi movq %rbx, %rdx callq 0x3007f testq %rax, %rax je 0x3087d leaq -0x40(%rbp), %r12 cmpq %r14, %rax jne 0x30928 movq -0x48(%rbp), %rdx movq %r13, %rdi movq %rbx, %rsi movq %r12, %rcx callq 0x301d8 testq %rax, %rax jne 0x3085d movl %r15d, %eax movl %eax, -0x4c(%rbp) movq 0x28(%r13), %rbx movq 0x10(%r13), %r12 movl 0x18(%r13), %r15d movq 0x58(%r13), %rax movq 0x68(%r13), %rdi movq -0x60(%rbp), %rdx testq %rdx, %rdx jne 0x308a4 movq 0x8(%r13), %rdx movq -0x58(%rbp), %rsi callq *%rax movl $0xffffffff, %edi # imm = 0xFFFFFFFF leaq (%r12,%rdi), %rsi movl %esi, %ecx andl %eax, %ecx shrq %r12 decl %r12d andl %r12d, %eax cmpl %r15d, %ecx cmovbl %ecx, %eax movl %esi, %ecx movl -0x4c(%rbp), %r11d andl %r11d, %ecx movl %r11d, %edx andl %r12d, %edx cmpl %r15d, %ecx cmovbl %ecx, %edx movq %rax, %rcx shlq $0x4, %rcx leaq (%rbx,%rcx), %r8 cmpq %r14, 0x8(%rbx,%rcx) je 0x3092c movl (%r8), %ecx cmpq %rdi, %rcx je 0x30928 movq %r8, %r9 movq %rcx, %r10 shlq $0x4, %r10 leaq (%rbx,%r10), %r8 cmpq %r14, 0x8(%rbx,%r10) jne 0x308ed cmpl %edx, %eax je 0x30933 movl (%r8), %eax movl 0xc(%r8), %edi movl %edi, -0x38(%rbp) movq 0x4(%r8), %rdi movq %rdi, -0x40(%rbp) movl %eax, (%r9) movq %rcx, %rax jmp 0x30965 movb $0x1, %al jmp 0x30996 cmpl %edx, %eax jne 0x30939 movq %rax, %rcx shlq $0x4, %rcx jmp 0x3098f movl (%r8), %ecx movl 0xc(%r8), %r9d movl %r9d, -0x38(%rbp) movq 0x4(%r8), %r9 movq %r9, -0x40(%rbp) cmpq %rdi, %rcx je 0x30962 movq %rcx, %rdi shlq $0x4, %rdi movups (%rbx,%rdi), %xmm0 movups %xmm0, (%r8) jmp 0x30965 movq %rax, %rcx cmpl %edx, %ecx jne 0x309b8 cmpl %eax, %ecx je 0x30984 movq %rcx, %rax shlq $0x4, %rax movl -0x38(%rbp), %edx movl %edx, 0xc(%rbx,%rax) movq -0x40(%rbp), %rdx movq %rdx, 0x4(%rbx,%rax) shlq $0x4, %rcx movl $0xffffffff, (%rbx,%rcx) # imm = 0xFFFFFFFF movl %r11d, 0x4(%rbx,%rcx) xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x30a45 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %edx, %edi shlq $0x4, %rdi leaq (%rbx,%rdi), %rax movl 0x4(%rbx,%rdi), %r8d andl %r8d, %esi andl %r8d, %r12d cmpl %r15d, %esi cmovbl %esi, %r12d cmpl %r12d, %edx jne 0x309fe movl (%rax), %edx movq %rcx, %rsi shlq $0x4, %rsi movl %edx, (%rbx,%rsi) movq -0x40(%rbp), %rdx movq %rdx, 0x4(%rbx,%rsi) movl -0x38(%rbp), %edx movl %edx, 0xc(%rbx,%rsi) movl %r11d, 0x4(%rbx,%rsi) movl %ecx, (%rax) jmp 0x30994 leaq (%rbx,%rdi), %rsi addq $0x4, %rsi movq %rcx, %rdi shlq $0x4, %rdi movups (%rax), %xmm0 movups %xmm0, (%rbx,%rdi) movl %r12d, %edi shlq $0x4, %rdi movl (%rbx,%rdi), %r12d cmpl %edx, %r12d jne 0x30a14 addq %rdi, %rbx movl %ecx, (%rbx) movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl -0x38(%rbp), %ecx movl %ecx, 0x8(%rsi) movq -0x40(%rbp), %rcx movq %rcx, (%rsi) movl %r11d, 0x4(%rax) jmp 0x30994 callq 0x24360
my_hash_update: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_60], rcx mov r14, rsi mov r13, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+50h] test rax, rax mov [rbp+var_58], rdx jz short loc_3081B lea r12, [rbp+var_48] mov rdi, r14 mov rsi, r12 mov edx, 1 call rax mov rbx, rax mov rdx, [r12] jmp short loc_3082A loc_3081B: mov rdx, [r13+8] mov [rbp+var_48], rdx mov rbx, [r13+0] add rbx, r14 loc_3082A: mov rdi, [r13+68h] mov rsi, rbx call qword ptr [r13+58h] test byte ptr [r13+20h], 1 jz short loc_30880 mov rcx, [rbp+var_48] lea r8, [rbp+var_40] mov rdi, r13 mov r15d, eax mov esi, eax mov rdx, rbx call my_hash_first_from_hash_value test rax, rax jz short loc_3087D lea r12, [rbp+var_40] loc_3085D: cmp rax, r14 jnz loc_30928 mov rdx, [rbp+var_48] mov rdi, r13 mov rsi, rbx mov rcx, r12 call my_hash_next test rax, rax jnz short loc_3085D loc_3087D: mov eax, r15d loc_30880: mov [rbp+var_4C], eax mov rbx, [r13+28h] mov r12, [r13+10h] mov r15d, [r13+18h] mov rax, [r13+58h] mov rdi, [r13+68h] mov rdx, [rbp+var_60] test rdx, rdx jnz short loc_308A4 mov rdx, [r13+8] loc_308A4: mov rsi, [rbp+var_58] call rax mov edi, 0FFFFFFFFh lea rsi, [r12+rdi] mov ecx, esi and ecx, eax shr r12, 1 dec r12d and eax, r12d cmp ecx, r15d cmovb eax, ecx mov ecx, esi mov r11d, [rbp+var_4C] and ecx, r11d mov edx, r11d and edx, r12d cmp ecx, r15d cmovb edx, ecx mov rcx, rax shl rcx, 4 lea r8, [rbx+rcx] cmp [rbx+rcx+8], r14 jz short loc_3092C loc_308ED: mov ecx, [r8] cmp rcx, rdi jz short loc_30928 mov r9, r8 mov r10, rcx shl r10, 4 lea r8, [rbx+r10] cmp [rbx+r10+8], r14 jnz short loc_308ED cmp eax, edx jz short loc_30933 mov eax, [r8] mov edi, [r8+0Ch] mov [rbp+var_38], edi mov rdi, [r8+4] mov [rbp+var_40], rdi mov [r9], eax mov rax, rcx jmp short loc_30965 loc_30928: mov al, 1 jmp short loc_30996 loc_3092C: cmp eax, edx jnz short loc_30939 mov rcx, rax loc_30933: shl rcx, 4 jmp short loc_3098F loc_30939: mov ecx, [r8] mov r9d, [r8+0Ch] mov [rbp+var_38], r9d mov r9, [r8+4] mov [rbp+var_40], r9 cmp rcx, rdi jz short loc_30962 mov rdi, rcx shl rdi, 4 movups xmm0, xmmword ptr [rbx+rdi] movups xmmword ptr [r8], xmm0 jmp short loc_30965 loc_30962: mov rcx, rax loc_30965: cmp ecx, edx jnz short loc_309B8 cmp ecx, eax jz short loc_30984 mov rax, rcx shl rax, 4 mov edx, [rbp+var_38] mov [rbx+rax+0Ch], edx mov rdx, [rbp+var_40] mov [rbx+rax+4], rdx loc_30984: shl rcx, 4 mov dword ptr [rbx+rcx], 0FFFFFFFFh loc_3098F: mov [rbx+rcx+4], r11d loc_30994: xor eax, eax loc_30996: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_30A45 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_309B8: mov edi, edx shl rdi, 4 lea rax, [rbx+rdi] mov r8d, [rbx+rdi+4] and esi, r8d and r12d, r8d cmp esi, r15d cmovb r12d, esi cmp edx, r12d jnz short loc_309FE mov edx, [rax] mov rsi, rcx shl rsi, 4 mov [rbx+rsi], edx mov rdx, [rbp+var_40] mov [rbx+rsi+4], rdx mov edx, [rbp+var_38] mov [rbx+rsi+0Ch], edx mov [rbx+rsi+4], r11d mov [rax], ecx jmp short loc_30994 loc_309FE: lea rsi, [rbx+rdi] add rsi, 4 mov rdi, rcx shl rdi, 4 movups xmm0, xmmword ptr [rax] movups xmmword ptr [rbx+rdi], xmm0 loc_30A14: mov edi, r12d shl rdi, 4 mov r12d, [rbx+rdi] cmp r12d, edx jnz short loc_30A14 add rbx, rdi mov [rbx], ecx mov dword ptr [rax], 0FFFFFFFFh mov ecx, [rbp+var_38] mov [rsi+8], ecx mov rcx, [rbp+var_40] mov [rsi], rcx mov [rax+4], r11d jmp loc_30994 loc_30A45: call ___stack_chk_fail
char my_hash_update(long long a1, long long a2, long long a3) { long long ( *v4)(long long, long long *, long long); // rax long long v5; // rbx long long v6; // rdx int v7; // eax int v8; // r15d long long v9; // rax long long v10; // rbx unsigned long long v11; // r12 unsigned int v12; // r15d unsigned int v13; // eax unsigned int v14; // esi unsigned int v15; // ecx int v16; // r12d long long v17; // rax unsigned int v18; // edx unsigned int *v19; // r8 long long v20; // rcx _DWORD *v21; // r9 int v22; // eax long long v24; // rcx long long v25; // rax long long v26; // rdi _DWORD *v27; // rax int v28; // r8d unsigned int v29; // esi unsigned int v30; // r12d long long v31; // rsi long long v32; // rsi long long v33; // rdi int v35; // [rsp+14h] [rbp-4Ch] long long v36; // [rsp+18h] [rbp-48h] BYREF long long v37; // [rsp+20h] [rbp-40h] BYREF unsigned int v38; // [rsp+28h] [rbp-38h] unsigned long long v39; // [rsp+30h] [rbp-30h] v39 = __readfsqword(0x28u); v4 = *(long long ( **)(long long, long long *, long long))(a1 + 80); if ( v4 ) { v5 = v4(a2, &v36, 1LL); v6 = v36; } else { v6 = *(_QWORD *)(a1 + 8); v36 = v6; v5 = a2 + *(_QWORD *)a1; } v7 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), v5, v6); if ( (*(_BYTE *)(a1 + 32) & 1) != 0 ) { v8 = v7; v9 = my_hash_first_from_hash_value((_QWORD *)a1, v7, v5, v36, (unsigned int *)&v37); if ( v9 ) { while ( v9 == a2 ) { v9 = my_hash_next((_QWORD *)a1, v5, v36, &v37); if ( !v9 ) goto LABEL_8; } return 1; } LABEL_8: v7 = v8; } v35 = v7; v10 = *(_QWORD *)(a1 + 40); v11 = *(_QWORD *)(a1 + 16); v12 = *(_DWORD *)(a1 + 24); v13 = (*(long long ( **)(_QWORD, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), a3); v14 = v11 - 1; v15 = v13 & (v11 - 1); v16 = (v11 >> 1) - 1; v17 = v16 & v13; if ( v15 < v12 ) v17 = v15; v18 = v16 & v35; if ( (v35 & v14) < v12 ) v18 = v35 & v14; v19 = (unsigned int *)(v10 + 16 * v17); if ( *((_QWORD *)v19 + 1) != a2 ) { while ( 1 ) { v20 = *v19; if ( v20 == 0xFFFFFFFFLL ) return 1; v21 = v19; v19 = (unsigned int *)(v10 + 16 * v20); if ( *((_QWORD *)v19 + 1) == a2 ) { if ( (_DWORD)v17 == v18 ) goto LABEL_21; v22 = *v19; v38 = v19[3]; v37 = *(_QWORD *)(v19 + 1); *v21 = v22; LODWORD(v17) = v20; goto LABEL_25; } } } if ( (_DWORD)v17 == v18 ) { v20 = v17; LABEL_21: v24 = 16 * v20; } else { v20 = *v19; v38 = v19[3]; v37 = *(_QWORD *)(v19 + 1); if ( v20 == 0xFFFFFFFFLL ) v20 = v17; else *(_OWORD *)v19 = *(_OWORD *)(v10 + 16 * v20); LABEL_25: if ( (_DWORD)v20 != v18 ) { v26 = 16LL * v18; v27 = (_DWORD *)(v10 + v26); v28 = *(_DWORD *)(v10 + v26 + 4); v29 = v28 & v14; v30 = v28 & v16; if ( v29 < v12 ) v30 = v29; if ( v18 == v30 ) { v31 = 16 * v20; *(_DWORD *)(v10 + v31) = *v27; *(_QWORD *)(v10 + v31 + 4) = v37; *(_DWORD *)(v10 + v31 + 12) = v38; *(_DWORD *)(v10 + v31 + 4) = v35; *v27 = v20; } else { v32 = v10 + v26 + 4; *(_OWORD *)(v10 + 16 * v20) = *(_OWORD *)v27; do { v33 = 16LL * v30; v30 = *(_DWORD *)(v10 + v33); } while ( v30 != v18 ); *(_DWORD *)(v33 + v10) = v20; *v27 = -1; *(_DWORD *)(v32 + 8) = v38; *(_QWORD *)v32 = v37; v27[1] = v35; } return 0; } if ( (_DWORD)v20 != (_DWORD)v17 ) { v25 = 16 * v20; *(_DWORD *)(v10 + v25 + 12) = v38; *(_QWORD *)(v10 + v25 + 4) = v37; } v24 = 16 * v20; *(_DWORD *)(v10 + v24) = -1; } *(_DWORD *)(v10 + v24 + 4) = v35; return 0; }
my_hash_update: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x60],RCX MOV R14,RSI MOV R13,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0x50] TEST RAX,RAX MOV qword ptr [RBP + -0x58],RDX JZ 0x0013081b LEA R12,[RBP + -0x48] MOV RDI,R14 MOV RSI,R12 MOV EDX,0x1 CALL RAX MOV RBX,RAX MOV RDX,qword ptr [R12] JMP 0x0013082a LAB_0013081b: MOV RDX,qword ptr [R13 + 0x8] MOV qword ptr [RBP + -0x48],RDX MOV RBX,qword ptr [R13] ADD RBX,R14 LAB_0013082a: MOV RDI,qword ptr [R13 + 0x68] MOV RSI,RBX CALL qword ptr [R13 + 0x58] TEST byte ptr [R13 + 0x20],0x1 JZ 0x00130880 MOV RCX,qword ptr [RBP + -0x48] LEA R8,[RBP + -0x40] MOV RDI,R13 MOV R15D,EAX MOV ESI,EAX MOV RDX,RBX CALL 0x0013007f TEST RAX,RAX JZ 0x0013087d LEA R12,[RBP + -0x40] LAB_0013085d: CMP RAX,R14 JNZ 0x00130928 MOV RDX,qword ptr [RBP + -0x48] MOV RDI,R13 MOV RSI,RBX MOV RCX,R12 CALL 0x001301d8 TEST RAX,RAX JNZ 0x0013085d LAB_0013087d: MOV EAX,R15D LAB_00130880: MOV dword ptr [RBP + -0x4c],EAX MOV RBX,qword ptr [R13 + 0x28] MOV R12,qword ptr [R13 + 0x10] MOV R15D,dword ptr [R13 + 0x18] MOV RAX,qword ptr [R13 + 0x58] MOV RDI,qword ptr [R13 + 0x68] MOV RDX,qword ptr [RBP + -0x60] TEST RDX,RDX JNZ 0x001308a4 MOV RDX,qword ptr [R13 + 0x8] LAB_001308a4: MOV RSI,qword ptr [RBP + -0x58] CALL RAX MOV EDI,0xffffffff LEA RSI,[R12 + RDI*0x1] MOV ECX,ESI AND ECX,EAX SHR R12,0x1 DEC R12D AND EAX,R12D CMP ECX,R15D CMOVC EAX,ECX MOV ECX,ESI MOV R11D,dword ptr [RBP + -0x4c] AND ECX,R11D MOV EDX,R11D AND EDX,R12D CMP ECX,R15D CMOVC EDX,ECX MOV RCX,RAX SHL RCX,0x4 LEA R8,[RBX + RCX*0x1] CMP qword ptr [RBX + RCX*0x1 + 0x8],R14 JZ 0x0013092c LAB_001308ed: MOV ECX,dword ptr [R8] CMP RCX,RDI JZ 0x00130928 MOV R9,R8 MOV R10,RCX SHL R10,0x4 LEA R8,[RBX + R10*0x1] CMP qword ptr [RBX + R10*0x1 + 0x8],R14 JNZ 0x001308ed CMP EAX,EDX JZ 0x00130933 MOV EAX,dword ptr [R8] MOV EDI,dword ptr [R8 + 0xc] MOV dword ptr [RBP + -0x38],EDI MOV RDI,qword ptr [R8 + 0x4] MOV qword ptr [RBP + -0x40],RDI MOV dword ptr [R9],EAX MOV RAX,RCX JMP 0x00130965 LAB_00130928: MOV AL,0x1 JMP 0x00130996 LAB_0013092c: CMP EAX,EDX JNZ 0x00130939 MOV RCX,RAX LAB_00130933: SHL RCX,0x4 JMP 0x0013098f LAB_00130939: MOV ECX,dword ptr [R8] MOV R9D,dword ptr [R8 + 0xc] MOV dword ptr [RBP + -0x38],R9D MOV R9,qword ptr [R8 + 0x4] MOV qword ptr [RBP + -0x40],R9 CMP RCX,RDI JZ 0x00130962 MOV RDI,RCX SHL RDI,0x4 MOVUPS XMM0,xmmword ptr [RBX + RDI*0x1] MOVUPS xmmword ptr [R8],XMM0 JMP 0x00130965 LAB_00130962: MOV RCX,RAX LAB_00130965: CMP ECX,EDX JNZ 0x001309b8 CMP ECX,EAX JZ 0x00130984 MOV RAX,RCX SHL RAX,0x4 MOV EDX,dword ptr [RBP + -0x38] MOV dword ptr [RBX + RAX*0x1 + 0xc],EDX MOV RDX,qword ptr [RBP + -0x40] MOV qword ptr [RBX + RAX*0x1 + 0x4],RDX LAB_00130984: SHL RCX,0x4 MOV dword ptr [RBX + RCX*0x1],0xffffffff LAB_0013098f: MOV dword ptr [RBX + RCX*0x1 + 0x4],R11D LAB_00130994: XOR EAX,EAX LAB_00130996: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00130a45 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001309b8: MOV EDI,EDX SHL RDI,0x4 LEA RAX,[RBX + RDI*0x1] MOV R8D,dword ptr [RBX + RDI*0x1 + 0x4] AND ESI,R8D AND R12D,R8D CMP ESI,R15D CMOVC R12D,ESI CMP EDX,R12D JNZ 0x001309fe MOV EDX,dword ptr [RAX] MOV RSI,RCX SHL RSI,0x4 MOV dword ptr [RBX + RSI*0x1],EDX MOV RDX,qword ptr [RBP + -0x40] MOV qword ptr [RBX + RSI*0x1 + 0x4],RDX MOV EDX,dword ptr [RBP + -0x38] MOV dword ptr [RBX + RSI*0x1 + 0xc],EDX MOV dword ptr [RBX + RSI*0x1 + 0x4],R11D MOV dword ptr [RAX],ECX JMP 0x00130994 LAB_001309fe: LEA RSI,[RBX + RDI*0x1] ADD RSI,0x4 MOV RDI,RCX SHL RDI,0x4 MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RBX + RDI*0x1],XMM0 LAB_00130a14: MOV EDI,R12D SHL RDI,0x4 MOV R12D,dword ptr [RBX + RDI*0x1] CMP R12D,EDX JNZ 0x00130a14 ADD RBX,RDI MOV dword ptr [RBX],ECX MOV dword ptr [RAX],0xffffffff MOV ECX,dword ptr [RBP + -0x38] MOV dword ptr [RSI + 0x8],ECX MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RSI],RCX MOV dword ptr [RAX + 0x4],R11D JMP 0x00130994 LAB_00130a45: CALL 0x00124360
int8 my_hash_update(long *param_1,long param_2,int8 param_3,long param_4) { uint *puVar1; uint uVar2; uint uVar3; uint uVar4; uint uVar5; uint uVar6; uint uVar7; long lVar8; long lVar9; ulong uVar10; int8 uVar11; uint uVar12; ulong uVar13; uint uVar14; uint *puVar15; uint uVar16; long in_FS_OFFSET; long local_50; int8 local_48; uint local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if ((code *)param_1[10] == (code *)0x0) { local_50 = param_1[1]; lVar8 = *param_1 + param_2; } else { lVar8 = (*(code *)param_1[10])(param_2,&local_50,1); } uVar5 = (*(code *)param_1[0xb])(param_1[0xd],lVar8,local_50); if (((*(byte *)(param_1 + 4) & 1) != 0) && (lVar9 = my_hash_first_from_hash_value(param_1,uVar5,lVar8,local_50,&local_48), lVar9 != 0)) { do { if (lVar9 != param_2) goto LAB_00130928; lVar9 = my_hash_next(param_1,lVar8,local_50,&local_48); } while (lVar9 != 0); } lVar8 = param_1[5]; uVar10 = param_1[2]; uVar2 = *(uint *)(param_1 + 3); if (param_4 == 0) { param_4 = param_1[1]; } uVar6 = (*(code *)param_1[0xb])(param_1[0xd],param_3,param_4); uVar14 = (int)uVar10 - 1; uVar16 = (int)(uVar10 >> 1) - 1; uVar7 = uVar6 & uVar16; if ((uVar14 & uVar6) < uVar2) { uVar7 = uVar14 & uVar6; } uVar10 = (ulong)uVar7; uVar6 = uVar5 & uVar16; if ((uVar14 & uVar5) < uVar2) { uVar6 = uVar14 & uVar5; } puVar1 = (uint *)(lVar8 + uVar10 * 0x10); if (*(long *)(lVar8 + 8 + uVar10 * 0x10) == param_2) { if (uVar7 != uVar6) { uVar13 = (ulong)*puVar1; local_40 = puVar1[3]; local_48 = *(int8 *)(puVar1 + 1); if (uVar13 != 0xffffffff) { puVar15 = (uint *)(lVar8 + uVar13 * 0x10); uVar12 = puVar15[1]; uVar3 = puVar15[2]; uVar4 = puVar15[3]; *puVar1 = *puVar15; puVar1[1] = uVar12; puVar1[2] = uVar3; puVar1[3] = uVar4; uVar10 = uVar13; } goto LAB_00130965; } LAB_00130933: lVar9 = uVar10 << 4; LAB_0013098f: *(uint *)(lVar8 + 4 + lVar9) = uVar5; } else { do { puVar15 = puVar1; uVar12 = *puVar15; uVar10 = (ulong)uVar12; if (uVar10 == 0xffffffff) goto LAB_00130928; puVar1 = (uint *)(lVar8 + uVar10 * 0x10); } while (*(long *)(lVar8 + 8 + uVar10 * 0x10) != param_2); if (uVar7 == uVar6) goto LAB_00130933; local_40 = puVar1[3]; local_48 = *(int8 *)(puVar1 + 1); *puVar15 = *puVar1; uVar7 = uVar12; LAB_00130965: uVar12 = (uint)uVar10; if (uVar12 == uVar6) { if (uVar12 != uVar7) { *(uint *)(lVar8 + 0xc + uVar10 * 0x10) = local_40; *(int8 *)(lVar8 + 4 + uVar10 * 0x10) = local_48; } lVar9 = uVar10 * 0x10; *(int4 *)(lVar8 + lVar9) = 0xffffffff; goto LAB_0013098f; } lVar9 = (ulong)uVar6 * 0x10; puVar1 = (uint *)(lVar8 + lVar9); uVar7 = *(uint *)(lVar8 + 4 + lVar9); uVar14 = uVar14 & uVar7; uVar7 = uVar16 & uVar7; if (uVar14 < uVar2) { uVar7 = uVar14; } if (uVar6 == uVar7) { lVar9 = uVar10 * 0x10; *(uint *)(lVar8 + lVar9) = *puVar1; *(int8 *)(lVar8 + 4 + lVar9) = local_48; *(uint *)(lVar8 + 0xc + lVar9) = local_40; *(uint *)(lVar8 + 4 + lVar9) = uVar5; *puVar1 = uVar12; } else { uVar2 = puVar1[1]; uVar14 = puVar1[2]; uVar16 = puVar1[3]; puVar15 = (uint *)(lVar8 + uVar10 * 0x10); *puVar15 = *puVar1; puVar15[1] = uVar2; puVar15[2] = uVar14; puVar15[3] = uVar16; do { uVar10 = (ulong)uVar7; uVar7 = *(uint *)(lVar8 + uVar10 * 0x10); } while (uVar7 != uVar6); *(uint *)(lVar8 + uVar10 * 0x10) = uVar12; *puVar1 = 0xffffffff; *(uint *)(lVar8 + lVar9 + 0xc) = local_40; *(int8 *)(lVar8 + lVar9 + 4) = local_48; puVar1[1] = uVar5; } } uVar11 = 0; LAB_00130996: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar11; LAB_00130928: uVar11 = 1; goto LAB_00130996; }
47,684
Binary_string::copy_or_move(char const*, unsigned long)
eloqsql/sql/sql_string.cc
bool Binary_string::copy_or_move(const char *str, size_t arg_length) { DBUG_ASSERT(arg_length < UINT_MAX32); if (alloc(arg_length+1)) return TRUE; if ((str_length=uint32(arg_length))) memmove(Ptr,str,arg_length); Ptr[arg_length]=0; return FALSE; }
O0
cpp
Binary_string::copy_or_move(char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x77fde movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x1, %rsi callq 0x79f40 testb $0x1, %al jne 0x77ff5 jmp 0x77ffb movb $0x1, -0x1(%rbp) jmp 0x78032 movq -0x28(%rbp), %rcx movq -0x20(%rbp), %rax movl %eax, 0x8(%rcx) cmpl $0x0, %eax je 0x7801f movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x60190 movq -0x28(%rbp), %rax movq (%rax), %rax movq -0x20(%rbp), %rcx movb $0x0, (%rax,%rcx) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN13Binary_string12copy_or_moveEPKcm: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov [rbp+var_28], rax jmp short $+2 loc_77FDE: mov rdi, [rbp+var_28]; this mov rsi, [rbp+var_20] add rsi, 1; unsigned __int64 call _ZN13Binary_string5allocEm; Binary_string::alloc(ulong) test al, 1 jnz short loc_77FF5 jmp short loc_77FFB loc_77FF5: mov [rbp+var_1], 1 jmp short loc_78032 loc_77FFB: mov rcx, [rbp+var_28] mov rax, [rbp+var_20] mov [rcx+8], eax cmp eax, 0 jz short loc_7801F mov rax, [rbp+var_28] mov rdi, [rax] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memmove loc_7801F: mov rax, [rbp+var_28] mov rax, [rax] mov rcx, [rbp+var_20] mov byte ptr [rax+rcx], 0 mov [rbp+var_1], 0 loc_78032: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char Binary_string::copy_or_move(Binary_string *this, const char *a2, long long a3) { if ( (Binary_string::alloc(this, a3 + 1) & 1) != 0 ) return 1; *((_DWORD *)this + 2) = a3; if ( (_DWORD)a3 ) memmove(*(_QWORD *)this, a2, a3); *(_BYTE *)(*(_QWORD *)this + a3) = 0; return 0; }
copy_or_move: 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 RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX JMP 0x00177fde LAB_00177fde: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x1 CALL 0x00179f40 TEST AL,0x1 JNZ 0x00177ff5 JMP 0x00177ffb LAB_00177ff5: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00178032 LAB_00177ffb: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RCX + 0x8],EAX CMP EAX,0x0 JZ 0x0017801f MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00160190 LAB_0017801f: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + RCX*0x1],0x0 MOV byte ptr [RBP + -0x1],0x0 LAB_00178032: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x30 POP RBP RET
/* Binary_string::copy_or_move(char const*, unsigned long) */ int1 __thiscall Binary_string::copy_or_move(Binary_string *this,char *param_1,ulong param_2) { ulong uVar1; int1 local_9; uVar1 = alloc(this,param_2 + 1); if ((uVar1 & 1) == 0) { *(int *)(this + 8) = (int)param_2; if ((int)param_2 != 0) { memmove(*(void **)this,param_1,param_2); } *(int1 *)(*(long *)this + param_2) = 0; local_9 = 0; } else { local_9 = 1; } return local_9; }
47,685
LefDefParser::lefwLayerRoutingMinwidth(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingMinwidth(double width) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING) return LEFW_BAD_ORDER; if (!lefwIsRouting) return LEFW_BAD_DATA; // only routing calls this func if (prtSemiColon) { // the previous statement hasn't written the ; yet if (lefwWriteEncrypt) encPrint(lefwFile, (char*) ";\n"); else fprintf(lefwFile, ";\n"); prtSemiColon = 0; } if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " MINWIDTH %.11g ;\n", width); else fprintf(lefwFile, " MINWIDTH %.11g ;\n", width); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerRoutingMinwidth(double): pushq %rbx subq $0x10, %rsp leaq 0x78cfa(%rip), %rbx # 0x8d0f0 movq (%rbx), %rcx testq %rcx, %rcx je 0x14451 leaq 0x78f3b(%rip), %rax # 0x8d340 movl (%rax), %edx cmpl $0x1f, %edx je 0x1441a movl $0x2, %eax cmpl $0x7, %edx jne 0x144b7 leaq 0x78f93(%rip), %rax # 0x8d3b4 cmpl $0x0, (%rax) je 0x14458 cmpb $0x1, 0x78fb7(%rip) # 0x8d3e4 jne 0x14482 movsd %xmm0, 0x8(%rsp) cmpb $0x1, 0x78fa0(%rip) # 0x8d3dc jne 0x1445f leaq 0x463bc(%rip), %rsi # 0x5a801 movq %rcx, %rdi xorl %eax, %eax callq 0x55afd jmp 0x14475 movl $0x1, %eax jmp 0x144b7 movl $0x3, %eax jmp 0x144b7 leaq 0x4639b(%rip), %rdi # 0x5a801 movl $0x2, %esi movl $0x1, %edx callq 0x23d0 movb $0x0, 0x78f68(%rip) # 0x8d3e4 movsd 0x8(%rsp), %xmm0 movq (%rbx), %rdi cmpb $0x1, 0x78f50(%rip) # 0x8d3dc jne 0x1449e leaq 0x46c8b(%rip), %rsi # 0x5b120 movb $0x1, %al callq 0x55afd jmp 0x144ac leaq 0x46c7b(%rip), %rsi # 0x5b120 movb $0x1, %al callq 0x22e0 leaq 0x78e89(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbx retq
_ZN12LefDefParser24lefwLayerRoutingMinwidthEd: push rbx sub rsp, 10h lea rbx, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [rbx] test rcx, rcx jz short loc_14451 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rax] cmp edx, 1Fh jz short loc_1441A mov eax, 2 cmp edx, 7 jnz loc_144B7 loc_1441A: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jz short loc_14458 cmp cs:_ZN12LefDefParserL12prtSemiColonE, 1; LefDefParser::prtSemiColon jnz short loc_14482 movsd [rsp+18h+var_10], xmm0 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_1445F lea rsi, aDividercharS+11h; ";\n" mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_14475 loc_14451: mov eax, 1 jmp short loc_144B7 loc_14458: mov eax, 3 jmp short loc_144B7 loc_1445F: lea rdi, aDividercharS+11h; ";\n" mov esi, 2 mov edx, 1 call _fwrite loc_14475: mov cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon movsd xmm0, [rsp+18h+var_10] loc_14482: mov rdi, [rbx] cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_1449E lea rsi, aMinwidth11g; " MINWIDTH %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_144AC loc_1449E: lea rsi, aMinwidth11g; " MINWIDTH %.11g ;\n" mov al, 1 call _fprintf loc_144AC: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax loc_144B7: add rsp, 10h pop rbx retn
long long LefDefParser::lefwLayerRoutingMinwidth( LefDefParser *this, double a2, long long a3, long long a4, long long a5, int a6, int a7) { int v7; // ecx unsigned int v8; // edx long long result; // rax v7 = LefDefParser::lefwFile; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; v8 = LefDefParser::lefwState; if ( LefDefParser::lefwState == 31 || (result = 2LL, LefDefParser::lefwState == 7) ) { if ( LefDefParser::lefwIsRouting ) { if ( LefDefParser::prtSemiColon == 1 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)";\n", LefDefParser::lefwState, LefDefParser::lefwFile, a6, a7); else fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); LefDefParser::prtSemiColon = 0; } if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" MINWIDTH %.11g ;\n", v8, v7, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " MINWIDTH %.11g ;\n", a2); ++LefDefParser::lefwLines; return 0LL; } else { return 3LL; } } return result; }
lefwLayerRoutingMinwidth: PUSH RBX SUB RSP,0x10 LEA RBX,[0x18d0f0] MOV RCX,qword ptr [RBX] TEST RCX,RCX JZ 0x00114451 LEA RAX,[0x18d340] MOV EDX,dword ptr [RAX] CMP EDX,0x1f JZ 0x0011441a MOV EAX,0x2 CMP EDX,0x7 JNZ 0x001144b7 LAB_0011441a: LEA RAX,[0x18d3b4] CMP dword ptr [RAX],0x0 JZ 0x00114458 CMP byte ptr [0x0018d3e4],0x1 JNZ 0x00114482 MOVSD qword ptr [RSP + 0x8],XMM0 CMP byte ptr [0x0018d3dc],0x1 JNZ 0x0011445f LEA RSI,[0x15a801] MOV RDI,RCX XOR EAX,EAX CALL 0x00155afd JMP 0x00114475 LAB_00114451: MOV EAX,0x1 JMP 0x001144b7 LAB_00114458: MOV EAX,0x3 JMP 0x001144b7 LAB_0011445f: LEA RDI,[0x15a801] MOV ESI,0x2 MOV EDX,0x1 CALL 0x001023d0 LAB_00114475: MOV byte ptr [0x0018d3e4],0x0 MOVSD XMM0,qword ptr [RSP + 0x8] LAB_00114482: MOV RDI,qword ptr [RBX] CMP byte ptr [0x0018d3dc],0x1 JNZ 0x0011449e LEA RSI,[0x15b120] MOV AL,0x1 CALL 0x00155afd JMP 0x001144ac LAB_0011449e: LEA RSI,[0x15b120] MOV AL,0x1 CALL 0x001022e0 LAB_001144ac: LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX LAB_001144b7: ADD RSP,0x10 POP RBX RET
/* LefDefParser::lefwLayerRoutingMinwidth(double) */ int8 LefDefParser::lefwLayerRoutingMinwidth(double param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else if ((lefwState == 0x1f) || (uVar1 = 2, lefwState == 7)) { if (lefwIsRouting == 0) { uVar1 = 3; } else { if (prtSemiColon == '\x01') { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,";\n"); } else { fwrite(";\n",2,1,lefwFile); } prtSemiColon = '\0'; } if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," MINWIDTH %.11g ;\n"); } else { fprintf(lefwFile," MINWIDTH %.11g ;\n",param_1); } lefwLines = lefwLines + 1; uVar1 = 0; } } return uVar1; }
47,686
rb_delete_fixup
eloqsql/mysys/tree.c
static void rb_delete_fixup(TREE *tree, TREE_ELEMENT ***parent) { TREE_ELEMENT *x,*w,*par; x= **parent; while (x != tree->root && x->colour == BLACK) { if (x == (par=parent[-1][0])->left) { w=par->right; if (w->colour == RED) { w->colour=BLACK; par->colour=RED; left_rotate(parent[-1],par); parent[0]= &w->left; *++parent= &par->left; w=par->right; } if (w->left->colour == BLACK && w->right->colour == BLACK) { w->colour=RED; x=par; parent--; } else { if (w->right->colour == BLACK) { w->left->colour=BLACK; w->colour=RED; right_rotate(&par->right,w); w=par->right; } w->colour=par->colour; par->colour=BLACK; w->right->colour=BLACK; left_rotate(parent[-1],par); x=tree->root; break; } } else { w=par->left; if (w->colour == RED) { w->colour=BLACK; par->colour=RED; right_rotate(parent[-1],par); parent[0]= &w->right; *++parent= &par->right; w=par->left; } if (w->right->colour == BLACK && w->left->colour == BLACK) { w->colour=RED; x=par; parent--; } else { if (w->left->colour == BLACK) { w->right->colour=BLACK; w->colour=RED; left_rotate(&par->left,w); w=par->left; } w->colour=par->colour; par->colour=BLACK; w->left->colour=BLACK; right_rotate(parent[-1],par); x=tree->root; break; } } } x->colour=BLACK; }
O0
c
rb_delete_fixup: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq (%rdx), %rcx movb %al, -0x29(%rbp) je 0x873b3 movq -0x18(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0x873bf jmp 0x8772a movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq -0x8(%rcx), %rcx movq (%rcx), %rcx movq %rcx, -0x28(%rbp) cmpq (%rcx), %rax jne 0x87583 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x0, %eax jne 0x8745e movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq -0x8(%rax), %rdi movq -0x28(%rbp), %rsi callq 0x88360 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x10(%rbp) movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0x874af movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0x874af movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax addq $-0x8, %rax movq %rax, -0x10(%rbp) jmp 0x8757e movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0x8750b movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rdi addq $0x8, %rdi movq -0x20(%rbp), %rsi callq 0x883a0 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax movl 0x10(%rax), %edx shrl $0x1f, %edx movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x1, %edx shll $0x1f, %edx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl %edx, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq -0x8(%rax), %rdi movq -0x28(%rbp), %rsi callq 0x88360 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0x8772a jmp 0x87725 movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x0, %eax jne 0x8760c movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq -0x8(%rax), %rdi movq -0x28(%rbp), %rsi callq 0x883a0 movq -0x20(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x10(%rbp) movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0x8765d movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0x8765d movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax addq $-0x8, %rax movq %rax, -0x10(%rbp) jmp 0x87723 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0x876b4 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x88360 movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax movl 0x10(%rax), %edx shrl $0x1f, %edx movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x1, %edx shll $0x1f, %edx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl %edx, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq -0x8(%rax), %rdi movq -0x28(%rbp), %rsi callq 0x883a0 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0x8772a jmp 0x87725 jmp 0x8738e movq -0x18(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rb_delete_fixup: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax] mov [rbp+var_18], rax loc_8738E: mov rcx, [rbp+var_18] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx] mov [rbp+var_29], al jz short loc_873B3 mov rax, [rbp+var_18] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 setz al mov [rbp+var_29], al loc_873B3: mov al, [rbp+var_29] test al, 1 jnz short loc_873BF jmp loc_8772A loc_873BF: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov rcx, [rcx-8] mov rcx, [rcx] mov [rbp+var_28], rcx cmp rax, [rcx] jnz loc_87583 mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 0 jnz short loc_8745E mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_28] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rax, [rbp+var_10] mov rdi, [rax-8] mov rsi, [rbp+var_28] call left_rotate mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov rdx, rax add rdx, 8 mov [rbp+var_10], rdx mov [rax+8], rcx mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_20], rax loc_8745E: mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_874AF mov rax, [rbp+var_20] mov rax, [rax+8] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_874AF mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rax, [rbp+var_28] mov [rbp+var_18], rax mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_10], rax jmp loc_8757E loc_874AF: mov rax, [rbp+var_20] mov rax, [rax+8] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_8750B mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rdi, [rbp+var_28] add rdi, 8 mov rsi, [rbp+var_20] call right_rotate mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_20], rax loc_8750B: mov rax, [rbp+var_28] mov edx, [rax+10h] shr edx, 1Fh mov rax, [rbp+var_20] mov ecx, [rax+10h] and edx, 1 shl edx, 1Fh and ecx, 7FFFFFFFh or ecx, edx mov [rax+10h], ecx mov rax, [rbp+var_28] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_20] mov rax, [rax+8] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_10] mov rdi, [rax-8] mov rsi, [rbp+var_28] call left_rotate mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax jmp loc_8772A loc_8757E: jmp loc_87725 loc_87583: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 0 jnz short loc_8760C mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_28] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rax, [rbp+var_10] mov rdi, [rax-8] mov rsi, [rbp+var_28] call right_rotate mov rcx, [rbp+var_20] add rcx, 8 mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_28] add rcx, 8 mov rax, [rbp+var_10] mov rdx, rax add rdx, 8 mov [rbp+var_10], rdx mov [rax+8], rcx mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax loc_8760C: mov rax, [rbp+var_20] mov rax, [rax+8] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_8765D mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_8765D mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rax, [rbp+var_28] mov [rbp+var_18], rax mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_10], rax jmp loc_87723 loc_8765D: mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_876B4 mov rax, [rbp+var_20] mov rax, [rax+8] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] call left_rotate mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax loc_876B4: mov rax, [rbp+var_28] mov edx, [rax+10h] shr edx, 1Fh mov rax, [rbp+var_20] mov ecx, [rax+10h] and edx, 1 shl edx, 1Fh and ecx, 7FFFFFFFh or ecx, edx mov [rax+10h], ecx mov rax, [rbp+var_28] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_10] mov rdi, [rax-8] mov rsi, [rbp+var_28] call right_rotate mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax jmp short loc_8772A loc_87723: jmp short $+2 loc_87725: jmp loc_8738E loc_8772A: mov rax, [rbp+var_18] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx add rsp, 30h pop rbp retn
long long * rb_delete_fixup(long long **a1, _QWORD **a2) { _QWORD *v2; // rax _QWORD *v3; // rax long long *result; // rax bool v5; // [rsp+7h] [rbp-29h] long long *v6; // [rsp+8h] [rbp-28h] long long v7; // [rsp+10h] [rbp-20h] long long v8; // [rsp+10h] [rbp-20h] long long *v9; // [rsp+18h] [rbp-18h] _QWORD *v10; // [rsp+20h] [rbp-10h] v10 = a2; v9 = (long long *)**a2; while ( 1 ) { v5 = 0; if ( v9 != *a1 ) v5 = *((_DWORD *)v9 + 4) >> 31 == 1; if ( !v5 ) break; v6 = *(long long **)*(v10 - 1); if ( v9 == (long long *)*v6 ) { v7 = v6[1]; if ( *(int *)(v7 + 16) >= 0 ) { *(_DWORD *)(v7 + 16) = *(_DWORD *)(v7 + 16) & 0x7FFFFFFF | 0x80000000; *((_DWORD *)v6 + 4) &= ~0x80000000; left_rotate(*(v10 - 1), v6); *v10 = v7; v2 = v10++; v2[1] = v6; v7 = v6[1]; } if ( *(_DWORD *)(*(_QWORD *)v7 + 16LL) >> 31 != 1 || *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) >> 31 != 1 ) { if ( *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) >> 31 == 1 ) { *(_DWORD *)(*(_QWORD *)v7 + 16LL) = *(_DWORD *)(*(_QWORD *)v7 + 16LL) & 0x7FFFFFFF | 0x80000000; *(_DWORD *)(v7 + 16) &= ~0x80000000; right_rotate(v6 + 1, v7); v7 = v6[1]; } *(_DWORD *)(v7 + 16) = (*((_DWORD *)v6 + 4) >> 31 << 31) | *(_DWORD *)(v7 + 16) & 0x7FFFFFFF; *((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000; *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) = *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) & 0x7FFFFFFF | 0x80000000; left_rotate(*(v10 - 1), v6); v9 = *a1; break; } *(_DWORD *)(v7 + 16) &= ~0x80000000; v9 = v6; --v10; } else { v8 = *v6; if ( *(int *)(*v6 + 16) >= 0 ) { *(_DWORD *)(v8 + 16) = *(_DWORD *)(v8 + 16) & 0x7FFFFFFF | 0x80000000; *((_DWORD *)v6 + 4) &= ~0x80000000; right_rotate(*(v10 - 1), v6); *v10 = v8 + 8; v3 = v10++; v3[1] = v6 + 1; v8 = *v6; } if ( *(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) >> 31 != 1 || *(_DWORD *)(*(_QWORD *)v8 + 16LL) >> 31 != 1 ) { if ( *(_DWORD *)(*(_QWORD *)v8 + 16LL) >> 31 == 1 ) { *(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) = *(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) & 0x7FFFFFFF | 0x80000000; *(_DWORD *)(v8 + 16) &= ~0x80000000; left_rotate(v6, v8); v8 = *v6; } *(_DWORD *)(v8 + 16) = (*((_DWORD *)v6 + 4) >> 31 << 31) | *(_DWORD *)(v8 + 16) & 0x7FFFFFFF; *((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000; *(_DWORD *)(*(_QWORD *)v8 + 16LL) = *(_DWORD *)(*(_QWORD *)v8 + 16LL) & 0x7FFFFFFF | 0x80000000; right_rotate(*(v10 - 1), v6); v9 = *a1; break; } *(_DWORD *)(v8 + 16) &= ~0x80000000; v9 = v6; --v10; } } result = v9; *((_DWORD *)v9 + 4) = v9[2] & 0x7FFFFFFF | 0x80000000; return result; }
rb_delete_fixup: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_0018738e: MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX] MOV byte ptr [RBP + -0x29],AL JZ 0x001873b3 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_001873b3: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x001873bf JMP 0x0018772a LAB_001873bf: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + -0x8] MOV RCX,qword ptr [RCX] MOV qword ptr [RBP + -0x28],RCX CMP RAX,qword ptr [RCX] JNZ 0x00187583 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x0 JNZ 0x0018745e MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00188360 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX LAB_0018745e: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001874af MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001874af MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x0018757e LAB_001874af: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x0018750b MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x20] CALL 0x001883a0 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX LAB_0018750b: MOV RAX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RAX + 0x10] SHR EDX,0x1f MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND EDX,0x1 SHL EDX,0x1f AND ECX,0x7fffffff OR ECX,EDX MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00188360 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x0018772a LAB_0018757e: JMP 0x00187725 LAB_00187583: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x0 JNZ 0x0018760c MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001883a0 MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_0018760c: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x0018765d MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x0018765d MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x00187723 LAB_0018765d: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001876b4 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00188360 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_001876b4: MOV RAX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RAX + 0x10] SHR EDX,0x1f MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND EDX,0x1 SHL EDX,0x1f AND ECX,0x7fffffff OR ECX,EDX MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001883a0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x0018772a LAB_00187723: JMP 0x00187725 LAB_00187725: JMP 0x0018738e LAB_0018772a: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX ADD RSP,0x30 POP RBP RET
void rb_delete_fixup(long *param_1,long *param_2) { long *plVar1; bool bVar2; long *local_28; long *local_20; long *local_18; local_20 = *(long **)*param_2; local_18 = param_2; do { bVar2 = false; if (local_20 != (long *)*param_1) { bVar2 = (int)local_20[2] < 0; } if (!bVar2) goto LAB_0018772a; plVar1 = *(long **)local_18[-1]; if (local_20 == (long *)*plVar1) { local_28 = (long *)plVar1[1]; if (-1 < (int)local_28[2]) { *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | 0x80000000; *(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff; left_rotate(local_18[-1],plVar1); *local_18 = (long)local_28; local_18[1] = (long)plVar1; local_28 = (long *)plVar1[1]; local_18 = local_18 + 1; } if ((-1 < *(int *)(*local_28 + 0x10)) || (-1 < *(int *)(local_28[1] + 0x10))) { if (*(int *)(local_28[1] + 0x10) < 0) { *(uint *)(*local_28 + 0x10) = *(uint *)(*local_28 + 0x10) & 0x7fffffff | 0x80000000; *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff; right_rotate(plVar1 + 1,local_28); local_28 = (long *)plVar1[1]; } *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | *(uint *)(plVar1 + 2) & 0x80000000; *(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff | 0x80000000; *(uint *)(local_28[1] + 0x10) = *(uint *)(local_28[1] + 0x10) & 0x7fffffff | 0x80000000; left_rotate(local_18[-1],plVar1); local_20 = (long *)*param_1; LAB_0018772a: *(uint *)(local_20 + 2) = *(uint *)(local_20 + 2) & 0x7fffffff | 0x80000000; return; } *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff; } else { local_28 = (long *)*plVar1; if (-1 < (int)local_28[2]) { *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | 0x80000000; *(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff; right_rotate(local_18[-1],plVar1); *local_18 = (long)(local_28 + 1); local_18[1] = (long)(plVar1 + 1); local_28 = (long *)*plVar1; local_18 = local_18 + 1; } if ((-1 < *(int *)(local_28[1] + 0x10)) || (-1 < *(int *)(*local_28 + 0x10))) { if (*(int *)(*local_28 + 0x10) < 0) { *(uint *)(local_28[1] + 0x10) = *(uint *)(local_28[1] + 0x10) & 0x7fffffff | 0x80000000; *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff; left_rotate(plVar1,local_28); local_28 = (long *)*plVar1; } *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | *(uint *)(plVar1 + 2) & 0x80000000; *(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff | 0x80000000; *(uint *)(*local_28 + 0x10) = *(uint *)(*local_28 + 0x10) & 0x7fffffff | 0x80000000; right_rotate(local_18[-1],plVar1); local_20 = (long *)*param_1; goto LAB_0018772a; } *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff; } local_18 = local_18 + -1; local_20 = plVar1; } while( true ); }
47,687
cs_copy_data
eloqsql/mysys/charset.c
static int cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from) { to->number= from->number ? from->number : to->number; /* Don't replace csname if already set */ if (from->cs_name.str && !to->cs_name.str) { if (!(to->cs_name.str= my_once_memdup(from->cs_name.str, from->cs_name.length + 1, MYF(MY_WME)))) goto err; to->cs_name.length= from->cs_name.length; } if (from->coll_name.str) { if (!(to->coll_name.str= my_once_memdup(from->coll_name.str, from->coll_name.length + 1, MYF(MY_WME)))) goto err; to->coll_name.length= from->coll_name.length; } if (from->comment) if (!(to->comment= my_once_strdup(from->comment,MYF(MY_WME)))) goto err; if (from->m_ctype) { if (!(to->m_ctype= (uchar*) my_once_memdup((char*) from->m_ctype, MY_CS_CTYPE_TABLE_SIZE, MYF(MY_WME)))) goto err; if (init_state_maps(to)) goto err; } if (from->to_lower) if (!(to->to_lower= (uchar*) my_once_memdup((char*) from->to_lower, MY_CS_TO_LOWER_TABLE_SIZE, MYF(MY_WME)))) goto err; if (from->to_upper) if (!(to->to_upper= (uchar*) my_once_memdup((char*) from->to_upper, MY_CS_TO_UPPER_TABLE_SIZE, MYF(MY_WME)))) goto err; if (from->sort_order) { if (!(to->sort_order= (uchar*) my_once_memdup((char*) from->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE, MYF(MY_WME)))) goto err; } if (from->tab_to_uni) { uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16); if (!(to->tab_to_uni= (uint16*) my_once_memdup((char*)from->tab_to_uni, sz, MYF(MY_WME)))) goto err; } if (from->tailoring) if (!(to->tailoring= my_once_strdup(from->tailoring,MYF(MY_WME)))) goto err; return 0; err: return 1; }
O0
c
cs_copy_data: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0x2ad24 movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x20(%rbp) jmp 0x2ad2d movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x2ad8d movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x2ad8d movq -0x18(%rbp), %rax movq 0x10(%rax), %rdi movq -0x18(%rbp), %rax movq 0x18(%rax), %rsi addq $0x1, %rsi movl $0x10, %edx callq 0x261e0 movq -0x10(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x2ad7d jmp 0x2af69 movq -0x18(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x2add9 movq -0x18(%rbp), %rax movq 0x20(%rax), %rdi movq -0x18(%rbp), %rax movq 0x28(%rax), %rsi addq $0x1, %rsi movl $0x10, %edx callq 0x261e0 movq -0x10(%rbp), %rcx movq %rax, 0x20(%rcx) cmpq $0x0, %rax jne 0x2adc9 jmp 0x2af69 movq -0x18(%rbp), %rax movq 0x28(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0x2ae0b movq -0x18(%rbp), %rax movq 0x30(%rax), %rdi movl $0x10, %esi callq 0x26180 movq -0x10(%rbp), %rcx movq %rax, 0x30(%rcx) cmpq $0x0, %rax jne 0x2ae09 jmp 0x2af69 jmp 0x2ae0b movq -0x18(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x2ae54 movq -0x18(%rbp), %rax movq 0x40(%rax), %rdi movl $0x101, %esi # imm = 0x101 movl $0x10, %edx callq 0x261e0 movq -0x10(%rbp), %rcx movq %rax, 0x40(%rcx) cmpq $0x0, %rax jne 0x2ae40 jmp 0x2af69 movq -0x10(%rbp), %rdi callq 0x2b080 cmpb $0x0, %al je 0x2ae52 jmp 0x2af69 jmp 0x2ae54 movq -0x18(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x2ae8b movq -0x18(%rbp), %rax movq 0x48(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x261e0 movq -0x10(%rbp), %rcx movq %rax, 0x48(%rcx) cmpq $0x0, %rax jne 0x2ae89 jmp 0x2af69 jmp 0x2ae8b movq -0x18(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x2aec2 movq -0x18(%rbp), %rax movq 0x50(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x261e0 movq -0x10(%rbp), %rcx movq %rax, 0x50(%rcx) cmpq $0x0, %rax jne 0x2aec0 jmp 0x2af69 jmp 0x2aec2 movq -0x18(%rbp), %rax cmpq $0x0, 0x58(%rax) je 0x2aef6 movq -0x18(%rbp), %rax movq 0x58(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x261e0 movq -0x10(%rbp), %rcx movq %rax, 0x58(%rcx) cmpq $0x0, %rax jne 0x2aef4 jmp 0x2af69 jmp 0x2aef6 movq -0x18(%rbp), %rax cmpq $0x0, 0x68(%rax) je 0x2af31 movl $0x200, -0x1c(%rbp) # imm = 0x200 movq -0x18(%rbp), %rax movq 0x68(%rax), %rdi movl -0x1c(%rbp), %eax movl %eax, %esi movl $0x10, %edx callq 0x261e0 movq -0x10(%rbp), %rcx movq %rax, 0x68(%rcx) cmpq $0x0, %rax jne 0x2af2f jmp 0x2af69 jmp 0x2af31 movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x2af60 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi movl $0x10, %esi callq 0x26180 movq -0x10(%rbp), %rcx movq %rax, 0x38(%rcx) cmpq $0x0, %rax jne 0x2af5e jmp 0x2af69 jmp 0x2af60 movl $0x0, -0x4(%rbp) jmp 0x2af70 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
cs_copy_data: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_2AD24 mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_20], eax jmp short loc_2AD2D loc_2AD24: mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_20], eax loc_2AD2D: mov ecx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_18] cmp qword ptr [rax+10h], 0 jz short loc_2AD8D mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jnz short loc_2AD8D mov rax, [rbp+var_18] mov rdi, [rax+10h] mov rax, [rbp+var_18] mov rsi, [rax+18h] add rsi, 1 mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+10h], rax cmp rax, 0 jnz short loc_2AD7D jmp loc_2AF69 loc_2AD7D: mov rax, [rbp+var_18] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax+18h], rcx loc_2AD8D: mov rax, [rbp+var_18] cmp qword ptr [rax+20h], 0 jz short loc_2ADD9 mov rax, [rbp+var_18] mov rdi, [rax+20h] mov rax, [rbp+var_18] mov rsi, [rax+28h] add rsi, 1 mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+20h], rax cmp rax, 0 jnz short loc_2ADC9 jmp loc_2AF69 loc_2ADC9: mov rax, [rbp+var_18] mov rcx, [rax+28h] mov rax, [rbp+var_10] mov [rax+28h], rcx loc_2ADD9: mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 0 jz short loc_2AE0B mov rax, [rbp+var_18] mov rdi, [rax+30h] mov esi, 10h call my_once_strdup mov rcx, [rbp+var_10] mov [rcx+30h], rax cmp rax, 0 jnz short loc_2AE09 jmp loc_2AF69 loc_2AE09: jmp short $+2 loc_2AE0B: mov rax, [rbp+var_18] cmp qword ptr [rax+40h], 0 jz short loc_2AE54 mov rax, [rbp+var_18] mov rdi, [rax+40h] mov esi, 101h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+40h], rax cmp rax, 0 jnz short loc_2AE40 jmp loc_2AF69 loc_2AE40: mov rdi, [rbp+var_10] call init_state_maps cmp al, 0 jz short loc_2AE52 jmp loc_2AF69 loc_2AE52: jmp short $+2 loc_2AE54: mov rax, [rbp+var_18] cmp qword ptr [rax+48h], 0 jz short loc_2AE8B mov rax, [rbp+var_18] mov rdi, [rax+48h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+48h], rax cmp rax, 0 jnz short loc_2AE89 jmp loc_2AF69 loc_2AE89: jmp short $+2 loc_2AE8B: mov rax, [rbp+var_18] cmp qword ptr [rax+50h], 0 jz short loc_2AEC2 mov rax, [rbp+var_18] mov rdi, [rax+50h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+50h], rax cmp rax, 0 jnz short loc_2AEC0 jmp loc_2AF69 loc_2AEC0: jmp short $+2 loc_2AEC2: mov rax, [rbp+var_18] cmp qword ptr [rax+58h], 0 jz short loc_2AEF6 mov rax, [rbp+var_18] mov rdi, [rax+58h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+58h], rax cmp rax, 0 jnz short loc_2AEF4 jmp short loc_2AF69 loc_2AEF4: jmp short $+2 loc_2AEF6: mov rax, [rbp+var_18] cmp qword ptr [rax+68h], 0 jz short loc_2AF31 mov [rbp+var_1C], 200h mov rax, [rbp+var_18] mov rdi, [rax+68h] mov eax, [rbp+var_1C] mov esi, eax mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+68h], rax cmp rax, 0 jnz short loc_2AF2F jmp short loc_2AF69 loc_2AF2F: jmp short $+2 loc_2AF31: mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jz short loc_2AF60 mov rax, [rbp+var_18] mov rdi, [rax+38h] mov esi, 10h call my_once_strdup mov rcx, [rbp+var_10] mov [rcx+38h], rax cmp rax, 0 jnz short loc_2AF5E jmp short loc_2AF69 loc_2AF5E: jmp short $+2 loc_2AF60: mov [rbp+var_4], 0 jmp short loc_2AF70 loc_2AF69: mov [rbp+var_4], 1 loc_2AF70: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long cs_copy_data(int *a1, int *a2) { char *v2; // rax char *v3; // rax char *v4; // rax char *v5; // rax char *v6; // rax char *v7; // rax char *v8; // rax char *v9; // rax char *v10; // rax int v12; // [rsp+0h] [rbp-20h] if ( *a2 ) v12 = *a2; else v12 = *a1; *a1 = v12; if ( *((_QWORD *)a2 + 2) && !*((_QWORD *)a1 + 2) ) { v2 = my_once_memdup(*((_QWORD *)a2 + 2), *((_QWORD *)a2 + 3) + 1LL, 16); *((_QWORD *)a1 + 2) = v2; if ( !v2 ) return 1; *((_QWORD *)a1 + 3) = *((_QWORD *)a2 + 3); } if ( !*((_QWORD *)a2 + 4) ) goto LABEL_11; v3 = my_once_memdup(*((_QWORD *)a2 + 4), *((_QWORD *)a2 + 5) + 1LL, 16); *((_QWORD *)a1 + 4) = v3; if ( !v3 ) return 1; *((_QWORD *)a1 + 5) = *((_QWORD *)a2 + 5); LABEL_11: if ( *((_QWORD *)a2 + 6) ) { v4 = my_once_strdup(*((_QWORD *)a2 + 6), 16); *((_QWORD *)a1 + 6) = v4; if ( !v4 ) return 1; } if ( *((_QWORD *)a2 + 8) ) { v5 = my_once_memdup(*((_QWORD *)a2 + 8), 257LL, 16); *((_QWORD *)a1 + 8) = v5; if ( !v5 || (unsigned __int8)init_state_maps(a1) ) return 1; } if ( *((_QWORD *)a2 + 9) ) { v6 = my_once_memdup(*((_QWORD *)a2 + 9), 256LL, 16); *((_QWORD *)a1 + 9) = v6; if ( !v6 ) return 1; } if ( *((_QWORD *)a2 + 10) ) { v7 = my_once_memdup(*((_QWORD *)a2 + 10), 256LL, 16); *((_QWORD *)a1 + 10) = v7; if ( !v7 ) return 1; } if ( *((_QWORD *)a2 + 11) ) { v8 = my_once_memdup(*((_QWORD *)a2 + 11), 256LL, 16); *((_QWORD *)a1 + 11) = v8; if ( !v8 ) return 1; } if ( *((_QWORD *)a2 + 13) ) { v9 = my_once_memdup(*((_QWORD *)a2 + 13), 512LL, 16); *((_QWORD *)a1 + 13) = v9; if ( !v9 ) return 1; } if ( *((_QWORD *)a2 + 7) ) { v10 = my_once_strdup(*((_QWORD *)a2 + 7), 16); *((_QWORD *)a1 + 7) = v10; if ( !v10 ) return 1; } return 0; }
cs_copy_data: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x0012ad24 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX JMP 0x0012ad2d LAB_0012ad24: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX LAB_0012ad2d: MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x10],0x0 JZ 0x0012ad8d MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0012ad8d MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x18] ADD RSI,0x1 MOV EDX,0x10 CALL 0x001261e0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x0012ad7d JMP 0x0012af69 LAB_0012ad7d: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX LAB_0012ad8d: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x20],0x0 JZ 0x0012add9 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x28] ADD RSI,0x1 MOV EDX,0x10 CALL 0x001261e0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x20],RAX CMP RAX,0x0 JNZ 0x0012adc9 JMP 0x0012af69 LAB_0012adc9: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],RCX LAB_0012add9: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x0 JZ 0x0012ae0b MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x30] MOV ESI,0x10 CALL 0x00126180 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x30],RAX CMP RAX,0x0 JNZ 0x0012ae09 JMP 0x0012af69 LAB_0012ae09: JMP 0x0012ae0b LAB_0012ae0b: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0012ae54 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x40] MOV ESI,0x101 MOV EDX,0x10 CALL 0x001261e0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x40],RAX CMP RAX,0x0 JNZ 0x0012ae40 JMP 0x0012af69 LAB_0012ae40: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012b080 CMP AL,0x0 JZ 0x0012ae52 JMP 0x0012af69 LAB_0012ae52: JMP 0x0012ae54 LAB_0012ae54: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x48],0x0 JZ 0x0012ae8b MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x48] MOV ESI,0x100 MOV EDX,0x10 CALL 0x001261e0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x48],RAX CMP RAX,0x0 JNZ 0x0012ae89 JMP 0x0012af69 LAB_0012ae89: JMP 0x0012ae8b LAB_0012ae8b: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x50],0x0 JZ 0x0012aec2 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x50] MOV ESI,0x100 MOV EDX,0x10 CALL 0x001261e0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x50],RAX CMP RAX,0x0 JNZ 0x0012aec0 JMP 0x0012af69 LAB_0012aec0: JMP 0x0012aec2 LAB_0012aec2: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x58],0x0 JZ 0x0012aef6 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x58] MOV ESI,0x100 MOV EDX,0x10 CALL 0x001261e0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x58],RAX CMP RAX,0x0 JNZ 0x0012aef4 JMP 0x0012af69 LAB_0012aef4: JMP 0x0012aef6 LAB_0012aef6: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x68],0x0 JZ 0x0012af31 MOV dword ptr [RBP + -0x1c],0x200 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x68] MOV EAX,dword ptr [RBP + -0x1c] MOV ESI,EAX MOV EDX,0x10 CALL 0x001261e0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x68],RAX CMP RAX,0x0 JNZ 0x0012af2f JMP 0x0012af69 LAB_0012af2f: JMP 0x0012af31 LAB_0012af31: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0012af60 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] MOV ESI,0x10 CALL 0x00126180 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x38],RAX CMP RAX,0x0 JNZ 0x0012af5e JMP 0x0012af69 LAB_0012af5e: JMP 0x0012af60 LAB_0012af60: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012af70 LAB_0012af69: MOV dword ptr [RBP + -0x4],0x1 LAB_0012af70: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 cs_copy_data(int *param_1,int *param_2) { char cVar1; long lVar2; int local_28; int4 local_c; if (*param_2 == 0) { local_28 = *param_1; } else { local_28 = *param_2; } *param_1 = local_28; if ((*(long *)(param_2 + 4) == 0) || (*(long *)(param_1 + 4) != 0)) { LAB_0012ad8d: if (*(long *)(param_2 + 8) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 8),*(long *)(param_2 + 10) + 1,0x10); *(long *)(param_1 + 8) = lVar2; if (lVar2 == 0) goto LAB_0012af69; *(int8 *)(param_1 + 10) = *(int8 *)(param_2 + 10); } if (*(long *)(param_2 + 0xc) != 0) { lVar2 = my_once_strdup(*(int8 *)(param_2 + 0xc),0x10); *(long *)(param_1 + 0xc) = lVar2; if (lVar2 == 0) goto LAB_0012af69; } if (*(long *)(param_2 + 0x10) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x10),0x101,0x10); *(long *)(param_1 + 0x10) = lVar2; if ((lVar2 == 0) || (cVar1 = init_state_maps(param_1), cVar1 != '\0')) goto LAB_0012af69; } if (*(long *)(param_2 + 0x12) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x12),0x100,0x10); *(long *)(param_1 + 0x12) = lVar2; if (lVar2 == 0) goto LAB_0012af69; } if (*(long *)(param_2 + 0x14) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x14),0x100,0x10); *(long *)(param_1 + 0x14) = lVar2; if (lVar2 == 0) goto LAB_0012af69; } if (*(long *)(param_2 + 0x16) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x16),0x100,0x10); *(long *)(param_1 + 0x16) = lVar2; if (lVar2 == 0) goto LAB_0012af69; } if (*(long *)(param_2 + 0x1a) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x1a),0x200,0x10); *(long *)(param_1 + 0x1a) = lVar2; if (lVar2 == 0) goto LAB_0012af69; } if (*(long *)(param_2 + 0xe) != 0) { lVar2 = my_once_strdup(*(int8 *)(param_2 + 0xe),0x10); *(long *)(param_1 + 0xe) = lVar2; if (lVar2 == 0) goto LAB_0012af69; } local_c = 0; } else { lVar2 = my_once_memdup(*(int8 *)(param_2 + 4),*(long *)(param_2 + 6) + 1,0x10); *(long *)(param_1 + 4) = lVar2; if (lVar2 != 0) { *(int8 *)(param_1 + 6) = *(int8 *)(param_2 + 6); goto LAB_0012ad8d; } LAB_0012af69: local_c = 1; } return local_c; }
47,688
google::protobuf::compiler::cpp::(anonymous namespace)::ReinterpretCast(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/message_field.cc
std::string ReinterpretCast(const std::string& type, const std::string& expression, bool implicit_weak_field) { if (implicit_weak_field) { return "reinterpret_cast< " + type + " >(" + expression + ")"; } else { return expression; } }
O0
cpp
google::protobuf::compiler::cpp::(anonymous namespace)::ReinterpretCast(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): subq $0xa8, %rsp movq %rdi, 0x8(%rsp) movb %cl, %al movq %rdi, %rcx movq %rcx, 0x10(%rsp) movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq %rdx, 0x90(%rsp) andb $0x1, %al movb %al, 0x8f(%rsp) testb $0x1, 0x8f(%rsp) je 0x18e928 movq 0x98(%rsp), %rdx leaq 0x24c014(%rip), %rsi # 0x3da878 leaq 0x28(%rsp), %rdi movq %rdi, (%rsp) callq 0x4d3a0 movq (%rsp), %rsi leaq 0x24c00e(%rip), %rdx # 0x3da88b leaq 0x48(%rsp), %rdi callq 0x38840 jmp 0x18e889 movq 0x90(%rsp), %rdx leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x288b0 jmp 0x18e8a2 movq 0x8(%rsp), %rdi leaq 0x21d85a(%rip), %rdx # 0x3ac108 leaq 0x68(%rsp), %rsi callq 0x38840 jmp 0x18e8ba leaq 0x68(%rsp), %rdi callq 0x21cc8 leaq 0x48(%rsp), %rdi callq 0x21cc8 leaq 0x28(%rsp), %rdi callq 0x21cc8 jmp 0x18e93a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) jmp 0x18e91c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) jmp 0x18e912 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x68(%rsp), %rdi callq 0x21cc8 leaq 0x48(%rsp), %rdi callq 0x21cc8 leaq 0x28(%rsp), %rdi callq 0x21cc8 jmp 0x18e947 movq 0x8(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0x21160 movq 0x10(%rsp), %rax addq $0xa8, %rsp retq movq 0x20(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax)
_ZN6google8protobuf8compiler3cpp12_GLOBAL__N_115ReinterpretCastERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_b: sub rsp, 0A8h mov qword ptr [rsp+0A8h+var_A0], rdi; int mov al, cl mov rcx, rdi; int mov [rsp+0A8h+var_98], rcx; void * mov [rsp+0A8h+var_8], rdi mov qword ptr [rsp+0A8h+var_10], rsi mov [rsp+0A8h+var_18], rdx and al, 1 mov [rsp+0A8h+var_19], al test [rsp+0A8h+var_19], 1 jz loc_18E928 mov rdx, qword ptr [rsp+0A8h+var_10]; int lea rsi, aReinterpretCas; "reinterpret_cast< " lea rdi, [rsp+0A8h+var_80]; int mov qword ptr [rsp+0A8h+var_A8], rdi; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rsi, qword ptr [rsp+0A8h+var_A8] lea rdx, asc_3DA88B; " >(" lea rdi, [rsp+0A8h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_18E889: mov rdx, [rsp+0A8h+var_18] lea rdi, [rsp+0A8h+var_40] lea rsi, [rsp+0A8h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) jmp short $+2 loc_18E8A2: mov rdi, qword ptr [rsp+0A8h+var_A0] lea rdx, a1_1+5; ")" lea rsi, [rsp+0A8h+var_40] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_18E8BA: lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_18E93A mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax jmp short loc_18E91C mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax jmp short loc_18E912 mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_18E912: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_18E91C: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_18E947 loc_18E928: mov rdi, qword ptr [rsp+0A8h+var_A0] mov rsi, [rsp+0A8h+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) loc_18E93A: mov rax, [rsp+0A8h+var_98] add rsp, 0A8h retn loc_18E947: mov rdi, [rsp+arg_18] call __Unwind_Resume
long long google::protobuf::compiler::cpp::`anonymous namespace'::ReinterpretCast( long long a1, long long a2, long long a3, char a4) { int v5[8]; // [rsp+28h] [rbp-80h] BYREF _BYTE v6[32]; // [rsp+48h] [rbp-60h] BYREF _BYTE v7[40]; // [rsp+68h] [rbp-40h] BYREF long long v8; // [rsp+90h] [rbp-18h] int v9[2]; // [rsp+98h] [rbp-10h] long long v10; // [rsp+A0h] [rbp-8h] v10 = a1; *(_QWORD *)v9 = a2; v8 = a3; v7[39] = a4 & 1; if ( (a4 & 1) != 0 ) { std::operator+<char>((long long)v5, (long long)"reinterpret_cast< ", *(long long *)v9); std::operator+<char>((long long)v6, (long long)v5, (long long)" >("); std::operator+<char>((long long)v7, (long long)v6, v8); std::operator+<char>(a1, (long long)v7, (long long)")"); std::string::~string(v7); std::string::~string(v6); std::string::~string(v5); } else { std::string::basic_string(a1, v8); } return a1; }
__find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>>: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x58],RDX LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0x68] CALL 0x0018ea40 SAR RAX,0x2 MOV qword ptr [RSP + 0x48],RAX LAB_0018e83b: CMP qword ptr [RSP + 0x48],0x0 JLE 0x0018e93a MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x40],RAX MOV RSI,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x58] CALL 0x0018ea80 TEST AL,0x1 JNZ 0x0018e866 JMP 0x0018e875 LAB_0018e866: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x70],RAX JMP 0x0018ea1e LAB_0018e875: LEA RDI,[RSP + 0x68] CALL 0x0016f560 MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x38],RAX MOV RSI,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0x58] CALL 0x0018ea80 TEST AL,0x1 JNZ 0x0018e89e JMP 0x0018e8ad LAB_0018e89e: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x70],RAX JMP 0x0018ea1e LAB_0018e8ad: LEA RDI,[RSP + 0x68] CALL 0x0016f560 MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x30],RAX MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x58] CALL 0x0018ea80 TEST AL,0x1 JNZ 0x0018e8d6 JMP 0x0018e8e5 LAB_0018e8d6: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x70],RAX JMP 0x0018ea1e LAB_0018e8e5: LEA RDI,[RSP + 0x68] CALL 0x0016f560 MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x28],RAX MOV RSI,qword ptr [RSP + 0x28] LEA RDI,[RSP + 0x58] CALL 0x0018ea80 TEST AL,0x1 JNZ 0x0018e90e JMP 0x0018e91d LAB_0018e90e: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x70],RAX JMP 0x0018ea1e LAB_0018e91d: LEA RDI,[RSP + 0x68] CALL 0x0016f560 MOV RAX,qword ptr [RSP + 0x48] ADD RAX,-0x1 MOV qword ptr [RSP + 0x48],RAX JMP 0x0018e83b LAB_0018e93a: LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0x68] CALL 0x0018ea40 MOV RCX,RAX MOV qword ptr [RSP + 0x8],RCX SUB RAX,0x3 JA 0x0018ea14 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x4b08e8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_3: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX MOV RSI,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0x58] CALL 0x0018ea80 TEST AL,0x1 JNZ 0x0018e98f JMP 0x0018e99e LAB_0018e98f: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x70],RAX JMP 0x0018ea1e LAB_0018e99e: LEA RDI,[RSP + 0x68] CALL 0x0016f560 caseD_2: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x18],RAX MOV RSI,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x58] CALL 0x0018ea80 TEST AL,0x1 JNZ 0x0018e9c7 JMP 0x0018e9d3 LAB_0018e9c7: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x70],RAX JMP 0x0018ea1e LAB_0018e9d3: LEA RDI,[RSP + 0x68] CALL 0x0016f560 caseD_1: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x58] CALL 0x0018ea80 TEST AL,0x1 JNZ 0x0018e9fc JMP 0x0018ea08 LAB_0018e9fc: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x70],RAX JMP 0x0018ea1e LAB_0018ea08: LEA RDI,[RSP + 0x68] CALL 0x0016f560 caseD_0: JMP 0x0018ea14 default: MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x70],RAX LAB_0018ea1e: MOV RAX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
/* __gnu_cxx::__normal_iterator<std::__cxx11::string const*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > > std::__find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string const*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >, __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string const> >(__gnu_cxx::__normal_iterator<std::__cxx11::string const*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >, __gnu_cxx::__normal_iterator<std::__cxx11::string const*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >, __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string const>, std::random_access_iterator_tag) */ int8 std:: __find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>> (int8 param_1,int8 param_2,int8 param_3) { bool bVar1; int8 uVar2; long local_30; int8 local_20; int8 local_18; int8 local_10; int8 local_8; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_30 = __gnu_cxx::operator-((__normal_iterator *)&local_18,(__normal_iterator *)&local_10); for (local_30 = local_30 >> 2; 0 < local_30; local_30 = local_30 + -1) { bVar1 = __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>::operator() ((_Iter_equals_val<std::__cxx11::string_const> *)&local_20,local_10); if (bVar1) { return local_10; } __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_10); bVar1 = __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>::operator() ((_Iter_equals_val<std::__cxx11::string_const> *)&local_20,local_10); if (bVar1) { return local_10; } __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_10); bVar1 = __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>::operator() ((_Iter_equals_val<std::__cxx11::string_const> *)&local_20,local_10); if (bVar1) { return local_10; } __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_10); bVar1 = __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>::operator() ((_Iter_equals_val<std::__cxx11::string_const> *)&local_20,local_10); if (bVar1) { return local_10; } __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_10); } uVar2 = __gnu_cxx::operator-((__normal_iterator *)&local_18,(__normal_iterator *)&local_10); switch(uVar2) { case 0: goto switchD_0018e96e_caseD_0; case 1: goto switchD_0018e96e_caseD_1; case 3: bVar1 = __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>::operator() ((_Iter_equals_val<std::__cxx11::string_const> *)&local_20,local_10); if (bVar1) { return local_10; } __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_10); case 2: bVar1 = __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>::operator() ((_Iter_equals_val<std::__cxx11::string_const> *)&local_20,local_10); if (bVar1) { local_8 = local_10; } else { __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_10); switchD_0018e96e_caseD_1: bVar1 = __gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>::operator() ((_Iter_equals_val<std::__cxx11::string_const> *)&local_20,local_10); if (!bVar1) { __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_10); switchD_0018e96e_caseD_0: goto switchD_0018e96e_default; } local_8 = local_10; } break; default: switchD_0018e96e_default: local_8 = local_18; } return local_8; }
47,689
my_long10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, long int val) { char buffer[66]; register char *p, *e; long int new_val; uint sign=0; unsigned long int uval = (unsigned long int) val; e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval= (unsigned long int)0 - uval; *dst++= '-'; len--; sign= 1; } } 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; } len= MY_MIN(len, (size_t) (e-p)); memcpy(dst, p, len); return len+sign; }
O3
c
my_long10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r10 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb $0x0, -0x1f(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0x5ba2f negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r10 movl $0x1, %r14d jmp 0x5ba32 xorl %r14d, %r14d leaq -0x1f(%rbp), %rbx movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD movq %r8, %rax mulq %rcx movq %rdx, %r9 shrq $0x3, %r9 imull $0xf6, %r9d, %eax addl %r8d, %eax addb $0x30, %al leaq -0x20(%rbp), %rsi movb %al, (%rsi) cmpq $0xa, %r8 jb 0x5ba89 movq %r9, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r9d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi cmpq $0x9, %r9 movq %rdx, %r9 ja 0x5ba65 subq %rsi, %rbx cmpq %rbx, %r10 cmovbq %r10, %rbx movq %rbx, %rdx callq 0x26290 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x5bab9 addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x263a0
my_long10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r10, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax mov [rbp+var_1F], 0 test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_5BA2F neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r10 mov r14d, 1 jmp short loc_5BA32 loc_5BA2F: xor r14d, r14d loc_5BA32: lea rbx, [rbp+var_1F] mov rcx, 0CCCCCCCCCCCCCCCDh mov rax, r8 mul rcx mov r9, rdx shr r9, 3 imul eax, r9d, 0F6h add eax, r8d add al, 30h ; '0' lea rsi, [rbp+var_20] mov [rsi], al cmp r8, 0Ah jb short loc_5BA89 loc_5BA65: mov rax, r9 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r9d add al, 30h ; '0' mov [rsi-1], al dec rsi cmp r9, 9 mov r9, rdx ja short loc_5BA65 loc_5BA89: sub rbx, rsi cmp r10, rbx cmovb rbx, r10 mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_5BAB9 add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_5BAB9: call ___stack_chk_fail
_BYTE * my_long10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r10 _BYTE *v6; // rdi long long v7; // r14 unsigned long long v8; // r9 char *v9; // rsi bool v10; // cf bool v11; // zf _BYTE *v12; // rbx char v14; // [rsp+40h] [rbp-20h] BYREF _BYTE v15[7]; // [rsp+41h] [rbp-1Fh] BYREF unsigned long long v16; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v16 = __readfsqword(0x28u); v15[0] = 0; if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v7 = 1LL; } v8 = a5 / 0xA; v9 = &v14; v14 = a5 % 0xA + 48; if ( a5 >= 0xA ) { do { *--v9 = v8 % 0xA + 48; v10 = v8 < 9; v11 = v8 == 9; v8 /= 0xAuLL; } while ( !v10 && !v11 ); } v12 = (_BYTE *)(v15 - v9); if ( (unsigned long long)v5 < v15 - v9 ) v12 = v5; memcpy(v6, v9, v12); return &v12[v7]; }
my_long10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R10,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV byte ptr [RBP + -0x1f],0x0 TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x0015ba2f NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R10 MOV R14D,0x1 JMP 0x0015ba32 LAB_0015ba2f: XOR R14D,R14D LAB_0015ba32: LEA RBX,[RBP + -0x1f] MOV RCX,-0x3333333333333333 MOV RAX,R8 MUL RCX MOV R9,RDX SHR R9,0x3 IMUL EAX,R9D,0xf6 ADD EAX,R8D ADD AL,0x30 LEA RSI,[RBP + -0x20] MOV byte ptr [RSI],AL CMP R8,0xa JC 0x0015ba89 LAB_0015ba65: MOV RAX,R9 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R9D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI CMP R9,0x9 MOV R9,RDX JA 0x0015ba65 LAB_0015ba89: SUB RBX,RSI CMP R10,RBX CMOVC RBX,R10 MOV RDX,RBX CALL 0x00126290 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0015bab9 ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0015bab9: CALL 0x001263a0
char * my_long10_to_str_8bit (int8 param_1,int1 *param_2,char *param_3,int param_4,ulong param_5) { ulong uVar1; ulong uVar2; char *__n; char *__src; long in_FS_OFFSET; bool bVar3; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_29[2] = 0; bVar3 = (long)param_5 < 0; if (bVar3 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 + -1; } local_29[1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = local_29 + 1; uVar2 = param_5 / 10; while (uVar1 = uVar2, 9 < param_5) { __src[-1] = (char)(uVar1 / 10) * -10 + (char)uVar1 + '0'; __src = __src + -1; uVar2 = uVar1 / 10; param_5 = uVar1; } __n = local_29 + (2 - (long)__src); if (param_3 < local_29 + (2 - (long)__src)) { __n = param_3; } memcpy(param_2,__src,(size_t)__n); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return __n + (bVar3 && param_4 < 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,690
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_ucs2_nopad: movq (%rcx), %r9 movq (%r8), %rax cmpq $0x2, %rdx jl 0xc9865 pushq %rbp movq %rsp, %rbp pushq %rbx addq %rsi, %rdx movq 0x78(%rdi), %rdi movq 0x8(%rdi), %rdi movzbl (%rsi), %r10d movzbl 0x1(%rsi), %r11d movq (%rdi,%r10,8), %rbx testq %rbx, %rbx je 0xc9801 leaq (%r11,%r11,2), %r10 movl 0x8(%rbx,%r10,4), %r10d jmp 0xc9808 shll $0x8, %r10d orq %r11, %r10 movl %r9d, %r11d andl $0x3f, %r11d addq %rax, %r11 movzbl %r10b, %ebx imulq %r11, %rbx movq %r9, %r11 shlq $0x8, %r11 addq %rbx, %r11 xorq %r9, %r11 movl %r11d, %r9d andl $0x3f, %r9d addq %rax, %r9 addq $0x3, %r9 shrl $0x8, %r10d imulq %r9, %r10 movq %r11, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r11, %r9 addq $0x6, %rax leaq 0x2(%rsi), %r10 cmpq %rdx, %r10 jae 0xc9863 addq $0x4, %rsi cmpq %rdx, %rsi movq %r10, %rsi jbe 0xc97e4 popq %rbx popq %rbp movq %r9, (%rcx) movq %rax, (%r8) retq
my_hash_sort_ucs2_nopad: mov r9, [rcx] mov rax, [r8] cmp rdx, 2 jl loc_C9865 push rbp mov rbp, rsp push rbx add rdx, rsi mov rdi, [rdi+78h] mov rdi, [rdi+8] loc_C97E4: movzx r10d, byte ptr [rsi] movzx r11d, byte ptr [rsi+1] mov rbx, [rdi+r10*8] test rbx, rbx jz short loc_C9801 lea r10, [r11+r11*2] mov r10d, [rbx+r10*4+8] jmp short loc_C9808 loc_C9801: shl r10d, 8 or r10, r11 loc_C9808: mov r11d, r9d and r11d, 3Fh add r11, rax movzx ebx, r10b imul rbx, r11 mov r11, r9 shl r11, 8 add r11, rbx xor r11, r9 mov r9d, r11d and r9d, 3Fh add r9, rax add r9, 3 shr r10d, 8 imul r10, r9 mov r9, r11 shl r9, 8 add r9, r10 xor r9, r11 add rax, 6 lea r10, [rsi+2] cmp r10, rdx jnb short loc_C9863 add rsi, 4 cmp rsi, rdx mov rsi, r10 jbe short loc_C97E4 loc_C9863: pop rbx pop rbp loc_C9865: mov [rcx], r9 mov [r8], rax retn
long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long v5; // r9 long long result; // rax unsigned long long v7; // rdx long long v8; // rdi long long v9; // r10 long long v10; // r11 long long v11; // rbx unsigned int v12; // r10d long long v13; // rbx bool v14; // cc v5 = *a4; result = *a5; if ( a3 >= 2 ) { v7 = (unsigned long long)&a2[a3]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL); do { v9 = *a2; v10 = a2[1]; v11 = *(_QWORD *)(v8 + 8 * v9); if ( v11 ) v12 = *(_DWORD *)(v11 + 12 * v10 + 8); else v12 = v10 | ((_DWORD)v9 << 8); v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12; v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8) + ((v5 ^ (v13 + (v5 << 8))) << 8)); result += 6LL; if ( (unsigned long long)(a2 + 2) >= v7 ) break; v14 = (unsigned long long)(a2 + 4) <= v7; a2 += 2; } while ( v14 ); } *a4 = v5; *a5 = result; return result; }
my_hash_sort_ucs2_nopad: MOV R9,qword ptr [RCX] MOV RAX,qword ptr [R8] CMP RDX,0x2 JL 0x001c9865 PUSH RBP MOV RBP,RSP PUSH RBX ADD RDX,RSI MOV RDI,qword ptr [RDI + 0x78] MOV RDI,qword ptr [RDI + 0x8] LAB_001c97e4: MOVZX R10D,byte ptr [RSI] MOVZX R11D,byte ptr [RSI + 0x1] MOV RBX,qword ptr [RDI + R10*0x8] TEST RBX,RBX JZ 0x001c9801 LEA R10,[R11 + R11*0x2] MOV R10D,dword ptr [RBX + R10*0x4 + 0x8] JMP 0x001c9808 LAB_001c9801: SHL R10D,0x8 OR R10,R11 LAB_001c9808: MOV R11D,R9D AND R11D,0x3f ADD R11,RAX MOVZX EBX,R10B IMUL RBX,R11 MOV R11,R9 SHL R11,0x8 ADD R11,RBX XOR R11,R9 MOV R9D,R11D AND R9D,0x3f ADD R9,RAX ADD R9,0x3 SHR R10D,0x8 IMUL R10,R9 MOV R9,R11 SHL R9,0x8 ADD R9,R10 XOR R9,R11 ADD RAX,0x6 LEA R10,[RSI + 0x2] CMP R10,RDX JNC 0x001c9863 ADD RSI,0x4 CMP RSI,RDX MOV RSI,R10 JBE 0x001c97e4 LAB_001c9863: POP RBX POP RBP LAB_001c9865: MOV qword ptr [RCX],R9 MOV qword ptr [R8],RAX RET
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long lVar1; long lVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; ulong uVar6; uVar6 = *param_4; lVar2 = *param_5; if (1 < param_3) { pbVar3 = param_2; do { lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8); if (lVar1 == 0) { uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]); } else { uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc); } uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6; uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6; lVar2 = lVar2 + 6; } while ((pbVar3 + 2 < param_2 + param_3) && (pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3)); } *param_4 = uVar6; *param_5 = lVar2; return; }
47,691
_JS_NewAtomInit
bluesky950520[P]quickjs/quickjs.c
static JSAtom __JS_NewAtomInit(JSRuntime *rt, const char *str, int len, int atom_type) { JSString *p; p = js_alloc_string_rt(rt, len, 0); if (!p) return JS_ATOM_NULL; memcpy(p->u.str8, str, len); p->u.str8[len] = '\0'; return __JS_NewAtom(rt, p, atom_type); }
O0
c
_JS_NewAtomInit: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movl %edx, 0xc(%rsp) movl %ecx, 0x8(%rsp) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi xorl %edx, %edx callq 0x5d520 movq %rax, (%rsp) cmpq $0x0, (%rsp) jne 0x2937b movl $0x0, 0x24(%rsp) jmp 0x293b6 movq (%rsp), %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi movslq 0xc(%rsp), %rdx callq 0xe5b0 movq (%rsp), %rax movslq 0xc(%rsp), %rcx movb $0x0, 0x18(%rax,%rcx) movq 0x18(%rsp), %rdi movq (%rsp), %rsi movl 0x8(%rsp), %edx callq 0x28650 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nop
__JS_NewAtomInit: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_1C], edx mov [rsp+28h+var_20], ecx mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] xor edx, edx call js_alloc_string_rt mov [rsp+28h+var_28], rax cmp [rsp+28h+var_28], 0 jnz short loc_2937B mov [rsp+28h+var_4], 0 jmp short loc_293B6 loc_2937B: mov rdi, [rsp+28h+var_28] add rdi, 18h mov rsi, [rsp+28h+var_18] movsxd rdx, [rsp+28h+var_1C] call _memcpy mov rax, [rsp+28h+var_28] movsxd rcx, [rsp+28h+var_1C] mov byte ptr [rax+rcx+18h], 0 mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_28] mov edx, [rsp+28h+var_20] call __JS_NewAtom mov [rsp+28h+var_4], eax loc_293B6: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long _JS_NewAtomInit(long long a1, long long a2, unsigned int a3, int a4) { long long v5; // [rsp+0h] [rbp-28h] v5 = js_alloc_string_rt(a1, a3, 0LL); if ( v5 ) { memcpy(v5 + 24, a2, (int)a3); *(_BYTE *)(v5 + (int)a3 + 24) = 0; return (unsigned int)_JS_NewAtom(a1, v5, a4); } else { return 0; } }
__JS_NewAtomInit: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV dword ptr [RSP + 0xc],EDX MOV dword ptr [RSP + 0x8],ECX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] XOR EDX,EDX CALL 0x0015d520 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JNZ 0x0012937b MOV dword ptr [RSP + 0x24],0x0 JMP 0x001293b6 LAB_0012937b: MOV RDI,qword ptr [RSP] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] MOVSXD RDX,dword ptr [RSP + 0xc] CALL 0x0010e5b0 MOV RAX,qword ptr [RSP] MOVSXD RCX,dword ptr [RSP + 0xc] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP] MOV EDX,dword ptr [RSP + 0x8] CALL 0x00128650 MOV dword ptr [RSP + 0x24],EAX LAB_001293b6: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 __JS_NewAtomInit(int8 param_1,void *param_2,int param_3,int4 param_4) { long lVar1; int4 local_4; lVar1 = js_alloc_string_rt(param_1,param_3,0); if (lVar1 == 0) { local_4 = 0; } else { memcpy((void *)(lVar1 + 0x18),param_2,(long)param_3); *(int1 *)(lVar1 + 0x18 + (long)param_3) = 0; local_4 = __JS_NewAtom(param_1,lVar1,param_4); } return local_4; }
47,692
_JS_NewAtomInit
bluesky950520[P]quickjs/quickjs.c
static JSAtom __JS_NewAtomInit(JSRuntime *rt, const char *str, int len, int atom_type) { JSString *p; p = js_alloc_string_rt(rt, len, 0); if (!p) return JS_ATOM_NULL; memcpy(p->u.str8, str, len); p->u.str8[len] = '\0'; return __JS_NewAtom(rt, p, atom_type); }
O2
c
_JS_NewAtomInit: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebx movl %edx, %ebp movq %rsi, %r15 movq %rdi, %r14 movl %edx, %esi xorl %edx, %edx callq 0x34a65 testq %rax, %rax je 0x1ab2a movq %rax, %r12 movq %rax, %rdi addq $0x18, %rdi movslq %ebp, %r13 movq %r15, %rsi movq %r13, %rdx callq 0xe5c0 movb $0x0, 0x18(%r12,%r13) movq %r14, %rdi movq %r12, %rsi movl %ebx, %edx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1a53b xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
__JS_NewAtomInit: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, ecx mov ebp, edx mov r15, rsi mov r14, rdi mov esi, edx xor edx, edx call js_alloc_string_rt test rax, rax jz short loc_1AB2A mov r12, rax mov rdi, rax add rdi, 18h movsxd r13, ebp mov rsi, r15 mov rdx, r13 call _memcpy mov byte ptr [r12+r13+18h], 0 mov rdi, r14 mov rsi, r12 mov edx, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp __JS_NewAtom loc_1AB2A: xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long _JS_NewAtomInit(long long a1, long long a2, unsigned int a3, unsigned int a4) { long long v6; // rax _QWORD *v7; // r12 v6 = js_alloc_string_rt(a1, a3, 0LL); if ( !v6 ) return 0LL; v7 = (_QWORD *)v6; memcpy(v6 + 24, a2, (int)a3); *((_BYTE *)v7 + (int)a3 + 24) = 0; return _JS_NewAtom(a1, v7, a4); }
__JS_NewAtomInit: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ECX MOV EBP,EDX MOV R15,RSI MOV R14,RDI MOV ESI,EDX XOR EDX,EDX CALL 0x00134a65 TEST RAX,RAX JZ 0x0011ab2a MOV R12,RAX MOV RDI,RAX ADD RDI,0x18 MOVSXD R13,EBP MOV RSI,R15 MOV RDX,R13 CALL 0x0010e5c0 MOV byte ptr [R12 + R13*0x1 + 0x18],0x0 MOV RDI,R14 MOV RSI,R12 MOV EDX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011a53b LAB_0011ab2a: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 __JS_NewAtomInit(int8 param_1,void *param_2,int param_3,int4 param_4) { long lVar1; int8 uVar2; lVar1 = js_alloc_string_rt(param_1,param_3,0); if (lVar1 != 0) { memcpy((void *)(lVar1 + 0x18),param_2,(long)param_3); *(int1 *)(lVar1 + 0x18 + (long)param_3) = 0; uVar2 = __JS_NewAtom(param_1,lVar1,param_4); return uVar2; } return 0; }
47,693
ggml_backend_tensor_memset
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
void ggml_backend_tensor_memset(struct ggml_tensor * tensor, uint8_t value, size_t offset, size_t size) { ggml_backend_buffer_t buf = tensor->view_src ? tensor->view_src->buffer : tensor->buffer; if (size == 0) { return; } GGML_ASSERT(buf != NULL && "tensor buffer not set"); GGML_ASSERT(tensor->data != NULL && "tensor not allocated"); GGML_ASSERT(offset + size <= ggml_nbytes(tensor) && "tensor write out of bounds"); GGML_ASSERT(buf->iface.memset_tensor != NULL && "memset not implemented by backend buffer"); buf->iface.memset_tensor(buf, tensor, value, offset, size); }
O1
cpp
ggml_backend_tensor_memset: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0xe8(%rdi), %rax testq %rax, %rax cmoveq %rdi, %rax testq %rcx, %rcx je 0x271a8 movq 0x8(%rax), %r12 testq %r12, %r12 je 0x271b7 movq %rdi, %r15 cmpq $0x0, 0xf8(%rdi) je 0x271d3 movq %rcx, %rbx movq %rdx, %r14 movl %esi, %ebp leaq (%rcx,%rdx), %r13 movq %r15, %rdi callq 0x171c0 cmpq %rax, %r13 ja 0x271ef movq 0x18(%r12), %rax testq %rax, %rax je 0x2720b movzbl %bpl, %edx movq %r12, %rdi movq %r15, %rsi movq %r14, %rcx movq %rbx, %r8 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x285b6(%rip), %rdi # 0x4f774 leaq 0x253fc(%rip), %rdx # 0x4c5c1 leaq 0x2874b(%rip), %rcx # 0x4f917 movl $0x123, %esi # imm = 0x123 jmp 0x27225 leaq 0x2859a(%rip), %rdi # 0x4f774 leaq 0x253e0(%rip), %rdx # 0x4c5c1 leaq 0x28677(%rip), %rcx # 0x4f85f movl $0x124, %esi # imm = 0x124 jmp 0x27225 leaq 0x2857e(%rip), %rdi # 0x4f774 leaq 0x253c4(%rip), %rdx # 0x4c5c1 leaq 0x2868a(%rip), %rcx # 0x4f88e movl $0x125, %esi # imm = 0x125 jmp 0x27225 leaq 0x28562(%rip), %rdi # 0x4f774 leaq 0x253a8(%rip), %rdx # 0x4c5c1 leaq 0x2871e(%rip), %rcx # 0x4f93e movl $0x126, %esi # imm = 0x126 xorl %eax, %eax callq 0x18ce0
ggml_backend_tensor_memset: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rax, [rdi+0E8h] test rax, rax cmovz rax, rdi test rcx, rcx jz short loc_271A8 mov r12, [rax+8] test r12, r12 jz short loc_271B7 mov r15, rdi cmp qword ptr [rdi+0F8h], 0 jz short loc_271D3 mov rbx, rcx mov r14, rdx mov ebp, esi lea r13, [rcx+rdx] mov rdi, r15 call _ggml_nbytes cmp r13, rax ja short loc_271EF mov rax, [r12+18h] test rax, rax jz loc_2720B movzx edx, bpl mov rdi, r12 mov rsi, r15 mov rcx, r14 mov r8, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp rax loc_271A8: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_271B7: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBufNullTensorB; "buf != NULL && \"tensor buffer not set"... mov esi, 123h jmp short loc_27225 loc_271D3: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorDataNull; "tensor->data != NULL && \"tensor not al"... mov esi, 124h jmp short loc_27225 loc_271EF: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aOffsetSizeGgml; "offset + size <= ggml_nbytes(tensor) &&"... mov esi, 125h jmp short loc_27225 loc_2720B: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBufIfaceMemset; "buf->iface.memset_tensor != NULL && \"m"... mov esi, 126h loc_27225: xor eax, eax call _ggml_abort
long long ggml_backend_tensor_memset(long long a1, unsigned __int8 a2, long long a3, long long a4, int a5, int a6) { long long result; // rax long long v7; // r12 long long ( *v10)(long long, long long, _QWORD, long long, long long); // rax const char *v11; // rcx int v12; // esi result = *(_QWORD *)(a1 + 232); if ( !result ) result = a1; if ( a4 ) { v7 = *(_QWORD *)(result + 8); if ( v7 ) { if ( *(_QWORD *)(a1 + 248) ) { if ( a4 + a3 > ggml_nbytes((unsigned int *)a1) ) { v11 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\""; v12 = 293; } else { v10 = *(long long ( **)(long long, long long, _QWORD, long long, long long))(v7 + 24); if ( v10 ) return v10(v7, a1, a2, a3, a4); v11 = "buf->iface.memset_tensor != NULL && \"memset not implemented by backend buffer\""; v12 = 294; } } else { v11 = "tensor->data != NULL && \"tensor not allocated\""; v12 = 292; } } else { v11 = "buf != NULL && \"tensor buffer not set\""; v12 = 291; } ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp", v12, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v11, a5, a6); } return result; }
ggml_backend_tensor_memset: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI + 0xe8] TEST RAX,RAX CMOVZ RAX,RDI TEST RCX,RCX JZ 0x001271a8 MOV R12,qword ptr [RAX + 0x8] TEST R12,R12 JZ 0x001271b7 MOV R15,RDI CMP qword ptr [RDI + 0xf8],0x0 JZ 0x001271d3 MOV RBX,RCX MOV R14,RDX MOV EBP,ESI LEA R13,[RCX + RDX*0x1] MOV RDI,R15 CALL 0x001171c0 CMP R13,RAX JA 0x001271ef MOV RAX,qword ptr [R12 + 0x18] TEST RAX,RAX JZ 0x0012720b MOVZX EDX,BPL MOV RDI,R12 MOV RSI,R15 MOV RCX,R14 MOV R8,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP RAX LAB_001271a8: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001271b7: LEA RDI,[0x14f774] LEA RDX,[0x14c5c1] LEA RCX,[0x14f917] MOV ESI,0x123 JMP 0x00127225 LAB_001271d3: LEA RDI,[0x14f774] LEA RDX,[0x14c5c1] LEA RCX,[0x14f85f] MOV ESI,0x124 JMP 0x00127225 LAB_001271ef: LEA RDI,[0x14f774] LEA RDX,[0x14c5c1] LEA RCX,[0x14f88e] MOV ESI,0x125 JMP 0x00127225 LAB_0012720b: LEA RDI,[0x14f774] LEA RDX,[0x14c5c1] LEA RCX,[0x14f93e] MOV ESI,0x126 LAB_00127225: XOR EAX,EAX CALL 0x00118ce0
void ggml_backend_tensor_memset(long param_1,int1 param_2,long param_3,long param_4) { long lVar1; ulong uVar2; char *pcVar3; int8 uVar4; lVar1 = *(long *)(param_1 + 0xe8); if (*(long *)(param_1 + 0xe8) == 0) { lVar1 = param_1; } if (param_4 != 0) { lVar1 = *(long *)(lVar1 + 8); if (lVar1 == 0) { pcVar3 = "buf != NULL && \"tensor buffer not set\""; uVar4 = 0x123; } else if (*(long *)(param_1 + 0xf8) == 0) { pcVar3 = "tensor->data != NULL && \"tensor not allocated\""; uVar4 = 0x124; } else { uVar2 = ggml_nbytes(param_1); if (uVar2 < (ulong)(param_4 + param_3)) { pcVar3 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\""; uVar4 = 0x125; } else { if (*(code **)(lVar1 + 0x18) != (code *)0x0) { /* WARNING: Could not recover jumptable at 0x001271a6. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar1 + 0x18))(lVar1,param_1,param_2,param_3,param_4); return; } pcVar3 = "buf->iface.memset_tensor != NULL && \"memset not implemented by backend buffer\""; uVar4 = 0x126; } } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp" ,uVar4,"GGML_ASSERT(%s) failed",pcVar3); } return; }
47,694
ggml_backend_tensor_memset
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
void ggml_backend_tensor_memset(struct ggml_tensor * tensor, uint8_t value, size_t offset, size_t size) { ggml_backend_buffer_t buf = tensor->view_src ? tensor->view_src->buffer : tensor->buffer; if (size == 0) { return; } GGML_ASSERT(buf != NULL && "tensor buffer not set"); GGML_ASSERT(tensor->data != NULL && "tensor not allocated"); GGML_ASSERT(offset + size <= ggml_nbytes(tensor) && "tensor write out of bounds"); GGML_ASSERT(buf->iface.memset_tensor != NULL && "memset not implemented by backend buffer"); buf->iface.memset_tensor(buf, tensor, value, offset, size); }
O2
cpp
ggml_backend_tensor_memset: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0xe8(%rdi), %rax testq %rax, %rax cmoveq %rdi, %rax testq %rcx, %rcx je 0x2b954 movq 0x8(%rax), %r12 testq %r12, %r12 je 0x2b963 movq %rdi, %r15 cmpq $0x0, 0xf8(%rdi) je 0x2b97f movq %rcx, %rbx movq %rdx, %r14 movl %esi, %ebp leaq (%rcx,%rdx), %r13 movq %r15, %rdi callq 0x1d300 cmpq %rax, %r13 ja 0x2b99b movq 0x18(%r12), %rax testq %rax, %rax je 0x2b9b7 movzbl %bpl, %edx movq %r12, %rdi movq %r15, %rsi movq %r14, %rcx movq %rbx, %r8 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x25e1a(%rip), %rdi # 0x51784 leaq 0x22c64(%rip), %rdx # 0x4e5d5 leaq 0x25faf(%rip), %rcx # 0x51927 movl $0x123, %esi # imm = 0x123 jmp 0x2b9d1 leaq 0x25dfe(%rip), %rdi # 0x51784 leaq 0x22c48(%rip), %rdx # 0x4e5d5 leaq 0x25edb(%rip), %rcx # 0x5186f movl $0x124, %esi # imm = 0x124 jmp 0x2b9d1 leaq 0x25de2(%rip), %rdi # 0x51784 leaq 0x22c2c(%rip), %rdx # 0x4e5d5 leaq 0x25eee(%rip), %rcx # 0x5189e movl $0x125, %esi # imm = 0x125 jmp 0x2b9d1 leaq 0x25dc6(%rip), %rdi # 0x51784 leaq 0x22c10(%rip), %rdx # 0x4e5d5 leaq 0x25f82(%rip), %rcx # 0x5194e movl $0x126, %esi # imm = 0x126 xorl %eax, %eax callq 0x1f9b0
ggml_backend_tensor_memset: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rax, [rdi+0E8h] test rax, rax cmovz rax, rdi test rcx, rcx jz short loc_2B954 mov r12, [rax+8] test r12, r12 jz short loc_2B963 mov r15, rdi cmp qword ptr [rdi+0F8h], 0 jz short loc_2B97F mov rbx, rcx mov r14, rdx mov ebp, esi lea r13, [rcx+rdx] mov rdi, r15 call _ggml_nbytes cmp r13, rax ja short loc_2B99B mov rax, [r12+18h] test rax, rax jz loc_2B9B7 movzx edx, bpl mov rdi, r12 mov rsi, r15 mov rcx, r14 mov r8, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp rax loc_2B954: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2B963: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBufNullTensorB; "buf != NULL && \"tensor buffer not set"... mov esi, 123h jmp short loc_2B9D1 loc_2B97F: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorDataNull; "tensor->data != NULL && \"tensor not al"... mov esi, 124h jmp short loc_2B9D1 loc_2B99B: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aOffsetSizeGgml; "offset + size <= ggml_nbytes(tensor) &&"... mov esi, 125h jmp short loc_2B9D1 loc_2B9B7: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBufIfaceMemset; "buf->iface.memset_tensor != NULL && \"m"... mov esi, 126h loc_2B9D1: xor eax, eax call _ggml_abort
long long ggml_backend_tensor_memset( long long a1, unsigned __int8 a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al long long result; // rax long long v16; // r12 long long ( *v19)(long long, long long, _QWORD, long long, long long); // rax const char *v20; // rcx int v21; // esi char v22; // [rsp-8h] [rbp-38h] v22 = v14; result = *(_QWORD *)(a1 + 232); if ( !result ) result = a1; if ( a4 ) { v16 = *(_QWORD *)(result + 8); if ( v16 ) { if ( *(_QWORD *)(a1 + 248) ) { if ( a4 + a3 > ggml_nbytes((unsigned int *)a1) ) { v20 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\""; v21 = 293; } else { v19 = *(long long ( **)(long long, long long, _QWORD, long long, long long))(v16 + 24); if ( v19 ) return v19(v16, a1, a2, a3, a4); v20 = "buf->iface.memset_tensor != NULL && \"memset not implemented by backend buffer\""; v21 = 294; } } else { v20 = "tensor->data != NULL && \"tensor not allocated\""; v21 = 292; } } else { v20 = "buf != NULL && \"tensor buffer not set\""; v21 = 291; } ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp", v21, (long long)"GGML_ASSERT(%s) failed", (long long)v20, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v22); } return result; }
ggml_backend_tensor_memset: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI + 0xe8] TEST RAX,RAX CMOVZ RAX,RDI TEST RCX,RCX JZ 0x0012b954 MOV R12,qword ptr [RAX + 0x8] TEST R12,R12 JZ 0x0012b963 MOV R15,RDI CMP qword ptr [RDI + 0xf8],0x0 JZ 0x0012b97f MOV RBX,RCX MOV R14,RDX MOV EBP,ESI LEA R13,[RCX + RDX*0x1] MOV RDI,R15 CALL 0x0011d300 CMP R13,RAX JA 0x0012b99b MOV RAX,qword ptr [R12 + 0x18] TEST RAX,RAX JZ 0x0012b9b7 MOVZX EDX,BPL MOV RDI,R12 MOV RSI,R15 MOV RCX,R14 MOV R8,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP RAX LAB_0012b954: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012b963: LEA RDI,[0x151784] LEA RDX,[0x14e5d5] LEA RCX,[0x151927] MOV ESI,0x123 JMP 0x0012b9d1 LAB_0012b97f: LEA RDI,[0x151784] LEA RDX,[0x14e5d5] LEA RCX,[0x15186f] MOV ESI,0x124 JMP 0x0012b9d1 LAB_0012b99b: LEA RDI,[0x151784] LEA RDX,[0x14e5d5] LEA RCX,[0x15189e] MOV ESI,0x125 JMP 0x0012b9d1 LAB_0012b9b7: LEA RDI,[0x151784] LEA RDX,[0x14e5d5] LEA RCX,[0x15194e] MOV ESI,0x126 LAB_0012b9d1: XOR EAX,EAX CALL 0x0011f9b0
void ggml_backend_tensor_memset(long param_1,int1 param_2,long param_3,long param_4) { long lVar1; ulong uVar2; char *pcVar3; int8 uVar4; lVar1 = *(long *)(param_1 + 0xe8); if (*(long *)(param_1 + 0xe8) == 0) { lVar1 = param_1; } if (param_4 != 0) { lVar1 = *(long *)(lVar1 + 8); if (lVar1 == 0) { pcVar3 = "buf != NULL && \"tensor buffer not set\""; uVar4 = 0x123; } else if (*(long *)(param_1 + 0xf8) == 0) { pcVar3 = "tensor->data != NULL && \"tensor not allocated\""; uVar4 = 0x124; } else { uVar2 = ggml_nbytes(param_1); if (uVar2 < (ulong)(param_4 + param_3)) { pcVar3 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\""; uVar4 = 0x125; } else { if (*(code **)(lVar1 + 0x18) != (code *)0x0) { /* WARNING: Could not recover jumptable at 0x0012b952. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar1 + 0x18))(lVar1,param_1,param_2,param_3,param_4); return; } pcVar3 = "buf->iface.memset_tensor != NULL && \"memset not implemented by backend buffer\""; uVar4 = 0x126; } } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp" ,uVar4,"GGML_ASSERT(%s) failed",pcVar3); } return; }
47,695
js_sab_alloc
bluesky950520[P]quickjs/quickjs-libc.c
static void *js_sab_alloc(void *opaque, size_t size) { JSSABHeader *sab; sab = malloc(sizeof(JSSABHeader) + size); if (!sab) return NULL; sab->ref_count = 1; return sab->buf; }
O0
c
js_sab_alloc: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xe6c0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x176b4 movq $0x0, 0x20(%rsp) jmp 0x176cd movq 0x8(%rsp), %rax movl $0x1, (%rax) movq 0x8(%rsp), %rax addq $0x8, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopw (%rax,%rax)
js_sab_alloc: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rdi, [rsp+28h+var_18] add rdi, 8 call _malloc mov [rsp+28h+var_20], rax cmp [rsp+28h+var_20], 0 jnz short loc_176B4 mov [rsp+28h+var_8], 0 jmp short loc_176CD loc_176B4: mov rax, [rsp+28h+var_20] mov dword ptr [rax], 1 mov rax, [rsp+28h+var_20] add rax, 8 mov [rsp+28h+var_8], rax loc_176CD: mov rax, [rsp+28h+var_8] add rsp, 28h retn
_DWORD * js_sab_alloc(long long a1, long long a2) { _DWORD *v3; // [rsp+8h] [rbp-20h] v3 = (_DWORD *)malloc(a2 + 8); if ( !v3 ) return 0LL; *v3 = 1; return v3 + 2; }
js_sab_alloc: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x0010e6c0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x001176b4 MOV qword ptr [RSP + 0x20],0x0 JMP 0x001176cd LAB_001176b4: MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x8 MOV qword ptr [RSP + 0x20],RAX LAB_001176cd: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
int4 * js_sab_alloc(int8 param_1,long param_2) { int4 *local_8; local_8 = (int4 *)malloc(param_2 + 8); if (local_8 == (int4 *)0x0) { local_8 = (int4 *)0x0; } else { *local_8 = 1; local_8 = local_8 + 2; } return local_8; }
47,696
my_charlen_utf8mb4
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0xf0) return my_valid_mbcharlen_utf8mb3(s, e); if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; return 4; } return MY_CS_ILSEQ; }
O3
c
my_charlen_utf8mb4: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0x300d6 movb (%rsi), %cl cmpb $-0x11, %cl ja 0x30042 movl $0x1, %eax testb %cl, %cl jns 0x300d6 cmpb $-0x3e, %cl jb 0x300d4 cmpb $-0x21, %cl ja 0x3009b leaq 0x2(%rsi), %rcx movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %rcx ja 0x300d6 xorl %eax, %eax cmpb $-0x40, 0x1(%rsi) setl %al addl %eax, %eax jmp 0x300d6 cmpb $-0xc, %cl ja 0x300d4 leaq 0x4(%rsi), %rdi movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rdx, %rdi ja 0x300d6 movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0x300d4 cmpb $-0x41, 0x2(%rsi) jg 0x300d4 cmpb $-0x41, 0x3(%rsi) jg 0x300d4 cmpb $-0x10, %cl sete %sil cmpb $-0x70, %dl setb %dil movl $0x0, %eax testb %dil, %sil jne 0x300d6 cmpb $-0xc, %cl setne %al cmpb $-0x70, %dl setb %cl orb %al, %cl movzbl %cl, %eax shll $0x2, %eax jmp 0x300d6 leaq 0x3(%rsi), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %rdi ja 0x300d6 movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0x300d4 cmpb $-0x41, 0x2(%rsi) movl $0x0, %eax jg 0x300d6 xorl %eax, %eax cmpb $-0x60, %dl setae %al cmpb $-0x20, %cl leal (%rax,%rax,2), %ecx movl $0x3, %eax cmovel %ecx, %eax jmp 0x300d6 xorl %eax, %eax popq %rbp retq
my_charlen_utf8mb4: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb loc_300D6 mov cl, [rsi] cmp cl, 0EFh ja short loc_30042 mov eax, 1 test cl, cl jns loc_300D6 cmp cl, 0C2h jb loc_300D4 cmp cl, 0DFh ja short loc_3009B lea rcx, [rsi+2] mov eax, 0FFFFFF9Ah cmp rcx, rdx ja loc_300D6 xor eax, eax cmp byte ptr [rsi+1], 0C0h setl al add eax, eax jmp loc_300D6 loc_30042: cmp cl, 0F4h ja loc_300D4 lea rdi, [rsi+4] mov eax, 0FFFFFF98h cmp rdi, rdx ja short loc_300D6 mov dl, [rsi+1] cmp dl, 0BFh jg short loc_300D4 cmp byte ptr [rsi+2], 0BFh jg short loc_300D4 cmp byte ptr [rsi+3], 0BFh jg short loc_300D4 cmp cl, 0F0h setz sil cmp dl, 90h setb dil mov eax, 0 test sil, dil jnz short loc_300D6 cmp cl, 0F4h setnz al cmp dl, 90h setb cl or cl, al movzx eax, cl shl eax, 2 jmp short loc_300D6 loc_3009B: lea rdi, [rsi+3] mov eax, 0FFFFFF99h cmp rdi, rdx ja short loc_300D6 mov dl, [rsi+1] cmp dl, 0BFh jg short loc_300D4 cmp byte ptr [rsi+2], 0BFh mov eax, 0 jg short loc_300D6 xor eax, eax cmp dl, 0A0h setnb al cmp cl, 0E0h lea ecx, [rax+rax*2] mov eax, 3 cmovz eax, ecx jmp short loc_300D6 loc_300D4: xor eax, eax loc_300D6: pop rbp retn
long long my_charlen_utf8mb4(long long a1, char *a2, unsigned long long a3) { long long result; // rax char v4; // cl char v5; // dl char v6; // dl result = 4294967195LL; if ( (unsigned long long)a2 >= a3 ) return result; v4 = *a2; if ( (unsigned __int8)*a2 <= 0xEFu ) { result = 1LL; if ( v4 >= 0 ) return result; if ( (unsigned __int8)v4 >= 0xC2u ) { if ( (unsigned __int8)v4 <= 0xDFu ) { result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) return 2 * (unsigned int)(a2[1] < -64); return result; } result = 4294967193LL; if ( (unsigned long long)(a2 + 3) > a3 ) return result; v6 = a2[1]; if ( v6 <= -65 ) { result = 0LL; if ( a2[2] <= -65 ) { result = 3LL; if ( v4 == -32 ) return 3 * (unsigned int)((unsigned __int8)v6 >= 0xA0u); } return result; } } return 0LL; } if ( (unsigned __int8)v4 > 0xF4u ) return 0LL; result = 4294967192LL; if ( (unsigned long long)(a2 + 4) > a3 ) return result; v5 = a2[1]; if ( v5 > -65 || a2[2] > -65 || a2[3] > -65 ) return 0LL; result = 0LL; if ( (unsigned __int8)v5 >= 0x90u || v4 != -16 ) return 4 * (unsigned int)(v4 != -12 || (unsigned __int8)v5 < 0x90u); return result; }
my_charlen_utf8mb4: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x001300d6 MOV CL,byte ptr [RSI] CMP CL,0xef JA 0x00130042 MOV EAX,0x1 TEST CL,CL JNS 0x001300d6 CMP CL,0xc2 JC 0x001300d4 CMP CL,0xdf JA 0x0013009b LEA RCX,[RSI + 0x2] MOV EAX,0xffffff9a CMP RCX,RDX JA 0x001300d6 XOR EAX,EAX CMP byte ptr [RSI + 0x1],0xc0 SETL AL ADD EAX,EAX JMP 0x001300d6 LAB_00130042: CMP CL,0xf4 JA 0x001300d4 LEA RDI,[RSI + 0x4] MOV EAX,0xffffff98 CMP RDI,RDX JA 0x001300d6 MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x001300d4 CMP byte ptr [RSI + 0x2],0xbf JG 0x001300d4 CMP byte ptr [RSI + 0x3],0xbf JG 0x001300d4 CMP CL,0xf0 SETZ SIL CMP DL,0x90 SETC DIL MOV EAX,0x0 TEST SIL,DIL JNZ 0x001300d6 CMP CL,0xf4 SETNZ AL CMP DL,0x90 SETC CL OR CL,AL MOVZX EAX,CL SHL EAX,0x2 JMP 0x001300d6 LAB_0013009b: LEA RDI,[RSI + 0x3] MOV EAX,0xffffff99 CMP RDI,RDX JA 0x001300d6 MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x001300d4 CMP byte ptr [RSI + 0x2],0xbf MOV EAX,0x0 JG 0x001300d6 XOR EAX,EAX CMP DL,0xa0 SETNC AL CMP CL,0xe0 LEA ECX,[RAX + RAX*0x2] MOV EAX,0x3 CMOVZ EAX,ECX JMP 0x001300d6 LAB_001300d4: XOR EAX,EAX LAB_001300d6: POP RBP RET
ulong my_charlen_utf8mb4(int8 param_1,byte *param_2,byte *param_3) { byte bVar1; byte bVar2; if (param_3 <= param_2) { return 0xffffff9b; } bVar1 = *param_2; if (bVar1 < 0xf0) { if (-1 < (char)bVar1) { return 1; } if (0xc1 < bVar1) { if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { return 0xffffff9a; } return (ulong)((uint)((char)param_2[1] < -0x40) * 2); } if (param_3 < param_2 + 3) { return 0xffffff99; } if ((char)param_2[1] < -0x40) { if (-0x41 < (char)param_2[2]) { return 0; } if (bVar1 != 0xe0) { return 3; } return (ulong)((uint)(0x9f < param_2[1]) * 3); } } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { return 0xffffff98; } bVar2 = param_2[1]; if ((((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) { if (bVar1 == 0xf0 && bVar2 < 0x90) { return 0; } return (ulong)(bVar2 < 0x90 || bVar1 != 0xf4) << 2; } } return 0; }
47,697
my_strntoull_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for(; s<e && my_isspace(cs,*s); s++); if (s == e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); overflow = 0; i = 0; for ( ; s != e; s++) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (ulonglong) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) i) : (longlong) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O0
c
my_strntoull_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rcx xorl %eax, %eax cmpq -0x68(%rbp), %rcx movb %al, -0x76(%rbp) jae 0x44258 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x76(%rbp) movb -0x76(%rbp), %al testb $0x1, %al jne 0x44261 jmp 0x44271 jmp 0x44263 movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x44229 movq -0x60(%rbp), %rax cmpq -0x68(%rbp), %rax jne 0x44280 jmp 0x44441 movq -0x60(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x442a1 movl $0x1, -0x3c(%rbp) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x442cb movq -0x60(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x442c2 movl $0x0, -0x3c(%rbp) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x442c9 movl $0x0, -0x3c(%rbp) jmp 0x442cb movq -0x60(%rbp), %rax movq %rax, -0x70(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x48(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x4c(%rbp) movl $0x0, -0x74(%rbp) movq $0x0, -0x58(%rbp) movq -0x60(%rbp), %rax cmpq -0x68(%rbp), %rax je 0x443e5 movq -0x60(%rbp), %rax movb (%rax), %al movb %al, -0x75(%rbp) movzbl -0x75(%rbp), %eax cmpl $0x30, %eax jl 0x44340 movzbl -0x75(%rbp), %eax cmpl $0x39, %eax jg 0x44340 movzbl -0x75(%rbp), %eax subl $0x30, %eax movb %al, -0x75(%rbp) jmp 0x44388 movzbl -0x75(%rbp), %eax cmpl $0x41, %eax jl 0x44361 movzbl -0x75(%rbp), %eax cmpl $0x5a, %eax jg 0x44361 movzbl -0x75(%rbp), %eax subl $0x41, %eax addl $0xa, %eax movb %al, -0x75(%rbp) jmp 0x44386 movzbl -0x75(%rbp), %eax cmpl $0x61, %eax jl 0x44382 movzbl -0x75(%rbp), %eax cmpl $0x7a, %eax jg 0x44382 movzbl -0x75(%rbp), %eax subl $0x61, %eax addl $0xa, %eax movb %al, -0x75(%rbp) jmp 0x44384 jmp 0x443e5 jmp 0x44386 jmp 0x44388 movzbl -0x75(%rbp), %eax cmpl -0x24(%rbp), %eax jl 0x44393 jmp 0x443e5 movq -0x58(%rbp), %rax cmpq -0x48(%rbp), %rax ja 0x443b0 movq -0x58(%rbp), %rax cmpq -0x48(%rbp), %rax jne 0x443b9 movzbl -0x75(%rbp), %eax cmpl -0x4c(%rbp), %eax jbe 0x443b9 movl $0x1, -0x74(%rbp) jmp 0x443d2 movslq -0x24(%rbp), %rax imulq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movzbl -0x75(%rbp), %eax addq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x443d4 movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x4430b movq -0x60(%rbp), %rax cmpq -0x70(%rbp), %rax jne 0x443f1 jmp 0x44441 cmpq $0x0, -0x30(%rbp) je 0x44403 movq -0x60(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) cmpl $0x0, -0x74(%rbp) je 0x4441d movq -0x38(%rbp), %rax movl $0x22, (%rax) movq $-0x1, -0x8(%rbp) jmp 0x44465 cmpl $0x0, -0x3c(%rbp) je 0x4442f xorl %eax, %eax subq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x44437 movq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x44465 movq -0x38(%rbp), %rax movl $0x21, (%rax) cmpq $0x0, -0x30(%rbp) je 0x4445d movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
my_strntoull_8bit: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_18] mov [rbp+var_60], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_68], rax loc_44229: mov rcx, [rbp+var_60] xor eax, eax cmp rcx, [rbp+var_68] mov [rbp+var_76], al jnb short loc_44258 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_60] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_76], al loc_44258: mov al, [rbp+var_76] test al, 1 jnz short loc_44261 jmp short loc_44271 loc_44261: jmp short $+2 loc_44263: mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_44229 loc_44271: mov rax, [rbp+var_60] cmp rax, [rbp+var_68] jnz short loc_44280 jmp loc_44441 loc_44280: mov rax, [rbp+var_60] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_442A1 mov [rbp+var_3C], 1 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_442CB loc_442A1: mov rax, [rbp+var_60] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_442C2 mov [rbp+var_3C], 0 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_442C9 loc_442C2: mov [rbp+var_3C], 0 loc_442C9: jmp short $+2 loc_442CB: mov rax, [rbp+var_60] mov [rbp+var_70], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_48], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_4C], eax mov [rbp+var_74], 0 mov [rbp+var_58], 0 loc_4430B: mov rax, [rbp+var_60] cmp rax, [rbp+var_68] jz loc_443E5 mov rax, [rbp+var_60] mov al, [rax] mov [rbp+var_75], al movzx eax, [rbp+var_75] cmp eax, 30h ; '0' jl short loc_44340 movzx eax, [rbp+var_75] cmp eax, 39h ; '9' jg short loc_44340 movzx eax, [rbp+var_75] sub eax, 30h ; '0' mov [rbp+var_75], al jmp short loc_44388 loc_44340: movzx eax, [rbp+var_75] cmp eax, 41h ; 'A' jl short loc_44361 movzx eax, [rbp+var_75] cmp eax, 5Ah ; 'Z' jg short loc_44361 movzx eax, [rbp+var_75] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_75], al jmp short loc_44386 loc_44361: movzx eax, [rbp+var_75] cmp eax, 61h ; 'a' jl short loc_44382 movzx eax, [rbp+var_75] cmp eax, 7Ah ; 'z' jg short loc_44382 movzx eax, [rbp+var_75] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_75], al jmp short loc_44384 loc_44382: jmp short loc_443E5 loc_44384: jmp short $+2 loc_44386: jmp short $+2 loc_44388: movzx eax, [rbp+var_75] cmp eax, [rbp+var_24] jl short loc_44393 jmp short loc_443E5 loc_44393: mov rax, [rbp+var_58] cmp rax, [rbp+var_48] ja short loc_443B0 mov rax, [rbp+var_58] cmp rax, [rbp+var_48] jnz short loc_443B9 movzx eax, [rbp+var_75] cmp eax, [rbp+var_4C] jbe short loc_443B9 loc_443B0: mov [rbp+var_74], 1 jmp short loc_443D2 loc_443B9: movsxd rax, [rbp+var_24] imul rax, [rbp+var_58] mov [rbp+var_58], rax movzx eax, [rbp+var_75] add rax, [rbp+var_58] mov [rbp+var_58], rax loc_443D2: jmp short $+2 loc_443D4: mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp loc_4430B loc_443E5: mov rax, [rbp+var_60] cmp rax, [rbp+var_70] jnz short loc_443F1 jmp short loc_44441 loc_443F1: cmp [rbp+var_30], 0 jz short loc_44403 mov rcx, [rbp+var_60] mov rax, [rbp+var_30] mov [rax], rcx loc_44403: cmp [rbp+var_74], 0 jz short loc_4441D mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_44465 loc_4441D: cmp [rbp+var_3C], 0 jz short loc_4442F xor eax, eax sub rax, [rbp+var_58] mov [rbp+var_80], rax jmp short loc_44437 loc_4442F: mov rax, [rbp+var_58] mov [rbp+var_80], rax loc_44437: mov rax, [rbp+var_80] mov [rbp+var_8], rax jmp short loc_44465 loc_44441: mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' cmp [rbp+var_30], 0 jz short loc_4445D mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax], rcx loc_4445D: mov [rbp+var_8], 0 loc_44465: mov rax, [rbp+var_8] pop rbp retn
long long my_strntoull_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6) { bool v8; // [rsp+Ah] [rbp-76h] unsigned __int8 v9; // [rsp+Bh] [rbp-75h] unsigned __int8 v10; // [rsp+Bh] [rbp-75h] int v11; // [rsp+Ch] [rbp-74h] _BYTE *v12; // [rsp+10h] [rbp-70h] _BYTE *v13; // [rsp+18h] [rbp-68h] _BYTE *v14; // [rsp+20h] [rbp-60h] unsigned long long v15; // [rsp+28h] [rbp-58h] unsigned long long v16; // [rsp+38h] [rbp-48h] int v17; // [rsp+44h] [rbp-3Ch] *a6 = 0; v14 = a2; v13 = &a2[a3]; while ( 1 ) { v8 = 0; if ( v14 < v13 ) v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0; if ( !v8 ) break; ++v14; } if ( v14 == v13 ) goto LABEL_39; if ( *v14 == 45 ) { v17 = 1; ++v14; } else { v17 = 0; if ( *v14 == 43 ) ++v14; } v12 = v14; v16 = 0xFFFFFFFFFFFFFFFFLL / a4; v11 = 0; v15 = 0LL; while ( v14 != v13 ) { v9 = *v14; if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u ) { if ( v9 < 0x41u || v9 > 0x5Au ) { if ( v9 < 0x61u || v9 > 0x7Au ) break; v10 = v9 - 97 + 10; } else { v10 = v9 - 65 + 10; } } else { v10 = v9 - 48; } if ( v10 >= a4 ) break; if ( v15 > v16 || v15 == v16 && v10 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) ) v11 = 1; else v15 = v15 * a4 + v10; ++v14; } if ( v14 == v12 ) { LABEL_39: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v14; if ( v11 ) { *a6 = 34; return -1LL; } else if ( v17 ) { return -(long long)v15; } else { return v15; } } }
my_strntoull_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX LAB_00144229: MOV RCX,qword ptr [RBP + -0x60] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x68] MOV byte ptr [RBP + -0x76],AL JNC 0x00144258 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x60] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x76],AL LAB_00144258: MOV AL,byte ptr [RBP + -0x76] TEST AL,0x1 JNZ 0x00144261 JMP 0x00144271 LAB_00144261: JMP 0x00144263 LAB_00144263: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x00144229 LAB_00144271: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x68] JNZ 0x00144280 JMP 0x00144441 LAB_00144280: MOV RAX,qword ptr [RBP + -0x60] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x001442a1 MOV dword ptr [RBP + -0x3c],0x1 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x001442cb LAB_001442a1: MOV RAX,qword ptr [RBP + -0x60] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x001442c2 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x001442c9 LAB_001442c2: MOV dword ptr [RBP + -0x3c],0x0 LAB_001442c9: JMP 0x001442cb LAB_001442cb: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x70],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x48],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x4c],EAX MOV dword ptr [RBP + -0x74],0x0 MOV qword ptr [RBP + -0x58],0x0 LAB_0014430b: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x68] JZ 0x001443e5 MOV RAX,qword ptr [RBP + -0x60] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x75],AL MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x30 JL 0x00144340 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x39 JG 0x00144340 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x30 MOV byte ptr [RBP + -0x75],AL JMP 0x00144388 LAB_00144340: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x41 JL 0x00144361 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x5a JG 0x00144361 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x41 ADD EAX,0xa MOV byte ptr [RBP + -0x75],AL JMP 0x00144386 LAB_00144361: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x61 JL 0x00144382 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x7a JG 0x00144382 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x61 ADD EAX,0xa MOV byte ptr [RBP + -0x75],AL JMP 0x00144384 LAB_00144382: JMP 0x001443e5 LAB_00144384: JMP 0x00144386 LAB_00144386: JMP 0x00144388 LAB_00144388: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,dword ptr [RBP + -0x24] JL 0x00144393 JMP 0x001443e5 LAB_00144393: MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x48] JA 0x001443b0 MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x48] JNZ 0x001443b9 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,dword ptr [RBP + -0x4c] JBE 0x001443b9 LAB_001443b0: MOV dword ptr [RBP + -0x74],0x1 JMP 0x001443d2 LAB_001443b9: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX MOVZX EAX,byte ptr [RBP + -0x75] ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX LAB_001443d2: JMP 0x001443d4 LAB_001443d4: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0014430b LAB_001443e5: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x70] JNZ 0x001443f1 JMP 0x00144441 LAB_001443f1: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00144403 MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00144403: CMP dword ptr [RBP + -0x74],0x0 JZ 0x0014441d MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00144465 LAB_0014441d: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0014442f XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x80],RAX JMP 0x00144437 LAB_0014442f: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x80],RAX LAB_00144437: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x8],RAX JMP 0x00144465 LAB_00144441: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 CMP qword ptr [RBP + -0x30],0x0 JZ 0x0014445d MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_0014445d: MOV qword ptr [RBP + -0x8],0x0 LAB_00144465: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,int8 *param_5, int4 *param_6) { int1 auVar1 [16]; int1 auVar2 [16]; bool bVar3; byte *pbVar4; byte *pbVar5; ulong uVar6; bool bVar7; ulong local_88; byte local_7d; byte *local_68; ulong local_60; *param_6 = 0; pbVar5 = param_2 + param_3; local_68 = param_2; while( true ) { bVar7 = false; if (local_68 < pbVar5) { bVar7 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_68) & 8) != 0; } if (!bVar7) break; local_68 = local_68 + 1; } if (local_68 != pbVar5) { if (*local_68 == 0x2d) { bVar7 = true; local_68 = local_68 + 1; } else { if (*local_68 == 0x2b) { local_68 = local_68 + 1; } bVar7 = false; } pbVar4 = local_68; auVar1._8_8_ = 0; auVar1._0_8_ = (long)param_4; uVar6 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0); auVar2._8_8_ = 0; auVar2._0_8_ = (long)param_4; bVar3 = false; local_60 = 0; for (; local_68 != pbVar5; local_68 = local_68 + 1) { local_7d = *local_68; if ((local_7d < 0x30) || (0x39 < local_7d)) { if ((local_7d < 0x41) || (0x5a < local_7d)) { if ((local_7d < 0x61) || (0x7a < local_7d)) break; local_7d = local_7d + 0xa9; } else { local_7d = local_7d - 0x37; } } else { local_7d = local_7d - 0x30; } if (param_4 <= (int)(uint)local_7d) break; if ((uVar6 < local_60) || ((local_60 == uVar6 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar2,0) < (uint)local_7d))) ) { bVar3 = true; } else { local_60 = (ulong)local_7d + (long)param_4 * local_60; } } if (local_68 != pbVar4) { if (param_5 != (int8 *)0x0) { *param_5 = local_68; } if (bVar3) { *param_6 = 0x22; return 0xffffffffffffffff; } if (bVar7) { local_88 = -local_60; } else { local_88 = local_60; } return local_88; } } *param_6 = 0x21; if (param_5 != (int8 *)0x0) { *param_5 = param_2; } return 0; }
47,698
my_strntoull_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for(; s<e && my_isspace(cs,*s); s++); if (s == e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); overflow = 0; i = 0; for ( ; s != e; s++) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (ulonglong) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) i) : (longlong) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntoull_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0x38aa9 movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0x38aa9 incq %r10 cmpq %r11, %r10 jb 0x38a96 cmpq %r11, %r10 je 0x38b91 movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movslq %ecx, %rbx movq $-0x1, %rax xorl %edx, %edx movq %rbx, -0x38(%rbp) divq %rbx xorl %r12d, %r12d cmpq %r11, %r10 je 0x38b6e movq %rdi, -0x30(%rbp) movq %r10, %r14 xorl %r15d, %r15d movq %r15, %rdi movl %r12d, %r13d movb (%r14), %r12b leal -0x30(%r12), %ebx cmpb $0xa, %bl jb 0x38b1d leal -0x41(%r12), %ebx cmpb $0x19, %bl ja 0x38b0c addb $-0x37, %r12b jmp 0x38b1a leal -0x61(%r12), %ebx cmpb $0x19, %bl ja 0x38b5c addb $-0x57, %r12b movl %r12d, %ebx movzbl %bl, %ebx cmpl %ecx, %ebx jge 0x38b5c movl $0x1, %r12d cmpq %rax, %rdi jbe 0x38b34 movq %rdi, %r15 jmp 0x38b4b jne 0x38b3d movq %rax, %r15 cmpl %edx, %ebx ja 0x38b4b imulq -0x38(%rbp), %rdi movl %ebx, %r15d addq %rdi, %r15 movl %r13d, %r12d incq %r14 cmpq %r11, %r14 jne 0x38ae9 movq %r15, %rdi movq %r11, %r14 movl %r12d, %r13d testl %r13d, %r13d sete %al movq %rdi, %r12 movq %r14, %r11 movq -0x30(%rbp), %rdi jmp 0x38b70 movb $0x1, %al cmpq %r10, %r11 je 0x38b91 testq %r8, %r8 je 0x38b7d movq %r11, (%r8) testb %al, %al je 0x38ba4 movq %r12, %rax negq %rax cmpb $0x2d, %dil cmovneq %r12, %rax jmp 0x38bb2 movl $0x21, (%r9) testq %r8, %r8 je 0x38ba0 movq %rsi, (%r8) xorl %eax, %eax jmp 0x38bb2 movl $0x22, (%r9) movq $-0x1, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strntoull_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_38AA9 mov rax, [rdi+40h] mov r10, rsi loc_38A96: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_38AA9 inc r10 cmp r10, r11 jb short loc_38A96 loc_38AA9: cmp r10, r11 jz loc_38B91 mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 movsxd rbx, ecx mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_38], rbx div rbx xor r12d, r12d cmp r10, r11 jz loc_38B6E mov [rbp+var_30], rdi mov r14, r10 xor r15d, r15d loc_38AE9: mov rdi, r15 mov r13d, r12d mov r12b, [r14] lea ebx, [r12-30h] cmp bl, 0Ah jb short loc_38B1D lea ebx, [r12-41h] cmp bl, 19h ja short loc_38B0C add r12b, 0C9h jmp short loc_38B1A loc_38B0C: lea ebx, [r12-61h] cmp bl, 19h ja short loc_38B5C add r12b, 0A9h loc_38B1A: mov ebx, r12d loc_38B1D: movzx ebx, bl cmp ebx, ecx jge short loc_38B5C mov r12d, 1 cmp rdi, rax jbe short loc_38B34 mov r15, rdi jmp short loc_38B4B loc_38B34: jnz short loc_38B3D mov r15, rax cmp ebx, edx ja short loc_38B4B loc_38B3D: imul rdi, [rbp+var_38] mov r15d, ebx add r15, rdi mov r12d, r13d loc_38B4B: inc r14 cmp r14, r11 jnz short loc_38AE9 mov rdi, r15 mov r14, r11 mov r13d, r12d loc_38B5C: test r13d, r13d setz al mov r12, rdi mov r11, r14 mov rdi, [rbp+var_30] jmp short loc_38B70 loc_38B6E: mov al, 1 loc_38B70: cmp r11, r10 jz short loc_38B91 test r8, r8 jz short loc_38B7D mov [r8], r11 loc_38B7D: test al, al jz short loc_38BA4 mov rax, r12 neg rax cmp dil, 2Dh ; '-' cmovnz rax, r12 jmp short loc_38BB2 loc_38B91: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_38BA0 mov [r8], rsi loc_38BA0: xor eax, eax jmp short loc_38BB2 loc_38BA4: mov dword ptr [r9], 22h ; '"' mov rax, 0FFFFFFFFFFFFFFFFh loc_38BB2: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strntoull_8bit( long long a1, unsigned __int8 *a2, long long a3, int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned long long v10; // rax unsigned long long v11; // r12 unsigned __int8 *v12; // r14 unsigned long long v13; // r15 unsigned long long v14; // rdi int v15; // r13d unsigned __int8 v16; // r12 unsigned __int8 v17; // bl unsigned __int8 v18; // r12 bool v19; // al long long result; // rax unsigned __int8 v21; // [rsp+8h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_30; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFFFFFFFFFFLL / a4; v11 = 0LL; if ( v9 == v6 ) { v19 = 1; } else { v21 = v8; v12 = v9; v13 = 0LL; while ( 1 ) { v14 = v13; v15 = v11; v16 = *v12; v17 = *v12 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= a4 ) break; LODWORD(v11) = 1; if ( v13 <= v10 ) { if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v13 = a4 * v14 + v17; LODWORD(v11) = v15; } } if ( ++v12 == v6 ) { v14 = v13; v12 = &a2[a3]; v15 = v11; break; } } v19 = v15 == 0; v11 = v14; v6 = v12; v8 = v21; } if ( v6 == v9 ) { LABEL_30: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v6; if ( v19 ) { result = -(long long)v11; if ( v8 != 45 ) return v11; } else { *a6 = 34; return -1LL; } } return result; }
my_strntoull_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x00138aa9 MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_00138a96: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x00138aa9 INC R10 CMP R10,R11 JC 0x00138a96 LAB_00138aa9: CMP R10,R11 JZ 0x00138b91 MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOVSXD RBX,ECX MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x38],RBX DIV RBX XOR R12D,R12D CMP R10,R11 JZ 0x00138b6e MOV qword ptr [RBP + -0x30],RDI MOV R14,R10 XOR R15D,R15D LAB_00138ae9: MOV RDI,R15 MOV R13D,R12D MOV R12B,byte ptr [R14] LEA EBX,[R12 + -0x30] CMP BL,0xa JC 0x00138b1d LEA EBX,[R12 + -0x41] CMP BL,0x19 JA 0x00138b0c ADD R12B,0xc9 JMP 0x00138b1a LAB_00138b0c: LEA EBX,[R12 + -0x61] CMP BL,0x19 JA 0x00138b5c ADD R12B,0xa9 LAB_00138b1a: MOV EBX,R12D LAB_00138b1d: MOVZX EBX,BL CMP EBX,ECX JGE 0x00138b5c MOV R12D,0x1 CMP RDI,RAX JBE 0x00138b34 MOV R15,RDI JMP 0x00138b4b LAB_00138b34: JNZ 0x00138b3d MOV R15,RAX CMP EBX,EDX JA 0x00138b4b LAB_00138b3d: IMUL RDI,qword ptr [RBP + -0x38] MOV R15D,EBX ADD R15,RDI MOV R12D,R13D LAB_00138b4b: INC R14 CMP R14,R11 JNZ 0x00138ae9 MOV RDI,R15 MOV R14,R11 MOV R13D,R12D LAB_00138b5c: TEST R13D,R13D SETZ AL MOV R12,RDI MOV R11,R14 MOV RDI,qword ptr [RBP + -0x30] JMP 0x00138b70 LAB_00138b6e: MOV AL,0x1 LAB_00138b70: CMP R11,R10 JZ 0x00138b91 TEST R8,R8 JZ 0x00138b7d MOV qword ptr [R8],R11 LAB_00138b7d: TEST AL,AL JZ 0x00138ba4 MOV RAX,R12 NEG RAX CMP DIL,0x2d CMOVNZ RAX,R12 JMP 0x00138bb2 LAB_00138b91: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x00138ba0 MOV qword ptr [R8],RSI LAB_00138ba0: XOR EAX,EAX JMP 0x00138bb2 LAB_00138ba4: MOV dword ptr [R9],0x22 MOV RAX,-0x1 LAB_00138bb2: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5, int4 *param_6) { byte bVar1; byte bVar2; int1 auVar3 [16]; int1 auVar4 [16]; ulong uVar5; ulong uVar6; ulong uVar7; byte *pbVar8; byte *pbVar9; byte bVar10; ulong uVar11; ulong uVar12; int iVar13; byte *pbVar14; bool bVar15; *param_6 = 0; pbVar9 = param_2 + param_3; pbVar8 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break; pbVar8 = pbVar8 + 1; } while (pbVar8 < pbVar9); } if (pbVar8 != pbVar9) { bVar1 = *pbVar8; pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)param_4; auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar6 = SUB168(auVar4 / auVar3,0); uVar7 = 0; if (pbVar8 == pbVar9) { bVar15 = true; } else { uVar11 = uVar7; pbVar14 = pbVar8; uVar7 = 0; do { iVar13 = (int)uVar11; bVar2 = *pbVar14; bVar10 = bVar2 - 0x30; if (9 < bVar10) { if ((byte)(bVar2 + 0xbf) < 0x1a) { bVar10 = bVar2 - 0x37; } else { if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_00138b5c; bVar10 = bVar2 + 0xa9; } } if (param_4 <= (int)(uint)bVar10) goto LAB_00138b5c; uVar12 = 1; uVar5 = uVar7; if ((uVar7 <= uVar6) && ((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) { uVar12 = uVar11; uVar5 = (ulong)bVar10 + uVar7 * (long)param_4; } uVar7 = uVar5; pbVar14 = pbVar14 + 1; uVar11 = uVar12; } while (pbVar14 != pbVar9); iVar13 = (int)uVar12; pbVar14 = pbVar9; LAB_00138b5c: pbVar9 = pbVar14; bVar15 = iVar13 == 0; } if (pbVar9 != pbVar8) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar9; } if (bVar15) { if (bVar1 == 0x2d) { return -uVar7; } return uVar7; } *param_6 = 0x22; return 0xffffffffffffffff; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
47,699
fs_get_cache_directory[abi:cxx11]()
monkey531[P]llama/common/common.cpp
std::string fs_get_cache_directory() { std::string cache_directory = ""; auto ensure_trailing_slash = [](std::string p) { // Make sure to add trailing slash if (p.back() != DIRECTORY_SEPARATOR) { p += DIRECTORY_SEPARATOR; } return p; }; if (getenv("LLAMA_CACHE")) { cache_directory = std::getenv("LLAMA_CACHE"); } else { #ifdef __linux__ if (std::getenv("XDG_CACHE_HOME")) { cache_directory = std::getenv("XDG_CACHE_HOME"); } else { cache_directory = std::getenv("HOME") + std::string("/.cache/"); } #elif defined(__APPLE__) cache_directory = std::getenv("HOME") + std::string("/Library/Caches/"); #elif defined(_WIN32) cache_directory = std::getenv("LOCALAPPDATA"); #endif // __linux__ cache_directory = ensure_trailing_slash(cache_directory); cache_directory += "llama.cpp"; } return ensure_trailing_slash(cache_directory); }
O2
cpp
fs_get_cache_directory[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx subq $0xb0, %rsp movq %rdi, %rbx leaq 0x55048(%rip), %rsi # 0xa9151 leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x25c26 leaq 0x5dacd(%rip), %rdi # 0xb1bec callq 0x23a50 testq %rax, %rax je 0x5413b leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x24080 jmp 0x54213 leaq 0x5dab6(%rip), %rdi # 0xb1bf8 callq 0x23a50 testq %rax, %rax je 0x5415b leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x24080 jmp 0x541bf leaq 0x5daa0(%rip), %rdi # 0xb1c02 callq 0x23a50 movq %rax, %r14 leaq 0x5da96(%rip), %rsi # 0xb1c07 leaq 0x90(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x25c26 leaq 0x30(%rsp), %rdi leaq 0x90(%rsp), %rdx movq %r14, %rsi callq 0x57b16 leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %r14 movq %r14, %rsi callq 0x23a70 movq %r14, %rdi callq 0x24158 leaq 0x90(%rsp), %rdi callq 0x24158 leaq 0x70(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x23ba0 leaq 0x30(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x54292 leaq 0x10(%rsp), %r14 leaq 0x30(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x23a70 movq %r15, %rdi callq 0x24158 leaq 0x70(%rsp), %rdi callq 0x24158 leaq 0x5da05(%rip), %rsi # 0xb1c10 movq %r14, %rdi callq 0x24070 leaq 0x50(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x23ba0 leaq 0x50(%rsp), %rsi movq %rbx, %rdi callq 0x54292 leaq 0x50(%rsp), %rdi callq 0x24158 leaq 0x10(%rsp), %rdi callq 0x24158 movq %rbx, %rax addq $0xb0, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x90(%rsp), %rdi jmp 0x54276 jmp 0x5427d movq %rax, %rbx leaq 0x70(%rsp), %rdi jmp 0x54276 jmp 0x5427d movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x24158 jmp 0x54280 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x24158 movq %rbx, %rdi callq 0x23f10
_Z22fs_get_cache_directoryB5cxx11v: push r15 push r14 push rbx sub rsp, 0B0h mov rbx, rdi lea rsi, aExampleSpecifi+1Fh; "" lea rdi, [rsp+0C8h+var_B8] lea rdx, [rsp+0C8h+var_98] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, aLlamaCache; "LLAMA_CACHE" call _getenv test rax, rax jz short loc_5413B lea rdi, [rsp+0C8h+var_B8] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) jmp loc_54213 loc_5413B: lea rdi, aXdgCacheHome; "XDG_CACHE_HOME" call _getenv test rax, rax jz short loc_5415B lea rdi, [rsp+0C8h+var_B8] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) jmp short loc_541BF loc_5415B: lea rdi, aXdgCacheHome+0Ah; "HOME" call _getenv mov r14, rax lea rsi, aCache; "/.cache/" lea rdi, [rsp+0C8h+var_38] lea rdx, [rsp+0C8h+var_B9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0C8h+var_98] lea rdx, [rsp+0C8h+var_38] mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+0C8h+var_B8] lea r14, [rsp+0C8h+var_98] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_541BF: lea rdi, [rsp+0C8h+var_58] lea rsi, [rsp+0C8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rdi, [rsp+0C8h+var_98] lea rsi, [rsp+0C8h+var_58] call _ZZ22fs_get_cache_directoryB5cxx11vENK3$_0clENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_directory(void)::$_0::operator()(std::string) lea r14, [rsp+0C8h+var_B8] lea r15, [rsp+0C8h+var_98] mov rdi, r14 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, aLlamaCpp; "llama.cpp" mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_54213: lea rdi, [rsp+0C8h+var_78] lea rsi, [rsp+0C8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rsi, [rsp+0C8h+var_78] mov rdi, rbx call _ZZ22fs_get_cache_directoryB5cxx11vENK3$_0clENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_directory(void)::$_0::operator()(std::string) lea rdi, [rsp+0C8h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 0B0h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_88] jmp short loc_54276 jmp short loc_5427D mov rbx, rax lea rdi, [rsp+arg_68] jmp short loc_54276 jmp short loc_5427D mov rbx, rax lea rdi, [rsp+arg_48]; void * loc_54276: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_54280 loc_5427D: mov rbx, rax loc_54280: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long fs_get_cache_directory[abi:cxx11](long long a1) { long long v1; // rax long long v2; // rax long long v3; // r14 _QWORD v5[4]; // [rsp+10h] [rbp-B8h] BYREF _BYTE v6[32]; // [rsp+30h] [rbp-98h] BYREF _BYTE v7[32]; // [rsp+50h] [rbp-78h] BYREF _BYTE v8[32]; // [rsp+70h] [rbp-58h] BYREF _QWORD v9[7]; // [rsp+90h] [rbp-38h] BYREF std::string::basic_string<std::allocator<char>>(v5, (long long)""); v1 = getenv("LLAMA_CACHE"); if ( v1 ) { std::string::assign(v5, v1); } else { v2 = getenv("XDG_CACHE_HOME"); if ( v2 ) { std::string::assign(v5, v2); } else { v3 = getenv("HOME"); std::string::basic_string<std::allocator<char>>(v9, (long long)"/.cache/"); std::operator+<char>(v6, v3, v9); std::string::operator=(v5, v6); std::string::~string(v6); std::string::~string(v9); } std::string::basic_string(v8, v5); fs_get_cache_directory[abi:cxx11](void)::$_0::operator()(v6, v8); std::string::operator=(v5, v6); std::string::~string(v6); std::string::~string(v8); std::string::append(v5, "llama.cpp"); } std::string::basic_string(v7, v5); fs_get_cache_directory[abi:cxx11](void)::$_0::operator()(a1, v7); std::string::~string(v7); std::string::~string(v5); return a1; }
fs_get_cache_directory[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xb0 MOV RBX,RDI LEA RSI,[0x1a9151] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x30] CALL 0x00125c26 LEA RDI,[0x1b1bec] CALL 0x00123a50 TEST RAX,RAX JZ 0x0015413b LAB_00154129: LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x00124080 JMP 0x00154213 LAB_0015413b: LEA RDI,[0x1b1bf8] CALL 0x00123a50 TEST RAX,RAX JZ 0x0015415b LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x00124080 JMP 0x001541bf LAB_0015415b: LEA RDI,[0x1b1c02] CALL 0x00123a50 MOV R14,RAX LAB_0015416a: LEA RSI,[0x1b1c07] LEA RDI,[RSP + 0x90] LEA RDX,[RSP + 0xf] CALL 0x00125c26 LAB_00154183: LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x90] MOV RSI,R14 CALL 0x00157b16 LEA RDI,[RSP + 0x10] LEA R14,[RSP + 0x30] MOV RSI,R14 CALL 0x00123a70 MOV RDI,R14 CALL 0x00124158 LEA RDI,[RSP + 0x90] CALL 0x00124158 LAB_001541bf: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x10] CALL 0x00123ba0 LAB_001541ce: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x70] CALL 0x00154292 LEA R14,[RSP + 0x10] LEA R15,[RSP + 0x30] MOV RDI,R14 MOV RSI,R15 CALL 0x00123a70 MOV RDI,R15 CALL 0x00124158 LEA RDI,[RSP + 0x70] CALL 0x00124158 LAB_00154204: LEA RSI,[0x1b1c10] MOV RDI,R14 CALL 0x00124070 LAB_00154213: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x10] CALL 0x00123ba0 LAB_00154222: LEA RSI,[RSP + 0x50] MOV RDI,RBX CALL 0x00154292 LAB_0015422f: LEA RDI,[RSP + 0x50] CALL 0x00124158 LEA RDI,[RSP + 0x10] CALL 0x00124158 MOV RAX,RBX ADD RSP,0xb0 POP RBX POP R14 POP R15 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* fs_get_cache_directory[abi:cxx11]() */ void fs_get_cache_directory_abi_cxx11_(void) { char *pcVar1; string *psVar2; allocator local_b9; string local_b8 [32]; allocator local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [32]; std::__cxx11::string::string<std::allocator<char>>(local_b8,"",local_98); pcVar1 = getenv("LLAMA_CACHE"); if (pcVar1 == (char *)0x0) { pcVar1 = getenv("XDG_CACHE_HOME"); if (pcVar1 == (char *)0x0) { psVar2 = (string *)getenv("HOME"); /* try { // try from 0015416a to 00154182 has its CatchHandler @ 00154260 */ std::__cxx11::string::string<std::allocator<char>>(local_38,"/.cache/",&local_b9); /* try { // try from 00154183 to 00154197 has its CatchHandler @ 00154253 */ std::operator+((char *)local_98,psVar2); std::__cxx11::string::operator=(local_b8,(string *)local_98); std::__cxx11::string::~string((string *)local_98); std::__cxx11::string::~string(local_38); } else { std::__cxx11::string::assign((char *)local_b8); } /* try { // try from 001541bf to 001541cd has its CatchHandler @ 0015426c */ std::__cxx11::string::string(local_58,local_b8); /* try { // try from 001541ce to 001541dc has its CatchHandler @ 00154262 */ fs_get_cache_directory[abi:cxx11]()::$_0::operator()((__0 *)local_98,local_58); std::__cxx11::string::operator=(local_b8,(string *)local_98); std::__cxx11::string::~string((string *)local_98); std::__cxx11::string::~string(local_58); /* try { // try from 00154204 to 00154221 has its CatchHandler @ 0015427d */ std::__cxx11::string::append((char *)local_b8); } else { /* try { // try from 00154129 to 00154158 has its CatchHandler @ 0015427d */ std::__cxx11::string::assign((char *)local_b8); } std::__cxx11::string::string(local_78,local_b8); /* try { // try from 00154222 to 0015422e has its CatchHandler @ 0015426e */ fs_get_cache_directory[abi:cxx11]()::$_0::operator()(); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_b8); return; }